Instructions to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/Vikhr-Gemma-2B-instruct-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Vikhr-Gemma-2B-instruct-GGUF", filename="Vikhr-Gemma-2B-instruct.Q2_K.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
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 QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
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 QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF with Ollama:
ollama run hf.co/QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
- Unsloth Studio new
How to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF 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 QuantFactory/Vikhr-Gemma-2B-instruct-GGUF 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 QuantFactory/Vikhr-Gemma-2B-instruct-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Vikhr-Gemma-2B-instruct-GGUF to start chatting
- Docker Model Runner
How to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Vikhr-Gemma-2B-instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Vikhr-Gemma-2B-instruct-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Vikhr-Gemma-2B-instruct-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/Vikhr-Gemma-2B-instruct-GGUF
This is quantized version of Vikhrmodels/Vikhr-Gemma-2B-instruct created using llama.cpp
Original Model Card
💨 Vikhr-Gemma-2B-instruct
RU
Мощная инструктивная модель на основе Gemma 2 2B, обученная на русскоязычном датасете GrandMaster-PRO-MAX.
EN
A powerful instructive model based on Gemma 2 2B, trained on the Russian-language dataset GrandMaster-PRO-MAX.
GGUF
Особенности:
- 📚 Основа / Base: gemma-2-2b-it
- 🇷🇺 Специализация / Specialization: RU
- 💾 Датасет / Dataset: GrandMaster-PRO-MAX
Попробовать / Try now:
Описание:
RU
Vikhr-Gemma-2B-instruct — это мощная и компактная языковая модель, обученная на датасете GrandMaster-PRO-MAX, специально доученная для обработки русского языка.
EN
Vikhr-Gemma-2B-instruct is a powerful and compact language model trained on the GrandMaster-PRO-MAX dataset, specifically designed for processing the Russian language.
Пример кода для запуска / Sample code to run:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Загрузка модели и токенизатора
model_name = "Vikhrmodels/Vikhr-Gemma-2B-instruct"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Подготовка входного текста
input_text = "Напиши стихотворение о весне в России."
# Токенизация и генерация текста
input_ids = tokenizer.encode(input_text, return_tensors="pt")
output = model.generate(input_ids, max_length=200, num_return_sequences=1, no_repeat_ngram_size=2)
# Декодирование и вывод результата
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
Ответ модели / Model response:
Весна в России – это время обновления природы, когда природа пробуждается >от зимнего сна. Вот стихотворение, отражающее эту красоту:
Весна в России
Зимняя тишина утихла, Весна в России пришла. Солнце светит, словно в сказке, В небесах – птицы в полете.
Снег пошел, ушел вдаль, И в каждом уголке – весна. Лед промерз, вода в реке – Ветры вьют, и листья поют.
Цветы распустились, как будто В честь весны, в честь жизни. Зеленая трава, как полотно, Под ногами – мягкость.
Весна в России – это чудо, Счастье, что в сердце живет. И каждый день – праздник, Когда природа в цвету.
Надеюсь, это стихотворение передало дух и красоту весны в России.
Метрики на ru_arena_general / Metrics on ru_arena_general
| Model | Score | 95% CI | Avg Tokens | Std Tokens | LC Score |
|---|---|---|---|---|---|
| suzume-llama-3-8B-multilingual-orpo-borda-half | 90.89 | +1.1 / -1.1 | 2495.38 | 1211.62 | 55.86 |
| mistral-nemo-instruct-2407 | 50.53 | +2.5 / -2.2 | 403.17 | 321.53 | 50.08 |
| sfr-iterative-dpo-llama-3-8b-r | 50.06 | +2.1 / -2.1 | 516.74 | 316.84 | 50.01 |
| gpt-3.5-turbo-0125 | 50.00 | +0.0 / -0.0 | 220.83 | 170.30 | 50.00 |
| glm-4-9b-chat | 49.75 | +1.9 / -2.3 | 568.81 | 448.76 | 49.96 |
| c4ai-command-r-v01 | 48.95 | +2.6 / -1.7 | 529.34 | 368.98 | 49.85 |
| llama-3-instruct-8b-sppo-iter3 | 47.45 | +2.0 / -2.2 | 502.27 | 304.27 | 49.63 |
| Vikhrmodels-vikhr-gemma-2b-it | 45.82 | +2.4 / -2.0 | 722.83 | 710.71 | 49.40 |
| suzume-llama-3-8b-multilingual | 45.71 | +2.4 / -1.7 | 641.18 | 858.96 | 49.38 |
| yandex_gpt_pro | 45.11 | +2.2 / -2.5 | 345.30 | 277.64 | 49.30 |
| hermes-2-theta-llama-3-8b | 44.07 | +2.0 / -2.2 | 485.99 | 390.85 | 49.15 |
| gpt-3.5-turbo-1106 | 41.48 | +1.9 / -2.0 | 191.19 | 177.31 | 48.77 |
| llama-3-smaug-8b | 40.80 | +2.1 / -1.6 | 524.02 | 480.56 | 48.68 |
| llama-3-8b-saiga-suzume-ties | 39.94 | +2.0 / -1.7 | 763.27 | 699.39 | 48.55 |
@article{nikolich2024vikhr,
title={Vikhr: The Family of Open-Source Instruction-Tuned Large Language Models for Russian},
author={Aleksandr Nikolich and Konstantin Korolev and Sergey Bratchikov and Nikolay Kompanets and Artem Shelmanov},
journal={arXiv preprint arXiv:2405.13929},
year={2024},
url={https://arxiv.org/pdf/2405.13929}
}
- Downloads last month
- 54
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit