--- title: NogaiLLM Russian-Nogai (experimental) emoji: 😻 colorFrom: yellow colorTo: pink sdk: gradio sdk_version: 6.19.0 python_version: '3.13' app_file: app.py pinned: false license: apache-2.0 short_description: Experimental Russian-Nogai translation (Qwen2.5-1.5B LoRA) models: - Qwen/Qwen2.5-1.5B-Instruct - ansarzeinulla/Qwen2.5-1.5B-Nogai-LoRA - ansarzeinulla/Qwen2.5-1.5B-Nogai-SFT-Experimental datasets: - ansarzeinulla/Nogai-Unified-Corpus-v1 - ansarzeinulla/Nogai-Russian-SFT-Biblical-v1 --- # NogaiLLM demo: Russian ↔ Nogai (experimental) Chat demo of [NogaiLLM](https://github.com/ansarzeinulla/NogaiLLM-Apple-Silicon): Qwen2.5-1.5B-Instruct adapted to Nogai in two LoRA stages trained with `mlx-lm` on an Apple M2 Pro. ## How it works 1. Downloads both MLX adapters and converts them to PEFT format: all seven target modules (q/k/v/o/gate/up/down), layers 12–27. 2. Merges the **Phase 1** adapter ([Qwen2.5-1.5B-Nogai-LoRA](https://huggingface.co/ansarzeinulla/Qwen2.5-1.5B-Nogai-LoRA), continued pre-training on Nogai text) into Qwen2.5-1.5B-Instruct. 3. Applies the **Phase 2** adapter ([Qwen2.5-1.5B-Nogai-SFT-Experimental](https://huggingface.co/ansarzeinulla/Qwen2.5-1.5B-Nogai-SFT-Experimental), translation instructions) on top. 4. Generates on CPU in float32, temperature 0.3, up to 128 new tokens. ## Try Use the format the model was trained on: - `Переведи этот текст на ногайский язык: В начале сотворил Бог небо и землю.` - `Переведи этот текст на русский язык: Бизикилер, яшавлары пайдасыз болмасын.` ## Limitations - Trained on Bible text only. Modern-domain sentences often come back with religious vocabulary, or with words from other languages. - Free CPU hardware: the first reply after the Space wakes up takes a while. - No quality numbers yet. A clean evaluation (chrF++/BLEU against human translations on a held-out test set) is in progress.