Instructions to use codercat/AtmosRegime-Qwen3-8B-Distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codercat/AtmosRegime-Qwen3-8B-Distill with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codercat/AtmosRegime-Qwen3-8B-Distill") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("codercat/AtmosRegime-Qwen3-8B-Distill") model = AutoModelForCausalLM.from_pretrained("codercat/AtmosRegime-Qwen3-8B-Distill", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use codercat/AtmosRegime-Qwen3-8B-Distill with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "codercat/AtmosRegime-Qwen3-8B-Distill" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "codercat/AtmosRegime-Qwen3-8B-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/codercat/AtmosRegime-Qwen3-8B-Distill
- SGLang
How to use codercat/AtmosRegime-Qwen3-8B-Distill 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 "codercat/AtmosRegime-Qwen3-8B-Distill" \ --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": "codercat/AtmosRegime-Qwen3-8B-Distill", "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 "codercat/AtmosRegime-Qwen3-8B-Distill" \ --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": "codercat/AtmosRegime-Qwen3-8B-Distill", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use codercat/AtmosRegime-Qwen3-8B-Distill with Docker Model Runner:
docker model run hf.co/codercat/AtmosRegime-Qwen3-8B-Distill
AtmosRegime-Qwen3-8B-Distill
Qwen3-8B trained by on-policy distillation from a teacher given the correct formula, from the paper Language models misapply atmospheric formulas until trained on a few worked examples. In the paper, this route raises outside-regime accuracy from 0% to 71% on mechanisms the base model never solved but did solve once told the formula.
Code and data: https://github.com/acodercat/AtmosRegime. The other models from the paper are in the AtmosRegime collection.
Training
- Student: Qwen3-8B, thinking off.
- Teacher: a frozen copy of Qwen3-8B whose prompt also contains the correct formula. The student never sees the formula; on its own samples it is pulled towards the teacher's token distribution (forward KL over the teacher's 32 most probable tokens), alongside the answer reward.
- Settings: verl, learning rate 1e-6, 128 problems ร 8 samples per step, 120 steps, no dynamic sampling.
- Data: training fold 1 of the study's templates (29 of the 70 mechanisms); seed 42.
Use
The model was trained on one prompt format and should be given the same one. It answers with a Python program
that defines solve(). Run it with thinking disabled.
# git clone https://github.com/acodercat/AtmosRegime && cd AtmosRegime (for the prompt)
from transformers import AutoModelForCausalLM, AutoTokenizer
from atmoscoder_rl.prompts import chat
name = "codercat/AtmosRegime-Qwen3-8B-Distill"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, torch_dtype="auto", device_map="auto")
problem = "Atmospheric CO2 rises from 280 ppm to 560 ppm. Calculate the radiative forcing in W m-2."
text = tok.apply_chat_template(chat(problem), tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=3072, do_sample=True, temperature=0.3)
print(tok.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Execution and grading of the returned program are in atmoscoder_rl/evaluation/ of the repository.
Limitations
- This checkpoint is one fold and one seed. Numbers in the paper average both folds and two seeds, so this model alone will not reproduce them exactly.
- Distillation helped only where the teacher could solve the problem once told the formula.
- It is not a general-purpose assistant for atmospheric science.
Citation
@unpublished{ran2026regime,
title = {Language models misapply atmospheric formulas until trained on a few worked examples},
author = {Ran, Maohao and Zhang, Yanting and Ma, Chendong and Song, Jun},
year = {2026},
note = {Manuscript under review}
}
Licence
Apache 2.0, as for the base model Qwen3-8B.
- Downloads last month
- -