wikimedia/wikipedia
Viewer • Updated • 61.6M • 296k • 1.67k
How to use RaspizdAI/ueban-1.3 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="RaspizdAI/ueban-1.3") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("RaspizdAI/ueban-1.3")
model = AutoModelForCausalLM.from_pretrained("RaspizdAI/ueban-1.3", device_map="auto")How to use RaspizdAI/ueban-1.3 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "RaspizdAI/ueban-1.3"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "RaspizdAI/ueban-1.3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/RaspizdAI/ueban-1.3
How to use RaspizdAI/ueban-1.3 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "RaspizdAI/ueban-1.3" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "RaspizdAI/ueban-1.3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "RaspizdAI/ueban-1.3" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "RaspizdAI/ueban-1.3",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use RaspizdAI/ueban-1.3 with Docker Model Runner:
docker model run hf.co/RaspizdAI/ueban-1.3
A tiny Russian language model with 180M parameters, based on the Llama architecture and designed to run on edge devices.
| Total parameters | 180,186,624 |
| Vocabulary size | 50,257 |
| Embedding dimensions | 768 |
| Hidden layers | 20 |
| Attention heads | 12 |
| Head dimension | 64 |
| Context length | 1024 |
The model works with plain-text instructions in this format:
### Инструкция:
{question}
### Ответ:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("RaspizdAI/ueban-1.3")
model = AutoModelForCausalLM.from_pretrained("RaspizdAI/ueban-1.3", dtype="bfloat16").cuda().eval()
prompt = "### Инструкция:\nКто ты?\n### Ответ:\n"
ids = tok(prompt, return_tensors="pt").input_ids.cuda()
with torch.no_grad():
out = model.generate(ids, max_new_tokens=60, do_sample=True, temperature=0.8, top_p=0.9,
top_k=50, repetition_penalty=1.15,
pad_token_id=tok.pad_token_id, eos_token_id=tok.eos_token_id)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
This model is licensed under CC-BY-Sa-4.0.