Text Generation
Transformers
Safetensors
English
Russian
mistral
conversational
text-generation-inference
Instructions to use Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24") model = AutoModelForCausalLM.from_pretrained("Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24
- SGLang
How to use Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24 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 "Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24" \ --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": "Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24", "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 "Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24" \ --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": "Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24 with Docker Model Runner:
docker model run hf.co/Vikhrmodels/Vikhr-Nemo-12B-Instruct-R-21-09-24
Update Readme_en.md
Browse files- Readme_en.md +5 -4
Readme_en.md
CHANGED
|
@@ -274,10 +274,11 @@ Using the model's first response, `relevant_indexes` (JSON), one can determine w
|
|
| 274 |
### Cite
|
| 275 |
```
|
| 276 |
@inproceedings{nikolich2024vikhr,
|
| 277 |
-
title={Vikhr: Constructing a State-of-the-art Bilingual Open-Source Instruction-Following Large Language Model for Russian},
|
| 278 |
-
author={Aleksandr Nikolich and Konstantin Korolev and Sergei Bratchikov and
|
| 279 |
-
booktitle={Proceedings of the
|
| 280 |
year={2024},
|
| 281 |
-
|
|
|
|
| 282 |
}
|
| 283 |
```
|
|
|
|
| 274 |
### Cite
|
| 275 |
```
|
| 276 |
@inproceedings{nikolich2024vikhr,
|
| 277 |
+
title={Vikhr: Constructing a State-of-the-art Bilingual Open-Source Instruction-Following Large Language Model for {Russian}},
|
| 278 |
+
author={Aleksandr Nikolich and Konstantin Korolev and Sergei Bratchikov and Igor Kiselev and Artem Shelmanov },
|
| 279 |
+
booktitle = {Proceedings of the 4rd Workshop on Multilingual Representation Learning (MRL) @ EMNLP-2024}
|
| 280 |
year={2024},
|
| 281 |
+
publisher = {Association for Computational Linguistics},
|
| 282 |
+
url={https://arxiv.org/pdf/2405.13929}
|
| 283 |
}
|
| 284 |
```
|