Instructions to use JamieAi33/deal-master-negotiator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JamieAi33/deal-master-negotiator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JamieAi33/deal-master-negotiator")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("JamieAi33/deal-master-negotiator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use JamieAi33/deal-master-negotiator with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf JamieAi33/deal-master-negotiator:Q4_K_M # Run inference directly in the terminal: llama cli -hf JamieAi33/deal-master-negotiator:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf JamieAi33/deal-master-negotiator:Q4_K_M # Run inference directly in the terminal: llama cli -hf JamieAi33/deal-master-negotiator:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf JamieAi33/deal-master-negotiator:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf JamieAi33/deal-master-negotiator:Q4_K_M
Use Docker
docker model run hf.co/JamieAi33/deal-master-negotiator:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use JamieAi33/deal-master-negotiator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JamieAi33/deal-master-negotiator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JamieAi33/deal-master-negotiator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JamieAi33/deal-master-negotiator:Q4_K_M
- SGLang
How to use JamieAi33/deal-master-negotiator 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 "JamieAi33/deal-master-negotiator" \ --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": "JamieAi33/deal-master-negotiator", "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 "JamieAi33/deal-master-negotiator" \ --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": "JamieAi33/deal-master-negotiator", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use JamieAi33/deal-master-negotiator with Ollama:
ollama run hf.co/JamieAi33/deal-master-negotiator:Q4_K_M
- Unsloth Desktop
- Pi
How to use JamieAi33/deal-master-negotiator with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf JamieAi33/deal-master-negotiator:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "JamieAi33/deal-master-negotiator:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use JamieAi33/deal-master-negotiator with Docker Model Runner:
docker model run hf.co/JamieAi33/deal-master-negotiator:Q4_K_M
- Lemonade
How to use JamieAi33/deal-master-negotiator with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull JamieAi33/deal-master-negotiator:Q4_K_M
Run and chat with the model
lemonade run user.deal-master-negotiator-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use JamieAi33/deal-master-negotiator with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf JamieAi33/deal-master-negotiator:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default JamieAi33/deal-master-negotiator:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use JamieAi33/deal-master-negotiator with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf JamieAi33/deal-master-negotiator:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "JamieAi33/deal-master-negotiator:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Deal Master โ constrained B2B negotiation policy (3B)
A Qwen2.5-3B-Instruct policy fine-tuned to negotiate price and payment terms while emitting a strict JSON turn object and never revealing a hidden walk-away limit. The model is one half of a two-part system: the fine-tuned policy proposes a turn, and a deterministic Python guardrail layer validates or clamps the numbers before anything is sent.
This repository is private. It hosts LoRA adapters (small, versioned) and the merged Q4_K_M GGUF build that was actually benchmarked.
Recommended version
| File | Purpose | SHA256 |
|---|---|---|
gguf/dpo-drill-r1-q4_k_m.gguf |
merged Q4_K_M build, use this one | f3a72e080b8c46915d2c10d6f82196fdb4b68614e84e36d3f7d5837bf631ce3a |
adapters/dpo_drill_r1/ |
LoRA adapter that produced that GGUF | 741cb13bdf8bcf06fd20828d2131fd49c84a0e59a75deaf5446869ff7214470a |
configs/dpo-drill-r1.generation_config.json |
chat template + stop tokens | โ |
Older versions kept for rollback:
| Version | Files | Gate (80 episodes) |
|---|---|---|
v0.1.0-sft |
adapters/sft_final/, gguf/sft-q4_k_m.gguf |
not run at 80 |
v0.2.0-dpo |
adapters/dpo_final/, gguf/dpo-q4_k_m.gguf |
0.9325 / 0.9325 (fails gate) |
v1.0.0-drill-r1 |
adapters/dpo_drill_r1/, gguf/dpo-drill-r1-q4_k_m.gguf |
1.000 / 1.000 |
Git-style tags v0.1.0-sft, v0.2.0-dpo, and v1.0.0-drill-r1 point to the
corresponding revisions on the Hub. To roll back, download the adapter/GGUF
from that tag:
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="JamieAi33/deal-master-negotiator",
filename="gguf/dpo-drill-r1-q4_k_m.gguf",
revision="v1.0.0-drill-r1",
)
Base model and training
- Base:
Qwen/Qwen2.5-3B-Instruct(3.1B params, bf16). - Stage 1 โ QLoRA SFT: 2,743 training / 296 validation synthetic multi-turn B2B negotiation episodes. 4-bit NF4, LoRA r=16 alpha=32 on q/k/v/o/gate/up/down projections, 2 epochs, effective batch 8, LR 2e-4, max sequence 1024, seed 3407. Gate: 1.0 schema / 1.0 zero-leak on 150 turns.
- Stage 2 โ DPO: 5,615
(prompt, chosen, rejected)pairs targeting floor leakage, premature capitulation, and walk-away discipline. Beta 0.1, LR 5e-6, 1 epoch (702 steps). It passed the gate but produced no measurable lift on the holdout. - Stage 3 โ targeted action-field drill: 2,743 pairs built from the
training split only. Each
rejectedturn is identical tochosenexceptactionis replaced with the strategy label the quantized model wrongly emitted (close_deal/trade_terms). 1 epoch (343 steps) from the SFT adapter. This fixed the Q4 enum confusion and improved deal outcomes.
The training prompt lists the finite JSON enums and the chat template is the
one saved in configs/*.generation_config.json. Use the same template at
inference โ the GGUF embeds it and LlamaCppBackend verifies parity.
Quantization
- Format: GGUF Q4_K_M, 1,929,902,688 bytes, produced by Unsloth from the merged LoRA weights. All 36 layers fit in 80 GB VRAM with room to spare.
- Pinned greedy sampling used for every benchmark row:
temperature=0, top_p=1, min_p=0, top_k=1, max_tokens=512, seed=0. - Rationale for hosting adapters instead of full bf16 merged weights: the GGUF is the merged build used in production, and the LoRA adapters let you reproduce it or swap stages without storing three ~6 GB checkpoints.
Evaluation
Frozen 80-episode holdout (621โ622 scored turns), same harness for every row.
Gates: raw_schema_valid_rate >= 0.95, raw_zero_leak_rate >= 0.98.
| Variant | schema | zero-leak | deal completion | avg utility |
|---|---|---|---|---|
| base Qwen2.5-3B-Instruct | 0.000 | 0.000 | 0.000 | 0.000 |
| SFT HF adapter | 1.000 | 1.000 | 0.150 | 0.041 |
| SFT+DPO HF adapter | 1.000 | 1.000 | 0.150 | 0.032 |
| SFT GGUF Q4_K_M | 0.907 | 0.907 | 0.150 | 0.038 |
| DPO GGUF Q4_K_M | 0.9325 | 0.9325 | 0.250 | 0.053 |
| Drill GGUF Q4_K_M | 1.000 | 1.000 | 0.663 | 0.130 |
The drill's 95% CI on both gate metrics is [0.994, 1.0] (621/621 valid turns).
Raw result JSON, per-turn traces, and the full comparison table are in the
companion GitHub repository (results/, docs/).
Output contract
Each turn is one JSON object, nothing else:
{
"turn": 2,
"strategy": "trade_terms",
"action": "counter_offer",
"opponent_read": "bluffing_deadline",
"proposed_price": 300.89,
"proposed_terms": "prepaid_discount",
"concession_pct_of_room": 41.47,
"walk_away_risk": "low",
"rationale_short": "Trade terms kept inside the policy boundary.",
"reply": "At 300.89 on prepaid_discount terms, we can align on the package."
}
action is one of counter_offer | accept_offer | hold_current | walk_away.
close_deal is a strategy, not an action โ this was the single quantized
failure mode that the drill eliminated.
Serving and guardrails
The companion repo ships serve/app.py (FastAPI) and scripts/modal_demo.py
(Modal H100 ASGI deployment). The server keeps the hidden deal policy and runs
enforce_guardrails on every response: price floor clamp, concession pacing,
terms allowlist, irrational-jump check, leak sanitization, and max-turn exit.
Only a client-safe view of state is returned. A live demo is linked in the
GitHub README.
Limitations
- Trained on synthetic episodes; no real counterparty corpus.
- Small holdout confidence intervals are now tight for the gates, but deal quality metrics still have wide intervals (n=80 episodes).
- The model is not a legal or commercial advisor; guardrails enforce the configured policy, not real-world contract law.
- Hidden limit protection depends on the prompt contract and guardrail layer; do not expose raw prompts or hidden config through an API.
- Downloads last month
- 592
4-bit