Instructions to use TilQazyna/Til-mini-1B-GEC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TilQazyna/Til-mini-1B-GEC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TilQazyna/Til-mini-1B-GEC") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TilQazyna/Til-mini-1B-GEC") model = AutoModelForCausalLM.from_pretrained("TilQazyna/Til-mini-1B-GEC", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TilQazyna/Til-mini-1B-GEC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TilQazyna/Til-mini-1B-GEC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TilQazyna/Til-mini-1B-GEC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TilQazyna/Til-mini-1B-GEC
- SGLang
How to use TilQazyna/Til-mini-1B-GEC with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TilQazyna/Til-mini-1B-GEC" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TilQazyna/Til-mini-1B-GEC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "TilQazyna/Til-mini-1B-GEC" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TilQazyna/Til-mini-1B-GEC", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TilQazyna/Til-mini-1B-GEC with Docker Model Runner:
docker model run hf.co/TilQazyna/Til-mini-1B-GEC
You need to agree to share your contact information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
Бұл репозиторийге қолжетімділік өтінім бойынша беріледі. Өзіңіз туралы және деректерді қалай қолданатыңыз туралы жазыңыз — өтінімді TilQazyna командасы қарайды. · Доступ к репозиторию выдаётся по заявке. Расскажите о себе и о том, как собираетесь использовать данные — заявку рассматривает команда TilQazyna. · Access to this repository is granted on request. Tell us who you are and how you plan to use the material; the TilQazyna team reviews each application.
Log in or Sign Up to review the conditions and access this model content.
Til-mini-1B-GEC
Қазақ мәтініндегі қатені түзету · Исправление ошибок в казахском тексте · Kazakh grammatical error correction
Қазақша
Til-mini-1B-GEC — қазақ мәтініндегі грамматикалық, орфографиялық және пунктуациялық қателерді түзететін 956.3M параметрлі модель. Репозиторий көлемі — 1.93 ГБ. Ол Til-mini-1B негізінде Til-GEC деректерімен fine-tune жасалған.
Құрылымы мен міндеті
| Сипаттама | Мәні |
|---|---|
| Архитектура | DeepseekV3ForCausalLM, MLA |
| Қабат саны | 24 |
| Контекст | 2048 токен |
| Формат | ChatML |
| Fine-tune деректері | шамамен 900 GEC жұбы |
Модель қазақ әріптерін, бас әріпті, тыныс белгілерін және жиі кездесетін қиысу мен емле қателерін түзетеді. Ұзын мәтінді сөйлем бойынша өңдеп, нәтижесінің бірінші жолын алу ұсынылады.
Іске қосу
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "TilQazyna/Til-mini-1B-GEC"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
message = "Мәтіндегі қателерді түзет. Тек түзетілген мәтінді қайтар.\n\nМәтін: кеше жанбыр жауды"
prompt = tokenizer.apply_chat_template([{"role": "user", "content": message}], tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=True).split("\n")[0])
Қолжетімділік
Карточка мен файлдар тізімі ашық. Файлдарды «Request access» өтінімін TilQazyna командасы мақұлдағаннан кейін жүктеуге болады.
Байланысты репозиторийлер
Base-модель — Til-mini-1B, оқыту деректері — Til-GEC.
Русский
Til-mini-1B-GEC — модель на 956.3M параметров для исправления грамматических, орфографических и пунктуационных ошибок в казахском тексте. Объём репозитория — 1.93 ГБ. Это fine-tune Til-mini-1B на Til-GEC.
Устройство и задача
| Характеристика | Значение |
|---|---|
| Архитектура | DeepseekV3ForCausalLM, MLA |
| Слоёв | 24 |
| Контекст | 2048 токенов |
| Формат | ChatML |
| Данные fine-tune | около 900 GEC-пар |
Модель исправляет казахские буквы, регистр, пунктуацию и частые ошибки согласования и орфографии. Длинный текст лучше обрабатывать по предложениям и брать первую строку ответа.
Как запустить
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "TilQazyna/Til-mini-1B-GEC"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
message = "Мәтіндегі қателерді түзет. Тек түзетілген мәтінді қайтар.\n\nМәтін: кеше жанбыр жауды"
prompt = tokenizer.apply_chat_template([{"role": "user", "content": message}], tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=True).split("\n")[0])
Доступ
Карточка и список файлов открыты. Команда TilQazyna разрешает скачивание после рассмотрения заявки через «Request access».
Связанные репозитории
Базовая модель — Til-mini-1B, данные обучения — Til-GEC.
English
Til-mini-1B-GEC is a 956.3M-parameter model for correcting grammatical, spelling, and punctuation errors in Kazakh text. The repository occupies 1.93 GB. It fine-tunes Til-mini-1B on Til-GEC.
Architecture and task
| Characteristic | Value |
|---|---|
| Architecture | DeepseekV3ForCausalLM, MLA |
| Layers | 24 |
| Context | 2048 tokens |
| Format | ChatML |
| Fine-tune data | about 900 GEC pairs |
The model corrects Kazakh letters, capitalization, punctuation, and common agreement and spelling errors. Longer texts should be processed sentence by sentence, keeping the first response line.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "TilQazyna/Til-mini-1B-GEC"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo)
message = "Мәтіндегі қателерді түзет. Тек түзетілген мәтінді қайтар.\n\nМәтін: кеше жанбыр жауды"
prompt = tokenizer.apply_chat_template([{"role": "user", "content": message}], tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tokenizer.decode(output[0][inputs.input_ids.shape[1]:], skip_special_tokens=True).split("\n")[0])
Access
The card and file list are public. Downloads require approval of a request submitted through “Request access” and reviewed by the TilQazyna team.
Related repositories
The base checkpoint is Til-mini-1B, and the training dataset is Til-GEC.
Лицензия · License: apache-2.0 · TilQazyna
- Downloads last month
- -
Model tree for TilQazyna/Til-mini-1B-GEC
Base model
TilQazyna/Til-mini-1B