Instructions to use sfanm/d24-pretrain-v2-climbmix-13B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sfanm/d24-pretrain-v2-climbmix-13B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sfanm/d24-pretrain-v2-climbmix-13B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sfanm/d24-pretrain-v2-climbmix-13B") model = AutoModelForCausalLM.from_pretrained("sfanm/d24-pretrain-v2-climbmix-13B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sfanm/d24-pretrain-v2-climbmix-13B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sfanm/d24-pretrain-v2-climbmix-13B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sfanm/d24-pretrain-v2-climbmix-13B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sfanm/d24-pretrain-v2-climbmix-13B
- SGLang
How to use sfanm/d24-pretrain-v2-climbmix-13B 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 "sfanm/d24-pretrain-v2-climbmix-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sfanm/d24-pretrain-v2-climbmix-13B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "sfanm/d24-pretrain-v2-climbmix-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sfanm/d24-pretrain-v2-climbmix-13B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sfanm/d24-pretrain-v2-climbmix-13B with Docker Model Runner:
docker model run hf.co/sfanm/d24-pretrain-v2-climbmix-13B
d24-pretrain-v2-climbmix-13B
v2 from-scratch pretrained BASE LM (strong base).
nanochat-style depth-24 decoder โ 24 layers ร 1536 hidden ร 12 heads, SwiGLU / RoPE / RMSNorm, tied embeddings, GPT-2 BPE vocab (50304), 0.757B params, 2048-token context.
Lineage. From scratch on 13.1B ClimbMix tokens with a WSD LR schedule, GPT-2 vocab.
Metrics. val loss 2.53 / test 2.53. Base for the v2 reasoning-midtrain/SFT lineage.
Use (base LM)
This is a base language model (pre-SFT) โ use it for text continuation, not chat. EOS is the GPT-2 <|endoftext|> (50256). For a chat model, use the d24-sft-* checkpoints.
from transformers import AutoModelForCausalLM, AutoTokenizer
mid = "sfanm/d24-pretrain-v2-climbmix-13B"
tok = AutoTokenizer.from_pretrained(mid)
model = AutoModelForCausalLM.from_pretrained(mid, torch_dtype="bfloat16", device_map="auto")
inputs = tok("The derivative of x**2 is", return_tensors="pt").to(model.device)
print(tok.decode(model.generate(**inputs, max_new_tokens=128)[0], skip_special_tokens=True))
Research checkpoint from a from-scratch nanochat-d24 replication (pretrain โ midtrain โ SFT โ RL) on NERSC Perlmutter. Trained on third-party corpora (ClimbMix, FineMath, OpenMath, MetaMath, OpenThoughts, OLMo-3 Dolmino, SmolTalk, โฆ) โ see those datasets' licenses; provided as-is for research.
- Downloads last month
- 5