Instructions to use timothywong731/tim-360m-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use timothywong731/tim-360m-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="timothywong731/tim-360m-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("timothywong731/tim-360m-base") model = AutoModelForCausalLM.from_pretrained("timothywong731/tim-360m-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use timothywong731/tim-360m-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "timothywong731/tim-360m-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "timothywong731/tim-360m-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/timothywong731/tim-360m-base
- SGLang
How to use timothywong731/tim-360m-base 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 "timothywong731/tim-360m-base" \ --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": "timothywong731/tim-360m-base", "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 "timothywong731/tim-360m-base" \ --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": "timothywong731/tim-360m-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use timothywong731/tim-360m-base with Docker Model Runner:
docker model run hf.co/timothywong731/tim-360m-base
TIM-360M-base
A 361.8M-parameter decoder-only transformer, trained from scratch on ~30B tokens on 2× RTX 4090. Part of TIM (Transformer Inference Model) — an end-to-end, from-scratch LLM built to be legible and honestly evaluated.
Exported as Qwen3ForCausalLM — it loads with transformers and no trust_remote_code.
Architecture
SmolLM2-360M skeleton with modern choices: pre-LN RMSNorm, RoPE (θ=100000), SwiGLU, grouped-query attention (15 query / 5 KV heads) with per-head QK-norm, tied embeddings, no biases. 32 layers, hidden 960, head_dim 64, FFN 2560, vocab 49,152 (byte-level BPE). Context: max_position_embeddings 4096, trained at seq_len 2048.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("timothywong731/tim-360m-base")
m = AutoModelForCausalLM.from_pretrained("timothywong731/tim-360m-base", torch_dtype=torch.bfloat16)
ids = tok("The capital of France is", return_tensors="pt")
print(tok.decode(m.generate(**ids, max_new_tokens=20)[0]))
Training
~30B tokens, mix: 70% web (FineWeb-Edu sample-100BT + DCLM-Baseline), 15% Stack-Edu (code), 10% FineMath-3+, 5% misc. Muon + AdamW, WSD (warmup–stable–decay) schedule, bf16, 2× RTX 4090 (DDP, no NVLink).
Evaluation
lm-evaluation-harness (0.4.12), 0-shot, acc_norm where applicable:
| HellaSwag | ARC-Easy | ARC-Challenge | PIQA | WinoGrande | OpenBookQA | SciQ | SocialIQA | CommonsenseQA | WikiText (bpb ↓) |
|---|---|---|---|---|---|---|---|---|---|
| 0.388 | 0.515 | 0.259 | 0.658 | 0.525 | 0.294 | 0.722 | 0.378 | 0.196 | 1.058 |
Healthy for the scale: at 30B tokens this is **130× less training data** than SmolLM2-360M (4T). Near-parity on early-saturating tasks (PIQA, SciQ), a real gap on token-hungry ones (HellaSwag, ARC) — as the token budget predicts.
Limitations
Small (360M) and lightly trained (~30B tokens). Not instruction-tuned — this is the base model. Weak at arithmetic and multi-step reasoning; will hallucinate facts; English-only; no safety tuning — do not deploy to end users without your own filtering.
Provenance & license
Apache-2.0. Trained only on named, public datasets: FineWeb-Edu (ODC-BY), DCLM-Baseline (CC-BY-4.0), Stack-Edu (derived from The Stack v2), FineMath (ODC-BY). No gated or scraped-private data. Attribution and removal requests: open an issue on the source repository.
- Downloads last month
- -
Model tree for timothywong731/tim-360m-base
Datasets used to train timothywong731/tim-360m-base
mlfoundations/dclm-baseline-1.0
HuggingFaceTB/finemath
Evaluation results
- acc_norm on HellaSwag (0-shot)self-reported0.388
- acc_norm on ARC-Easy (0-shot)self-reported0.515
- acc_norm on ARC-Challenge (0-shot)self-reported0.259
- acc_norm on PIQA (0-shot)self-reported0.658
- acc on WinoGrande (0-shot)self-reported0.525
- acc_norm on OpenBookQA (0-shot)self-reported0.294
- acc_norm on SciQ (0-shot)self-reported0.722