Text Generation
Transformers
Safetensors
qwen3_5_text
ps4mas
sft
full-finetune
tool-calling
multi-agent
conversational
Instructions to use yinita/ps4mas-sft-x5-single-ep3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yinita/ps4mas-sft-x5-single-ep3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yinita/ps4mas-sft-x5-single-ep3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("yinita/ps4mas-sft-x5-single-ep3") model = AutoModelForCausalLM.from_pretrained("yinita/ps4mas-sft-x5-single-ep3", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yinita/ps4mas-sft-x5-single-ep3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yinita/ps4mas-sft-x5-single-ep3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yinita/ps4mas-sft-x5-single-ep3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yinita/ps4mas-sft-x5-single-ep3
- SGLang
How to use yinita/ps4mas-sft-x5-single-ep3 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 "yinita/ps4mas-sft-x5-single-ep3" \ --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": "yinita/ps4mas-sft-x5-single-ep3", "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 "yinita/ps4mas-sft-x5-single-ep3" \ --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": "yinita/ps4mas-sft-x5-single-ep3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use yinita/ps4mas-sft-x5-single-ep3 with Docker Model Runner:
docker model run hf.co/yinita/ps4mas-sft-x5-single-ep3
PS4MAS SFT full-FT — x5 single ep3 (best single / protocol)
Full fine-tune of Qwen/Qwen3.5-9B for PS4MAS (Personalized Safety for Multi-Agent Systems).
- Local run:
results/0617/sft_full_9b_claude_x5_single_ep3 - HF repo:
yinita/ps4mas-sft-x5-single-ep3 - Teacher: Claude Sonnet (x5 Claude distillation data)
- Eval:
tiny_eval— 50 scenarios × 4 cold topologies (200 traces), judge = GPT-OSS-120B
tiny_eval results
| Model | Method | Overall | Single | Central | Hier | Debate | avg_ask | zero_tool% |
|---|---|---|---|---|---|---|---|---|
| baseline_9b (Qwen3.5-9B) | raw | 3.386 | 2.140 | 3.613 | 3.508 | 4.281 | 1.74 | 90.0 |
| x5_mixed_ep1 (this / sibling) | SFT full-FT | 3.679 | 2.387 | 4.101 | 3.821 | 4.407 | 1.95 | 48.0 |
| x5_mixed_ep3 (bottom-line) | SFT full-FT | 3.622 | 2.267 | 3.974 | 3.801 | 4.448 | 1.93 | 58.0 |
| x5_single_ep3 | SFT full-FT | 3.646 | 2.600 | 3.821 | 3.881 | 4.281 | 2.13 | 6.0 |
| ceod_gate_lr_sft_v1 | SFT LoRA | 3.602 | 2.326 | 4.094 | 3.747 | 4.241 | 1.89 | 58.0 |
| low400_ep3 (weights not on disk) | SFT full-FT | 3.682 | 2.546 | 3.854 | 3.860 | 4.467 | 1.86 | 66.0 |
Why this checkpoint
Best PS-cold-single among SFT full-FT (2.600) and dramatically lower single zero_tool rate (6% vs ~48–58% for mixed). Trained on single-topology Claude x5 data (3 epochs).
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "yinita/ps4mas-sft-x5-single-ep3"
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(repo)
Citation / project
PS4MAS — Personalized Safety Multi-Agent Systems (internal research checkpoint).
- Downloads last month
- 35