Instructions to use Sumail/copy_sarak7_v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sumail/copy_sarak7_v4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sumail/copy_sarak7_v4")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Sumail/copy_sarak7_v4") model = AutoModelForCausalLM.from_pretrained("Sumail/copy_sarak7_v4") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Sumail/copy_sarak7_v4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sumail/copy_sarak7_v4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sumail/copy_sarak7_v4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Sumail/copy_sarak7_v4
- SGLang
How to use Sumail/copy_sarak7_v4 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 "Sumail/copy_sarak7_v4" \ --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": "Sumail/copy_sarak7_v4", "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 "Sumail/copy_sarak7_v4" \ --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": "Sumail/copy_sarak7_v4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Sumail/copy_sarak7_v4 with Docker Model Runner:
docker model run hf.co/Sumail/copy_sarak7_v4
Upload folder using huggingface_hub
Browse files- config.json +33 -23
- merges.txt +0 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
config.json
CHANGED
|
@@ -1,28 +1,38 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
|
|
|
| 3 |
"architectures": [
|
| 4 |
-
"
|
| 5 |
],
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
"eos_token_id":
|
| 10 |
-
"
|
| 11 |
-
|
|
|
|
| 12 |
"initializer_range": 0.02,
|
| 13 |
-
"
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
"vocab_size": 50257
|
| 28 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_num_labels": 1,
|
| 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,
|
| 10 |
+
"eos_token_id": 50256,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "LABEL_0"
|
| 13 |
+
},
|
| 14 |
"initializer_range": 0.02,
|
| 15 |
+
"label2id": {
|
| 16 |
+
"LABEL_0": 0
|
| 17 |
+
},
|
| 18 |
+
"layer_norm_epsilon": 1e-05,
|
| 19 |
+
"model_type": "gpt2",
|
| 20 |
+
"n_ctx": 1024,
|
| 21 |
+
"n_embd": 768,
|
| 22 |
+
"n_head": 12,
|
| 23 |
+
"n_layer": 6,
|
| 24 |
+
"n_positions": 1024,
|
| 25 |
+
"resid_pdrop": 0.1,
|
| 26 |
+
"summary_activation": null,
|
| 27 |
+
"summary_first_dropout": 0.1,
|
| 28 |
+
"summary_proj_to_labels": true,
|
| 29 |
+
"summary_type": "cls_index",
|
| 30 |
+
"summary_use_proj": true,
|
| 31 |
+
"task_specific_params": {
|
| 32 |
+
"text-generation": {
|
| 33 |
+
"do_sample": true,
|
| 34 |
+
"max_length": 50
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
"vocab_size": 50257
|
| 38 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"model_max_length": 1024}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|