A Llama-family decoder-only language model built from a Hugging Face config, and loading its Hugging Face weights by name (IO-4).
More...
|
| class | pulsatrix::ResidualIntervention |
| | A trainable edit of the residual stream after a transformer block (TRN-9: LoReFT), run by CausalLM::set_intervention(). Maps hidden states (N, L, hidden_size) to the same shape and, as a Module, trains and explains with the model. More...
|
| |
| class | pulsatrix::CausalLM |
| | Token embedding, num_hidden_layers pre-norm transformer blocks, a final RMSNorm and a language-model head (tied to the embedding or its own bias-free Linear): the architecture of Llama, SmolLM2, Qwen2/2.5 and Qwen3. Maps (N, L) token ids to (N, L, vocab) logits. More...
|
| |
| struct | pulsatrix::WeightMapping |
| | One entry of a name-mapping manifest. More...
|
| |
| struct | pulsatrix::WeightLoadOptions |
| | Loading settings. More...
|
| |
| struct | pulsatrix::WeightLoadReport |
| | What a load did. More...
|
| |
|
| Tensor | pulsatrix::detail::ApplyHiddenStateHook (const HiddenStateHook &hook, int64_t position, const Tensor &x) |
| | Runs hook and checks its result keeps the shape.
|
| |
| WeightLoadReport | pulsatrix::LoadWeights (Module &model, const HfCheckpoint &checkpoint, const std::vector< WeightMapping > &mapping, const WeightLoadOptions &options={}) |
| | Loads checkpoint tensors into model's named parameters and buffers by mapping. Every tensor is read, converted to fp32 (IO-6), sliced and transformed, and checked against its target's shape before anything is written, so a failed load leaves the model unchanged.
|
| |
| std::vector< WeightMapping > | pulsatrix::HuggingFaceMapping (const HfModelConfig &config) |
| | The manifest for a Llama-family Hugging Face checkpoint (model.embed_tokens.weight, model.layers.<i>.self_attn.q_proj.weight, ..., model.norm.weight, lm_head.weight) onto CausalLM's parameters: Linear weights transposed, biases and norms as they are.
|
| |
| std::unique_ptr< CausalLM > | pulsatrix::LoadCausalLM (const std::string &directory, DeviceBackend *backend) |
| | Reads config.json and the weights in a downloaded Hugging Face model directory into a new CausalLM, strictly: a tied checkpoint's lm_head.weight is the only tensor allowed to go unused.
|
| |
A Llama-family decoder-only language model built from a Hugging Face config, and loading its Hugging Face weights by name (IO-4).