Instructions to use RaspizdAI/tolk-flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RaspizdAI/tolk-flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RaspizdAI/tolk-flash") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RaspizdAI/tolk-flash") model = AutoModelForCausalLM.from_pretrained("RaspizdAI/tolk-flash", 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
- vLLM
How to use RaspizdAI/tolk-flash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RaspizdAI/tolk-flash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RaspizdAI/tolk-flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RaspizdAI/tolk-flash
- SGLang
How to use RaspizdAI/tolk-flash 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 "RaspizdAI/tolk-flash" \ --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": "RaspizdAI/tolk-flash", "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 "RaspizdAI/tolk-flash" \ --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": "RaspizdAI/tolk-flash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RaspizdAI/tolk-flash with Docker Model Runner:
docker model run hf.co/RaspizdAI/tolk-flash
tolk-flash
tolk-flash is a lightweight Flash version of the tolk-7B language model, based on Qwen 2.5 3B.
The model is designed for fast multi-turn conversational dialogue, persona alignment, and text generation in Russian and English while maintaining a small parameter count for efficient inference.
📌 Model Summary
Model Name: tolk-flash
Parameters: 3B
Base Model: unsloth/Qwen2.5-3B-bnb-4bit
Languages: Russian (ru), English (en)
Primary Task: Conversational Text Generation / Persona-based Dialogue
🚀 Quick Start
You can run tolk-flash using standard Hugging Face Transformers:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "RaspizdAI/tolk-flash"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto"
)
messages = [
{"role": "user", "content": "Привет! Расскажи немного о себе."}
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to("cuda")
outputs = model.generate(
input_ids=inputs,
max_new_tokens=1024,
temperature=0.2,
top_p=0.9,
do_sample=True
)
response = tokenizer.decode(
outputs[0][inputs.shape[1]:],
skip_special_tokens=True
)
print(response)
⚡ Why Flash?
tolk-flash is intended as a smaller and faster alternative to larger versions of the tolk-7B model.
With 3B parameters, it requires significantly fewer resources and is better suited for:
- Fast inference
- Weak GPUs
- Low-resource environments
- High-throughput conversational applications
📜 License
This model is made available under the MIT License. You are free to use, modify, distribute, and incorporate this model into commercial or non-commercial applications.
- Downloads last month
- 295