Instructions to use PygmalionAI/pygmalion-6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PygmalionAI/pygmalion-6b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PygmalionAI/pygmalion-6b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PygmalionAI/pygmalion-6b") model = AutoModelForCausalLM.from_pretrained("PygmalionAI/pygmalion-6b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use PygmalionAI/pygmalion-6b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PygmalionAI/pygmalion-6b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PygmalionAI/pygmalion-6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PygmalionAI/pygmalion-6b
- SGLang
How to use PygmalionAI/pygmalion-6b 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 "PygmalionAI/pygmalion-6b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PygmalionAI/pygmalion-6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "PygmalionAI/pygmalion-6b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PygmalionAI/pygmalion-6b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PygmalionAI/pygmalion-6b with Docker Model Runner:
docker model run hf.co/PygmalionAI/pygmalion-6b
part 4/10 of experiment 7 as described in logbook 2023-03-03
Browse files
pytorch_model-00001-of-00002.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 10581615331
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:88ba2b44537f444e3fad92dff6962ac8c0b983427523484f98e7acf2d71fd65e
|
| 3 |
size 10581615331
|
pytorch_model-00002-of-00002.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5810125147
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c9aabb90f1f0004ec6c406366d65484a29c3de927b7561ad52ac8036b2be48e
|
| 3 |
size 5810125147
|
pytorch_model.bin.index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_size":
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.bias": "pytorch_model-00002-of-00002.bin",
|
|
@@ -205,8 +205,8 @@
|
|
| 205 |
"transformer.h.23.attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
|
| 206 |
"transformer.h.23.ln_1.bias": "pytorch_model-00001-of-00002.bin",
|
| 207 |
"transformer.h.23.ln_1.weight": "pytorch_model-00001-of-00002.bin",
|
| 208 |
-
"transformer.h.23.mlp.fc_in.bias": "pytorch_model-
|
| 209 |
-
"transformer.h.23.mlp.fc_in.weight": "pytorch_model-
|
| 210 |
"transformer.h.23.mlp.fc_out.bias": "pytorch_model-00002-of-00002.bin",
|
| 211 |
"transformer.h.23.mlp.fc_out.weight": "pytorch_model-00002-of-00002.bin",
|
| 212 |
"transformer.h.24.attn.bias": "pytorch_model-00002-of-00002.bin",
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 12116445688.0
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"lm_head.bias": "pytorch_model-00002-of-00002.bin",
|
|
|
|
| 205 |
"transformer.h.23.attn.v_proj.weight": "pytorch_model-00001-of-00002.bin",
|
| 206 |
"transformer.h.23.ln_1.bias": "pytorch_model-00001-of-00002.bin",
|
| 207 |
"transformer.h.23.ln_1.weight": "pytorch_model-00001-of-00002.bin",
|
| 208 |
+
"transformer.h.23.mlp.fc_in.bias": "pytorch_model-00001-of-00002.bin",
|
| 209 |
+
"transformer.h.23.mlp.fc_in.weight": "pytorch_model-00001-of-00002.bin",
|
| 210 |
"transformer.h.23.mlp.fc_out.bias": "pytorch_model-00002-of-00002.bin",
|
| 211 |
"transformer.h.23.mlp.fc_out.weight": "pytorch_model-00002-of-00002.bin",
|
| 212 |
"transformer.h.24.attn.bias": "pytorch_model-00002-of-00002.bin",
|