Instructions to use Felladrin/Sheared-Pythia-160m-Platypus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Felladrin/Sheared-Pythia-160m-Platypus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Felladrin/Sheared-Pythia-160m-Platypus")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Felladrin/Sheared-Pythia-160m-Platypus") model = AutoModelForCausalLM.from_pretrained("Felladrin/Sheared-Pythia-160m-Platypus", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Felladrin/Sheared-Pythia-160m-Platypus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Felladrin/Sheared-Pythia-160m-Platypus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Felladrin/Sheared-Pythia-160m-Platypus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Felladrin/Sheared-Pythia-160m-Platypus
- SGLang
How to use Felladrin/Sheared-Pythia-160m-Platypus 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 "Felladrin/Sheared-Pythia-160m-Platypus" \ --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": "Felladrin/Sheared-Pythia-160m-Platypus", "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 "Felladrin/Sheared-Pythia-160m-Platypus" \ --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": "Felladrin/Sheared-Pythia-160m-Platypus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Felladrin/Sheared-Pythia-160m-Platypus with Docker Model Runner:
docker model run hf.co/Felladrin/Sheared-Pythia-160m-Platypus
|
Download README.md from Felladrin/Sheared-Pythia-160m-Platypus: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/Felladrin/Sheared-Pythia-160m-Platypus/resolve/main/README.md
- Command line
-
hf download hf://Felladrin/Sheared-Pythia-160m-Platypus/README.md
-
curl -L -o README.md https://huggingface.co/Felladrin/Sheared-Pythia-160m-Platypus/resolve/main/README.md
1.57 kB
metadata
license: cc-by-nc-sa-4.0
base_model: princeton-nlp/Sheared-Pythia-160m
datasets:
- garage-bAInd/Open-Platypus
widget:
- text: |-
### User:
What are some popular locations for visiting around the world?
### Assistant:
- text: >-
### User:
How do meteorologists predict how much air pollution will be produced in
the next year?
### Assistant:
- text: |-
### User:
How to become more healthy?
### Assistant:
- text: |-
### User:
Write the specs of a game about dragons and warriors in a fantasy world.
### Assistant:
inference:
parameters:
max_new_tokens: 64
repetition_penalty: 1.18
Princeton NLP's Sheared-Pythia-160m trained on the Open-Platypus dataset
- Base model: princeton-nlp/Sheared-Pythia-160m
- Dataset: garage-bAInd/Open-Platypus
- Trained with AutoTrain Advanced using these parameters
- Availability in other ML formats:
Recommended Prompt Format
### User:
<message>
### Assistant: