Instructions to use bigai/GS1-0.8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigai/GS1-0.8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="bigai/GS1-0.8B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bigai/GS1-0.8B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -7,73 +7,218 @@ tags:
|
|
| 7 |
- custom_code
|
| 8 |
- system-one
|
| 9 |
- safetensors
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
# GS1-0.8B
|
| 12 |
|
| 13 |
[English](README.md) · [简体中文](README.zh-CN.md)
|
| 14 |
|
| 15 |
-

|
| 16 |
|
| 17 |
-
**Fast, Faithful, Frontier
|
| 18 |
|
| 19 |
-
[Code
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
| Stored parameters | 879,765,056 |
|
| 24 |
-
|
|
| 25 |
-
|
|
| 26 |
-
|
|
| 27 |
-
|
|
| 28 |
-
|
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
Latency measured on 9 November 2026: RTX 4090 reporting 48 GiB, BF16 computation, 256-token longest branch, one question, single GPU, five warmups and 30 measured calls. Complete in-process timing includes validation, compilation, model computation and probabilities; loading, graph capture, HTTP and SDK transport are excluded. [Machine-readable decision metrics](assets/results/public-evaluation.json) · [Raw latency samples](assets/results/inference-latency.json) · [Methodology and all models](https://github.com/bigai-nlco/GS1/blob/main/benchmark/latency.md)
|
| 34 |
|
| 35 |
-
##
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
```bash
|
| 40 |
-
python -m pip install
|
| 41 |
```
|
| 42 |
|
|
|
|
|
|
|
| 43 |
```python
|
|
|
|
| 44 |
from transformers import AutoModel
|
| 45 |
|
| 46 |
model = AutoModel.from_pretrained(
|
| 47 |
-
"bigai/GS1-0.8B",
|
| 48 |
trust_remote_code=True,
|
| 49 |
).eval().to("cuda")
|
| 50 |
|
| 51 |
-
|
| 52 |
-
state
|
| 53 |
-
questions
|
| 54 |
"team": {
|
| 55 |
"type": "choice",
|
| 56 |
-
"instructions": "
|
| 57 |
-
"criteria": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
},
|
| 59 |
-
"refund": {"type": "noul", "instructions": "Does the customer request a refund?"},
|
| 60 |
"urgency": {
|
| 61 |
"type": "score",
|
| 62 |
"instructions": "Rate the urgency of handling this ticket.",
|
| 63 |
-
"criteria": [
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
print(result["answers"])
|
|
|
|
| 68 |
```
|
| 69 |
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
`result` contains `model`, `answers` and `usage`. Choice returns a candidate ID, a probability for every candidate, and confidence. Noul returns `p(true)`. Score returns the expected zero-based rubric level and probabilities over all supplied levels. Output-token usage is zero. The default path evaluates complete question branches independently and has no runtime profile or graph-capture dependency.
|
| 73 |
|
| 74 |
-
##
|
| 75 |
|
| 76 |
-
The GS1
|
| 77 |
|
| 78 |
```bash
|
| 79 |
git clone https://github.com/bigai-nlco/GS1.git
|
|
@@ -82,34 +227,48 @@ uv sync --locked --extra serve --extra cuda
|
|
| 82 |
uv run gs1 serve --model bigai/GS1-0.8B --model-name GS1
|
| 83 |
```
|
| 84 |
|
| 85 |
-
|
| 86 |
|
| 87 |
-
|
| 88 |
-
uv run python -m benchmark.inference --model bigai/GS1-0.8B \
|
| 89 |
-
--out runs/runtime.json --runtime-profile-out runs/profile.json \
|
| 90 |
-
--graph-cache-mb 16384 --graph-cache-entries 128
|
| 91 |
-
|
| 92 |
-
uv run gs1 serve --model bigai/GS1-0.8B --model-name GS1 \
|
| 93 |
-
--runtime-profile runs/profile.json --experimental-cuda-graphs \
|
| 94 |
-
--graph-warmup-requests runs/profile-warmup.json \
|
| 95 |
-
--graph-cache-mb 4096 --graph-cache-entries 128
|
| 96 |
-
```
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
-
|
|
|
|
| 101 |
|
| 102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
-
##
|
| 109 |
|
| 110 |
-
|
| 111 |
|
| 112 |
-
|
|
|
|
|
|
|
| 113 |
|
| 114 |
```bibtex
|
| 115 |
@techreport{zheng2026gs1,
|
|
@@ -118,4 +277,4 @@ Code and released weights: [Apache-2.0](LICENSE), with [upstream attribution](NO
|
|
| 118 |
institution={BIGAI},
|
| 119 |
year={2026}
|
| 120 |
}
|
| 121 |
-
```
|
|
|
|
| 7 |
- custom_code
|
| 8 |
- system-one
|
| 9 |
- safetensors
|
| 10 |
+
base_model:
|
| 11 |
+
- Qwen/Qwen3.5-0.8B
|
| 12 |
---
|
| 13 |
# GS1-0.8B
|
| 14 |
|
| 15 |
[English](README.md) · [简体中文](README.zh-CN.md)
|
| 16 |
|
| 17 |
+

|
| 18 |
|
| 19 |
+
> ***Fast, Faithful, Frontier System One Intelligence.***
|
| 20 |
|
| 21 |
+
[Code](https://github.com/bigai-nlco/GS1) · [Model](https://huggingface.co/collections/bigai/gs1) · [Documentation](https://github.com/bigai-nlco/GS1/blob/main/docs/README.md) · [Playground](https://github.com/bigai-nlco/GS1/blob/main/playground/README.md)
|
| 22 |
|
| 23 |
+
**GS1-0.8B** is an open-source decision model developed by **BIGAI** (Beijing Institute for General Artificial Intelligence). It computes native probability distributions over runtime-defined candidates for agent routing, verification, extraction and control.
|
| 24 |
+
|
| 25 |
+
## GS1 Highlights
|
| 26 |
+
|
| 27 |
+
- **Fast - Native Runtime Decision Head.**
|
| 28 |
+
- Produce Choice, Noul and Score distributions directly, with zero generated output tokens.
|
| 29 |
+
- A native multi-head cross-attention decision head queries state evidence using question and candidate representations.
|
| 30 |
+
- With CUDA Graph, GS1-0.8B reaches 12.51 ms P50 for one short question and **6.05×** speedup over default inference for eight short questions.
|
| 31 |
+
- **Faithful — multi-step RL with calibrated rewards**
|
| 32 |
+
- Reinforcement learning optimizes sampled action probabilities with a Brier reward. [RLCD](https://github.com/bigai-nlco/GS1/blob/main/docs/RLCD.md)
|
| 33 |
+
- Native probabilities and confidence support evidence gathering, deferral and explicit abstention choices.
|
| 34 |
+
- **Frontier — Hybrid Architecture, Competitive Quality**
|
| 35 |
+
- **Causal Gated DeltaNet** and **Segmented Bidirectional Full Attention** give candidates their complete comparison context while preserving immutable prefixes for reuse across questions.
|
| 36 |
+
- Carry-preserving **Attention Residual** lets sparse full-attention receivers query earlier representations while retaining the explicit skip-connection anchor. [Architecture](https://github.com/bigai-nlco/GS1/blob/main/docs/model.md)
|
| 37 |
+
- GS1-0.8B reaches **56.12** on the latest Decision Index 0.4.1 Public index. All GS1 sizes lie on the displayed parameter–performance frontier.
|
| 38 |
+
|
| 39 |
+
## Model Overview
|
| 40 |
+
|
| 41 |
+
| Specification | GS1-0.8B |
|
| 42 |
+
| --- | ---: |
|
| 43 |
+
| Model type | Native typed decision model |
|
| 44 |
| Stored parameters | 879,765,056 |
|
| 45 |
+
| Hidden dimension | 1,024 |
|
| 46 |
+
| Decoder layers | 24 |
|
| 47 |
+
| Decision attention heads | 4 |
|
| 48 |
+
| Candidate-routing layers | 2 |
|
| 49 |
+
| Decision projection dimension | 256 |
|
| 50 |
+
| Maximum complete branch length | 65,536 tokens |
|
| 51 |
+
|
| 52 |
+
GS1 uses a Qwen3.5 hybrid backbone that interleaves three causal Gated DeltaNet layers with one segmented full-attention layer. A native cross-attention decision head compares runtime-defined candidates against state evidence. [Architecture](https://github.com/bigai-nlco/GS1/blob/main/docs/model.md)
|
| 53 |
+
|
| 54 |
+
Text and decision-head weights are stored in FP32, and the retained vision tower in BF16. Inference supports BF16 computation with FP32 final logits and probability reductions. Stored dtypes are preserved by default loading.
|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
|
| 58 |
+
| Primitive | Typical use | Output |
|
| 59 |
+
| --- | --- | --- |
|
| 60 |
+
| **Choice** | Routing, classification, tool selection | Candidate ID, all candidate probabilities, confidence |
|
| 61 |
+
| **Noul** | Verification and binary judgments | Probability that the proposition is true: `p(true)` |
|
| 62 |
+
| **Score** | Ordered ratings and rubric judgments | Expected zero-based level, level probabilities, confidence |
|
| 63 |
+
|
| 64 |
+
## Benchmark Results
|
| 65 |
+
|
| 66 |
+
### Decision Index
|
| 67 |
+
|
| 68 |
+
The following are the **latest complete public-suite results** (edition 0.3). Each model completes **140,178 requests** and **312,320 decisions** across **43 text benchmarks**, with **100% coverage** and zero failed or unsupported requests. **37 benchmarks** contribute to the chance-corrected Public index; six additional benchmarks are displayed separately. The private Full score is evaluated by the leaderboard maintainers.
|
| 69 |
+
|
| 70 |
+
| Metric | [GS1-0.8B](https://huggingface.co/bigai/GS1-0.8B) | [GS1-2B](https://huggingface.co/bigai/GS1-2B) | [GS1-4B](https://huggingface.co/bigai/GS1-4B) | [GS1-9B](https://huggingface.co/bigai/GS1-9B) |
|
| 71 |
+
| --- | ---: | ---: | ---: | ---: |
|
| 72 |
+
| Public index ↑ | **56.12** | **62.22** | **68.97** | **70.45** |
|
| 73 |
+
| Raw index ↑ | 67.36 | 71.70 | 76.47 | 77.46 |
|
| 74 |
+
| Coverage | 100% | 100% | 100% | 100% |
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
|
| 78 |
+
The frontier refers to the comparison models displayed in the figure.
|
| 79 |
+
|
| 80 |
+
### Area Scores
|
| 81 |
+
|
| 82 |
+
Chance-corrected area scores on a 0–100 scale; higher is better.
|
| 83 |
+
|
| 84 |
+
| Area | GS1-0.8B | GS1-2B | GS1-4B | GS1-9B |
|
| 85 |
+
| --- | ---: | ---: | ---: | ---: |
|
| 86 |
+
| Knowledge & Reasoning | 33.32 | 41.84 | 52.40 | 56.01 |
|
| 87 |
+
| Language Understanding | 56.25 | 63.67 | 71.12 | 72.62 |
|
| 88 |
+
| Retrieval & Classification | 68.62 | 71.21 | 75.55 | 75.58 |
|
| 89 |
+
| Tools & Automation | 79.26 | 83.57 | 87.49 | 87.61 |
|
| 90 |
+
| Arts & Human Taste | 47.47 | 54.16 | 59.26 | 60.57 |
|
| 91 |
+
|
| 92 |
+
<details>
|
| 93 |
+
<summary>Complete text benchmark results — 43 benchmarks</summary>
|
| 94 |
+
|
| 95 |
+
Native benchmark scores are scaled to 0–100 before chance correction. The metric is shown for each row. † marks the six display-only benchmarks that do not contribute to the Public index. All rows use the Decision Index typed-decision protocol.
|
| 96 |
+
|
| 97 |
+
| Benchmark | Native metric | GS1-0.8B | GS1-2B | GS1-4B | GS1-9B |
|
| 98 |
+
| --- | --- | ---: | ---: | ---: | ---: |
|
| 99 |
+
| BFCL | case exact accuracy | 90.44 | 93.27 | 97.52 | 96.99 |
|
| 100 |
+
| ToolRet | nDCG@10 | 67.52 | 69.25 | 71.16 | 70.90 |
|
| 101 |
+
| API-Bank | accuracy | 67.52 | 76.97 | 84.45 | 85.43 |
|
| 102 |
+
| BANKING77 | macro-F1 | 85.33 | 88.34 | 92.09 | 92.76 |
|
| 103 |
+
| CLINC150+OOS | macro-F1 | 85.51 | 90.61 | 94.35 | 93.48 |
|
| 104 |
+
| RouterBench † | selected quality (quality objective) | 79.63 | 71.76 | 79.06 | 79.86 |
|
| 105 |
+
| Home appliance simulator | case exact accuracy | 98.86 | 100.00 | 100.00 | 100.00 |
|
| 106 |
+
| SGD/SGD-X † | macro-F1 | 61.15 | 65.16 | 68.10 | 67.60 |
|
| 107 |
+
| ContractNLI | macro-F1 | 84.41 | 84.14 | 85.99 | 86.16 |
|
| 108 |
+
| ANLI | macro-F1 | 58.98 | 65.80 | 75.74 | 77.32 |
|
| 109 |
+
| BPoMP | accuracy | 78.14 | 87.24 | 92.02 | 93.92 |
|
| 110 |
+
| Humicroedit | accuracy | 61.80 | 62.56 | 65.68 | 64.50 |
|
| 111 |
+
| POP909-CL | accuracy | 84.40 | 84.95 | 84.70 | 85.05 |
|
| 112 |
+
| cfcolor | accuracy | 69.02 | 68.70 | 71.26 | 71.38 |
|
| 113 |
+
| MMLU † | accuracy | 56.09 | 65.65 | 77.95 | 81.42 |
|
| 114 |
+
| GPQA Diamond | accuracy | 33.67 | 35.71 | 44.39 | 48.47 |
|
| 115 |
+
| ARC-Easy † | accuracy | 88.97 | 95.50 | 98.19 | 98.82 |
|
| 116 |
+
| ARC-Challenge † | accuracy | 78.16 | 87.54 | 95.05 | 96.08 |
|
| 117 |
+
| WinoGrande | accuracy | 71.11 | 80.82 | 89.66 | 92.74 |
|
| 118 |
+
| HellaSwag | accuracy | 80.85 | 89.44 | 94.81 | 96.28 |
|
| 119 |
+
| GSM8K | accuracy | 49.47 | 57.35 | 69.37 | 71.04 |
|
| 120 |
+
| ChessBench | accuracy | 25.44 | 26.24 | 28.60 | 29.08 |
|
| 121 |
+
| MuSR | accuracy | 62.10 | 70.08 | 71.94 | 74.60 |
|
| 122 |
+
| SATA-Bench | case exact accuracy | 46.48 | 53.33 | 54.61 | 55.70 |
|
| 123 |
+
| SimpleBench † | accuracy | 0.00 | 10.00 | 0.00 | 10.00 |
|
| 124 |
+
| BRIGHT | nDCG@10 | 37.32 | 38.75 | 46.58 | 45.40 |
|
| 125 |
+
| Amazon ESCI | macro-F1 | 56.30 | 57.51 | 60.69 | 61.48 |
|
| 126 |
+
| ACOS | per-review F1 | 51.22 | 52.45 | 56.19 | 56.93 |
|
| 127 |
+
| FinEntity | macro-F1 | 85.65 | 87.77 | 95.53 | 94.83 |
|
| 128 |
+
| iSarcasmEval | Sarcasm F1 · track A, English | 44.64 | 59.44 | 63.76 | 68.02 |
|
| 129 |
+
| VAST | macro-F1 | 76.52 | 77.34 | 78.62 | 78.49 |
|
| 130 |
+
| NLI4CT | macro-F1 | 66.64 | 73.41 | 80.38 | 82.39 |
|
| 131 |
+
| CRUXEval | accuracy | 42.98 | 57.89 | 78.60 | 81.40 |
|
| 132 |
+
| CLadder | accuracy | 89.44 | 87.74 | 91.30 | 94.82 |
|
| 133 |
+
| HLE | accuracy | 14.97 | 13.97 | 11.98 | 11.58 |
|
| 134 |
+
| Habermas Machine | accuracy | 56.80 | 59.13 | 61.93 | 63.13 |
|
| 135 |
+
| PhishNChips phishing decisions | accuracy | 98.20 | 97.85 | 99.30 | 98.90 |
|
| 136 |
+
| MMLU-Pro | accuracy | 38.66 | 47.10 | 60.51 | 64.06 |
|
| 137 |
+
| BBH fixed-option tasks | accuracy | 68.88 | 76.96 | 84.07 | 87.07 |
|
| 138 |
+
| RAGTruth response-level hallucination | F1 on hallucinated class | 79.96 | 83.00 | 85.20 | 85.08 |
|
| 139 |
+
| HoVer claim verification | accuracy | 85.85 | 88.10 | 89.15 | 90.05 |
|
| 140 |
+
| When2Call MCQ | accuracy | 86.39 | 89.40 | 91.59 | 92.06 |
|
| 141 |
+
| New Yorker caption matching | accuracy | 56.25 | 65.91 | 73.67 | 76.52 |
|
| 142 |
+
|
| 143 |
+
</details>
|
| 144 |
|
| 145 |
+
Evaluation uses BF16 native reference inference and the official scorer. Independent re-scoring of the compressed predictions reproduces the results exactly.
|
| 146 |
|
|
|
|
| 147 |
|
| 148 |
+
### Inference Performance
|
| 149 |
|
| 150 |
+
Latest family measurements for the 256-token, single-question fixture:
|
| 151 |
+
|
| 152 |
+
| Model | GS1 Default P50 (ms) | CUDA Graph P50 / P95 (ms) | Speedup | Graph allocated (GiB) |
|
| 153 |
+
| --- | ---: | ---: | ---: | ---: |
|
| 154 |
+
| GS1-0.8B | 54.10 | **12.51 / 13.22** | 4.32× | 4.07 |
|
| 155 |
+
| GS1-2B | 53.95 | **18.64 / 18.69** | 2.89× | 10.60 |
|
| 156 |
+
| GS1-4B | 72.87 | **35.17 / 35.24** | 2.07× | 23.68 |
|
| 157 |
+
|
| 158 |
+
Single RTX 4090 reporting 48 GiB, BF16 computation, five warmups and 30 timed calls per group. Timing covers the complete in-process decision call, including validation, prompt compilation, model execution, probabilities and typed responses; model loading, graph capture, HTTP and SDK transport are excluded. Speedup compares GS1 Default P50 with CUDA Graph P50 using identical weights and inputs. Latency and memory depend on request shape.
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
|
| 162 |
+
## Quickstart
|
| 163 |
+
|
| 164 |
+
### Hugging Face Transformers
|
| 165 |
+
|
| 166 |
+
Use Python 3.11+ and install the dependencies:
|
| 167 |
|
| 168 |
```bash
|
| 169 |
+
python -m pip install torch==2.9.1 torchvision==0.24.1 transformers==5.3.0 accelerate safetensors 'pydantic>=2.8,<3' typesafe-sdk==0.7.0 pillow
|
| 170 |
```
|
| 171 |
|
| 172 |
+
Load the Hub ID or a local model directory and submit all three decision primitives in one call:
|
| 173 |
+
|
| 174 |
```python
|
| 175 |
+
import torch
|
| 176 |
from transformers import AutoModel
|
| 177 |
|
| 178 |
model = AutoModel.from_pretrained(
|
| 179 |
+
"bigai/GS1-0.8B",
|
| 180 |
trust_remote_code=True,
|
| 181 |
).eval().to("cuda")
|
| 182 |
|
| 183 |
+
request = {
|
| 184 |
+
"state": "A customer was charged twice and requests an urgent refund.",
|
| 185 |
+
"questions": {
|
| 186 |
"team": {
|
| 187 |
"type": "choice",
|
| 188 |
+
"instructions": "Which team should handle this ticket?",
|
| 189 |
+
"criteria": {
|
| 190 |
+
"billing": "Payments and refunds",
|
| 191 |
+
"technical": "Software problems"
|
| 192 |
+
}
|
| 193 |
+
},
|
| 194 |
+
"refund": {
|
| 195 |
+
"type": "noul",
|
| 196 |
+
"instructions": "Does the customer request a refund?"
|
| 197 |
},
|
|
|
|
| 198 |
"urgency": {
|
| 199 |
"type": "score",
|
| 200 |
"instructions": "Rate the urgency of handling this ticket.",
|
| 201 |
+
"criteria": [
|
| 202 |
+
"Routine",
|
| 203 |
+
"Soon",
|
| 204 |
+
"Immediate"
|
| 205 |
+
]
|
| 206 |
+
}
|
| 207 |
+
}
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
with torch.autocast("cuda", dtype=torch.bfloat16, cache_enabled=False):
|
| 211 |
+
result = model.decide(**request, precision="bf16")
|
| 212 |
+
|
| 213 |
print(result["answers"])
|
| 214 |
+
print(result["usage"])
|
| 215 |
```
|
| 216 |
|
| 217 |
+
The response contains `model`, `answers` and `usage`. Choice preserves candidate IDs and returns every candidate probability; Noul returns `p(true)`; Score returns the expected zero-based rubric level and its full probability distribution. Generated `output_tokens` is zero.
|
|
|
|
|
|
|
| 218 |
|
| 219 |
+
### GS1 Runtime
|
| 220 |
|
| 221 |
+
The GS1 runtime adds shared-state reuse, compatible batching, HTTP serving and qualified CUDA Graph replay:
|
| 222 |
|
| 223 |
```bash
|
| 224 |
git clone https://github.com/bigai-nlco/GS1.git
|
|
|
|
| 227 |
uv run gs1 serve --model bigai/GS1-0.8B --model-name GS1
|
| 228 |
```
|
| 229 |
|
| 230 |
+
The service exposes `POST /v1/systemone` and `GET /v1/models` at `http://127.0.0.1:8000`. The [Playground](https://github.com/bigai-nlco/GS1/blob/main/playground/README.md) provides an interactive Query workspace.
|
| 231 |
|
| 232 |
+
### TypeSafe SDK
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
|
| 234 |
+
Call the running service through the official SDK:
|
| 235 |
|
| 236 |
+
```python
|
| 237 |
+
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
|
| 238 |
|
| 239 |
+
with TypeSafeClient(
|
| 240 |
+
base_url="http://127.0.0.1:8000", api_key="local", model="GS1",
|
| 241 |
+
) as client:
|
| 242 |
+
result = client.system_one(
|
| 243 |
+
state="A customer was charged twice and requests an urgent refund.",
|
| 244 |
+
questions={
|
| 245 |
+
"team": Choice(
|
| 246 |
+
instructions="Which team should handle this ticket?",
|
| 247 |
+
criteria={"billing": "Payments and refunds", "technical": "Software problems"},
|
| 248 |
+
),
|
| 249 |
+
"refund": Noul(instructions="Does the customer request a refund?"),
|
| 250 |
+
"urgency": Score(
|
| 251 |
+
instructions="Rate the urgency of handling this ticket.",
|
| 252 |
+
criteria=["Routine", "Soon", "Immediate"],
|
| 253 |
+
),
|
| 254 |
+
},
|
| 255 |
+
)
|
| 256 |
|
| 257 |
+
print(result.choices["team"].choice)
|
| 258 |
+
print(result.choices["team"].probabilities)
|
| 259 |
+
print(result.nouls["refund"].noul)
|
| 260 |
+
print(result.scores["urgency"].score)
|
| 261 |
+
```
|
| 262 |
|
| 263 |
+
Use the API root as `base_url` and match `model` to the server alias configured by `--model-name`. The SDK accepts `api_key="local"` for this local service.
|
| 264 |
|
| 265 |
+
## License
|
| 266 |
|
| 267 |
+
Code and released model weights use [Apache-2.0](LICENSE).
|
| 268 |
|
| 269 |
+
## Citation
|
| 270 |
+
|
| 271 |
+
If you find our work helpful, feel free to give us a cite.
|
| 272 |
|
| 273 |
```bibtex
|
| 274 |
@techreport{zheng2026gs1,
|
|
|
|
| 277 |
institution={BIGAI},
|
| 278 |
year={2026}
|
| 279 |
}
|
| 280 |
+
```
|