Nessim/Nessim-48M-Base
An ultracompact base language model with a hybrid architecture
2 min read
The model is a 48.1-million-parameter language model trained from scratch on 26.4 billion tokens. It features the KLM 1.6 architecture, combining Gated DeltaNet-2 layers (a recurrent-style mechanism) and standard attention, along with a shared-kernel loop and built-in n-gram memory for precise context retention. As a base model, it is designed for text completion rather than chat or instruction-following. It targets developers and researchers exploring efficient, compact language model architectures.
Key features
- Hybrid architecture: A combination of Gated DeltaNet-2, attention layers, and a 163,000-row n-gram memory.
- Recurrent layers: A 6-layer shared core applied 4 times between the prelude and coda.
- Trained from scratch: The model was trained on a 2.64-billion-token text mixture without distillation.
- Easy deployment: Written in pure PyTorch, requiring no complex Triton or flash-linear-attention kernels.
What you can do
- Pipeline integration: Use the model as a foundation for experimenting with custom architectures built on PyTorch and Hugging Face Transformers.
- Benchmarking: Run standard benchmarks (HellaSwag, ARC, PIQA) to evaluate the performance of micromodels.
- Memory research: Study how the built-in n-gram memory and recurrent layer repetition mechanisms perform.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Nessim/Nessim-48M-Base"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True).to(device)
inputs = tokenizer("The three primary colors are", return_tensors="pt").to(device)
outputs = model.generate(**inputs, max_new_tokens=40, do_sample=False)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Read more
Details• Benchmark results: ARC-Easy (47.69), HellaSwag (35.39), PIQA (63.49), Intelligence Index (18.75).
• Hardware requirements: Weights take up 193 MB, and the model runs on a CPU or any GPU (trained on an RTX 5090 and RTX 4090).
• Limitations: English language only, 2048-token context window, no generation KV cache (generation slows down as text grows).
• License: Weights are licensed under CC-BY-NC-4.0 (non-commercial use only), code under Apache-2.0.










Comments