utkarshshukla2912 commited on
Commit
39a2bed
·
verified ·
1 Parent(s): 1f2db50

Card: training recipe and considerations

Browse files
Files changed (1) hide show
  1. README.md +91 -6
README.md CHANGED
@@ -238,12 +238,97 @@ GPU. Generating the rationale adds roughly 20–25 tokens.
238
  - As with any language model, decisions can be wrong; keep a fallback for high-stakes actions (payments, account
239
  changes, cancellations).
240
 
241
- ## Training data
242
-
243
- Fine-tuned on a multilingual mix of the public datasets listed in this card's metadata (intent routing, typed
244
- decisions, NLI, NER, slot and function-argument extraction, explanation data), each used under its own licence, plus
245
- proprietary conversational routing data from Ringg AI, which is not released. Evaluation rows above are disjoint from
246
- the training rows. Belebele and the Kev suites were never used in training.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
 
248
  ## License
249
 
 
238
  - As with any language model, decisions can be wrong; keep a fallback for high-stakes actions (payments, account
239
  changes, cancellations).
240
 
241
+ ## Training
242
+
243
+ ### Data
244
+
245
+ A multitask mix in one shared format (system prompt per task, JSON input, JSON answer):
246
+
247
+ | task family | public sources |
248
+ |---|---|
249
+ | Intent routing | MASSIVE (multilingual), Banking77, CLINC-OOS, Bitext customer support, Hindi prompt routing, Hinglish-TOP |
250
+ | Typed decisions (choice / yes-no-unknown / score) | Open-Jev, jev-bench, jev-distill, tasksource-jev, typed-decisions-synth |
251
+ | NLI and yes/no, English + 10 Indic languages | IndicXNLI, BoolQ-Indic, BoolQ, MultiNLI |
252
+ | Explanations | e-SNLI, ECQA |
253
+ | Entity extraction | Naamapadam, HiNER, MultiCoNER v2 |
254
+ | Slots, function selection and arguments | SGD, MASSIVE-Agents, BFCL-Hi, ToolACE, Hermes JSON mode, xLAM irrelevance, X-RiSAWOZ |
255
+ | Extractive QA | IndicQA |
256
+
257
+ On top of these, Ringg's own conversational routing data (not released) teaches the voice-agent setting: transcribed
258
+ multilingual calls, multi-step flows, and when to stay versus move. Its rationales are short English sentences.
259
+
260
+ About half of the public rows are in Indian languages or code-mixed text. Telugu, Kannada and Gujarati are
261
+ oversampled because they are underrepresented in the sources. Every row passed automatic format checks (the gold id
262
+ is among the options, ids are unique, JSON is valid), and a sample of every source was reviewed for label quality.
263
+ Sources whose labels did not hold up in review were left out.
264
+
265
+ ### Recipe
266
+
267
+ - **Base:** `google/gemma-4-E2B-it`, text only. Parameter-efficient fine-tuning (LoRA on the language-model attention
268
+ and MLP projections), then merged into the base weights. The vision and audio towers are untouched.
269
+ - **Objective:** next-token loss on the answer only. The option id is weighted up, so the decision is learned first;
270
+ rationale tokens are weighted down.
271
+ - **Order invariance:** options are reshuffled every epoch, and ids are sometimes replaced by opaque codes, so the
272
+ model reads the descriptions instead of trusting positions or id names. Some examples appear twice in an epoch with
273
+ different option orders and the same answer.
274
+ - **Robustness:** a "none of these" option is added to some public choice tasks, and fields to extract are reshuffled.
275
+ - **Length:** prompts up to about 2.5k tokens. Long conversations keep their latest turns.
276
+ - **Selection:** the checkpoint was chosen on routing accuracy for held-out agents (conversation flows never seen in
277
+ training), not on the public benchmarks above. Training stopped once that score stopped improving.
278
+ - **Precision:** bf16 throughout, on a single GPU.
279
+
280
+ Evaluation rows in this card are disjoint from training rows. Belebele and the Kev suites were never used in training.
281
+
282
+ ## Considerations
283
+
284
+ ### Designing options
285
+
286
+ - **Write options as conditions.** "User reports a failed or pending payment" works; "intent = payments" does not.
287
+ The model never sees your agent's system prompt, so any rule it must follow has to be in the option text.
288
+ - **Put the call stage in the text.** For example: "user has no further questions after being helped" or "user agreed
289
+ to talk to a live specialist". Wrap-up and hand-off moves are the ones the model misses when the option is vague.
290
+ - **Include an explicit stay option**, and a "none of these" option for open-ended menus.
291
+ - **Use unique, short ids.** Up to 24 options per decision were seen in training.
292
+ - **Feed data the model cannot hear as text** in the state or option (e.g. "account status: not registered"). Do not
293
+ expect the model to infer hidden facts.
294
+
295
+ ### Deployment
296
+
297
+ - **Precision:** use bfloat16. float16 corrupts Gemma-4 outputs.
298
+ - **Attention kernels:** Gemma-4's 512-wide attention heads need a GPU with enough shared memory. Ada/Hopper (L4,
299
+ L40S, H100) work with vLLM's Triton backend; T4 does not (use transformers in bf16 there, which is slow).
300
+ - **Multimodal memory:** with vLLM, pass `limit_mm_per_prompt={"image": 0, "video": 0, "audio": 0}` to skip
301
+ reserving memory for inputs you don't send.
302
+ - **Context:** the model was trained on the most recent turns of a conversation (about five lines). Longer histories
303
+ add latency more than accuracy.
304
+ - **Constrained decoding:** to guarantee a valid id, constrain the branch to your option ids (e.g. vLLM structured
305
+ outputs with a `choice` list), or map the decoded text back to the nearest id.
306
+ - **Calibration:** the first-token log-probabilities of the option ids give a usable ranking. Calibrate a stay/move
307
+ threshold on your own traffic before you act on low-margin decisions.
308
+
309
+ ### Safety and responsible use
310
+
311
+ - **Prompt injection:** the model is trained to treat the `state` as data, not instructions, but it is not a
312
+ security boundary. Keep permission checks and irreversible actions (payments, cancellations, account changes)
313
+ behind your own logic and confirmations.
314
+ - **Imperfect output:** routing and extraction mistakes happen, and more often on noisy transcripts, rare languages
315
+ and long option lists. Log the decisions and keep a human or LLM fallback for ambiguous cases.
316
+ - **Uneven language coverage:** English, Hindi and Hinglish are strongest. Some Indic languages have less training
317
+ data. Evaluate on your own languages and domains before production.
318
+ - **Personal data:** extraction pulls personal details (names, numbers, addresses) out of conversations when asked.
319
+ Handle outputs under your data-protection obligations. Do not use the model to profile people or to make decisions
320
+ with legal or similarly significant effects without human review.
321
+ - **Rationales** are short explanations of the chosen option, useful for logs and debugging. They are not guaranteed
322
+ to reflect the model's internal reasoning.
323
+
324
+ ### Evaluation caveats
325
+
326
+ - **Small samples:** each source contributes up to 150 held-out rows (60 for validation), so single-dataset numbers
327
+ carry a few points of noise. Task-family averages are steadier.
328
+ - **Extraction scoring** uses exact match after normalisation, so a correct value in different wording counts as
329
+ wrong. This penalises all three models equally.
330
+ - **Same prompts for all three models:** the base models are scored zero-shot on this card's prompt format, and a
331
+ different prompt could raise their scores.
332
 
333
  ## License
334