Text Generation
Transformers
Safetensors
Russian
llama
russian
conversational
text-generation-inference
Instructions to use ViorikaAI-org/MicroLlama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ViorikaAI-org/MicroLlama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ViorikaAI-org/MicroLlama") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ViorikaAI-org/MicroLlama") model = AutoModelForCausalLM.from_pretrained("ViorikaAI-org/MicroLlama") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ViorikaAI-org/MicroLlama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ViorikaAI-org/MicroLlama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ViorikaAI-org/MicroLlama", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ViorikaAI-org/MicroLlama
- SGLang
How to use ViorikaAI-org/MicroLlama 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 "ViorikaAI-org/MicroLlama" \ --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": "ViorikaAI-org/MicroLlama", "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 "ViorikaAI-org/MicroLlama" \ --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": "ViorikaAI-org/MicroLlama", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ViorikaAI-org/MicroLlama with Docker Model Runner:
docker model run hf.co/ViorikaAI-org/MicroLlama
File size: 1,729 Bytes
9dda3a3 25c8aec 9dda3a3 25c8aec | 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 | ---
license: mit
language:
- ru
tags:
- llama
- russian
- conversational
model-index:
- name: MicroLLAMA
results: []
library_name: transformers
model_creator: ViorikaAI
pipeline_tag: text-generation
---
# 🦙 MicroLlama
**Эксперементальная микро-модель**
# Подробнее:
## ⚙️ Детали модели
- **Архитектура: LLAMA**
- **Параметры: 3M**
- **Язык: Русский**
- **Лицения: MIT**
## 🏋️ Детали Тренировки
- **Датасет:** ``
- **Железо:** **ОДНА** NVIDIA **GEFORCE RTX 5060 TI** (16GB VRAM)
- **Эпохи:** - 18
- **СРЕДНИЙ LOSS:** 0.4349
- **Оптимизатор:** 5e-4
- **Контекст:** 32 токена
## 🏋️ Использование
```python
from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
model_name = "ViorikaAI-org/MicroLlama"
tokenizer = PreTrainedTokenizerFast.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
model.eval()
prompt = "<s> Привет, как дела? =>"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=32,
temperature=0.7,
top_k=50,
top_p=0.9,
do_sample=True,
no_repeat_ngram_size=2,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id
)
full_text = tokenizer.decode(outputs[0], skip_special_tokens=False)
answer = full_text.split("=>")[-1].replace("</s>", "").strip()
print(f"Ответ модели: {answer}")
```
## 🛜 Наши Соц. Сети
- **Discord:** https://discord.gg/8JwTv8zj8d , https://discord.gg/7JE7maH6cf
- **Telegram:** https://t.me/viorika_official
|