core/format: read nemotron_h checkpoints

Nemotron-3.5-Bolt's config nests its language model under llm_config, which is now read as
text_config is; arrays of objects (Puzzle's block_configs) become flat keys,
block_configs.<i>.<field>; a checkpoint without num_hidden_layers counts layers_block_type; and a
drafter merged from its own checkpoint keeps its own quantisation (Checkpoint::imports_at).
This commit is contained in:
keptn42 committed 2026-11-04 22:08:06 +01:00
1 parent e6787b7bdd
commit a1b7643310
2 files changed
+100 -30

No files matched your search

+9
View File
@@ -187,6 +187,12 @@ public:
enum class Import { None, Gptq, QuarkMx, CtInt4, ParoMx, ParoM2, ParoI5, ParoI4, Nvfp4, CtFp8,
ModelOpt };
Import imports() const { return import_; }
/* The form `name` is read in: a drafter merged by add_draft ships its own quantisation (a
* ModelOpt NVFP4 drafter beside a bf16 target), so names under its prefix take that one. */
Import imports_at(const std::string& name) const {
return draft_import_ != Import::None && name.rfind(draft_prefix_, 0) == 0 ? draft_import_
: import_;
}
const std::string& import_refusal() const { return import_why_; }
/* The pieces an imported `name` (a `.weight`) is read from, as views owned here: GPTQ-packed
@@ -231,6 +237,9 @@ private:
int64_t fp8_br_ = 128, fp8_bc_ = 128;
Import import_ = Import::None;
std::string import_why_;
/* add_draft's drafter, when it ships a quantisation of its own: the form and the prefix. */
Import draft_import_ = Import::None;
std::string draft_prefix_;
int64_t ct_group_ = 0; /* CtInt4: the group every weight's config states */
bool ct_asym_ = false; /* CtInt4: the config states asymmetric weights */
/* import_piece's answers by name, so a weight resolved twice reuses its views. */