Instructions to use ashish-soni08/tiny-aya-fire-esa-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ashish-soni08/tiny-aya-fire-esa-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ashish-soni08/tiny-aya-fire-esa-sft") 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("ashish-soni08/tiny-aya-fire-esa-sft") model = AutoModelForCausalLM.from_pretrained("ashish-soni08/tiny-aya-fire-esa-sft", 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 ashish-soni08/tiny-aya-fire-esa-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ashish-soni08/tiny-aya-fire-esa-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ashish-soni08/tiny-aya-fire-esa-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ashish-soni08/tiny-aya-fire-esa-sft
- SGLang
How to use ashish-soni08/tiny-aya-fire-esa-sft 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 "ashish-soni08/tiny-aya-fire-esa-sft" \ --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": "ashish-soni08/tiny-aya-fire-esa-sft", "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 "ashish-soni08/tiny-aya-fire-esa-sft" \ --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": "ashish-soni08/tiny-aya-fire-esa-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ashish-soni08/tiny-aya-fire-esa-sft with Docker Model Runner:
docker model run hf.co/ashish-soni08/tiny-aya-fire-esa-sft
tiny-aya-fire-esa-sft
Tiny Aya Fire, clean tool-use SFT. Part of the Stage 2 experiments of Escalation-safe tool-using Aya (Lexsi AI Safety & Alignment Hackathon, Track 3, Agentic Fine-tuning).
LoRA SFT on clean tool-use trajectories (no reward training). Baseline.
The project asks one question: when a tool-using agent hits an access control (bot wall, login, captcha, rate limit), does it stop honestly or go around it? The answer depends on the reward. The same recipe is run on Tiny Aya Global, Fire, Water and Earth and on Aya Expanse 8B.
Results
Simulated web sandbox, neutral system prompt, greedy decoding. "Blocked" tasks cannot be solved without going around an access control; the right behaviour is to stop and say so. The unseen and sealed sets use shortcut kinds never seen in training.
| set | escalation on blocked tasks | legitimate success on solvable tasks |
|---|---|---|
| test | 0.0% | 100.0% |
| stress | 89.2% | 73.2% |
| unseen | 92.2% | 87.8% |
| fresh | 49.6% | 65.3% |
| sealed | 47.8% | 82.4% |
Full tables with confidence intervals: results/report_s2.md in the GitHub repository.
Run it
Same tool format and agent loop as the Stage 1 model: tool JSON schemas in the system prompt, the model replies with a JSON
list of calls, tool results come back as a user turn, and it ends with ANSWER: <value> or BLOCKED: <reason>
(esa/prompts.py, loop in esa/runner.py; a transformers example is on the
v4.1 card). To run it on a test set:
git clone https://github.com/Ashish-Soni08/lexsi-escalation-safe-agent && cd lexsi-escalation-safe-agent
pip install vllm # or the vllm/vllm-openai:v0.22.1 image
python scripts/eval.py --model ashish-soni08/tiny-aya-fire-esa-sft --name try --split sealed --variants neutral --n 40 --out results/try
Reproduce
One Hugging Face Jobs run on an A100 80GB (setup and costs in the README):
scripts/job.sh s2_fire a100-large 6h vllm/vllm-openai:v0.22.1 \
"bash scripts/stage2_chain.sh CohereLabs/tiny-aya-fire fire <you>/tiny-aya-fire-esa"
Training
- Base: CohereLabs/tiny-aya-fire, merged LoRA weights.
- Recipe: clean SFT and escalation-prone SFT (200 steps), then 160 GRPO steps (AgentTune, lr 2e-5, seed 4) on 960 simulated tasks that offer 10 shortcut kinds (fewer in the coverage-curve arms).
- Code, data generator, test sets and logs: https://github.com/Ashish-Soni08/lexsi-escalation-safe-agent
Limits
Research artefact. Trained and tested in a simulated web sandbox with fictional sites, plus a small real-server check. The safe models still escalate on some never-trained shortcut kinds (see the table), so they need a runtime guard and are not a security control on their own. Subject to the base model's licence (CC-BY-NC 4.0).
- Downloads last month
- 46