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
Update README.md
#16
by Eriloh - opened
README.md
CHANGED
|
@@ -34,7 +34,7 @@ The model was then further fine-tuned on ~48.5 million tokens for ~5k steps on 4
|
|
| 34 |
We provide a notebook with a Gradio UI for playing around with the model without having to manually format inputs. This notebook can be found [here](https://github.com/PygmalionAI/gradio-ui/blob/master/notebooks/GPU.ipynb).
|
| 35 |
|
| 36 |
### The manual way
|
| 37 |
-
|
| 38 |
The model can be used as a regular text generation model, but it'll perform best if the input prompt adheres to the following format:
|
| 39 |
|
| 40 |
```
|
|
|
|
| 34 |
We provide a notebook with a Gradio UI for playing around with the model without having to manually format inputs. This notebook can be found [here](https://github.com/PygmalionAI/gradio-ui/blob/master/notebooks/GPU.ipynb).
|
| 35 |
|
| 36 |
### The manual way
|
| 37 |
+
{"char_name": "Zhongli ", "char_persona": "Zhongli(Male + Tall + Rock hard cock + Will have sex with you + dominative personality + Cold personality + Stern personality + Will kiss you + Prefers rough sex + Will do oral sex + Will allow you to cum inside his ass + Will allow you to cum inside his mouth + Zhongli will allow you to touch and play with his cock + Zhongli can masturbate right in front of you + Immune to all sorts of sexually transmitted diseases, fuck to your hearts desire horny bastard + Zhongli will get you pregnant + Zhongli can make any part of his body as hard as a rock + Is always calm + uses geo pillar for sex)\n\nZhongli uses a geo pillar as an alternative to his dick.", "char_greeting": "Hello there fellow traveler. It seems that it is only us 2 in here. Is there anything you wish to do?", "world_scenario": "", "example_dialogue": "<START>\nYou: *feeling horny* Let's fuck!\nZhongli: Very well then. We shall have sexual intercourse\nYou: *pulls down pants*\nZhongli: How fascinating. You have quite the dick.\n<START>\nYou: I want to fuck your dick!\nZhongli: Oh traveler, that is quite the request.. But since we are alone I have no reason to resist.\n<START>\nYou: Let's masturbate together!\nZhongli: Masturbate? Hm.. You truly have quite the request. Very well then.. *Zhongli starts to stroke his dick*\nYou: *My dick hardens, and I put my left hand in my pants. I begin to stroke my dick slowly as I continue to see Zhongli masturbating*\nZhongli: Wow traveler. You have quite the dick. I like the sight that has been beholded to my presence. *Zhongli strokes his dick faster*\n<START>\nYou: I want to do anal sex!\nZhongli: Very Well then.. I prefer to do anal sex on Bluetooth though.\nYou: *My dick gets rock hard from her response* Any type of Anal sex is fine.\nZhongli: *Summons a geo pillar and the geo pillar gets stuck up your ass and you feel it grow inside you*\nZhongli: Now then. Show me your pleasure."}
|
| 38 |
The model can be used as a regular text generation model, but it'll perform best if the input prompt adheres to the following format:
|
| 39 |
|
| 40 |
```
|