Text Generation
Transformers
PyTorch
llama
8bit
sharded
open_llama
text-generation-inference
8-bit precision
Instructions to use ethzanalytics/open_llama_13b-sharded-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ethzanalytics/open_llama_13b-sharded-8bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ethzanalytics/open_llama_13b-sharded-8bit")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ethzanalytics/open_llama_13b-sharded-8bit") model = AutoModelForCausalLM.from_pretrained("ethzanalytics/open_llama_13b-sharded-8bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ethzanalytics/open_llama_13b-sharded-8bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ethzanalytics/open_llama_13b-sharded-8bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ethzanalytics/open_llama_13b-sharded-8bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ethzanalytics/open_llama_13b-sharded-8bit
- SGLang
How to use ethzanalytics/open_llama_13b-sharded-8bit 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 "ethzanalytics/open_llama_13b-sharded-8bit" \ --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": "ethzanalytics/open_llama_13b-sharded-8bit", "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 "ethzanalytics/open_llama_13b-sharded-8bit" \ --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": "ethzanalytics/open_llama_13b-sharded-8bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ethzanalytics/open_llama_13b-sharded-8bit with Docker Model Runner:
docker model run hf.co/ethzanalytics/open_llama_13b-sharded-8bit
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,12 +11,13 @@ inference: False
|
|
| 11 |
|
| 12 |
# open_llama_13b-sharded-8bit
|
| 13 |
|
| 14 |
-
This is [open_llama_13b](https://huggingface.co/openlm-research/open_llama_13b) sharded into 2 GB shards, and in 8-bit precision using `bitsandbytes==0.38.0`. Please refer to the original model card for details.
|
| 15 |
-
|
| 16 |
<a href="https://colab.research.google.com/gist/pszemraj/166ad661c6af1e024d4e2897621fc886/open_llama_13b-sharded-8bit-example.ipynb">
|
| 17 |
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
| 18 |
</a>
|
| 19 |
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
## loading
|
| 22 |
|
|
|
|
| 11 |
|
| 12 |
# open_llama_13b-sharded-8bit
|
| 13 |
|
|
|
|
|
|
|
| 14 |
<a href="https://colab.research.google.com/gist/pszemraj/166ad661c6af1e024d4e2897621fc886/open_llama_13b-sharded-8bit-example.ipynb">
|
| 15 |
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
| 16 |
</a>
|
| 17 |
|
| 18 |
+
This is [open_llama_13b](https://huggingface.co/openlm-research/open_llama_13b) sharded into 2 GB shards, and in 8-bit precision using `bitsandbytes==0.38.0`. Please refer to the original model card for details.
|
| 19 |
+
|
| 20 |
+
|
| 21 |
|
| 22 |
## loading
|
| 23 |
|