Instructions to use Den4ikAI/instruct_medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Den4ikAI/instruct_medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Den4ikAI/instruct_medium")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Den4ikAI/instruct_medium") model = AutoModelForCausalLM.from_pretrained("Den4ikAI/instruct_medium", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Den4ikAI/instruct_medium with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Den4ikAI/instruct_medium" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Den4ikAI/instruct_medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Den4ikAI/instruct_medium
- SGLang
How to use Den4ikAI/instruct_medium 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 "Den4ikAI/instruct_medium" \ --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": "Den4ikAI/instruct_medium", "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 "Den4ikAI/instruct_medium" \ --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": "Den4ikAI/instruct_medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Den4ikAI/instruct_medium with Docker Model Runner:
docker model run hf.co/Den4ikAI/instruct_medium
Upload 6 files
Browse files- config.json +2 -6
- eval_results.json +9 -0
- merges.txt +1 -1
- special_tokens_map.json +1 -1
- tokenizer_config.json +1 -1
- vocab.json +0 -0
config.json
CHANGED
|
@@ -1,9 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "model",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
-
"architectures": [
|
| 5 |
-
"GPT2LMHeadModel"
|
| 6 |
-
],
|
| 7 |
"attn_pdrop": 0.1,
|
| 8 |
"bos_token_id": 50256,
|
| 9 |
"embd_pdrop": 0.1,
|
|
@@ -36,7 +32,7 @@
|
|
| 36 |
"summary_type": "cls_index",
|
| 37 |
"summary_use_proj": true,
|
| 38 |
"torch_dtype": "float32",
|
| 39 |
-
"transformers_version": "4.
|
| 40 |
"use_cache": true,
|
| 41 |
-
"vocab_size":
|
| 42 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"activation_function": "gelu_new",
|
|
|
|
|
|
|
|
|
|
| 3 |
"attn_pdrop": 0.1,
|
| 4 |
"bos_token_id": 50256,
|
| 5 |
"embd_pdrop": 0.1,
|
|
|
|
| 32 |
"summary_type": "cls_index",
|
| 33 |
"summary_use_proj": true,
|
| 34 |
"torch_dtype": "float32",
|
| 35 |
+
"transformers_version": "4.15.0",
|
| 36 |
"use_cache": true,
|
| 37 |
+
"vocab_size": 50261
|
| 38 |
}
|
eval_results.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch": 1.0,
|
| 3 |
+
"eval_loss": 3.4997777938842773,
|
| 4 |
+
"eval_runtime": 448.829,
|
| 5 |
+
"eval_samples": 40311,
|
| 6 |
+
"eval_samples_per_second": 89.814,
|
| 7 |
+
"eval_steps_per_second": 7.486,
|
| 8 |
+
"perplexity": 33.10809432022858
|
| 9 |
+
}
|
merges.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
#version: 0.2
|
| 2 |
Ġ Ð
|
| 3 |
Ð ¾
|
| 4 |
Ð µ
|
|
|
|
| 1 |
+
#version: 0.2
|
| 2 |
Ġ Ð
|
| 3 |
Ð ¾
|
| 4 |
Ð µ
|
special_tokens_map.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"bos_token": "<
|
|
|
|
| 1 |
+
{"bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "pad_token": "<pad>"}
|
tokenizer_config.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "
|
|
|
|
| 1 |
+
{"errors": "replace", "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "special_tokens_map_file": null, "use_fast": true, "tokenizer_class": "GPT2Tokenizer"}
|
vocab.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|