Instructions to use TilQazyna/Til-Core-1B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TilQazyna/Til-Core-1B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TilQazyna/Til-Core-1B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TilQazyna/Til-Core-1B-Instruct") model = AutoModelForCausalLM.from_pretrained("TilQazyna/Til-Core-1B-Instruct", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TilQazyna/Til-Core-1B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TilQazyna/Til-Core-1B-Instruct" # 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-Core-1B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TilQazyna/Til-Core-1B-Instruct
- SGLang
How to use TilQazyna/Til-Core-1B-Instruct 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-Core-1B-Instruct" \ --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-Core-1B-Instruct", "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-Core-1B-Instruct" \ --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-Core-1B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TilQazyna/Til-Core-1B-Instruct with Docker Model Runner:
docker model run hf.co/TilQazyna/Til-Core-1B-Instruct
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-Core-1B-Instruct
Қазақша нұсқаулар мен диалогқа арналған модель · Модель для инструкций и диалога на казахском языке · Instruction and dialogue model for Kazakh
Қазақша
Til-Core-1B-Instruct — қазақ тіліндегі нұсқаулар мен бір айналымды диалогқа арналған 1.25B параметрлі модель. Репозиторий көлемі — 3.57 ГБ; модель Til-Core-1B негізінде supervised fine-tune арқылы бейімделген.
Модель native-Kazakh instruction–response жұптарымен үйретілген және ChatML пішімін қолданады. Ол қазақша жауап береді, бірақ дәл фактілерге сүйенетін міндеттерде қате ақпарат немесе тақырыптан ауытқу болуы мүмкін.
Құрылымы мен үйрету
| Сипаттама | Мәні |
|---|---|
| Архитектура | LlamaForCausalLM |
| Параметр саны | 1.25B |
| Жасырын қабат өлшемі | 2048 |
| Қабат саны | 16 |
| Attention басы | 32 |
| Сөздік | 256002 токен |
| Контекст ұзындығы | 2048 токен |
| SFT жұбы | 52 173 |
| Epoch | 3 |
| Үйрету пішімі | ChatML |
Үйретуде loss тек assistant токендеріне есептелген. Модель RLHF кезеңінен өтпеген және safety alignment жасалмаған.
Сұрау пішімі
Репозиторийде chat_template.jinja бар. apply_chat_template user хабарын ChatML пішіміне келтіреді және generation басталатын assistant белгісін қосады.
Іске қосу
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "TilQazyna/Til-Core-1B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, dtype=torch.bfloat16, device_map="auto"
).eval()
messages = [{"role": "user", "content": "Денсаулықты сақтаудың үш кеңесін айт."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
output = model.generate(**inputs, max_new_tokens=160, do_sample=True, temperature=0.7, top_p=0.9)
answer = output[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(answer, skip_special_tokens=True))
Қолжетімділік
Карточка мен файлдар тізімін өтінімсіз көруге болады. Файлдарды жүктеу үшін «Request access» батырмасы арқылы сұрау жіберіледі, оны TilQazyna командасы қарайды.
Байланысты репозиторийлер
Базалық checkpoint — Til-Core-1B. Supervised fine-tune деректерінің TilQazyna жинағы — Til-Instruct.
Русский
Til-Core-1B-Instruct — модель на 1.25B параметров для инструкций и одношагового диалога на казахском языке. Репозиторий занимает 3.57 ГБ; модель получила supervised fine-tune поверх Til-Core-1B.
Для обучения использованы native-Kazakh пары instruction–response и формат ChatML. Модель отвечает по-казахски, но в заданиях на точные факты может сообщать неверные сведения или отклоняться от темы.
Устройство и обучение
| Характеристика | Значение |
|---|---|
| Архитектура | LlamaForCausalLM |
| Параметров | 1.25B |
| Размер скрытого слоя | 2048 |
| Слоёв | 16 |
| Голов attention | 32 |
| Словарь | 256002 токена |
| Длина контекста | 2048 токенов |
| SFT-пар | 52 173 |
| Epoch | 3 |
| Формат обучения | ChatML |
Loss при обучении считался только по токенам assistant. Модель не проходила RLHF и не получила safety alignment.
Формат запроса
В репозитории лежит chat_template.jinja. Метод apply_chat_template переводит сообщение user в формат ChatML и добавляет маркер assistant для начала generation.
Как запустить
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "TilQazyna/Til-Core-1B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, dtype=torch.bfloat16, device_map="auto"
).eval()
messages = [{"role": "user", "content": "Денсаулықты сақтаудың үш кеңесін айт."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
output = model.generate(**inputs, max_new_tokens=160, do_sample=True, temperature=0.7, top_p=0.9)
answer = output[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(answer, skip_special_tokens=True))
Доступ
Карточка и перечень файлов видны без заявки. Для скачивания нужно отправить запрос кнопкой «Request access»; заявки рассматривает команда TilQazyna.
Связанные репозитории
Базовый checkpoint — Til-Core-1B. Коллекция TilQazyna с данными для supervised fine-tune — Til-Instruct.
English
Til-Core-1B-Instruct is a 1.25B-parameter model for Kazakh instructions and single-turn dialogue. The repository is 3.57 GB; the checkpoint was produced by supervised fine-tuning Til-Core-1B.
Training used native-Kazakh instruction–response pairs formatted as ChatML. The model responds in Kazakh, although prompts requiring precise factual knowledge can lead to inaccurate claims or topic drift.
Architecture and training
| Property | Value |
|---|---|
| Architecture | LlamaForCausalLM |
| Parameters | 1.25B |
| Hidden size | 2048 |
| Layers | 16 |
| Attention heads | 32 |
| Vocabulary | 256002 tokens |
| Context length | 2048 tokens |
| SFT pairs | 52 173 |
| Epochs | 3 |
| Training format | ChatML |
Training calculated loss only on assistant tokens. This checkpoint has no RLHF stage and no safety alignment.
Prompt format
The repository includes chat_template.jinja. Calling apply_chat_template converts the user message to ChatML and appends the assistant marker that starts generation.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "TilQazyna/Til-Core-1B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, dtype=torch.bfloat16, device_map="auto"
).eval()
messages = [{"role": "user", "content": "Денсаулықты сақтаудың үш кеңесін айт."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)
output = model.generate(**inputs, max_new_tokens=160, do_sample=True, temperature=0.7, top_p=0.9)
answer = output[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(answer, skip_special_tokens=True))
Access
The model card and file listing are visible without an access request. Downloads require approval after submission through “Request access”; the TilQazyna team reviews each application.
Related repositories
The base checkpoint is Til-Core-1B. TilQazyna's supervised fine-tuning data collection is Til-Instruct.
Лицензия · License: apache-2.0 · TilQazyna
- Downloads last month
- -
Model tree for TilQazyna/Til-Core-1B-Instruct
Base model
TilQazyna/Til-Core-1B