Instructions to use aws-neuron/SOLAR-10.7B-v1.0-neuron with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aws-neuron/SOLAR-10.7B-v1.0-neuron with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aws-neuron/SOLAR-10.7B-v1.0-neuron")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aws-neuron/SOLAR-10.7B-v1.0-neuron") model = AutoModelForCausalLM.from_pretrained("aws-neuron/SOLAR-10.7B-v1.0-neuron", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aws-neuron/SOLAR-10.7B-v1.0-neuron with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aws-neuron/SOLAR-10.7B-v1.0-neuron" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aws-neuron/SOLAR-10.7B-v1.0-neuron", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aws-neuron/SOLAR-10.7B-v1.0-neuron
- SGLang
How to use aws-neuron/SOLAR-10.7B-v1.0-neuron 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 "aws-neuron/SOLAR-10.7B-v1.0-neuron" \ --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": "aws-neuron/SOLAR-10.7B-v1.0-neuron", "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 "aws-neuron/SOLAR-10.7B-v1.0-neuron" \ --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": "aws-neuron/SOLAR-10.7B-v1.0-neuron", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aws-neuron/SOLAR-10.7B-v1.0-neuron with Docker Model Runner:
docker model run hf.co/aws-neuron/SOLAR-10.7B-v1.0-neuron
Update README.md
Browse filesRemoving 2.16 language
README.md
CHANGED
|
@@ -28,26 +28,15 @@ Please refer to the 🤗 `optimum-neuron` [documentation](https://huggingface.co
|
|
| 28 |
## Set up the environment
|
| 29 |
|
| 30 |
First, use the [DLAMI image from Hugging Face](https://aws.amazon.com/marketplace/pp/prodview-gr3e6yiscria2). It has most of the utilities and drivers preinstalled, but hasn't been updated to 2.16 as of 1/13/24.
|
| 31 |
-
However, you will need version 2.16 to use these binaries. 2.16 shows a significant performance increase over 2.15 for Llama based models.
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
```
|
| 36 |
-
sudo apt-get update -y \
|
| 37 |
-
&& sudo apt-get install -y --no-install-recommends \
|
| 38 |
-
aws-neuronx-dkms=2.15.9.0 \
|
| 39 |
-
aws-neuronx-collectives=2.19.7.0-530fb3064 \
|
| 40 |
-
aws-neuronx-runtime-lib=2.19.5.0-97e2d271b \
|
| 41 |
-
aws-neuronx-tools=2.16.1.0
|
| 42 |
-
|
| 43 |
-
pip3 install --upgrade \
|
| 44 |
-
neuronx-cc==2.12.54.0 \
|
| 45 |
-
torch-neuronx==1.13.1.1.13.0 \
|
| 46 |
-
transformers-neuronx==0.9.474 \
|
| 47 |
-
--extra-index-url=https://pip.repos.neuron.amazonaws.com
|
| 48 |
-
|
| 49 |
-
pip3 install git+https://github.com/huggingface/optimum-neuron.git
|
| 50 |
-
```
|
| 51 |
## Running inference from this repository
|
| 52 |
|
| 53 |
|
|
|
|
| 28 |
## Set up the environment
|
| 29 |
|
| 30 |
First, use the [DLAMI image from Hugging Face](https://aws.amazon.com/marketplace/pp/prodview-gr3e6yiscria2). It has most of the utilities and drivers preinstalled, but hasn't been updated to 2.16 as of 1/13/24.
|
|
|
|
| 31 |
|
| 32 |
+
(As of the 20240123 version, the Hugging Face DLAMI image has the updated 2.16 binaries)
|
| 33 |
+
|
| 34 |
+
~~However, you will need version 2.16 to use these binaries. 2.16 shows a significant performance increase over 2.15 for Llama based models.~~
|
| 35 |
+
|
| 36 |
+
~~The commands below will update your 2.15 libraries to 2.16.~~
|
| 37 |
+
|
| 38 |
+
```<update commands removed>```
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
## Running inference from this repository
|
| 41 |
|
| 42 |
|