Instructions to use alpindale/pyg-vn-2.7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alpindale/pyg-vn-2.7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alpindale/pyg-vn-2.7b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alpindale/pyg-vn-2.7b") model = AutoModelForCausalLM.from_pretrained("alpindale/pyg-vn-2.7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use alpindale/pyg-vn-2.7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alpindale/pyg-vn-2.7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alpindale/pyg-vn-2.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/alpindale/pyg-vn-2.7b
- SGLang
How to use alpindale/pyg-vn-2.7b 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 "alpindale/pyg-vn-2.7b" \ --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": "alpindale/pyg-vn-2.7b", "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 "alpindale/pyg-vn-2.7b" \ --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": "alpindale/pyg-vn-2.7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use alpindale/pyg-vn-2.7b with Docker Model Runner:
docker model run hf.co/alpindale/pyg-vn-2.7b
Pyg-VN-2.7B
This model is a fine-tuned version of PygmalionAI/pygmalion-2.7b. The base model is GPT-Neo-2.7B, which was fine-tuned with a dataset of Discord/Reddit conversations by Haru in this commit and was later fine-tuned by the PygmalionAI team on various conversational data.
Training Data
The data used for training this revision is about 59M tokens (189MB) of Visual Novel data.
Intended uses and limitations
This model was trained for research and evaluation purposes to observe what effects Visual Novels would have on a chat-bot model. It has the potential to output X-rated content.
Training Procedure and Hardware
The model was fine-tuned on a single A100-80GB with the following settings:
{
"Batch size": 1,
"Epoch": 1,
"FP16 Level": O2,
"Gradient Steps": 8,
"Learning Rate": 5e-5,
"Adam_Beta1": 0.9,
"Adam_Beta2": 0.98,
"Weight Decay": 0.1,
"Block Size": 2048
}
Training Results:
{
"epoch": 1.0,
"train_loss": 2.0835590305339813,
"train_runtime": 14124.2003,
"train_samples": 26672,
"train_samples_per_second": 1.888,
"train_steps_per_second": 0.236
}
Evaluation Results:
{
"epoch": 1.0,
"eval_accuracy": 0.556417810103348,
"eval_loss": 2.0116419792175293,
"eval_runtime": 317.7849,
"eval_samples": 1648,
"eval_samples_per_second": 5.186,
"eval_steps_per_second": 5.186,
"perplexity": 7.4755820257152745
}
How to use
You can use either KoboldAI or Text-Generation-WebUI to load the model.
You can also load the model directly with a pipeline for textgen:
from transformers import pipeline
generator = pipeline('text-generation', model='AlpinDale/pyg-vn-2.7b')
generator("Last summer we", do_sample=True, min_length=50)
Framework versions
- Transformers 4.28.0.dev0
- Pytorch 1.12.1+cu116
- Datasets 2.4.0
- Tokenizers 0.12.1
- Downloads last month
- 6