voidash commited on
Commit
4aa6500
·
verified ·
1 Parent(s): 39d56ae

barga v0.1.0: G14 decision model (English, Nepali)

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer/tokenizer.json filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
NOTICE ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ barga
2
+ Copyright 2026 Ampixa
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ The barga model weights are fine-tuned from the encoder of Julia-1 by Supersonic Labs
7
+ (https://huggingface.co/SupersonicLabs/Julia-1, revision a85b127321d580d65176c89ced8273f305745d85),
8
+ licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0).
9
+
10
+ Julia-1 is in turn built on mmBERT-small by the Johns Hopkins University CLSP group
11
+ (https://huggingface.co/jhu-clsp/mmBERT-small), licensed under the MIT License.
12
+
13
+ The model code drives transformers' ModernBERT implementation (Hugging Face transformers, Apache License 2.0).
README.md ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - ne
6
+ library_name: barga
7
+ pipeline_tag: zero-shot-classification
8
+ base_model: SupersonicLabs/Julia-1
9
+ tags:
10
+ - nepali
11
+ - decision-model
12
+ - multiple-choice
13
+ - system-one
14
+ - modernbert
15
+ - mmbert
16
+ model-index:
17
+ - name: barga
18
+ results:
19
+ - task:
20
+ type: multiple-choice
21
+ name: Typed decisions
22
+ dataset:
23
+ name: typed-decisions (test split)
24
+ type: LocalLLaMA/typed-decisions
25
+ split: test
26
+ metrics:
27
+ - type: accuracy
28
+ value: 76.3
29
+ name: Accuracy (released checkpoint)
30
+ - task:
31
+ type: natural-language-inference
32
+ name: Natural language inference
33
+ dataset:
34
+ name: MultiNLI (300-question sample)
35
+ type: nyu-mll/multi_nli
36
+ metrics:
37
+ - type: accuracy
38
+ value: 66.0
39
+ name: Accuracy (released checkpoint)
40
+ - task:
41
+ type: natural-language-inference
42
+ name: Natural language inference (Nepali)
43
+ dataset:
44
+ name: MNLI-Nepali (300-question sample)
45
+ type: IRIIS-RESEARCH/MNLI-Nepali
46
+ metrics:
47
+ - type: accuracy
48
+ value: 64.3
49
+ name: Accuracy (released checkpoint)
50
+ - task:
51
+ type: question-answering
52
+ name: Answerability / extractive QA as choice
53
+ dataset:
54
+ name: SQuAD 2.0 (300-question sample)
55
+ type: rajpurkar/squad_v2
56
+ metrics:
57
+ - type: accuracy
58
+ value: 61.0
59
+ name: Accuracy (released checkpoint)
60
+ - task:
61
+ type: text-classification
62
+ name: Intent classification
63
+ dataset:
64
+ name: CLINC150 (300-question sample)
65
+ type: clinc/clinc_oos
66
+ metrics:
67
+ - type: accuracy
68
+ value: 90.7
69
+ name: Accuracy (released checkpoint)
70
+ ---
71
+
72
+ # barga
73
+
74
+ **barga** (Nepali बर्ग, "category") is a small **system-one decision model** for English and Nepali. It reads a
75
+ **state** (a conversation, a call transcript, a document, a game position) and one or more **questions**, each with
76
+ its own candidate **options**, and returns a probability for every option in a single forward pass. It does not
77
+ generate text. It decides.
78
+
79
+ - **Size:** 140.6M parameters (ModernBERT / mmBERT-small encoder + a small option scorer), fp32 safetensors, 562 MB.
80
+ - **Languages:** English, Nepali (Devanagari and romanized), and code-mixed Nepali–English.
81
+ - **Architecture:** split-layer. The lower 11 of 22 encoder layers read the state once; the top 11 layers read each
82
+ question jointly with the state. Every question about the same state shares one state encoding.
83
+ - **Speed:** 0.87 s per turn (median; 1.38 s p95) on an Apple M3 Pro CPU with 4 threads, for simulator call turns of
84
+ about 6 questions over states of up to 1,024 tokens; a short input with one question takes 0.05–0.2 s. Peak
85
+ process memory 2.6 GB.
86
+ - **Licence:** Apache-2.0. Built on [Julia-1](https://huggingface.co/SupersonicLabs/Julia-1) (Apache-2.0), which is
87
+ built on [mmBERT-small](https://huggingface.co/jhu-clsp/mmBERT-small) (MIT).
88
+ - **Made by** [Ampixa](https://ampixa.com).
89
+
90
+ ## Quickstart
91
+
92
+ ```bash
93
+ pip install barga
94
+ ```
95
+
96
+ ```python
97
+ import barga
98
+
99
+ model = barga.load("ampixa/barga") # device="cuda" for a GPU
100
+
101
+ state = ("Caller: Hello, I want to book a check-up for my dog tomorrow morning.\n"
102
+ "Agent: Sure. We have 9:30 or 11:00 tomorrow.\n"
103
+ "Caller: 9:30 is fine.")
104
+
105
+ for d in model.decide(state, [
106
+ {"id": "intent", "text": "What does the caller want?",
107
+ "options": [{"id": "book", "description": "Book an appointment"},
108
+ {"id": "cancel", "description": "Cancel an appointment"},
109
+ {"id": "info", "description": "Only ask for information"}]},
110
+ {"id": "intent_ne", "text": "कल गर्नेले के चाहनुहुन्छ?",
111
+ "options": [{"id": "book", "description": "अपोइन्टमेन्ट बुक गर्न"},
112
+ {"id": "cancel", "description": "अपोइन्टमेन्ट रद्द गर्न"},
113
+ {"id": "info", "description": "जानकारी मात्र सोध्न"}]},
114
+ ]):
115
+ print(d.question_id, d.choice, d.probs)
116
+ # intent book {'book': 0.989, 'cancel': 0.009, 'info': 0.003}
117
+ # intent_ne book {'book': 0.983, 'cancel': 0.002, 'info': 0.015}
118
+ ```
119
+
120
+ Questions can be `"choice"` (default), `"boolean"` (two options valued `True`/`False`) or `"ordinal"` (numeric
121
+ option values; the result also carries an `expected_value`). Each takes 2–20 options and an optional `rubric`. The
122
+ model reads only the state, the question, the rubric and each option's description, never the ids. The input
123
+ format is documented in the [barga package](https://pypi.org/project/barga/).
124
+
125
+ ## How to read the output
126
+
127
+ `choice` is the most probable option; `probs` gives every option's probability (they sum to 1 within a question).
128
+ Probabilities compare options within one question. A flat distribution (say a top probability below 0.6) means the
129
+ model is unsure, which is often correct when the state does not answer the question. Set your own threshold on
130
+ your own data before acting on a decision automatically.
131
+
132
+ ## Intended uses
133
+
134
+ - Turn-by-turn decisions in voice and chat agents: intent, slot values, whether the caller confirmed, what to do next.
135
+ - Classification, routing and yes/no checks over English or Nepali text, with the label set given at run time.
136
+ - Reading-comprehension style checks (does the text support this statement? is this question answerable?).
137
+ - Rule and strategy questions about Nepali-played card and board games (see the limits below).
138
+
139
+ ## Evaluation
140
+
141
+ All numbers are accuracy (%) on held-out test sets that were never used for training or checkpoint selection. The
142
+ released checkpoint is **seed 17**; **two-seed** is the mean of seed 17 and an identically trained seed-18
143
+ replicate, shown to indicate seed variance. Sampled sets use a fixed seed (17).
144
+
145
+ ### Calls and agent decisions
146
+
147
+ | test set | questions | released | two-seed |
148
+ |---|---:|---:|---:|
149
+ | Held-out real customer-service calls, set A (English questions) | 2,589 | 77.0 | 76.6 |
150
+ | same calls, Nepali questions | 2,589 | 77.1 | 76.7 |
151
+ | same calls rendered in the output style of a speech recognizer (English / Nepali questions) | 2,589 | 72.1 / 71.6 | 72.1 / 71.9 |
152
+ | Held-out real calls, set B (English) | 135 | 64.4 | 64.8 |
153
+ | set B in speech-recognizer style | 135 | 62.2 | 60.7 |
154
+ | Receptionist simulator, template phrasing (300 calls) | 1,779 | 94.4 | 94.4 |
155
+ | Receptionist simulator, LLM phrasing (300 calls) | 1,678 | 96.1 | 96.1 |
156
+ | typed-decisions test split | 2,000 | 76.3 | 76.0 |
157
+
158
+ ### Reading comprehension and classification (300-question samples unless noted)
159
+
160
+ | test set | released | two-seed |
161
+ |---|---:|---:|
162
+ | MultiNLI | 66.0 | 65.5 |
163
+ | MNLI-Nepali | 64.3 | 63.0 |
164
+ | SQuAD 2.0 | 61.0 | 60.2 |
165
+ | BoolQ | 60.7 | 62.3 |
166
+ | ShARC | 62.7 | 64.2 |
167
+ | PAWS | 56.7 | 56.8 |
168
+ | CLINC150 intents | 90.7 | 91.3 |
169
+ | AG News (100) | 95.0 | 94.0 |
170
+ | Emotion (100) | 81.0 | 84.5 |
171
+ | Hard cases (1,500; the hard slice of an Ampixa support-ticket decision set) | 26.3 | 26.1 |
172
+
173
+ ### Games (rule and strategy questions; positions from engines and self-play)
174
+
175
+ | game | questions | released | two-seed |
176
+ |---|---:|---:|---:|
177
+ | Dhumbal | 1,440 | 62.0 | 62.1 |
178
+ | Ludo | 1,592 | 62.9 | 62.7 |
179
+ | Marriage | 1,494 | 47.7 | 47.6 |
180
+ | Call Break | 1,828 | 47.8 | 46.7 |
181
+ | Chess | 1,674 | 42.8 | 41.3 |
182
+ | Bagh-Chal | 3,726 | 24.0 | 24.1 |
183
+
184
+ Game questions have 2–20 options, so chance differs by set: about 14% on Bagh-Chal, and up to 50% on yes/no
185
+ families.
186
+
187
+ ### Against Julia-1 on identical questions
188
+
189
+ Same questions and the same scoring for both models; a question a model cannot encode counts as wrong.
190
+
191
+ | | Julia-1 | barga (released) |
192
+ |---|---:|---:|
193
+ | typed-decisions test | 72.5 | **76.3** |
194
+ | CLINC150 | 55.7 | **90.7** |
195
+ | MultiNLI / MNLI-Nepali | 30.7 / 31.0 | **66.0 / 64.3** |
196
+ | ShARC / BoolQ / SQuAD 2.0 | 31.0 / 45.7 / 51.0 | **62.7 / 60.7 / 61.0** |
197
+ | PAWS | 54.3 | **56.7** |
198
+ | AG News (100) | 94.0 | **95.0** |
199
+ | Emotion (100) | **86.0** | 81.0 |
200
+ | Hard cases | **33.7** | 26.3 |
201
+ | Julia-1's own evaluation families (12 Open-Jev families, macro) | **87.8** | 58.5 |
202
+
203
+ On the real-call and simulator sets barga scores 77 and 94–96, against Julia-1's 22 and 23. Read that gap with care:
204
+ - **Encoding:** Julia-1 cannot encode some of those questions; on the questions both models answer it scores 17.7–24.8.
205
+ - **Training data:** barga was trained on the training splits of those same sources, and Julia-1 was not.
206
+
207
+ Julia-1 leads on its own evaluation families: game-playing agents (tile platformer, ViZDoom, Snake), workflow and
208
+ customer controls, and reasoning controls. barga was not trained on those families.
209
+
210
+ ## Limitations
211
+
212
+ - **Near chance on some game families.** Chess move legality (yes/no), tic-tac-toe, Bagh-Chal, Marriage discards,
213
+ Ludo safe squares and Call Break card play score within a few points of chance. Do not use barga as a game engine;
214
+ use a rules engine for legality and barga, at most, to rank legal moves.
215
+ - **Out of domain.** Julia-1's agent-control families (above) and the hard support-ticket cases are weak spots.
216
+ - **Real-call accuracy is about 77%.** Speech-recognizer errors cost about 5 points (72%). Keep a human or a
217
+ confirmation step in the loop for anything with consequences.
218
+ - **Calibration.** Probabilities are informative but not calibrated to your data; threshold them on your own data.
219
+ - **Context.** 1,024 state tokens (when a state is longer, barga keeps its beginning and its most recent end) and
220
+ 768 tokens per question with its options. Longer questions are rejected, not cut.
221
+ - **Languages.** Tested on English, Nepali (Devanagari and romanized) and code-mixed text. Other languages inherit
222
+ some ability from mmBERT but were not evaluated.
223
+ - **Seed variance.** Two identically trained seeds differ by up to 3.5 points on small sets (135–300 questions);
224
+ differences smaller than that between models are not meaningful.
225
+
226
+ ## Out-of-scope uses
227
+
228
+ Generating text; open-ended question answering without candidate options; medical, legal, financial or safety-critical
229
+ decisions without human review; profiling or surveillance of people; any use that violates the licences of the
230
+ training data sources listed below.
231
+
232
+ ## Training data
233
+
234
+ barga was fine-tuned from the encoder of Julia-1 on a weighted mix of 32 training sets:
235
+
236
+ | source | share | licence / terms |
237
+ |---|---:|---|
238
+ | Nepali/English customer-service calls from partners, used under agreement; not released | 13.1% | private; used under agreement |
239
+ | Receptionist simulator: synthetic calls; template phrasing and LLM-written phrasing | 13.9% | generated by Ampixa |
240
+ | typed-decisions (train split) | 8.8% | Apache-2.0 |
241
+ | MultiNLI, SQuAD 2.0, ShARC, CLINC150, BoolQ, PAWS (English) | 19.5% | CC BY 3.0 / CC BY-SA 3.0 / MIT / other (MultiNLI), CC BY-SA 4.0, CC BY-SA 3.0, CC BY 3.0, CC BY-SA 3.0, "may be freely used for any purpose" |
242
+ | MultiNLI, SQuAD 2.0, ShARC, CLINC150, BoolQ machine-translated to Nepali (Sarvam-Translate) | 14.1% | as the originals |
243
+ | MNLI-Nepali (IRIIS-RESEARCH) | 4.8% | see the dataset |
244
+ | Bagh-Chal, Marriage, Dhumbal, Ludo, Call Break positions with rule-checked labels | 12.4% | generated by Ampixa |
245
+ | Chess positions from the Lichess open database with engine labels | 3.0% | CC0 (Lichess database) |
246
+ | Ampixa support-ticket decision sets (routing, negation, urgency, emotion, abstention) | 4.8% | Ampixa |
247
+ | Typed-decision replays with teacher soft labels | 2.4% | generated by Ampixa |
248
+ | AG News, Emotion (dair-ai), Banking77, MASSIVE (scenario) | 3.2% | research / non-commercial (AG News), educational and research purposes only (Emotion), CC BY 4.0, CC BY 4.0 |
249
+
250
+ Protected test calls and the typed-decisions test split were never used for training. No call audio or transcripts
251
+ are released.
252
+
253
+ ## Files
254
+
255
+ - `backbone/`: ModernBERT encoder (config.json, model.safetensors)
256
+ - `heads.pt`: option scorer weights
257
+ - `tokenizer/`: tokenizer (the mmBERT/Gemma-style 256k vocabulary)
258
+ - `bundle.json`: architecture, serialization config and the sha256 of every file above; `barga.load` verifies
259
+ them before loading. Its backbone reference was rewritten from a local path to its public source; every hashed
260
+ file is byte-identical to the evaluated checkpoint.
261
+
262
+ ## Citation
263
+
264
+ ```bibtex
265
+ @misc{barga2026,
266
+ title = {barga: a system-one decision model for English and Nepali},
267
+ author = {Ampixa},
268
+ year = {2026},
269
+ url = {https://huggingface.co/ampixa/barga}
270
+ }
271
+ ```
272
+
273
+ barga builds on Julia-1 (Supersonic Labs) and mmBERT (Johns Hopkins University CLSP).
backbone/config.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 2,
8
+ "classifier_activation": "gelu",
9
+ "classifier_bias": false,
10
+ "classifier_dropout": 0.0,
11
+ "classifier_pooling": "mean",
12
+ "cls_token_id": 1,
13
+ "decoder_bias": true,
14
+ "deterministic_flash_attn": false,
15
+ "dtype": "float32",
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 1,
18
+ "global_attn_every_n_layers": 3,
19
+ "gradient_checkpointing": false,
20
+ "hidden_activation": "gelu",
21
+ "hidden_size": 384,
22
+ "initializer_cutoff_factor": 2.0,
23
+ "initializer_range": 0.02,
24
+ "intermediate_size": 1152,
25
+ "layer_norm_eps": 1e-05,
26
+ "layer_types": [
27
+ "full_attention",
28
+ "sliding_attention",
29
+ "sliding_attention",
30
+ "full_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "full_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "full_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "full_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "full_attention",
43
+ "sliding_attention",
44
+ "sliding_attention",
45
+ "full_attention",
46
+ "sliding_attention",
47
+ "sliding_attention",
48
+ "full_attention"
49
+ ],
50
+ "local_attention": 128,
51
+ "mask_token_id": 4,
52
+ "max_position_embeddings": 8192,
53
+ "mlp_bias": false,
54
+ "mlp_dropout": 0.0,
55
+ "model_type": "modernbert",
56
+ "norm_bias": false,
57
+ "norm_eps": 1e-05,
58
+ "num_attention_heads": 6,
59
+ "num_hidden_layers": 22,
60
+ "pad_token_id": 0,
61
+ "position_embedding_type": "sans_pos",
62
+ "repad_logits_with_grad": false,
63
+ "rope_parameters": {
64
+ "full_attention": {
65
+ "rope_theta": 160000,
66
+ "rope_type": "default"
67
+ },
68
+ "sliding_attention": {
69
+ "rope_theta": 160000,
70
+ "rope_type": "default"
71
+ }
72
+ },
73
+ "sep_token_id": 1,
74
+ "sparse_pred_ignore_index": -100,
75
+ "sparse_prediction": true,
76
+ "tie_word_embeddings": true,
77
+ "transformers_version": "5.17.0",
78
+ "vocab_size": 256000
79
+ }
backbone/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d86e7f036986b46eaf392c372d8fe03796d189792ae9fa0b470bcf220c060546
3
+ size 561987832
bundle.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "format": "barga-bundle-v1",
3
+ "architecture": "split_layer",
4
+ "model": {
5
+ "cross_blocks": 2,
6
+ "ffn_mult": 4,
7
+ "dropout": 0.1,
8
+ "split_top_layers": 11
9
+ },
10
+ "serialization": {
11
+ "version": "barga-ser-v1",
12
+ "max_state_tokens": 1024,
13
+ "max_branch_tokens": 768,
14
+ "max_joint_tokens": 1536,
15
+ "min_state_tokens": 32,
16
+ "state_head_fraction": 0.3
17
+ },
18
+ "backbone": {
19
+ "id": "SupersonicLabs/Julia-1",
20
+ "revision": "a85b127321d580d65176c89ced8273f305745d85",
21
+ "component": "encoder",
22
+ "source_weights_sha256": "df853bf7fe424420011f3d0c47a05d7341aa9eefa7fb9f203ea4aada4ad95b72"
23
+ },
24
+ "barga_version": "0.0.1",
25
+ "torch": "2.14.0+cu130",
26
+ "transformers": "5.17.0",
27
+ "created_at": 1791049772.5638797,
28
+ "files": {
29
+ "backbone/config.json": "c98509e2c952a364bc639aef342134a575c4ecbccce6db1f1ee8e1e03b919049",
30
+ "backbone/model.safetensors": "d86e7f036986b46eaf392c372d8fe03796d189792ae9fa0b470bcf220c060546",
31
+ "heads.pt": "83cbd6b2646641856eb4034573f2eb83d914cd73c163cba3431a87ea16155302",
32
+ "tokenizer/tokenizer.json": "609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f",
33
+ "tokenizer/tokenizer_config.json": "8126d750f083e2f2bc52dcd2400c36882822145ad41e00bf95842e4d559de64d"
34
+ },
35
+ "step": 9000,
36
+ "dev_task_macro": 0.8357260501906745,
37
+ "selection_dev": [
38
+ "sim_dev",
39
+ "sim_heldout",
40
+ "iriis_mnli",
41
+ "mt_mnli",
42
+ "mt_squad2",
43
+ "mt_sharc",
44
+ "mt_clinc",
45
+ "mt_boolq",
46
+ "mnli",
47
+ "squad2",
48
+ "sharc",
49
+ "clinc",
50
+ "boolq",
51
+ "paws",
52
+ "baghchal",
53
+ "gd_dev",
54
+ "typed_replay_dev"
55
+ ],
56
+ "release": {
57
+ "name": "barga",
58
+ "checkpoint": "G14 seed 17 (best dev checkpoint, step 9000)",
59
+ "license": "apache-2.0",
60
+ "note": "backbone reference rewritten from a local path to its public source; every hashed file is unchanged"
61
+ }
62
+ }
heads.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83cbd6b2646641856eb4034573f2eb83d914cd73c163cba3431a87ea16155302
3
+ size 598589
tokenizer/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f
3
+ size 34363188
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "bos_token": "<bos>",
4
+ "clean_up_tokenization_spaces": false,
5
+ "cls_token": "<bos>",
6
+ "eos_token": "<eos>",
7
+ "extra_special_tokens": [
8
+ "<start_of_turn>",
9
+ "<end_of_turn>"
10
+ ],
11
+ "is_local": true,
12
+ "local_files_only": false,
13
+ "mask_token": "<mask>",
14
+ "max_length": 512,
15
+ "model_input_names": [
16
+ "input_ids",
17
+ "attention_mask"
18
+ ],
19
+ "model_max_length": 8192,
20
+ "pad_token": "<pad>",
21
+ "padding_side": "right",
22
+ "sep_token": "<eos>",
23
+ "spaces_between_special_tokens": false,
24
+ "stride": 0,
25
+ "tokenizer_class": "TokenizersBackend",
26
+ "truncation_side": "right",
27
+ "truncation_strategy": "longest_first",
28
+ "unk_token": "<unk>"
29
+ }