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
File size: 2,922 Bytes
2832cad | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | # AgentBench — frozen coding-agent evaluation
AgentBench measures **multi-step tool use** (read/write files, run tests in a sandbox, structured JSON actions) on tasks with **hidden graders**. It complements single-shot HumanEval+/MBPP+ in `scripts/enterprise/eval.py`.
Full audit and experiment plan: [`docs/enterprise_coding_agent.md`](enterprise_coding_agent.md).
## Suites
| Suite | File | Tasks | Use |
|---|---|---|---|
| `dev` | `scripts/enterprise/agentbench/suites/dev_v1.json` | 46 | Development, ablations, fast iteration |
| `test` | `scripts/enterprise/agentbench/suites/test_v1.json` | 94 | **Held-out** — do not train on these families |
Validate integrity before any run:
```bash
cd scripts/enterprise
PYTHONPATH=. python -m agentbench.selftest
```
## Variants (same tasks, same model)
| Variant | Meaning |
|---|---|
| `notools` | Full files in prompt, single completion — no execution |
| `old` | Legacy `AgentHarness` |
| `new` | `CodingHarness` (repomap, autoverify, verify gate on `final(done)`) |
Tune flags on `new`, e.g. `new:gate=0,repomap=0`.
## Run benchmark
From `scripts/enterprise` with vLLM available:
```bash
cd scripts/enterprise
source ../../.venv/bin/activate
pytest ../../tests/enterprise/test_sandbox.py ../../tests/enterprise/test_agent_security.py
PYTHONPATH=. python -m agentbench.runner \
--model /models/ckpts/grpo_instruct/final \
--name baseline_instruct \
--suite test \
--variants notools,old,new \
--concurrency 2 --gpu-mem 0.28 --verbose
```
Outputs: `/models/runs/agentbench/<name>__<variant>__<suite>.json` with per-task rows and `summary` metrics (`success`, `false_completion`, `hidden_pass`, `tool_call_validity`, `security_violations`, …).
## Recommended checkpoints
| Checkpoint | Role |
|---|---|
| `/models/ckpts/grpo_instruct/final` | Best single-shot coding; agent baseline |
| `/models/ckpts/agent_A/final` | Agent trajectory SFT on oracle data |
Hub ids (private): see [`ecosystem/models.manifest.json`](../ecosystem/models.manifest.json).
## Oracle data & agent SFT
```bash
cd scripts/enterprise
PYTHONPATH=. python -m agentbench.gen_data oracle --n 700 --seed 1 --out /models/agent_data/v1
PYTHONPATH=. python -m agentbench.build_sft \
--inputs accepted_oracle.jsonl \
--components core,blocked,recovery \
--out /models/agent_data/v1/sft_B
cd ../..
python scripts/enterprise/sft.py --config configs/agentbench/sft_agent.json
```
## Security
- Model code runs under `rewards/sandbox.py` (bwrap, no network, seccomp).
- Regression: `tests/enterprise/test_agent_security.py`, `tests/enterprise/test_sandbox.py`.
## Publishing results
Include agentbench JSON summaries in your model card or link to `/models/runs/agentbench/` paths in `REPORT.md`. The packaging step (`package_and_publish.py`) already ships HumanEval+/MBPP+ and security eval JSON; extend the card manually when agent numbers stabilize on `test_v1`.
|