Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
fabrix
argos
rdaf
dpo
direct-preference-optimization
citation-retrieval
custom-widgets
unsloth
conversational
Instructions to use Fabrix-AI-Inc/Argos-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Fabrix-AI-Inc/Argos-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Fabrix-AI-Inc/Argos-2B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Fabrix-AI-Inc/Argos-2B") model = AutoModelForMultimodalLM.from_pretrained("Fabrix-AI-Inc/Argos-2B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Fabrix-AI-Inc/Argos-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Fabrix-AI-Inc/Argos-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Fabrix-AI-Inc/Argos-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Fabrix-AI-Inc/Argos-2B
- SGLang
How to use Fabrix-AI-Inc/Argos-2B 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 "Fabrix-AI-Inc/Argos-2B" \ --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": "Fabrix-AI-Inc/Argos-2B", "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 "Fabrix-AI-Inc/Argos-2B" \ --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": "Fabrix-AI-Inc/Argos-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use Fabrix-AI-Inc/Argos-2B with Docker Model Runner:
docker model run hf.co/Fabrix-AI-Inc/Argos-2B
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: unsloth/Qwen3.5-2B
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- fabrix
|
| 10 |
+
- argos
|
| 11 |
+
- rdaf
|
| 12 |
+
- dpo
|
| 13 |
+
- direct-preference-optimization
|
| 14 |
+
- citation-retrieval
|
| 15 |
+
- custom-widgets
|
| 16 |
+
- qwen3_5
|
| 17 |
+
- unsloth
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Argos 2B (DPO-Aligned Merged Model)
|
| 21 |
+
|
| 22 |
+
**Argos 2B** is an advanced domain-adapted model for **Fabrix.ai / RDAF** knowledge retrieval, documentation citation, and hop-closed custom widget dashboard pack generation.
|
| 23 |
+
|
| 24 |
+
This model combines:
|
| 25 |
+
1. **Supervised Fine-Tuning (SFT)** on the comprehensive Fabrix / RDAF knowledge base and custom widget recipes.
|
| 26 |
+
2. **Direct Preference Optimization (DPO)** trained concurrently on:
|
| 27 |
+
- Single-card preference pairs (`delta_20260821_dpo.jsonl`) to strictly enforce card citations (`kb/cards/*.md`).
|
| 28 |
+
- Hop-closed custom widget pack preference pairs (`pack_custom_widget_dpo.jsonl`) to guarantee exact 34-item ordered card dependencies for custom widget dashboards.
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## 📊 Alignment & Benchmark Performance
|
| 33 |
+
|
| 34 |
+
| Evaluation Benchmark | Baseline SFT | Argos 2B (DPO Aligned) |
|
| 35 |
+
|---|---|---|
|
| 36 |
+
| **DPO Training Accuracy** | 50.0% | **100.0%** |
|
| 37 |
+
| **Card Format Accuracy (`kb/cards/*`)** | 40.9% | **100.0%** (22/22) |
|
| 38 |
+
| **Single-Card Preference Citation Accuracy** | 4.5% | **59.1%** exact match |
|
| 39 |
+
| **Custom Widget Pack Order Accuracy** | 0.0% | **81.2%** (13/16) |
|
| 40 |
+
|
| 41 |
+
---
|
| 42 |
+
|
| 43 |
+
## 🚀 Quickstart with `transformers`
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
import torch
|
| 47 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 48 |
+
|
| 49 |
+
model_id = "Fabrix-AI-Inc/Argos-2B"
|
| 50 |
+
|
| 51 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 52 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 53 |
+
model_id,
|
| 54 |
+
torch_dtype=torch.float16,
|
| 55 |
+
device_map="auto",
|
| 56 |
+
)
|
| 57 |
+
|
| 58 |
+
system_prompt = (
|
| 59 |
+
"You are Fabrix cite-mode retrieval. Reply with repo-relative kb/ paths only, one per line. "
|
| 60 |
+
"Prefer kb/cards/*.md. Cite a topic file (kb/pstreams/, kb/widgets/, kb/dashboards/, kb/ux/, kb/entry/) "
|
| 61 |
+
"only when no card fits. Typically 1-5 paths. No prose, no HTML, no line numbers, no GET/POST examples, "
|
| 62 |
+
"no secrets. Zero paths only if nothing under kb/ applies."
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
messages = [
|
| 66 |
+
{"role": "system", "content": system_prompt},
|
| 67 |
+
{"role": "user", "content": "Put a group filter on the top so I can pick site type, tier, and primary transport."},
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 71 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 72 |
+
|
| 73 |
+
with torch.no_grad():
|
| 74 |
+
outputs = model.generate(
|
| 75 |
+
**inputs,
|
| 76 |
+
max_new_tokens=64,
|
| 77 |
+
do_sample=False,
|
| 78 |
+
)
|
| 79 |
+
|
| 80 |
+
response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
|
| 81 |
+
print(response.strip())
|
| 82 |
+
# Output: kb/cards/widget-filters.md
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
---
|
| 86 |
+
|
| 87 |
+
## 🏗️ Architecture & Model Specs
|
| 88 |
+
|
| 89 |
+
- **Base Architecture:** `Qwen3_5ForConditionalGeneration` (2.3B parameters)
|
| 90 |
+
- **Format:** Standalone Merged 16-bit Float Safetensors
|
| 91 |
+
- **Adapter Version:** [`Fabrix-AI-Inc/Argos-2B-LoRA`](https://huggingface.co/Fabrix-AI-Inc/Argos-2B-LoRA)
|
| 92 |
+
- **Training Toolkit:** Unsloth / Hugging Face Transformers / TRL / PyTorch
|