/** * import/foreign/infer.ts — a Mamba-1 checkpoint's config, read off its tensors. * * `state-spaces/mamba-*` repositories publish `model.safetensors` with a * `config.json` in the original Mamba-SSM vocabulary (`d_model`, `n_layer`, …) * that no adapter reads, and a dropped safetensors file often arrives with no * config at all. Every geometry fact the port needs is in the tensor shapes, so * this derives the Hugging Face `MambaConfig` the {@link mambaAdapter} expects * instead of anyone restating the derivation. */ import type { NamedTensor } from "../../export/tensors.js"; import type { ForeignConfig } from "./adapter.js"; /** * The `MambaForCausalLM` config implied by a Mamba-1 checkpoint's tensors: * embedding `[vocab, d_model]`, per-layer `in_proj [2·d_inner, d_model]`, * `conv1d [d_inner, (1,) d_conv]`, `A_log [d_inner, d_state]` and * `x_proj [dt_rank + 2·d_state, d_inner]`. */ export declare function mambaConfigFromTensors(tensors: readonly NamedTensor[]): ForeignConfig; //# sourceMappingURL=infer.d.ts.map