AhiskaAI LLaMA 65M Alpaca v0.1 is a next-generation, highly optimized Small Language Model (SLM) built completely from scratch for the Turkish language ecosystem.
Unlike older architectures, this model is initialized from zero using the modern LLaMA framework (featuring RoPE, SiLU activation, and RMSNorm). It was pre-trained for 1 full epoch on a 5.3 GB clean Turkish corpus and subsequently instruction fine-tuned via the Alpaca format. It represents a major leap in efficiency, packing modern LLM features into a tight, lightweight ~65M parameter envelope.
To guarantee a structurally sound foundation capable of instruction alignment, the model underwent a rigorous dual-stage training pipeline:
At AhıskaAI, we champion transparency and the indie "Build in Public" spirit. This modern LLaMA variant was hammered out entirely on local, consumer-grade hardware:
Instead of using English-centric tokenizers that aggressively fragment agglutinative Turkish words, this model deploys a custom BPE Tokenizer with a 32,000 vocab size trained entirely from scratch on our raw corpus.
As verified by the core configuration, this model abandons legacy frameworks for a pure LLaMA layout:
LlamaForCausalLMhidden_size): 512intermediate_size): 1376num_hidden_layers): 12num_attention_heads): 8silu)max_position_embeddings): 1024 tokensYou can easily load and run inference using the Hugging Face transformers library. Make sure to use the exact Alpaca prompt template for the best instruction-following results:
from transformers import LlamaForCausalLM, AutoTokenizer
import torch
model_name = "AhiskaAI/ahiska-llama-65m-alpaca-v0.1"
# Load model and custom tokenizer
model = LlamaForCausalLM.from_pretrained(model_name).to("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained(model_name)
def generate_response(instruction):
# Standard Alpaca Prompt Template
prompt = f"Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_length=200,
do_sample=True,
top_k=40,
top_p=0.92,
temperature=0.6, # Keeps the small LLaMA focused and realistic
repetition_penalty=1.15
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
return response.split("### Response:\n")[-1].strip()
# Sample Generation
print(generate_response("Sağlıklı yaşamak için 3 ipucu ver"))