Instructions to use polymer/model-007-2-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use polymer/model-007-2-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="polymer/model-007-2-13b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("polymer/model-007-2-13b") model = AutoModelForCausalLM.from_pretrained("polymer/model-007-2-13b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use polymer/model-007-2-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "polymer/model-007-2-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "polymer/model-007-2-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/polymer/model-007-2-13b
- SGLang
How to use polymer/model-007-2-13b 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 "polymer/model-007-2-13b" \ --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": "polymer/model-007-2-13b", "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 "polymer/model-007-2-13b" \ --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": "polymer/model-007-2-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use polymer/model-007-2-13b with Docker Model Runner:
docker model run hf.co/polymer/model-007-2-13b
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,12 +19,19 @@ duplicated_from: psmathur/model_007_13b_v2
|
|
| 19 |
|
| 20 |
# model-007-2-13b
|
| 21 |
|
| 22 |
-
A modified fork
|
| 23 |
|
| 24 |
-
|
| 25 |
-
Sharded model (~8 GB peak RAM usage): polymer/model-007-2-13b-sharded
|
| 26 |
|
| 27 |
-
Original model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
# model_007_13b_v2
|
| 30 |
|
|
@@ -206,4 +213,5 @@ Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams,
|
|
| 206 |
Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, Thomas Scialom},
|
| 207 |
year={2023}
|
| 208 |
}
|
| 209 |
-
```
|
|
|
|
|
|
| 19 |
|
| 20 |
# model-007-2-13b
|
| 21 |
|
| 22 |
+
A modified fork of [psmathur/model_007_13b_v2](https://huggingface.co/psmathur/model_007_13b_v2) prepared for training with the Hugging Face Transformers library.
|
| 23 |
|
| 24 |
+
### Links
|
|
|
|
| 25 |
|
| 26 |
+
Original model: [psmathur/model_007_13b_v2](https://huggingface.co/psmathur/model_007_13b_v2)
|
| 27 |
+
|
| 28 |
+
Sharded model (~8 GB peak RAM usage during loading): [polymer/model-007-2-13b-sharded](https://huggingface.co/polymer/model-007-2-13b-sharded)
|
| 29 |
+
|
| 30 |
+
### Original model card
|
| 31 |
+
|
| 32 |
+
The model card from the original repository:
|
| 33 |
+
|
| 34 |
+
<blockquote>
|
| 35 |
|
| 36 |
# model_007_13b_v2
|
| 37 |
|
|
|
|
| 213 |
Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, Thomas Scialom},
|
| 214 |
year={2023}
|
| 215 |
}
|
| 216 |
+
```
|
| 217 |
+
</blockquote>
|