Instructions to use JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu") model = AutoModelForCausalLM.from_pretrained("JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu
- SGLang
How to use JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu 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 "JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu" \ --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": "JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu", "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 "JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu" \ --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": "JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu with Docker Model Runner:
docker model run hf.co/JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu
T2MLR_Baseline_136M_50B_FineWebEdu
A dense Transformer baseline for T2MLR (Transformer with Temporal Middle-Layer Recurrence): a 136M-parameter Llama-style model pretrained from scratch on FineWeb-Edu for ~51.5B tokens, with no recurrence.
It is parameter-matched to its T2MLR counterpart
JupiterZhu/T2MLR_135M_lstart13_lend18_50B_FineWebEdu: same
SmolLM2-style architecture and training recipe, with the hidden size widened so the
total parameter count matches the T2MLR model's (which spends extra parameters on its
recurrent mixing module).
Configuration
| Parameters | 136.4M |
| Layers | 30 |
| Hidden size | 584 |
| Intermediate (MLP) size | 1536 |
| Attention heads / KV heads | 9 / 3 |
| Vocabulary | 49,152 (SmolLM2 tokenizer), tied embeddings |
| Precision | bfloat16 |
| Training tokens | ~51.5B (100,000 steps) |
| Final training loss | 2.7776 |
Usage
This is a standard LlamaForCausalLM — no custom code required.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "JupiterZhu/T2MLR_Baseline_136M_50B_FineWebEdu"
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16).eval()
tok = AutoTokenizer.from_pretrained(repo)
inputs = tok("The capital of France is", return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=32, do_sample=False)
print(tok.decode(out[0], skip_special_tokens=True))
Provenance
Trained with the T2MLR codebase's wrapper with recurrence disabled, then exported to a
plain LlamaForCausalLM (dropping the wrapper's unused mixing-module weights). The
export was validated against the original training checkpoint: identical weights,
bitwise-identical logits in fp32 and bf16, and identical greedy generations.
Notes
- This is a base model with no instruction tuning or alignment. Greedy decoding from short prompts is often repetitive.
- For exact reproduction, load with
from_pretrained(..., dtype=torch.bfloat16)rather than loading in fp32 and calling.to(torch.bfloat16): the latter also casts the RoPE frequency buffer, which Hugging Face otherwise keeps in fp32. - Outputs may be inaccurate, biased, or offensive, reflecting the pretraining data.
Citation
Official implementation: https://github.com/princeton-pli/T2MLR
- Downloads last month
- 596