{"record":{"id":"606a7aee21cacf4b","repo":"huggingface/candle","slug":"new-decoder-architecture-is-not-supported","errorCode":null,"errorMessage":"new_decoder_architecture is not supported","messagePattern":"new_decoder_architecture is not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"candle-transformers/src/models/falcon.rs","lineNumber":79,"sourceCode":"            hidden_dropout: 0.0,\n            attention_dropout: 0.0,\n            n_head_kv: None,\n            alibi: false,\n            new_decoder_architecture: false,\n            multi_query: true,\n            parallel_attn: true,\n            bias: false,\n        }\n    }\n}\n\nimpl Config {\n    pub fn validate(&self) -> Result<()> {\n        if self.alibi {\n            candle::bail!(\"alibi is not supported\");\n        }\n        if self.new_decoder_architecture {\n            candle::bail!(\"new_decoder_architecture is not supported\");\n        }\n        if self.n_head_kv.is_some() {\n            candle::bail!(\"n_head_kv is not supported\");\n        }\n        Ok(())\n    }\n\n    // https://huggingface.co/tiiuae/falcon-7b/blob/main/config.json\n    pub fn falcon7b() -> Self {\n        // This is currently on par with the defaults, the defaults come from the Python default\n        // arguments for the config initialization whereas the following come from the json config.\n        Self {\n            vocab_size: 65024,\n            hidden_size: 4544,\n            num_hidden_layers: 32,\n            num_attention_heads: 71,\n            layer_norm_epsilon: 1e-5,\n            initializer_range: 0.02,","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/huggingface/candle/blob/d5fee525bfde3273eb7c9b75fd2bc4937be867ca/candle-transformers/src/models/falcon.rs#L61-L97","documentation":"Falcon's Config::validate rejects new_decoder_architecture == true. The newer Falcon architecture (used by falcon-40b and later variants with parallel attention/MLP and multi-query layers) is not implemented in candle's Falcon model, so the config is rejected before construction.","triggerScenarios":"Loading a Falcon config.json from a new-architecture model (e.g. falcon-40b, falcon-180b) and calling validate(), usually via main when running the falcon example or inference binary.","commonSituations":"Downloading the newest/largest Falcon checkpoint from HuggingFace and assuming candle supports it; only classic (falcon-7b style, new_decoder_architecture:false) checkpoints work.","solutions":["Switch to a classic-architecture checkpoint such as tiiuae/falcon-7b or falcon-7b-instruct.","Check the model's config.json for new_decoder_architecture before downloading and pick a variant with it set to false.","If you need the new architecture, file/watch for upstream support in candle or implement the parallel-decoder path yourself."],"exampleFix":"// before\nlet config = Config::from_json(&hf_hub_json(\"falcon-40b\")?)?;\nconfig.validate()?; // bails\n// after\nlet config = Config::from_json(&hf_hub_json(\"falcon-7b\")?)?;\nconfig.validate()?; // ok","handlingStrategy":"validation","validationCode":"if config.new_decoder_architecture {\n    return Err(anyhow::anyhow!(\"new-architecture falcon (40b/180b) unsupported; use falcon-7b class models\"));\n}\nconfig.validate()?;","typeGuard":"fn is_classic_falcon(c: &Config) -> bool { !c.new_decoder_architecture }","tryCatchPattern":"config.validate().map_err(|e| {\n    if e.to_string().contains(\"new_decoder_architecture\") {\n        anyhow!(\"choose a classic-architecture falcon checkpoint (e.g. falcon-7b-instruct)\")\n    } else { e.into() }\n})?;","preventionTips":["Verify new_decoder_architecture is false in config.json before using a checkpoint.","Prefer candle's built-in presets (Config::falcon7b()).","Track candle releases for new-architecture support before attempting larger falcon models."],"tags":["config","falcon","unsupported-architecture","candle"],"backgroundTag":"unsupported-model-config","analyzedSha":"d5fee525bfde3273eb7c9b75fd2bc4937be867ca","analyzedAt":"2026-09-02T00:15:47.023Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}