mondk/Gemma-1B-Jev

It is Gemma, but fine-tuned to resemble TypeSafe/Jev.

Screenshot 2026-10-12 161500

Dataset: mondk/Jev-Decisions-EN-Vi-Vietnamese

Note regarding the license: If you publish a model derived from this one, you must use the Gemma license (as required by Google).

Usage

pip install transformers accelerate
import torch, json
from transformers import AutoModelForCausalLM, AutoTokenizer

REPO = "mondk/Gemma-1B-Jev-Decision-Classification-SystemOne"
tok = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForCausalLM.from_pretrained(REPO, dtype=torch.float16, device_map="auto")

prompt = (
  "Decision task. Output one JSON object, no explanation.\n"
  "STATE:\nSupport ticket: I got the wrong item, refund my card please.\n"
  'QUESTIONS:\n{"department": {"type": "choice", "instruction": "Which team handles this?", '
  '"options": ["general", "sales", "shipping", "billing", "technical"]}, '
  '"wants_refund": {"type": "boolean", "instruction": "Wants refund?"}}'
)
txt = tok.apply_chat_template(
  [{"role": "user", "content": prompt}],
  tokenize=False, add_generation_prompt=True,
)
inp = tok(txt, return_tensors="pt", add_special_tokens=False).to(model.device)
out = model.generate(inp["input_ids"], max_new_tokens=200, do_sample=False)
result = json.loads(tok.decode(out[0][inp["input_ids"].shape[1]:], skip_special_tokens=True).strip())
print(result)  # {"department": "shipping", "wants_refund": true}

  • add_special_tokens=False is mandatory β€” the tokenizer already includes <bos> in the template; using the default setting results in a double-BOS, causing the model to return an empty output.
  • Greedy decoding (do_sample=False) β€” the model was trained using the Jev method, making it suitable only for deterministic outputs rather than free-form chat.
  • The output is always a single JSON object (parseable via json.loads) with no extraneous text.

ty

Downloads last month
63
Safetensors
Model size
1.0B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for mondk/Gemma-1B-Jev-Decision-Classification-SystemOne

Finetuned
(428)
this model

Dataset used to train mondk/Gemma-1B-Jev-Decision-Classification-SystemOne

Space using mondk/Gemma-1B-Jev-Decision-Classification-SystemOne 1