Instructions to use surrey-nlp/diallm-qwen-grpo-aus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use surrey-nlp/diallm-qwen-grpo-aus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="surrey-nlp/diallm-qwen-grpo-aus") 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("surrey-nlp/diallm-qwen-grpo-aus") model = AutoModelForCausalLM.from_pretrained("surrey-nlp/diallm-qwen-grpo-aus", 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 surrey-nlp/diallm-qwen-grpo-aus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "surrey-nlp/diallm-qwen-grpo-aus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "surrey-nlp/diallm-qwen-grpo-aus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/surrey-nlp/diallm-qwen-grpo-aus
- SGLang
How to use surrey-nlp/diallm-qwen-grpo-aus 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 "surrey-nlp/diallm-qwen-grpo-aus" \ --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": "surrey-nlp/diallm-qwen-grpo-aus", "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 "surrey-nlp/diallm-qwen-grpo-aus" \ --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": "surrey-nlp/diallm-qwen-grpo-aus", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use surrey-nlp/diallm-qwen-grpo-aus with Docker Model Runner:
docker model run hf.co/surrey-nlp/diallm-qwen-grpo-aus
DiaLLM — Qwen 3-8B — AUS — GRPO
Part of DiaLLM: An Investigation into the Robustness-Generation Gap in English Dialect Adaptation (EMNLP 2026 Main).
- Base model: Qwen 3-8B
- Target variety: en-AU (Australian English)
- Adaptation thread: explicit (variety-targeted)
- Alignment method: GRPO
Continually pretrained on the International Corpus of English (18 varieties, ~20M tokens), then adapted via the explicit thread: dialect-specific SFT on Multi-VALUE-transformed en-AU preference data, followed by GRPO with the target-variety preference pairs.
Code, checkpoints, preference datasets, linguistic-analysis toolkit: https://github.com/surrey-nlp/diallm
Paper: https://arxiv.org/abs/2607.07669
This model is a fine-tuned version of jordanpainter/diallm-qwen-sft-aus, trained using TRL.
Quick start
from transformers import pipeline
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="surrey-nlp/diallm-qwen-grpo-aus", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])
Training procedure
This model was trained with GRPO.
Framework versions
- TRL: 0.28.0
- Transformers: 4.57.6
- Pytorch: 2.5.1+cu121
- Datasets: 4.5.0
- Tokenizers: 0.22.2
Citation
@article{painter2026diallm,
title = {DiaLLM: An Investigation into the Robustness-Generation Gap in English Dialect Adaptation},
author = {Painter, Jordan and Srirag, Dipankar and Kappiyath, Adarsh and Kanojia, Diptesh and Joshi, Aditya and Yin, Lu},
year = {2026},
eprint = {2607.07669},
archivePrefix = {arXiv}
}
@article{shao2024deepseekmath,
title = {{DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models}},
author = {Zhihong Shao and Peiyi Wang and Qihao Zhu and Runxin Xu and Junxiao Song and Mingchuan Zhang and Y. K. Li and Y. Wu and Daya Guo},
year = 2024,
eprint = {arXiv:2402.03300}
}
@software{vonwerra2020trl,
title = {{TRL: Transformers Reinforcement Learning}},
author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
license = {Apache-2.0},
url = {https://github.com/huggingface/trl},
year = {2020}
}
- Downloads last month
- 18
Model tree for surrey-nlp/diallm-qwen-grpo-aus
Base model
jordanpainter/diallm-qwen-sft-aus