Instructions to use SignvrseOfficial/Glosser_OLMo2_1B_it_v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SignvrseOfficial/Glosser_OLMo2_1B_it_v1 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("allenai/OLMo-2-0425-1B-Instruct") model = PeftModel.from_pretrained(base_model, "SignvrseOfficial/Glosser_OLMo2_1B_it_v1") - Notebooks
- Google Colab
- Kaggle
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
- Teacher: SignvrseOfficial/Glosser_Gemma2_2B_it_v2
- Sibling (50%): SignvrseOfficial/Glosser_OLMo2_1B_it_v1
- Sibling (25%): SignvrseOfficial/Glosser_Qwen25_0.5B_it_v1
- Downloads last month
- 19
Model tree for SignvrseOfficial/Glosser_OLMo2_1B_it_v1
Base model
allenai/OLMo-2-0425-1B Finetuned
allenai/OLMo-2-0425-1B-SFT Finetuned
allenai/OLMo-2-0425-1B-DPO Finetuned
allenai/OLMo-2-0425-1B-RLVR1 Finetuned
allenai/OLMo-2-0425-1B-Instruct