🏛️ KhwarazmiAI 1.0 — Sovereign AI Assistant & Student Learning Mentor

Developed Solely by ZAZU AI Named in honor of the revered 9th-century polymath Muhammad ibn Musa al-Khwarizmi, father of algebra and algorithms.

Model on Hugging Face License: Gemma Developer: ZAZU AI


🌟 Model Overview

KhwarazmiAI 1.0 is a sovereign frontier-grade artificial intelligence assistant and academic student learning mentor fine-tuned on Google Gemma 4 31B across dual Tesla T4 GPUs via QLoRA.

🏛️ Core Identity Directives

  1. Developer: Engineered, fine-tuned, and curated solely by ZAZU AI.
  2. Pedagogical Student Mentor: Deconstructs advanced mathematics, physics, computer science, biology, and historical concepts with step-by-step intuitive clarity.
  3. Multilingual Fluency: Native, literary fluency in Uzbek (O'zbek tili), English, and Russian.
  4. Heritage: Dedicated to Muhammad ibn Musa al-Khwarizmi, celebrating classical algorithmics, algebra, and scientific methodology.
  5. Practical Daily Guidance: Concise, actionable, and structured assistance for research, workflow planning, and coding.

📊 Technical Architecture & Hyperparameters

  • Base Foundation Model: google/gemma-4-31B-it (31,395,515,952 parameters)
  • Tuning Precision: QLoRA (NF4 4-bit with Double Quantization, FP16 compute)
  • Trainable LoRA Parameters: 122,429,440 (Rank $r = 16$, Alpha $lpha = 32$, Dropout = 0.05)
  • Target Projection Layers: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj (821 adapted tensors)
  • Optimizer: Paged 8-bit AdamW with Cosine Learning Rate Decay
  • Effective Batch Size: 16 (Gradient Accumulation = 16, Micro-Batch = 1)
  • Training Corpus (10,400+ balanced samples):
    • 🇺🇿 Uzbek Language Corpus (ulugbek2013/uzbek-lang-lm)
    • ⚖️ Uzbek Legal & Regulatory Corpus (ulugbek2013/uzbek-law-lm)
    • 🧮 Mathematical & Proof Reasoning (GSM8K, MetaMathQA)
    • 💻 Code & Logic (OpenHermes-2.5, OpenOrca)
    • 🛡️ Safe Academic Alignment (no_robots, Anthropic HH-RLHF)

🚀 Quickstart Usage in Python

Using transformers and peft:

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel

base_model_id = "google/gemma-4-31B-it"
adapter_id = "ulugbek2013/KhwarazmiAI-1.0-Adapter"

# 1. Tokenizer
tokenizer = AutoTokenizer.from_pretrained(adapter_id, trust_remote_code=True)

# 2. 4-bit Base Model
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_use_double_quant=True,
    bnb_4bit_compute_dtype=torch.float16
)

base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    quantization_config=bnb_config,
    device_map="auto",
    torch_dtype=torch.float16,
    trust_remote_code=True
)

# 3. Attach KhwarazmiAI 1.0 Adapter
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()

# 4. Generate with Official Chat Template
messages = [
    {
        "role": "system",
        "content": "You are KhwarazmiAI 1.0, an advanced artificial intelligence assistant and student learning mentor developed solely by ZAZU AI."
    },
    {
        "role": "user",
        "content": "Salom! Kvadrat tenglamani yechish algoritmini bosqichma-bosqich tushuntirib bering."
    }
]

prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=512,
        temperature=0.7,
        top_p=0.9,
        repetition_penalty=1.1,
        do_sample=True
    )

response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(response)

🦙 Ollama & LM Studio Integration

You can run KhwarazmiAI 1.0 in Ollama or LM Studio using the provided Modelfile:

ollama create khwarazmi -f Modelfile
ollama run khwarazmi

📜 Citation & Attribution

@misc{khwarazmiai2026,
  author = {ZAZU AI Team},
  title = {KhwarazmiAI 1.0: Sovereign Multi-Domain AI Assistant & Student Mentor},
  year = {2026},
  publisher = {Hugging Face},
  journal = {Hugging Face Model Hub},
  howpublished = {\url{https://huggingface.co/ulugbek2013/KhwarazmiAI-1.0-Adapter}}
}
Downloads last month
20
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ulugbek2013/KhwarazmiAI-1.0-Adapter

Adapter
(369)
this model