Downloads · 30 days
61
25% of all-time downloads
jaswanthsanjay88/mara-small
mara-small is a text generation model from jaswanthsanjay88. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A 24.6M parameter GPT trained from scratch (random init → coherent children's stories) on the TinyStories corpus. Designed as the base model of the mara project: a small-model-first family targeting browser inference…
Downloads · 30 days
61
25% of all-time downloads
All-time downloads
248
Public
Parameters
28.8M
135 MB on disk
Likes
1
Public
Click a slice to open those files.
.onnx77.2 MB · 57%
From the Hugging Face model README
A 24.6M parameter GPT trained from scratch (random init → coherent children's stories) on the TinyStories corpus. Designed as the base model of the mara project: a small-model-first family targeting browser inference and microcontrollers.
Live demo (runs in your browser, no server): https://huggingface.co/spaces/jaswanthsanjay88/mara-demo
| Config | Value |
|---|---|
| Parameters | 24,648,192 |
| Layers | 6 |
| d_model | 512 |
| Heads | 8 (head_dim 64) |
| FFN | SwiGLU, hidden 1,536 |
| Positional | RoPE |
| Norm | RMSNorm (pre-norm) |
| Context | 512 tokens |
| Vocab | 8,192 custom byte-level BPE (trained on TinyStories) |
| File | Size | Purpose |
|---|---|---|
model.safetensors | ~50 MB | fp16 PyTorch weights (training/fine-tuning) |
model_fp16.onnx | 50 MB | browser inference via WebGPU |
model_int8.onnx | 27 MB | browser inference via WASM (all browsers) |
tokenizer.json | — | custom 8k BPE (`< |
config.json | — | architecture hyperparameters |
The architecture is custom (mara/model.py in the source repo): RoPE + SwiGLU + tied embeddings. Load weights like so:
import json, torch
from safetensors.torch import load_file
from mara.model import Mara, MaraConfig # from the mara repo
from mara.tokenizer import load_tokenizer
cfg = MaraConfig(**json.load(open("config.json")))
model = Mara(cfg)
model.load_state_dict({k: v.float() for k, v in load_file("model.safetensors").items()})
model.eval()
tok = load_tokenizer("tokenizer.json")
ids = torch.tensor([tok.encode("Once upon a time")])
print(tok.decode(model.generate(ids, max_new_tokens=200)[0].tolist()))
This model is the teacher for a distilled intent-parsing student that runs fully offline on an ESP32-S3 for smart-home control.