Instructions to use raygx/GNePT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use raygx/GNePT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="raygx/GNePT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("raygx/GNePT") model = AutoModelForCausalLM.from_pretrained("raygx/GNePT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use raygx/GNePT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "raygx/GNePT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "raygx/GNePT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/raygx/GNePT
- SGLang
How to use raygx/GNePT 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 "raygx/GNePT" \ --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": "raygx/GNePT", "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 "raygx/GNePT" \ --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": "raygx/GNePT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use raygx/GNePT with Docker Model Runner:
docker model run hf.co/raygx/GNePT
Upload model
Browse files- config.json +6 -6
- generation_config.json +7 -0
- tf_model.h5 +2 -2
config.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
-
"
|
| 6 |
],
|
| 7 |
"attn_pdrop": 0.1,
|
| 8 |
-
"bos_token_id":
|
| 9 |
"embd_pdrop": 0.1,
|
| 10 |
-
"eos_token_id":
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"layer_norm_epsilon": 1e-05,
|
| 13 |
"model_type": "gpt2",
|
|
@@ -17,7 +17,7 @@
|
|
| 17 |
"n_inner": null,
|
| 18 |
"n_layer": 12,
|
| 19 |
"n_positions": 1024,
|
| 20 |
-
"pad_token_id":
|
| 21 |
"reorder_and_upcast_attn": false,
|
| 22 |
"resid_pdrop": 0.1,
|
| 23 |
"scale_attn_by_inverse_layer_idx": false,
|
|
@@ -35,5 +35,5 @@
|
|
| 35 |
},
|
| 36 |
"transformers_version": "4.29.2",
|
| 37 |
"use_cache": true,
|
| 38 |
-
"vocab_size":
|
| 39 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "raygx/GNePT",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
],
|
| 7 |
"attn_pdrop": 0.1,
|
| 8 |
+
"bos_token_id": 1,
|
| 9 |
"embd_pdrop": 0.1,
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"layer_norm_epsilon": 1e-05,
|
| 13 |
"model_type": "gpt2",
|
|
|
|
| 17 |
"n_inner": null,
|
| 18 |
"n_layer": 12,
|
| 19 |
"n_positions": 1024,
|
| 20 |
+
"pad_token_id": 3,
|
| 21 |
"reorder_and_upcast_attn": false,
|
| 22 |
"resid_pdrop": 0.1,
|
| 23 |
"scale_attn_by_inverse_layer_idx": false,
|
|
|
|
| 35 |
},
|
| 36 |
"transformers_version": "4.29.2",
|
| 37 |
"use_cache": true,
|
| 38 |
+
"vocab_size": 50000
|
| 39 |
}
|
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": 3,
|
| 6 |
+
"transformers_version": "4.29.2"
|
| 7 |
+
}
|
tf_model.h5
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f76404ce291f094200fb43ae939e9eeb919ba1e094b69cd104a62c44011c43f0
|
| 3 |
+
size 497145936
|