Instructions to use alkahestry/pygmalion-6b-chaicomp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alkahestry/pygmalion-6b-chaicomp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alkahestry/pygmalion-6b-chaicomp")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alkahestry/pygmalion-6b-chaicomp") model = AutoModelForCausalLM.from_pretrained("alkahestry/pygmalion-6b-chaicomp") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use alkahestry/pygmalion-6b-chaicomp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alkahestry/pygmalion-6b-chaicomp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alkahestry/pygmalion-6b-chaicomp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/alkahestry/pygmalion-6b-chaicomp
- SGLang
How to use alkahestry/pygmalion-6b-chaicomp 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 "alkahestry/pygmalion-6b-chaicomp" \ --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": "alkahestry/pygmalion-6b-chaicomp", "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 "alkahestry/pygmalion-6b-chaicomp" \ --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": "alkahestry/pygmalion-6b-chaicomp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use alkahestry/pygmalion-6b-chaicomp with Docker Model Runner:
docker model run hf.co/alkahestry/pygmalion-6b-chaicomp
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Model Details
I finetuned PygmalionAI/pygmalion-6b with QLora for 24 hours on 250k samples. Collected from SODA and Teacher GPT dataset. My first attempt on making LLM model as an entry to Chai competition.
Model Description
- Model type: Chatbot
- Finetuned from model : PygmalionAI/pygmalion-6b
Model Sources
Pygmalion-6b: https://huggingface.co/PygmalionAI/pygmalion-6b
Training Details
Training Data
For the training data I use 20% of SODA dadtaset mixed with TeacherGPT roleplay dataset.
Training Procedure
The model was trained for 24 hours on RTX4090.
Training Hyperparameters
Training param
batch_size = 128,
micro_batch_size = 4,
num_epochs = 1,
learning_rate = 3e-4,
cutoff_len = 512,
val_set_size = 0finetune method
finetune_method = "qlora"
prefix tuning hyperparams
num_virtual_tokens = 32
lora hyperparams
lora_r = 16,
lora_alpha = 16,
lora_dropout = 0.05,
lora_target_modules = "q_proj k_proj v_proj"llm hyperparams
bf16 = False,
load_in_8bit = False,
group_by_length = False ,
resume_from_checkpoint = None
Results
Me: Hi Nathan, how are you doing today
Nathan: I'm fine...
Me: Then tell me about your day.
Nathan:
It was good. We had a lot of fun in school and then we went to the park afterwards.
- Downloads last month
- 6