Text Generation
Transformers
Safetensors
Russian
gpt2
gpt-2
russian
conversational
text-generation-inference
Instructions to use ViorikaAI/CalmaCatLM-2-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ViorikaAI/CalmaCatLM-2-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ViorikaAI/CalmaCatLM-2-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ViorikaAI/CalmaCatLM-2-mini") model = AutoModelForCausalLM.from_pretrained("ViorikaAI/CalmaCatLM-2-mini") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ViorikaAI/CalmaCatLM-2-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ViorikaAI/CalmaCatLM-2-mini" # 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/CalmaCatLM-2-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ViorikaAI/CalmaCatLM-2-mini
- SGLang
How to use ViorikaAI/CalmaCatLM-2-mini 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/CalmaCatLM-2-mini" \ --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/CalmaCatLM-2-mini", "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/CalmaCatLM-2-mini" \ --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/CalmaCatLM-2-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ViorikaAI/CalmaCatLM-2-mini with Docker Model Runner:
docker model run hf.co/ViorikaAI/CalmaCatLM-2-mini
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ViorikaAI/CalmaCatLM-2-mini")
model = AutoModelForCausalLM.from_pretrained("ViorikaAI/CalmaCatLM-2-mini")Quick Links
🐈⬛ CalmaCatLM-2-MINI
Подробнее:
⚙️ Детали модели
- Архитектура: GPT-3
- Параметры: 125M
- Язык: Русский
- Лицения: MIT
🏋️ Детали Тренировки
- Датасет: ``
- Железо: ОДНА NVIDIA GEFORCE RTX 5060 TI (16GB VRAM)
- Эпохи: ...
- Шагов: - 20 тысяч
- СРЕДНИЙ LOSS: 0.9000
- Оптимизатор: 3e-4
- Контекст: 1024 токенов
🏋️ Использование
from transformers import GPT2LMHeadModel, GPT2Tokenizer
model = GPT2LMHeadModel.from_pretrained("ViorikaAI/CalmaCatLM-2-mini")
tokenizer = GPT2Tokenizer.from_pretrained("ViorikaAI/CalmaCatLM-2-mini")
tokenizer.pad_token = tokenizer.eos_token
inputs = tokenizer("Привет, как дела?", return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=80,
temperature=0.7,
top_k=50,
do_sample=True,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
🛜 Наши Соц. Сети
- Discord: https://discord.gg/8JwTv8zj8d , https://discord.gg/7JE7maH6cf
- Telegram: https://t.me/viorika_official
- Downloads last month
- 54
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ViorikaAI/CalmaCatLM-2-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)