Instructions to use FreedomIntelligence/AceGPT-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FreedomIntelligence/AceGPT-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FreedomIntelligence/AceGPT-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FreedomIntelligence/AceGPT-7B") model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/AceGPT-7B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FreedomIntelligence/AceGPT-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FreedomIntelligence/AceGPT-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FreedomIntelligence/AceGPT-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FreedomIntelligence/AceGPT-7B
- SGLang
How to use FreedomIntelligence/AceGPT-7B 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 "FreedomIntelligence/AceGPT-7B" \ --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": "FreedomIntelligence/AceGPT-7B", "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 "FreedomIntelligence/AceGPT-7B" \ --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": "FreedomIntelligence/AceGPT-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FreedomIntelligence/AceGPT-7B with Docker Model Runner:
docker model run hf.co/FreedomIntelligence/AceGPT-7B
Commit ·
c907e27
1
Parent(s): 51a28ee
Upload 6 files
Browse files- config.json +3 -4
- generation_config.json +9 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -3
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
@@ -19,10 +19,9 @@
|
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_scaling": null,
|
| 22 |
-
"rope_theta": 10000.0,
|
| 23 |
"tie_word_embeddings": false,
|
| 24 |
-
"torch_dtype": "
|
| 25 |
-
"transformers_version": "4.
|
| 26 |
"use_cache": true,
|
| 27 |
"vocab_size": 32000
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "meta-llama/Llama-2-7b-hf",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 19 |
"pretraining_tp": 1,
|
| 20 |
"rms_norm_eps": 1e-05,
|
| 21 |
"rope_scaling": null,
|
|
|
|
| 22 |
"tie_word_embeddings": false,
|
| 23 |
+
"torch_dtype": "float16",
|
| 24 |
+
"transformers_version": "4.31.0.dev0",
|
| 25 |
"use_cache": true,
|
| 26 |
"vocab_size": 32000
|
| 27 |
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"pad_token_id": 0,
|
| 6 |
+
"temperature": 0.9,
|
| 7 |
+
"top_p": 0.6,
|
| 8 |
+
"transformers_version": "4.31.0.dev0"
|
| 9 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
CHANGED
|
@@ -22,7 +22,6 @@
|
|
| 22 |
"model_max_length": 1000000000000000019884624838656,
|
| 23 |
"pad_token": null,
|
| 24 |
"sp_model_kwargs": {},
|
| 25 |
-
"spaces_between_special_tokens": false,
|
| 26 |
"tokenizer_class": "LlamaTokenizer",
|
| 27 |
"unk_token": {
|
| 28 |
"__type": "AddedToken",
|
|
@@ -31,6 +30,5 @@
|
|
| 31 |
"normalized": false,
|
| 32 |
"rstrip": false,
|
| 33 |
"single_word": false
|
| 34 |
-
}
|
| 35 |
-
"use_default_system_prompt": true
|
| 36 |
}
|
|
|
|
| 22 |
"model_max_length": 1000000000000000019884624838656,
|
| 23 |
"pad_token": null,
|
| 24 |
"sp_model_kwargs": {},
|
|
|
|
| 25 |
"tokenizer_class": "LlamaTokenizer",
|
| 26 |
"unk_token": {
|
| 27 |
"__type": "AddedToken",
|
|
|
|
| 30 |
"normalized": false,
|
| 31 |
"rstrip": false,
|
| 32 |
"single_word": false
|
| 33 |
+
}
|
|
|
|
| 34 |
}
|