Loading…
Loading…
A compact, 29.65M-parameter language model designed to translate Gen Z slang into clear, natural English.
GenZ Translator is a lightweight language model built for a focused task: understanding informal internet language and rewriting it in standard conversational English while preserving the original meaning, emotion, attitude, and context.
Version 2 continues training from the original GenZ Translator checkpoint, with additional cleaned translation data and curated examples targeting abbreviations, slang, and meaning-related questions.
Version 2 introduces a continued fine-tuning stage designed to improve translation quality, especially for common abbreviations and contextual slang.
Improvements observed in the current evaluation include:
WYD, tbh, omw, ty, and npThe model still has limitations involving unusual spellings, repeated characters, mixed-language text, URLs, and preservation of every detail in the input.
Important: Improvements vary by evaluation set. The current handcrafted benchmark shows a clear gain, but the held-out dataset benchmark does not show a corresponding improvement in exact-match accuracy.
| Property | Value |
|---|---|
| Model name | GenZ Translator |
| Repository | Sankar-2910/genz-translator |
| Architecture | Llama-style decoder-only Transformer |
| Parameters | 29,653,568 |
| Layers | 7 |
| Hidden size | 448 |
| Attention heads | 7 |
| KV heads | 7 |
| Intermediate size | 1,792 |
| Context length | 384 tokens |
| Vocabulary | 8,000 |
| Tokenizer | Custom Byte-Level BPE |
| Framework | PyTorch / Transformers |
| Weight format | Safetensors |
| Intended task | Single-turn slang translation |
The architecture uses separate input embeddings and output-head weights (tie_word_embeddings=False).
This model is a specialized translator, not a general-purpose assistant.
| Category | Examples | v1 pass rate | v2 pass rate |
|---|---|---|---|
| Abbreviations | 39 | 82% | 100% |
| Contextual abbreviations | 16 | 88% | 94% |
| Meaning questions | 11 | 27% | 100% |
| Overflow | 1 | 100% | 100% |
| Paragraphs | 5 | 100% | 100% |
| Passthrough | 8 | 75% | 75% |
| Polarity | 10 | 90% | 90% |
| Meaning preservation | 7 | 57% | 71% |
| Robustness | 37 | 86% | 92% |
| Slang | 34 | 91% | 88% |
| Overall scored categories | — | 80.2% | 92.4% |
The handcrafted benchmark measures whether outputs satisfy category-specific evaluation rules. Its results should not be interpreted as a universal translation accuracy percentage.
| Metric | v1 | v2 |
|---|---|---|
| Exact match | 15.2% | 14.5% |
| Token F1 | 0.701 | 0.699 |
| EOS-terminated outputs | 100% | 100% |
| Slang remaining in output | 0.0% | 0.1% |
| Definition-style outputs | 0.1% | 0.0% |
| Latency, batch size 32 | 4.1 ms/prompt | 4.7 ms/prompt |
Exact-match evaluation is strict: a valid translation can be marked incorrect if its wording differs from the reference. Token F1 offers a measure of lexical overlap but does not fully measure semantic correctness.
| Validation metric | Before fine-tuning | Selected checkpoint |
|---|---|---|
| General validation loss | 0.5268 | 0.5241 |
| Curated validation loss | 1.3334 | 0.2168 |
| Combined validation loss | 0.9301 | 0.3704 |
The combined loss is the arithmetic mean of general and curated validation losses. The curated validation set contained 82 examples, so its result should be interpreted cautiously.
These loss figures come from the current fine-tuning run. They should not be compared directly with validation losses from a different dataset split or evaluation pipeline.
The results suggest that v2 has learned useful mappings for common abbreviations and some meaning-related prompts. However, generalization remains a work in progress.
Known failure cases include:
pull up and stanFurther evaluation on an independently held-out test set is needed before making stronger claims about general translation quality.
The original GenZ Translator was trained from scratch using a custom tokenizer and a specialized Gen Z-to-English dataset.
It did not start from pretrained Meta Llama, Qwen, or Mistral model weights.
Version 2 continues from the original Sankar-2910/genz-translator checkpoint rather than starting from random initialization.
The current run used:
| Setting | Value |
|---|---|
| Starting checkpoint | Sankar-2910/genz-translator |
| Training examples after preparation | 333,993 tokenized examples |
| General validation examples | 1,995 tokenized examples |
| Curated training pairs | 437 before repetition |
| Curated validation pairs | 82 |
| Epochs | 1 |
| Batch size | 32 |
| Peak learning rate | 5 × 10⁻⁵ |
| Optimizer | AdamW |
| Learning-rate schedule | Cosine decay with warmup |
| Gradient clipping | 1.0 |
| Maximum sequence length | 384 tokens |
| Hardware | Kaggle T4x2 GPU |
| Checkpoint selection | Combined general and curated validation loss |
The dataset pipeline loaded a source dataset of approximately one million rows and filtered it before training. The figures above describe the prepared data for this run, not the full raw dataset.
Training examples included curated examples repeated during training. The held-out curated examples were kept separate from those repeated training examples.
Loss was computed over response tokens rather than prompt tokens.
The model uses a custom tokenizer trained for the original translation task.
Use the prompt structure expected by the model:
<s><|instruction|>Translate the following Gen Z slang sentence into clear, standard English.<|input|>YOUR TEXT<|response|>
The model is optimized for single-turn translation. It is not designed to maintain conversational history.
Install the required packages:
pip install -U transformers torch safetensors
Load v2 with Transformers:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "Sankar-2910/genz-translator"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo,
tie_word_embeddings=False
).eval()
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device)
def translate(text, max_new_tokens=96):
prompt = (
"<s><|instruction|>"
"Translate the following Gen Z slang sentence into clear, standard English."
"<|input|>" + text +
"<|response|>"
)
inputs = tokenizer(
prompt,
add_special_tokens=False,
return_tensors="pt"
).to(device)
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
do_sample=False,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.eos_token_id
)
generated = output[0, inputs["input_ids"].shape[1]:]
return tokenizer.decode(
generated,
skip_special_tokens=True
).strip()
print(translate("WYD"))
print(translate("tbh, that movie was mid"))
print(translate("omw, traffic is crazy"))
Greedy decoding (do_sample=False) provides repeatable outputs under the same model and inference conditions. It does not guarantee that every output will be accurate.
For longer paragraphs, increase max_new_tokens as needed.
GenZ Translator v2 is a compact, specialized model. It can still:
Do not assume a translation is correct solely because it is fluent. For important text, verify the output.
The Hugging Face repository includes the model configuration, weights, and tokenizer files required for loading the model with Transformers.
The repository is intended to distribute the standard safetensors checkpoint. Quantized or GGUF variants are not included unless published separately.
If you use this model in research, please cite:
@misc{genztranslator2026v2,
title={GenZ Translator v2},
author={Sankar Narayanan},
year={2026},
note={A 29.65M-parameter decoder-only Transformer for Gen Z slang translation, continued from an earlier custom-trained checkpoint},
url={https://huggingface.co/Sankar-2910/genz-translator-v2}
}
For the underlying Llama architecture, see:
@article{touvron2023llama,
title={LLaMA: Open and Efficient Foundation Language Models},
author={Touvron, Hugo and others},
journal={arXiv preprint arXiv:2302.13971},
year={2023}
}
GenZ Translator is an exploration of compact language models, custom tokenization, dataset preparation, and specialized natural-language generation.
Created by Sankara Narayanan.
Project: Sankar-2910/genz-translator-v2