Run this model with HF Jobs
Run yuntokki/chatif-A on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/yuntokki/chatif-A. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/yuntokki/chatif-A on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/yuntokki/chatif-A. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/yuntokki/chatif-A. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use yuntokki/chatif-A with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuntokki/chatif-A with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yuntokki/chatif-A") 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("yuntokki/chatif-A") model = AutoModelForCausalLM.from_pretrained("yuntokki/chatif-A", 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 yuntokki/chatif-A with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuntokki/chatif-A" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuntokki/chatif-A", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yuntokki/chatif-A
- SGLang
How to use yuntokki/chatif-A 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 "yuntokki/chatif-A" \ --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": "yuntokki/chatif-A", "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 "yuntokki/chatif-A" \ --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": "yuntokki/chatif-A", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yuntokki/chatif-A with Docker Model Runner:
docker model run hf.co/yuntokki/chatif-A
chatif-A — GenRM (RewardAnything)
RL-trained variant of Qwen3-4B-Instruct-2507 from the chatif study (chat quality × instruction-following constraints, Nov 2026). One of 16 runs that differ only in the reward; this run is the table row “GenRM (RewardAnything)”. Checkpoint = training step 200.
Reward and data
- Reward: Generative reward model.
WisdomShell/RewardAnything-8B-v1reads the prompt, a fixed principle (P0: answer the request well) and K = 4 sampled answers at once, and scores them; rank-corrected scores are the reward. No verifier signal. - Training data:
train_30k.parquet(all files are in the dataset repoyuntokki/chatif-data). - Training finished: 2026-11-05 07:46 UTC, job 619859.
Training setup (shared by all 16 runs)
| Initialization | Qwen/Qwen3-4B-Instruct-2507 (no SFT in between) |
| Algorithm | GRPO (verl 0.9.1, verl.trainer.main_ppo, group-relative advantages) |
| Batch | 48 prompts × 8 sampled answers per step (384 answers), PPO mini-batch 24, 200 steps |
| Optimization | lr 1e-6, no KL penalty, entropy coefficient 0 |
| Sampling during training | temperature 1.0, top_p 1.0, max response 4,096 tokens, max prompt 1,024 tokens (2,048 for self-judge runs) |
| Hardware | 6 × A100-80GB for the policy (FSDP), 1 GPU for the Skywork reward server, 1 GPU for RewardAnything where used |
Code (training, data construction, evaluation): https://github.com/chaeyoon-jang/chatif (private).
Results (step 200)
Evaluation on held-out benchmarks with the base model for reference. Definitions: Arena-Hard v2 = win-rate style score against the reference answers with the named judge (GPT-4.1 scores exist only for 6 runs); IFBench / IFEval = prompt-level strict accuracy (all constraints of a prompt satisfied); IHEval = mean strict accuracy over 9 instruction-hierarchy tasks, system/user aligned vs. in conflict, with the hierarchy hint in the system prompt; Arena+IFBench / Arena+IFEval = Arena-Hard prompts with constraints appended, counted as success only if all constraints pass and the content score is ≥ 7/10 by the named judge (Qwen3-32B thinking, Mistral-Small-3.2-24B); median answer length = median characters of the answer on the Arena+IFBench prompts (696 prompts). All generation at temperature 1.0.
| Metric | Qwen3-4B-Instruct-2507 (base) | GenRM (RewardAnything) |
|---|---|---|
| Arena-Hard v2 (GPT-4.1 / Qwen3-32B judge) | 38.5 / 52.9 | — / 63.4 |
| IFBench (prompt-level strict %) | 30.0 | 12.8 |
| IFEval (prompt-level strict %) | 82.9 | 43.0 |
| IHEval aligned / conflict (strict %, with hint) | 73.1 / 17.1 | 55.1 / 13.9 |
| Arena+IFBench joint % (Qwen3-32B / Mistral) | 22.8 / 25.0 | 10.9 / 10.9 |
| Arena+IFEval joint % (Qwen3-32B / Mistral) | 66.3 / 72.5 | 28.4 / 28.2 |
| Median answer length (chars, Arena+IFBench prompts) | 2,386 | 10,995 |
Read the joint columns together with the length column: several reward designs move the model mostly along the answer-length axis.
Files
model.safetensors— bf16 weights saved by verl at step 200 (16,089,918,232 bytes, single file).config.json,generation_config.json,tokenizer.json,tokenizer_config.json,vocab.json,merges.txt— copied from the base modelQwen3-4B-Instruct-2507(same architecture). This is exactly how the checkpoints were loaded for every number above.verl_saved/— the config and tokenizer files as the training environment (transformers 5.9) wrote them. They are equivalent, but a transformers 4.x install reads the 5.xrope_parametersfield as missing and silently falls back torope_theta = 10000(the model needs 5,000,000). Use the top-level files unless you run transformers ≥ 5.
Load
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "yuntokki/chatif-A"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="bfloat16", device_map="auto")
msgs = [{"role": "user", "content": "Write a haiku about the sea. Do not use the letter e."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=256, do_sample=True, temperature=1.0, top_p=1.0)[0][ids.shape[1]:]))
The chat template is the Instruct-2507 template (no thinking mode).
Intended use and limitations
Research artifact for studying reward design in RL fine-tuning. Trained only on English single-turn prompts; no safety training was added beyond the base model. Part of the training prompts (13.7 % of the IF_multi portion) are harmful-request prompts with constraints attached, exactly as in the public IF_multi data; the reward did not penalize compliance. Treat outputs accordingly.
License
Weights are released under Apache-2.0, following the base model's license (see LICENSE).
- Downloads last month
- 185
Model tree for yuntokki/chatif-A
Base model
Qwen/Qwen3-4B-Instruct-2507