Glosser — KSL Glossing (50% distilled student)

LoRA adapter distilled from SignvrseOfficial/Glosser_Gemma2_2B_it_v2 (v6-ksl-prompt) into allenai/OLMo-2-0425-1B-Instruct (1.0B parameters, 50% of the 2B teacher).

Translates English sentences into Kenyan Sign Language (KSL) gloss notation.

Evaluation (held-out web corpus, n=258)

Model Token F1 Exact Match
Teacher (Gemma2-2B v6) 0.616 14.0%
This model 0.618 14.3%

Training tracked on Weights & Biases.

Prompt

Translate the following sentence into Kenyan Sign Language (KSL) glosses.

<English sentence>

Usage

import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

BASE = "allenai/OLMo-2-0425-1B-Instruct"
ADAPTER = "SignvrseOfficial/Glosser_OLMo2_1B_it_v1"

tokenizer = AutoTokenizer.from_pretrained(ADAPTER)
base = AutoModelForCausalLM.from_pretrained(
    BASE, torch_dtype=torch.float16, device_map="auto"
)
model = PeftModel.from_pretrained(base, ADAPTER)
model.eval()

sentence = "That house is ours."
messages = [{
    "role": "user",
    "content": (
        "Translate the following sentence into Kenyan Sign Language "
        f"(KSL) glosses.\n\n{sentence}"
    ),
}]
prompt = tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=128, do_sample=False)
gloss = tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(gloss)

Training

  • Method: Black-box knowledge distillation (teacher-generated labels) + LoRA SFT
  • Train set: 8,818 sentence–gloss pairs (teacher labels from KSL annotation corpus)
  • LoRA: r=32, alpha=64, 4-bit QLoRA, 3 epochs

Related models

Downloads last month
19
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for SignvrseOfficial/Glosser_OLMo2_1B_it_v1