This repository contains a
full fine-tuned model (not LoRA adapter) based on
Qwen3-4B-Instruct-2507, trained with multi-turn agentic SFT using the
Open-AgentRL framework (verl FSDP SFT Trainer).
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "y-ohtani/qwen3-4b-ra-sft-merged"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11)
12
13messages = [
14 {"role": "user", "content": "Solve the equation x^2 - 5x + 6 = 0 step by step."}
15]
16text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
17inputs = tokenizer(text, return_tensors="pt").to(model.device)
18outputs = model.generate(**inputs, max_new_tokens=2048)
19print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Users must comply with the base model license and dataset terms.