Model: 24-mohamedyehia/Gloss2Text-V1-Gemma3-270M Source: Original Platform
license, datasets, language, base_model, pipeline_tag, tags
| license | datasets | language | base_model | pipeline_tag | tags | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| apache-2.0 |
|
|
|
text-generation |
|
Gloss2Text-V1-Gemma3-270M (Merged)
Overview
Gloss2Text-V1-Gemma3-270M is a fine-tuned version of Google's Gemma-3-270m-it, optimized for Arabic Sign Language (ArSL) gloss-to-text translation.
This release is merged, which means the LoRA adapters have already been fused into the base model weights for faster inference and easier plug-and-play usage.
Model Description
- Task: Converts a sequence of Arabic glosses into a natural, grammatically correct Modern Standard Arabic (MSA) sentence.
- Input format: Arabic gloss text, for example: "أنا شرب ماء الآن"
- Output format: Clean MSA text, for example: "أنا أشرب الماء الآن."
- Architecture: Gemma-3, 270M parameters
- Training method: Supervised fine-tuning with LoRA (rank 64), then merged
Training Highlights
The model was trained on a specialized dataset containing diverse ArSL gloss-sentence pairs.
- Final eval loss: ~0.34
- Precision: Trained with
bf16for improved numerical stability
How to Use
Because this is a merged model, you can load it directly with the transformers library without needing peft:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "24-mohamedyehia/Gloss2Text-V1-Gemma3-270M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
def translate_gloss(gloss_text):
prompt = f"Translate ArSL gloss to an MSA sentence.\nGloss: {gloss_text}\nOutput: "
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=50)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example
print(translate_gloss("أنا ذهاب صيدلية"))
Developer
Developed by Mohamed Yehia.
- LinkedIn: Mohamed Yehia
Description
Languages
Jinja
100%