Text Generation
Transformers
Safetensors
Turkish
llama
slm
base-model
causal-lm
pre-trained
tr-llm
Ahıska
AhiskaTurks
MeskhetianTurks
AhıskaTürkleri
text-generation-inference
Instructions to use AhiskaAI/AhiskaAI-65m-Base-v0.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AhiskaAI/AhiskaAI-65m-Base-v0.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AhiskaAI/AhiskaAI-65m-Base-v0.2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AhiskaAI/AhiskaAI-65m-Base-v0.2") model = AutoModelForCausalLM.from_pretrained("AhiskaAI/AhiskaAI-65m-Base-v0.2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AhiskaAI/AhiskaAI-65m-Base-v0.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AhiskaAI/AhiskaAI-65m-Base-v0.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AhiskaAI/AhiskaAI-65m-Base-v0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AhiskaAI/AhiskaAI-65m-Base-v0.2
- SGLang
How to use AhiskaAI/AhiskaAI-65m-Base-v0.2 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 "AhiskaAI/AhiskaAI-65m-Base-v0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AhiskaAI/AhiskaAI-65m-Base-v0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "AhiskaAI/AhiskaAI-65m-Base-v0.2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AhiskaAI/AhiskaAI-65m-Base-v0.2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AhiskaAI/AhiskaAI-65m-Base-v0.2 with Docker Model Runner:
docker model run hf.co/AhiskaAI/AhiskaAI-65m-Base-v0.2
| license: apache-2.0 | |
| language: | |
| - tr | |
| pipeline_tag: text-generation | |
| tags: | |
| - slm | |
| - base-model | |
| - causal-lm | |
| - pre-trained | |
| - tr-llm | |
| - Ahıska | |
| - AhiskaTurks | |
| - MeskhetianTurks | |
| - AhıskaTürkleri | |
| library_name: transformers | |
| # AhiskaAI-65m-Base-v0.2 | |
| AhiskaAI-65m-Base-v0.2 is a 65 million parameter Small Language Model (SLM) built from scratch. It is the lightweight member of the AhiskaAI v0.2 family, designed to provide efficient Turkish language understanding on resource-constrained hardware. | |
| ## Model Details | |
| - **Architecture:** Llama-based architecture. | |
| - **Parameters:** 65M. | |
| - **Context Window:** 1024 tokens. | |
| - **Tokenizer:** Custom BPE Tokenizer (Vocabulary Size: 32,000). | |
| - **Training Framework:** PyTorch & Transformers. | |
| --- | |
| ## Data Curation (The "Quality over Quantity" Approach) | |
| A major improvement in the v0.2 release is the adoption of a data-centric training pipeline. | |
| - **Raw Data (v0.1):** 5GB of raw Turkish corpus. | |
| - **Curated Data (v0.2):** 1.2GB of carefully filtered, high-quality Turkish text. | |
| - **Process:** Approximately 75% of noisy, duplicated, and low-quality samples were removed to maximize linguistic quality and training efficiency. | |
| --- | |
| ## Key Improvements from v0.1 | |
| - **Architecture Shift:** Migrated from GPT-2 to a modern Llama-based architecture. | |
| - **Normalization:** RMSNorm. | |
| - **Positional Encoding:** RoPE (Rotary Positional Embeddings). | |
| - **Activation:** SiLU. | |
| - **Precision:** Trained using bfloat16 for efficient consumer GPU training. | |
| --- | |
| ## Design Goal | |
| Unlike larger language models, the 65M variant focuses on efficiency while preserving core language understanding abilities. | |
| The objective of this model is not to maximize factual knowledge, but to provide: | |
| - Strong Turkish language modeling. | |
| - Basic instruction understanding. | |
| - Fast inference on low-resource hardware. | |
| - A compact research baseline for future AhiskaAI releases. | |
| --- | |
| ## Training Logs | |
|  | |
| *The graph above demonstrates the training convergence of AhiskaAI-65m-Base-v0.2. The stable decline in loss confirms the effective alignment of the model architecture with the curated Turkish dataset.* | |
| --- | |
| ## Usage | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model = AutoModelForCausalLM.from_pretrained("AhiskaAI/AhiskaAI-65m-Base-v0.2") | |
| tokenizer = AutoTokenizer.from_pretrained("AhiskaAI/AhiskaAI-65m-Base-v0.2") | |
| text = "Türkiye Cumhuriyeti" | |
| inputs = tokenizer(text, return_tensors="pt") | |
| outputs = model.generate(**inputs, max_new_tokens=50) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| --- | |
| ## Training Hardware | |
| Trained on NVIDIA RTX 4050 6GB Laptop GPU. | |
| --- | |
| ## Future Plans | |
| - Larger context windows. | |
| - Improved Turkish datasets. | |
| - Future v0.3 model family. | |
| --- | |
| ## About AhiskaAI | |
| AhiskaAI is an independent open-source initiative dedicated to developing efficient Turkish Small Language Models trained completely from scratch. | |
| Follow us on Hugging Face for updates and new releases. | |