Text Generation
Transformers
Safetensors
English
qwen2
code
coding-agent
tool-use
sft
rlvr
grpo
trl
security
conversational
text-generation-inference
Run this model with HF Jobs
Run SamJoshua/stacy 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/SamJoshua/stacy. 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/SamJoshua/stacy 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/SamJoshua/stacy. 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/SamJoshua/stacy. 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 SamJoshua/stacy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SamJoshua/stacy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SamJoshua/stacy") 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("SamJoshua/stacy") model = AutoModelForCausalLM.from_pretrained("SamJoshua/stacy", 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 SamJoshua/stacy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SamJoshua/stacy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SamJoshua/stacy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SamJoshua/stacy
- SGLang
How to use SamJoshua/stacy 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 "SamJoshua/stacy" \ --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": "SamJoshua/stacy", "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 "SamJoshua/stacy" \ --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": "SamJoshua/stacy", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SamJoshua/stacy with Docker Model Runner:
docker model run hf.co/SamJoshua/stacy
release stacy
Browse filesFiles changed (7)
175 unmodified lines176177178179180179180181182183175 unmodified lines
| Model | frozen `new` (report rows) | `new:strict=1`, gate only | `new:strict=1`, gate + re-sampler `final` fallback ||---|---|---|---|| ctf_sft60 (recommended) | 37.2% (35/94) (fc 53.4%, 1.6s, 27k tok/succ) | 38.3% (36/94) (fc 35.6%, 5.8s, 42k tok/succ) | 36.2% (34/94) (fc 43.5%, 4.9s, 41k tok/succ) || rlvr_long | 37.2% (35/94) (fc 48.9%, 2.4s, 30k tok/succ) | 37.2% (35/94) (fc 32.4%, 5.2s, 40k tok/succ) | 41.5% (39/94) (fc 32.5%, 4.7s, 33k tok/succ) || ctf_sft60 (morning recommendation) | 37.2% (35/94) (fc 53.4%, 1.6s, 27k tok/succ) | 38.3% (36/94) (fc 35.6%, 5.8s, 42k tok/succ) | 36.2% (34/94) (fc 43.5%, 4.9s, 41k tok/succ) || rlvr_long (revised recommendation, published) | 37.2% (35/94) (fc 48.9%, 2.4s, 30k tok/succ) | 37.2% (35/94) (fc 32.4%, 5.2s, 40k tok/succ) | 41.5% (39/94) (fc 32.5%, 4.7s, 33k tok/succ) || ctf_sft60_strict (phase 10: retrained on strict-verified data) | 28.7% (27/94) (fc 48.6%, 5.5s, 61k tok/succ) | — | 25.5% (24/94) (fc 31.8%, 7.4s, 84k tok/succ) || Gemma 3 27B-it (reference) | 61.7% (58/94) (fc 36.6%, 21.0s, 18k tok/succ) | — | 64.9% (61/94) (fc 27.4%, 28.0s, 23k tok/succ) |
17 unmodified lines1819202121222324232425262732 unmodified lines60616263636465661 unmodified line6869707172717273747576777778798017 unmodified lines- ise-uiuc/Magicoder-OSS-Instruct-75K---
# qwen2.5-coder-1.5b-coding-agent# stacy
A 1.5B **coding agent** checkpoint: `Qwen/Qwen2.5-Coder-1.5B-Instruct` → our security-RLVR checkpoint (`qwen2.5-coder-1.5b-sec-rlvr-instruct`) →agent trajectory SFT (execution-verified oracle trajectories through the real tool harness, mixed with 60% plain chat-coding replay so single-shot coding is not forgotten) → 240 steps of GRPO with verifiable rewards on two new environments: SWE-style whole-file patches graded by hidden tests and sanctioned CTF solve scripts graded by the printed flag (lr 2e-6, 38 min). Under the harness's strict verification gate it is the best in-house coding agent measured. It is meant to be driven by the harness in**stacy** is a 1.5B **coding agent** checkpoint (lineage: `Qwen/Qwen2.5-Coder-1.5B-Instruct` → our security-RLVR checkpoint (`qwen2.5-coder-1.5b-sec-rlvr-instruct`) →agent trajectory SFT (execution-verified oracle trajectories through the real tool harness, mixed with 60% plain chat-coding replay so single-shot coding is not forgotten) → 240 steps of GRPO with verifiable rewards on two new environments: SWE-style whole-file patches graded by hidden tests and sanctioned CTF solve scripts graded by the printed flag (lr 2e-6, 38 min). Under the harness's strict verification gate it is the best in-house coding agent measured.) It is meant to be driven by the harness in`scripts/enterprise/assistant/tools/coder.py` (JSON tool actions, execution-gated `final`, sandboxed `run_tests`), and it also works as an ordinary chat coding model.
**Status:** private research artifact. All numbers are measured, greedy, under one code version; "agent" rows use the frozen `agentbench test_v1` suite32 unmodified lines- Qwen3-32B remains far ahead on every benchmark here (see table).
## Training provenance- Repository: `scripts/enterprise/` (agentbench suites + data pipeline, `ctf/` environment, `sft.py`, `train_grpo.py`, overnight drivers `overnight2*.py`); git commit `251b3740fe456dbeb559d512f12832ae245975af`.- Repository: `scripts/enterprise/` (agentbench suites + data pipeline, `ctf/` environment, `sft.py`, `train_grpo.py`, overnight drivers `overnight2*.py`); git commit `dd01b6a6d4cdfece085f11dc5ca8cb0da63dd50b`.- Data: synthetic oracle trajectories from this repository's task generators (no third-party text), 32B-teacher trajectories accepted only when the hidden grader passed, `ise-uiuc/Magicoder-OSS-Instruct-75K` chat-coding replay; cards under `/models/agent_data/**/card_*.json` (copied here as `data_cards/`).- Every experiment (config, metrics, checkpoint) is in the ledger reproduced in `OVERNIGHT2_REPORT.md`.1 unmodified line## Usage```pythonfrom transformers import AutoModelForCausalLM, AutoTokenizertok = AutoTokenizer.from_pretrained("SamJoshua/qwen2.5-coder-1.5b-coding-agent")model = AutoModelForCausalLM.from_pretrained("SamJoshua/qwen2.5-coder-1.5b-coding-agent", dtype="bfloat16", device_map="auto")tok = AutoTokenizer.from_pretrained("SamJoshua/stacy")model = AutoModelForCausalLM.from_pretrained("SamJoshua/stacy", dtype="bfloat16", device_map="auto")msgs = [{"role": "user", "content": "Write a function that returns the distinct values common to two lists, sorted."}]ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt", return_dict=True).to(model.device)print(tok.decode(model.generate(**ids, max_new_tokens=512, do_sample=False)[0], skip_special_tokens=True))```Agent mode: serve with vLLM (`examples/serve_vllm.sh`) and run `python -m agentbench.runner --model SamJoshua/qwen2.5-coder-1.5b-coding-agent --suite dev --variants new:strict=1` from the training repository.Agent mode: serve with vLLM (`examples/serve_vllm.sh`) and run `python -m agentbench.runner --model SamJoshua/stacy --suite dev --variants new:strict=1` from the training repository.
## Ecosystem- **Model collection:** [Hub collection](https://huggingface.co/collections/SamJoshua/qwen25-coder-15b-secure-coding-and-defensive-rlvr-6ae47557a06f283f00e2feb9) (all Sec RLVR variants).1223457 unmodified lines1314151616171819201 unmodified line222324242526272843 unmodified lines7273747576777815 unmodified lines94959697989910011 unmodified lines11211311411511611711814 unmodified lines133134135132136137138139{ "timestamp": "2026-11-03T09:48:44+0530", "timestamp": "2026-11-03T10:49:20+0530", "git_sha": "251b3740fe456dbeb559d512f12832ae245975af", "python": "3.13.14", "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39",7 unmodified lines "agent", "--ab_tag", "rlvr_long", "--push" "--push", "--skip_reload_test" ], "torch": "2.13.0+cu130", "gpu": "NVIDIA RTX PRO 6000 Blackwell Workstation Edition",1 unmodified line "repo_id": "SamJoshua/qwen2.5-coder-1.5b-coding-agent", "url": "https://huggingface.co/SamJoshua/qwen2.5-coder-1.5b-coding-agent", "private": true, "sha": "2832cad5146e468849a034fb54f0be0c3a9dd72b", "sha": "339a0ed8ec630a316fa19e9fcbecfbf5252fa99c", "files": [ ".gitattributes", "OVERNIGHT2_REPORT.md",43 unmodified lines "eval/cmp_ctf_sft_p2.json", "eval/cmp_deepseek-coder-1.3b-instruct.json", "eval/cmp_foundation-sec-8b-instruct.json", "eval/cmp_gemma3_27b_p2.json", "eval/cmp_grpo_instruct_p2.json", "eval/cmp_llama-primus-merged-8b.json", "eval/cmp_qwen2.5-1.5b-instruct.json",15 unmodified lines "eval/ctf_ctf_sft60_p2.json", "eval/ctf_ctf_sft60_strict_p2.json", "eval/ctf_ctf_sft_p2.json", "eval/ctf_gemma3_27b_p2.json", "eval/ctf_grpo_instruct.json", "eval/ctf_grpo_instruct_p2.json", "eval/ctf_qwen3_1.7b_p2.json",11 unmodified lines "eval/overnight2_summary.json", "eval/publish_receipt.json", "eval/publish_receipt_abliterated.json", "eval/publish_receipt_agent.json", "eval/publish_receipt_grpo.json", "eval/publish_receipt_instruct.json", "eval/publish_receipt_nothink.json",14 unmodified lines "tokenizer.json", "tokenizer_config.json" ], "n_files": 105, "n_files": 108, "size_gb": 3.1, "expected_present": { "README.md": true,1223457 unmodified lines1314151616171819201 unmodified line222324242526272843 unmodified lines7273747576777815 unmodified lines94959697989910011 unmodified lines11211311411511611711814 unmodified lines133134135132136137138139{ "timestamp": "2026-11-03T09:48:44+0530", "timestamp": "2026-11-03T10:49:20+0530", "git_sha": "251b3740fe456dbeb559d512f12832ae245975af", "python": "3.13.14", "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39",7 unmodified lines "agent", "--ab_tag", "rlvr_long", "--push" "--push", "--skip_reload_test" ], "torch": "2.13.0+cu130", "gpu": "NVIDIA RTX PRO 6000 Blackwell Workstation Edition",1 unmodified line "repo_id": "SamJoshua/qwen2.5-coder-1.5b-coding-agent", "url": "https://huggingface.co/SamJoshua/qwen2.5-coder-1.5b-coding-agent", "private": true, "sha": "2832cad5146e468849a034fb54f0be0c3a9dd72b", "sha": "339a0ed8ec630a316fa19e9fcbecfbf5252fa99c", "files": [ ".gitattributes", "OVERNIGHT2_REPORT.md",43 unmodified lines "eval/cmp_ctf_sft_p2.json", "eval/cmp_deepseek-coder-1.3b-instruct.json", "eval/cmp_foundation-sec-8b-instruct.json", "eval/cmp_gemma3_27b_p2.json", "eval/cmp_grpo_instruct_p2.json", "eval/cmp_llama-primus-merged-8b.json", "eval/cmp_qwen2.5-1.5b-instruct.json",15 unmodified lines "eval/ctf_ctf_sft60_p2.json", "eval/ctf_ctf_sft60_strict_p2.json", "eval/ctf_ctf_sft_p2.json", "eval/ctf_gemma3_27b_p2.json", "eval/ctf_grpo_instruct.json", "eval/ctf_grpo_instruct_p2.json", "eval/ctf_qwen3_1.7b_p2.json",11 unmodified lines "eval/overnight2_summary.json", "eval/publish_receipt.json", "eval/publish_receipt_abliterated.json", "eval/publish_receipt_agent.json", "eval/publish_receipt_grpo.json", "eval/publish_receipt_instruct.json", "eval/publish_receipt_nothink.json",14 unmodified lines "tokenizer.json", "tokenizer_config.json" ], "n_files": 105, "n_files": 108, "size_gb": 3.1, "expected_present": { "README.md": true,1 unmodified line234556781 unmodified lineimport torchfrom transformers import AutoModelForCausalLM, AutoTokenizer
MODEL = "SamJoshua/qwen2.5-coder-1.5b-coding-agent"MODEL = "SamJoshua/stacy"tok = AutoTokenizer.from_pretrained(MODEL)model = AutoModelForCausalLM.from_pretrained(MODEL, dtype=torch.bfloat16, device_map="auto")messages = [{"role": "user", "content": "Review this code for vulnerabilities and propose a fix:\n\n```python\nimport os\ndef run(cmd):\n os.system('ls ' + cmd)\n```"}]1233455#!/usr/bin/env bash# Serve with vLLM (OpenAI-compatible API). Private repo: export HF_TOKEN first.vllm serve SamJoshua/qwen2.5-coder-1.5b-coding-agent --dtype bfloat16 --max-model-len 8192 --port 8000vllm serve SamJoshua/stacy --dtype bfloat16 --max-model-len 8192 --port 8000# curl http://localhost:8000/v1/chat/completions -H 'Content-Type: application/json' \# -d '{"model":"SamJoshua/qwen2.5-coder-1.5b-coding-agent","messages":[{"role":"user","content":"Explain CWE-79 and show a safe Flask template example."}]}'# -d '{"model":"SamJoshua/stacy","messages":[{"role":"user","content":"Explain CWE-79 and show a safe Flask template example."}]}'123234561 unmodified line891011111213144 unmodified lines19202122232223242526{ "timestamp": "2026-11-03T10:49:11+0530", "git_sha": "251b3740fe456dbeb559d512f12832ae245975af", "timestamp": "2026-11-03T10:57:17+0530", "git_sha": "dd01b6a6d4cdfece085f11dc5ca8cb0da63dd50b", "python": "3.13.14", "platform": "Linux-7.0.0-38-generic-x86_64-with-glibc2.39", "argv": [1 unmodified line "--checkpoint", "/models/ckpts/grpo_agent_rlvr_long/final", "--name", "qwen2.5-coder-1.5b-coding-agent", "stacy", "--variant", "agent", "--ab_tag",4 unmodified lines "torch": "2.13.0+cu130", "gpu": "NVIDIA RTX PRO 6000 Blackwell Workstation Edition", "transformers": "5.19.0", "repo_id": "SamJoshua/qwen2.5-coder-1.5b-coding-agent", "release_dir": "/models/ckpts/release/qwen2.5-coder-1.5b-coding-agent", "repo_id": "SamJoshua/stacy", "release_dir": "/models/ckpts/release/stacy", "checks": { "files": [ "chat_template.jinja",OVERNIGHT2_REPORT.md+2-2
README.md+7-7
eval/publish_receipt.json+8-4
eval/publish_receipt_agent.json+8-4
examples/generate.py+1-1
examples/serve_vllm.sh+2-2
release_manifest.json+5-5