Instructions to use alpindale/pygm-350m-experimental with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use alpindale/pygm-350m-experimental with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="alpindale/pygm-350m-experimental")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("alpindale/pygm-350m-experimental") model = AutoModelForCausalLM.from_pretrained("alpindale/pygm-350m-experimental") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use alpindale/pygm-350m-experimental with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "alpindale/pygm-350m-experimental" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "alpindale/pygm-350m-experimental", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/alpindale/pygm-350m-experimental
- SGLang
How to use alpindale/pygm-350m-experimental 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/pygm-350m-experimental" \ --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/pygm-350m-experimental", "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/pygm-350m-experimental" \ --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/pygm-350m-experimental", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use alpindale/pygm-350m-experimental with Docker Model Runner:
docker model run hf.co/alpindale/pygm-350m-experimental
pygmalion-350m
This model is a fine-tuned version of PygmalionAI/pygmalion-350m on a 2.4MB dataset. It achieves the following results on the evaluation set:
- Loss: 2.2731
- Accuracy: 0.5187
Model description
A proof-of-concept model based on PygmalionAI/pygmalion-350m, which was in turn based on OPT-350m.
This model was fine-tuned purely for testing purposes.
Fine-tuning process
Fine-tuned on an A100-80GB with HF's run_clm.py script. It was run through 3 epochs with 8 batch size using 2.4MB dataset (split 75/25 between training and validation sets).
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3.0
Framework versions
- Transformers 4.27.0.dev0
- Pytorch 1.13.1+cu117
- Datasets 2.10.0
- Tokenizers 0.13.2
- Downloads last month
- 3