Instructions to use helloollel/vicuna-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use helloollel/vicuna-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="helloollel/vicuna-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("helloollel/vicuna-7b") model = AutoModelForCausalLM.from_pretrained("helloollel/vicuna-7b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use helloollel/vicuna-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "helloollel/vicuna-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "helloollel/vicuna-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/helloollel/vicuna-7b
- SGLang
How to use helloollel/vicuna-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 "helloollel/vicuna-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": "helloollel/vicuna-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 "helloollel/vicuna-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": "helloollel/vicuna-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use helloollel/vicuna-7b with Docker Model Runner:
docker model run hf.co/helloollel/vicuna-7b
Commit ·
43b3abc
1
Parent(s): 25e57c6
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,7 +23,15 @@ python3 -m pip install --upgrade pip
|
|
| 23 |
python3 -m pip install accelerate
|
| 24 |
```
|
| 25 |
|
| 26 |
-
3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
```bash
|
| 29 |
git clone https://github.com/TimDettmers/bitsandbytes.git
|
|
@@ -33,6 +41,11 @@ python3 -m pip install .
|
|
| 33 |
cd ..
|
| 34 |
```
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
4. Clone the `FastChat` repository and install it:
|
| 37 |
|
| 38 |
```bash
|
|
@@ -235,4 +248,3 @@ def chat(inp):
|
|
| 235 |
```python
|
| 236 |
chat("what's the meaning of life?")
|
| 237 |
```
|
| 238 |
-
|
|
|
|
| 23 |
python3 -m pip install accelerate
|
| 24 |
```
|
| 25 |
|
| 26 |
+
3. Install `bitsandbytes`
|
| 27 |
+
|
| 28 |
+
3.1 install by pip
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
python3 -m pip install bitsandbytes
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
3.2 Clone the `bitsandbytes` repository and install it:
|
| 35 |
|
| 36 |
```bash
|
| 37 |
git clone https://github.com/TimDettmers/bitsandbytes.git
|
|
|
|
| 41 |
cd ..
|
| 42 |
```
|
| 43 |
|
| 44 |
+
use the following command to find `CUDA_VERSION`:
|
| 45 |
+
```bash
|
| 46 |
+
ls /usr/local/cuda*
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
4. Clone the `FastChat` repository and install it:
|
| 50 |
|
| 51 |
```bash
|
|
|
|
| 248 |
```python
|
| 249 |
chat("what's the meaning of life?")
|
| 250 |
```
|
|
|