Instructions to use sammysun0711/aquilachat-7b-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sammysun0711/aquilachat-7b-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sammysun0711/aquilachat-7b-hf", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("sammysun0711/aquilachat-7b-hf", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("sammysun0711/aquilachat-7b-hf", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sammysun0711/aquilachat-7b-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sammysun0711/aquilachat-7b-hf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sammysun0711/aquilachat-7b-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sammysun0711/aquilachat-7b-hf
- SGLang
How to use sammysun0711/aquilachat-7b-hf 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 "sammysun0711/aquilachat-7b-hf" \ --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": "sammysun0711/aquilachat-7b-hf", "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 "sammysun0711/aquilachat-7b-hf" \ --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": "sammysun0711/aquilachat-7b-hf", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sammysun0711/aquilachat-7b-hf with Docker Model Runner:
docker model run hf.co/sammysun0711/aquilachat-7b-hf
Xiake Sun commited on
Commit ·
a95dac2
1
Parent(s): 239b951
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,12 +3,12 @@ language:
|
|
| 3 |
- zh
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
---
|
| 6 |
-
|
| 7 |
|
| 8 |
Support Inference with AutoModelForCausalLM, ORTModelForCausalLM and OVModelForCausalLM
|
| 9 |
```python
|
| 10 |
-
#!pip install transformers>=4.
|
| 11 |
-
#!pip install optimum>=1.8.7 optimum-intel[openvino]
|
| 12 |
import torch
|
| 13 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 14 |
|
|
@@ -38,4 +38,4 @@ with torch.no_grad():
|
|
| 38 |
> 北京之所以成为中国的首都,是因为它有着独特的地理位置和历史背景。北京位于华北平原中心,周围是山峦起伏的燕山山脉和太行山脉。它自古以来就是华北地区的政治、文化和经济中心,有着重要的地理位置和战略地位。此外,北京还是中国历史文化的中心,有着丰富的历史遗迹和文化遗产,如故宫、天坛、颐和园等。因此,北京不仅是中国政治、文化和经济中心,也是世界知名的旅游胜地。
|
| 39 |
|
| 40 |
|
| 41 |
-
AquilaChat-7B开源模型使用《智源Aquila系列模型许可协议》, 原始代码基于Apache Licence 2.0。
|
|
|
|
| 3 |
- zh
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
---
|
| 6 |
+
FP16 Model converted from AquilaChat-7b v0.6 Pytorch Model: https://github.com/FlagAI-Open/FlagAI/tree/master/examples/Aquila
|
| 7 |
|
| 8 |
Support Inference with AutoModelForCausalLM, ORTModelForCausalLM and OVModelForCausalLM
|
| 9 |
```python
|
| 10 |
+
#!pip install transformers>=4.29.2
|
| 11 |
+
#!pip install optimum>=1.8.7 optimum-intel[openvino]==1.9.1
|
| 12 |
import torch
|
| 13 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 14 |
|
|
|
|
| 38 |
> 北京之所以成为中国的首都,是因为它有着独特的地理位置和历史背景。北京位于华北平原中心,周围是山峦起伏的燕山山脉和太行山脉。它自古以来就是华北地区的政治、文化和经济中心,有着重要的地理位置和战略地位。此外,北京还是中国历史文化的中心,有着丰富的历史遗迹和文化遗产,如故宫、天坛、颐和园等。因此,北京不仅是中国政治、文化和经济中心,也是世界知名的旅游胜地。
|
| 39 |
|
| 40 |
|
| 41 |
+
AquilaChat-7B开源模型使用《智源Aquila系列模型许可协议》, 原始代码基于Apache Licence 2.0。
|