Instructions to use af1tang/personaGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use af1tang/personaGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="af1tang/personaGPT")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("af1tang/personaGPT") model = AutoModelForCausalLM.from_pretrained("af1tang/personaGPT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use af1tang/personaGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "af1tang/personaGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "af1tang/personaGPT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/af1tang/personaGPT
- SGLang
How to use af1tang/personaGPT 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 "af1tang/personaGPT" \ --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": "af1tang/personaGPT", "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 "af1tang/personaGPT" \ --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": "af1tang/personaGPT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use af1tang/personaGPT with Docker Model Runner:
docker model run hf.co/af1tang/personaGPT
weights update
Browse files- added_tokens.json +1 -1
- config.json +1 -1
- merges.txt +1 -1
- pytorch_model.bin +1 -1
- tokenizer_config.json +1 -1
- vocab.json +0 -0
added_tokens.json
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
{"<|sep|>": 50257, "<|
|
|
|
|
| 1 |
+
{"<|sep|>": 50257, "<|cls|>": 50258, "<|start|>": 50259, "<|p1|>": 50260, "<|p2|>": 50261, "<|act|>": 50262}
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "af1tang/
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "/home/af1tang/convogym/checkpoint/model/",
|
| 3 |
"activation_function": "gelu_new",
|
| 4 |
"architectures": [
|
| 5 |
"GPT2LMHeadModel"
|
merges.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
#version: 0.2
|
| 2 |
Ġ t
|
| 3 |
Ġ a
|
| 4 |
h e
|
|
|
|
| 1 |
+
#version: 0.2
|
| 2 |
Ġ t
|
| 3 |
Ġ a
|
| 4 |
h e
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1444556021
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bba0725e119469e2773c082b1ff949e5f249df88fa2eab2e1bbd37e28b1627d6
|
| 3 |
size 1444556021
|
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, "pad_token": "<|endoftext|>", "cls_token": "<|cls|>", "sep_token": "<|sep|>", "special_tokens_map_file": null, "full_tokenizer_file": null, "
|
|
|
|
| 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, "pad_token": "<|endoftext|>", "cls_token": "<|cls|>", "sep_token": "<|sep|>", "special_tokens_map_file": null, "full_tokenizer_file": null, "tokenizer_file": "/home/af1tang/convogym/checkpoint/model/tokenizer.json", "name_or_path": "/home/af1tang/convogym/checkpoint/model/", "tokenizer_class": "GPT2Tokenizer"}
|
vocab.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|