Views
No views yet
| Component | Details |
|---|---|
| Layers | 24 × TENNsBlock (gate mode) |
| Hidden dim | 2048 |
| Inner dim | 4096 |
| Vocabulary | 32,000 (Mistral-7B tokenizer) |
| Parameters | ~1B |
RMSNorm → in_proj → causal_conv(4) → SSM(gate) → out_proj → residual1!pip install transformers torch einops opt_einsum safetensors
2
3from transformers import AutoModelForCausalLM, AutoTokenizer
4
5tokenizer = AutoTokenizer.from_pretrained("BrainChipInc/tenns-llm-1b")
6model = AutoModelForCausalLM.from_pretrained(
7 "BrainChipInc/tenns-llm-1b",
8 trust_remote_code=True,
9)
10
11output = model.generate_text("The history of artificial intelligence", tokenizer, max_new_tokens=100)
12print(output)Do not usepipeline()— this model uses a custom recurrent architecture that is not compatible with HuggingFace's standard text-generation pipeline.
pip install transformers torch einops opt_einsum safetensorsNote: Do not usepipeline()— this model requiresmodel.generate_text()instead of HuggingFace's standardgenerate(). The recurrent SSM architecture is not compatible with the attention KV-cache pipeline.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3tokenizer = AutoTokenizer.from_pretrained("BrainChipInc/tenns-llm-1b")
4model = AutoModelForCausalLM.from_pretrained(
5 "BrainChipInc/tenns-llm-1b",
6 trust_remote_code=True,
7)
8
9output = model.generate_text("The history of artificial intelligence", tokenizer, max_new_tokens=100)
10print(output)1# Greedy decoding (default)
2output = model.generate_text(prompt, tokenizer, max_new_tokens=50)
3
4# Top-k sampling with temperature
5output = model.generate_text(prompt, tokenizer, max_new_tokens=100, temperature=0.8, top_k=50)trust_remote_code=Truemodeling_tenns_llm.py, configuration_tenns_llm.py, tenns_core/).
Loading requires trust_remote_code=True. The bundled tenns_core/ package
is a snapshot of the TENNs Core SSM library — no separate installation needed.generate_text()