How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="Gen-Verse/ReasonFlux-Coder-4B")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Gen-Verse/ReasonFlux-Coder-4B")
model = AutoModelForCausalLM.from_pretrained("Gen-Verse/ReasonFlux-Coder-4B")
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]:]))
Quick Links

Introduction to our ReasonFlux-Coders

We introduce ReasonFlux-Coders, trained with CURE, our algorithm for co-evolving an LLM's coding and unit test generation abilities.

  • ReasonFlux-Coder-7B and ReasonFlux-Coder-14B outperform similarly sized Qwen Coders, DeepSeek Coders, and Seed-Coders, and naturally integrate into common test-time scaling and agentic coding pipelines.
  • ReasonFlux-Coder-4B is our Long-CoT model, outperforming Qwen3-4B while achieving 64.8% efficiency in unit test generation. We have demonstrated its ability to serve as a reward model for training base models via reinforcement learning (see our paper).

Paper | Code

Citation

@article{wang2025cure,
  title={Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning},
  author={Wang, Yinjie and Yang, Ling and Tian, Ye and Shen, Ke and Wang, Mengdi},
  journal={arXiv preprint arXiv:2506.03136},
  year={2025}
}
Downloads last month
12
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
Input a message to start chatting with Gen-Verse/ReasonFlux-Coder-4B.

Model tree for Gen-Verse/ReasonFlux-Coder-4B

Quantizations
3 models

Collection including Gen-Verse/ReasonFlux-Coder-4B

Paper for Gen-Verse/ReasonFlux-Coder-4B