Text Generation
Transformers
Safetensors
GGUF
Russian
English
qwen2
qwen
lora
assistant
chat
conversational
text-generation-inference
Instructions to use LUMAMODEL/luma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LUMAMODEL/luma with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LUMAMODEL/luma") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LUMAMODEL/luma") model = AutoModelForCausalLM.from_pretrained("LUMAMODEL/luma", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use LUMAMODEL/luma with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf LUMAMODEL/luma:Q8_0 # Run inference directly in the terminal: llama cli -hf LUMAMODEL/luma:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf LUMAMODEL/luma:Q8_0 # Run inference directly in the terminal: llama cli -hf LUMAMODEL/luma:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf LUMAMODEL/luma:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf LUMAMODEL/luma:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf LUMAMODEL/luma:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf LUMAMODEL/luma:Q8_0
Use Docker
docker model run hf.co/LUMAMODEL/luma:Q8_0
- LM Studio
- Jan
- vLLM
How to use LUMAMODEL/luma with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LUMAMODEL/luma" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LUMAMODEL/luma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LUMAMODEL/luma:Q8_0
- SGLang
How to use LUMAMODEL/luma 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 "LUMAMODEL/luma" \ --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": "LUMAMODEL/luma", "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 "LUMAMODEL/luma" \ --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": "LUMAMODEL/luma", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use LUMAMODEL/luma with Ollama:
ollama run hf.co/LUMAMODEL/luma:Q8_0
- Unsloth Studio
How to use LUMAMODEL/luma with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LUMAMODEL/luma to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for LUMAMODEL/luma to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for LUMAMODEL/luma to start chatting
- Pi
How to use LUMAMODEL/luma with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LUMAMODEL/luma:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "LUMAMODEL/luma:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use LUMAMODEL/luma with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LUMAMODEL/luma:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "LUMAMODEL/luma:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use LUMAMODEL/luma with Docker Model Runner:
docker model run hf.co/LUMAMODEL/luma:Q8_0
- Lemonade
How to use LUMAMODEL/luma with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull LUMAMODEL/luma:Q8_0
Run and chat with the model
lemonade run user.luma-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use LUMAMODEL/luma with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf LUMAMODEL/luma:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default LUMAMODEL/luma:Q8_0
Run Hermes
hermes
- Atomic Chat
File size: 6,254 Bytes
f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d f9489f1 ef2982d 20b745b ef2982d f9489f1 ef2982d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | ---
license: apache-2.0
language:
- ru
- en
library_name: transformers
pipeline_tag: text-generation
base_model: Qwen/Qwen2.5-0.5B-Instruct
tags:
- qwen
- lora
- ru
- assistant
- chat
- gguf
datasets:
- LUMAMODEL/luma-dataset
---
# 🐯 LUMA — мой дружелюбный русскоязычный помощник
<div align="center">
**Компактная дообученная `Qwen2.5-0.5B-Instruct` для живого общения по-русски**
[](https://www.apache.org/licenses/LICENSE-2.0)
[](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
[](#файлы)
[](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct)
</div>
---
## ✨ Кто эта LUMA?
Это не просто очередная нейронка — это **твой собеседник-ассистент**, обученный вести
естественные русские диалоги: здороваться, общаться, поддерживать беседу, отвечать на вопросы.
- 💬 **Живое общение по-русски** — отвечает по-человечески;
- 🧠 **Понимает контекст** — помнит, о чём разговор;
- ⌨️ **Может писать код и HTML** (если попросить);
- ⚡ **Работает даже на CPU** — всего 494 млн параметров;
- 🆓 **Бесплатна** — лицензия Apache-2.0.
Дообучена методом **LoRA** поверх `Qwen2.5-0.5B-Instruct` на корпусе русских диалогов.
Адаптер влит в веса — здесь лежит **готовая полная модель**, ничего дополнительно не нужно.
---
## 📦 Файлы
| Файл | Что это | Размер |
|---|---|---|
| `model.safetensors` | Полные веса модели (merged) | 988 МБ |
| `luma-q8_0.gguf` | **GGUF q8_0 — для LM Studio / Ollama** | 531 МБ |
| `config.json`, `tokenizer.*` | Конфигурация и токенизатор | — |
| `chat_template.jinja` | Chat-шаблон общения | — |
| `README.md` | Этот файл 😊 | — |
---
## 🚀 Быстрый старт
### Вариант 1 — Python / transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("LUMAMODEL/luma")
model = AutoModelForCausalLM.from_pretrained("LUMAMODEL/luma", torch_dtype="auto")
prompt = tok.apply_chat_template(
[{"role": "user", "content": "Привет! Как дела?"}],
tokenize=False, add_generation_prompt=True,
)
inputs = tok(prompt, return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=256, do_sample=True, temperature=0.8)
print(tok.decode(out[0], skip_special_tokens=True))
```
### Вариант 2 — LM Studio 🖥️
1. Открой **LM Studio** → вкладка **Search**;
2. Найди **`LUMAMODEL/luma`** и скачай **`luma-q8_0.gguf`**;
3. Открой **Chat**, выбери модель — и просто общайся 💬
### Вариант 3 — Ollama 🦙
```bash
ollama create luma -f - <<'EOF'
FROM https://huggingface.co/LUMAMODEL/luma/resolve/main/luma-q8_0.gguf
EOF
ollama run luma
```
---
## 💻 Хочешь полный код? (важно!)
LUMA обучена с системным промптом «программист» и без него может отвечать коротко.
**Для длинного и полного кода:**
1. **В LM Studio:** правая панель → **System Prompt** → вставь:
```
Ты — LUMA, русскоязычный ассистент и программист. Когда просят код — отвечай полным, готовым к запуску кодом без сокращений и без лишнего текста. Код делай чистым и валидным: только корректные CSS-единицы (px, em, rem, %, vw, vh), семантические HTML-теги, все теги закрыты, без PHP, без JSP и серверных шаблонов (${...}), без невалидных конструкций и обрывков чужого кода.
```
2. **Max Tokens** поставь **2048+** (по умолчанию в LM Studio часто 256/512 — из-за этого код обрывается!).
3. Пример запроса: «Сделай страницу на HTML + CSS: шапка, карточка товара с фото, ценой и кнопкой Купить».
> ⚙️ Рекомендуемая генерация: temperature 0.7, top_p 0.8, repetition_penalty 1.1.
---
## 🧠 Пример
**Вы:** *Привет! Как у тебя дела?*
**LUMA:** *Привет! Всё отлично, спасибо 😊 Рад, что ты заглянул. Чем могу помочь сегодня?*
---
## 🎓 Как обучалась
| Параметр | Значение |
|---|---|
| **База** | `Qwen/Qwen2.5-0.5B-Instruct` (Apache-2.0) |
| **Метод** | LoRA: r=8, alpha=16, dropout 0.1 |
| **Целевые слои** | q/k/v/o/gate/up/down proj |
| **Данные** | Корпус русских диалогов (ассистент) |
| **Точность** | bf16, batch=1, grad-accum=16 |
| **LR** | 1.5e-4, cosine + warmup |
| **Контекст** | 1024–2048 токенов |
| **Loss** | только по токенам ответов ассистента (+KL-рег. 0.5) |
> 📊 Дата-сеты обучения: [`LUMAMODEL/luma-dataset`](https://huggingface.co/datasets/LUMAMODEL/luma-dataset)
---
## 🛠 Благодарности
- [Qwen](https://huggingface.co/Qwen) за отличную базовую модель;
- [PEFT](https://github.com/huggingface/peft) за LoRA;
- [llama.cpp](https://github.com/ggml-org/llama.cpp) за GGUF. |