Instructions to use LadiesMan69/gemma-3-1b-tatar-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Studio
How to use LadiesMan69/gemma-3-1b-tatar-lora with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LadiesMan69/gemma-3-1b-tatar-lora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LadiesMan69/gemma-3-1b-tatar-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LadiesMan69/gemma-3-1b-tatar-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="LadiesMan69/gemma-3-1b-tatar-lora", max_seq_length=2048, )
Hugging Face | Base Model | Trained with Unsloth
License: Apache 2.0 | Author: LadiesMan69
- Model Overview
- Evaluation Results
- Core Capabilities
- Getting Started
- Best Practices
- Model Data
- Ethics and Safety
- Usage and Limitations
- Citation
gemma-3-1b-tatar-lora
gemma-3-1b-tatar-lora is a LoRA adapter built on top of Google's Gemma 3 (1B) instruction-tuned model, specialized for profanity filtering in the Tatar language. Given a Tatar-language input, the model rewrites the text to neutralize obscene language while preserving the original meaning as closely as possible. It is designed as a lightweight, on-device-friendly moderation component for chat apps, comment sections, and other user-generated-content pipelines that need Tatar-language coverage — a language largely unserved by mainstream moderation tools.
The adapter was trained with Unsloth and Hugging Face's TRL library, offering 2x faster fine-tuning than a standard training loop, on top of the 4-bit quantized base model unsloth/gemma-3-1b-it-bnb-4bit.
| Property | Value |
|---|---|
| Base model | google/gemma-3-1b-it (via unsloth/gemma-3-1b-it-bnb-4bit) |
| Adapter type | LoRA |
| Parameters (base) | ~1.0B |
| Precision | BF16 (safetensors) |
| Task | Text-to-text profanity filtering / detoxification |
| Language | Tatar (tt) |
| License | Apache 2.0 |
Evaluation Results
The adapter was evaluated on a held-out test set of Tatar sentences containing profanity, alongside a control set of clean sentences to measure over-filtering.
| Metric | Value | Description |
|---|---|---|
| Toxicity Reduction Rate | 78.67% | Share of profane input successfully neutralized |
| False Positive Rate | 0.00% | Share of clean input incorrectly altered |
| BERTScore (F1) | 0.6656 | Semantic similarity between input and output at the embedding level |
| Avg Cosine Similarity | 0.6633 | Average embedding-level similarity before vs. after filtering |
| Peak VRAM Delta | 0.74 GB | Additional GPU memory used during inference |
| Avg Tokens/sec | 2.88 | Average decoding throughput |
Reading the results: the model combines a strong toxicity reduction rate with a 0.00% false positive rate, meaning clean text is left untouched — an important property for a moderation filter that shouldn't "cry wolf" on innocuous language. The moderate BERTScore/cosine similarity (~0.66) reflects the fact that neutralizing profanity necessarily changes the text; it is not expected to reach near-1.0 similarity the way a pure paraphrase task would. Throughput (2.88 tok/s) reflects an unoptimized single-request setup and can likely be improved with batching or a dedicated serving engine (vLLM/SGLang).
Core Capabilities
- Tatar-language profanity detection & neutralization — identifies and rewrites obscene words/phrases in Tatar text.
- Meaning preservation — aims to keep the surrounding sentence intact rather than simply blanking out words.
- Low false-positive behavior — avoids altering clean text, as shown by the 0.00% FPR on the evaluation set.
- Lightweight footprint — built on a 1B-parameter base with a small VRAM delta (~0.74 GB), suitable for consumer GPUs or CPU inference with quantization.
- Chat-template compatible — works out of the box with the Gemma 3 chat template via Transformers.
Getting Started
Install the required dependencies:
pip install -U transformers torch accelerate
Load and run the model:
from transformers import AutoTokenizer, AutoModelForCausalLM
MODEL_ID = "LadiesMan69/gemma-3-1b-tatar-lora"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, device_map="auto")
messages = [
{"role": "user", "content": "<Tatar text containing profanity>"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0][input_len:], skip_special_tokens=True))
Loading with Unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
model_name="LadiesMan69/gemma-3-1b-tatar-lora",
max_seq_length=2048,
)
Serving with vLLM
pip install vllm
vllm serve "LadiesMan69/gemma-3-1b-tatar-lora"
Best Practices
- Single-turn filtering — the model performs best on single sentences or short passages passed as a single user turn; very long inputs may see degraded meaning preservation.
- Post-filter validation — for user-facing moderation pipelines, treat this model as one signal alongside rule-based filters and/or human review, rather than a standalone decision-maker.
- Batching for throughput — since baseline throughput is ~2.88 tok/s, batch multiple requests or use a serving engine (vLLM/SGLang) in production to improve latency.
- Domain match — the model is tuned specifically for Tatar profanity; performance on other Turkic languages or heavy Tatar-Russian code-mixing has not been separately validated.
Model Data
- Base model pretraining data: inherited from
google/gemma-3-1b-it, Google's general-purpose multilingual pretraining corpus (see the Gemma 3 model card for details). - Fine-tuning data: a task-specific dataset of Tatar sentences containing profanity paired with neutralized rewrites, plus clean Tatar sentences used to measure false positives.
- Fine-tuning method: LoRA adapters trained with Unsloth + TRL on the 4-bit quantized base model.
Ethics and Safety
This adapter inherits the safety properties and limitations of its Gemma 3 base model. It has not undergone the same scale of red-teaming and safety evaluation as Google's official Gemma releases, and it is a community fine-tune, not an official Google product. It should not be treated as a certified content-safety system.
Usage and Limitations
Intended Usage
- Pre-processing/filtering layer for Tatar-language user-generated content (chat, comments, forums).
- Research on low-resource-language moderation and detoxification.
- A starting point for further fine-tuning on related Tatar NLP moderation tasks.
Limitations
- Evaluated on a single held-out test set; results may not generalize to other data distributions (slang, dialectal variation, Tatar-Russian code-mixing).
- Moderate semantic-similarity scores (~0.66) mean meaning drift is possible on longer or more complex inputs.
- Not evaluated as a standalone content-moderation system; should be paired with additional safeguards in production.
- Inference throughput (~2.88 tok/s) is modest without further optimization.
Ethical Considerations and Risks
- Over-reliance risk: automated filtering can create false confidence; sensitive deployments (e.g., moderating content involving minors) should include human review.
- Bias: the fine-tuning dataset's coverage of Tatar dialects/slang is not exhaustively documented; filtering quality may vary across regional variants.
- Dual use: understanding what counts as "profane" in a language can, in principle, be misused to build language-specific harassment tools; this model is released for defensive/moderation use cases only.
Citation
If you use this adapter, please consider citing the repository:
@misc{ladiesman69_2026_gemma3tatar,
title={gemma-3-1b-tatar-lora: A LoRA Adapter for Tatar Profanity Filtering},
author={LadiesMan69},
year={2026},
url={https://huggingface.co/LadiesMan69/gemma-3-1b-tatar-lora}
}
This gemma3_text model was trained 2x faster with Unsloth and Hugging Face's TRL library, fine-tuned from unsloth/gemma-3-1b-it-bnb-4bit.
- Downloads last month
- 48
Model tree for LadiesMan69/gemma-3-1b-tatar-lora
Base model
google/gemma-3-1b-pt