Instructions to use Defetya/ru-3b-openllama-transformers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Defetya/ru-3b-openllama-transformers with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Defetya/ru-3b-openllama-transformers")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Defetya/ru-3b-openllama-transformers") model = AutoModelForCausalLM.from_pretrained("Defetya/ru-3b-openllama-transformers", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Defetya/ru-3b-openllama-transformers with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Defetya/ru-3b-openllama-transformers" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Defetya/ru-3b-openllama-transformers", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Defetya/ru-3b-openllama-transformers
- SGLang
How to use Defetya/ru-3b-openllama-transformers 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 "Defetya/ru-3b-openllama-transformers" \ --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": "Defetya/ru-3b-openllama-transformers", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Defetya/ru-3b-openllama-transformers" \ --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": "Defetya/ru-3b-openllama-transformers", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Defetya/ru-3b-openllama-transformers with Docker Model Runner:
docker model run hf.co/Defetya/ru-3b-openllama-transformers
Upload LlamaForCausalLM
Browse files- config.json +3 -5
- generation_config.json +7 -0
- pytorch_model.bin +3 -0
config.json
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
-
"attention_bias": false,
|
| 7 |
-
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 1,
|
| 9 |
"eos_token_id": 2,
|
| 10 |
"hidden_act": "silu",
|
|
@@ -16,13 +14,13 @@
|
|
| 16 |
"num_attention_heads": 32,
|
| 17 |
"num_hidden_layers": 26,
|
| 18 |
"num_key_value_heads": 32,
|
|
|
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
"rms_norm_eps": 1e-06,
|
| 21 |
"rope_scaling": null,
|
| 22 |
-
"rope_theta": 10000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
"torch_dtype": "bfloat16",
|
| 25 |
-
"transformers_version": "4.
|
| 26 |
"use_cache": true,
|
| 27 |
"vocab_size": 32000
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "hf_model_3b",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
|
|
|
| 6 |
"bos_token_id": 1,
|
| 7 |
"eos_token_id": 2,
|
| 8 |
"hidden_act": "silu",
|
|
|
|
| 14 |
"num_attention_heads": 32,
|
| 15 |
"num_hidden_layers": 26,
|
| 16 |
"num_key_value_heads": 32,
|
| 17 |
+
"pad_token_id": 0,
|
| 18 |
"pretraining_tp": 1,
|
| 19 |
"rms_norm_eps": 1e-06,
|
| 20 |
"rope_scaling": null,
|
|
|
|
| 21 |
"tie_word_embeddings": false,
|
| 22 |
"torch_dtype": "bfloat16",
|
| 23 |
+
"transformers_version": "4.31.0",
|
| 24 |
"use_cache": true,
|
| 25 |
"vocab_size": 32000
|
| 26 |
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
+
"transformers_version": "4.31.0"
|
| 7 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:391946ccd81558e1a93ff15055d56e9cea1e73cd8615a2379a8157a757500868
|
| 3 |
+
size 6853038093
|