Instructions to use vaprooll/MiraLM-47M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vaprooll/MiraLM-47M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vaprooll/MiraLM-47M")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("vaprooll/MiraLM-47M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vaprooll/MiraLM-47M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vaprooll/MiraLM-47M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vaprooll/MiraLM-47M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/vaprooll/MiraLM-47M
- SGLang
How to use vaprooll/MiraLM-47M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "vaprooll/MiraLM-47M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vaprooll/MiraLM-47M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "vaprooll/MiraLM-47M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vaprooll/MiraLM-47M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use vaprooll/MiraLM-47M with Docker Model Runner:
docker model run hf.co/vaprooll/MiraLM-47M
MiraLM-47M
A 47,640,968-parameter hybrid language model trained from scratch โ no pretrained weights, no distillation โ under a hard 50,000,000 cap, on a single Tesla T4. Interleaved Mamba โฅ attention blocks (Jamba-style) with a sparse top-2-of-8 mixture of experts whose router is domain-seeded by a guide loss.
This repository holds the step-11,000 best checkpoint (train loss 2.2113, perplexity 9.13) โ the run that carries the measured results below. The step-17,000 "last" checkpoint diverged (loss 2.587) and is deliberately not published.
Measured results
| Model | HellaSwag | ARC-Easy | PIQA | WinoGrande | WikiText-103 PPL |
|---|---|---|---|---|---|
| MiraLM-47M | 33.0 | 27.0 | 50.0 | 50.2 | 2837.6 |
Read honestly: at 47.6M parameters and 45,056,000 tokens โ roughly 4.7% of the Chinchilla-optimal budget for this size โ the model is undertrained by construction. Multiple-choice commonsense sits near its random floor, and the WikiText-103 perplexity reflects a domain shift, since the training corpus is code / math / web text, not prose. The claim is not "we win on HellaSwag". It is that the whole pipeline โ architecture, budget enforcement, data, routing, structured SFT, evaluation โ runs end to end, reproduces from one config, and fits the ceiling.
Load it
git clone https://github.com/qtttyr/MiraLM && cd MiraLM
from src.model.hf_interface import MiraLMForCausalLM # registers model_type "mira"
from transformers import AutoTokenizer
repo = "vaprooll/MiraLM-47M"
model = MiraLMForCausalLM.from_pretrained(repo).eval()
tok = AutoTokenizer.from_pretrained(repo)
prompt = "<|json|> Return a JSON object with product, price and stock: product mug, price 500, stock 23."
ids = tok(prompt, return_tensors="pt")
out = model.generate(**ids, max_new_tokens=64, do_sample=False)
print(tok.decode(out[0][ids["input_ids"].shape[1]:]))
No trust_remote_code needed: importing hf_interface registers the mira
model type locally, so from_pretrained resolves the checkpoint.
- Downloads last month
- 204