dheerajfabrixai commited on
Commit
3246b44
·
verified ·
1 Parent(s): d149d91

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +92 -0
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