Text Classification
Transformers
qwen3_5_text
typed-decisions
decision-model
system-one
jev-compatible
custom-code
Instructions to use GyrTechnology/saif-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GyrTechnology/saif-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="GyrTechnology/saif-4b")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("GyrTechnology/saif-4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from GyrTechnology/saif-4b: direct link, hf CLI and curl.
- Browser
- Download file 3.09 kB
-
https://huggingface.co/GyrTechnology/saif-4b/resolve/main/README.md
- Command line
-
hf download hf://GyrTechnology/saif-4b/README.md
-
curl -L -o README.md https://huggingface.co/GyrTechnology/saif-4b/resolve/main/README.md
3.09 kB
| license: cc-by-nc-4.0 | |
| base_model: Qwen/Qwen3.5-4B | |
| library_name: transformers | |
| pipeline_tag: text-classification | |
| tags: [typed-decisions, decision-model, system-one, jev-compatible, custom-code] | |
| # Saif 4B (v2.1) | |
| **A fast decision model.** Send it a state and a set of typed questions in one request; it returns a probability for | |
| every answer in a single forward pass. No text generation and no chat: it only makes decisions. It speaks the System | |
| One / Jev typed-decision format. | |
| - **Decision Index 0.3, public suite: 62.94** (raw 72.21), all 140,178 requests answered, none unsupported. | |
| v2.0 scored 57.71. | |
| - **Fast:** 32 ms median, 107 ms mean, 64 ms p80 per request, | |
| one request at a time. | |
| - **Built on Qwen/Qwen3.5-4B**, full fine-tune, block-bidirectional attention in the full-attention layers. | |
| Earlier versions stay available: `v1.0` and `v2.0` are tagged in this repository. | |
| ## Results | |
| Decision Index 0.3, public suite (37 benchmarks), run with the official kit on one RTX PRO 6000, one pass per request. | |
| Scores are chance-corrected skill (0 is random guessing, 100 is perfect). | |
| | Area | v2.1 | | |
| | --- | ---: | | |
| | **Overall index** | **62.94** | | |
| | Tools & Automation | 83.7 | | |
| | Retrieval & Classification | 68.6 | | |
| | Language Understanding | 68.1 | | |
| | Arts & Human Taste | 56.0 | | |
| | Knowledge & Reasoning | 41.4 | | |
| Strongest benchmarks: BFCL 97.2, CLINC150+OOS 92.7, HellaSwag 92.3, FinEntity 91.3, BANKING77 90.8, API-Bank 87.2, BPoMP 85.2, When2Call MCQ 82.7, Home appliance simulator 81.8, POP909-CL 80.6. | |
| Weakest: HLE, ChessBench, GPQA Diamond, Humicroedit, SATA-Bench, BRIGHT. | |
| ## Quick start | |
| ```python | |
| import sys | |
| sys.path.insert(0, '/path/to/saif-4b') | |
| from decision_index_engine import SaifEngine # needs the decision-index kit on PYTHONPATH | |
| engine = SaifEngine(model='/path/to/saif-4b', device='cuda') | |
| result, _ = engine('The parcel arrived broken and I want my money back today.', { | |
| 'refund': {'type': 'noul', 'instructions': 'Should the agent offer a refund?'}, | |
| 'tone': {'type': 'choice', 'criteria': {'angry': 'Angry', 'neutral': 'Neutral', 'happy': 'Happy'}}, | |
| }) | |
| print(result['answers']) | |
| ``` | |
| Requirements: Python 3.12, torch 2.8, transformers with Qwen3.5 support, safetensors, accelerate. | |
| ## Training | |
| Full fine-tuning of Qwen/Qwen3.5-4B (revision `851bf6e8`) in rounds at a constant learning rate on typed decisions | |
| drawn only from public training splits plus programmatically generated decisions, with audited, steered data mixes; | |
| then a 1,000-step cosine cooldown. Output temperatures and a PhishNChips decision boundary are fitted on held-out | |
| splits of the training data. Labels are the datasets' own human/source annotations or computed by code. Every training | |
| directory is screened against all Decision Index suite items, the evaluation panel and calibration dev sets before use; | |
| no Decision Index item is used for training or selection. | |
| ## License | |
| Weights released under CC-BY-NC-4.0 (non-commercial), because some training sources are research-only. Base model: | |
| [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B), Apache-2.0. | |