Instructions to use OpenAssistant/pythia-12b-sft-v8-7k-steps with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenAssistant/pythia-12b-sft-v8-7k-steps with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="OpenAssistant/pythia-12b-sft-v8-7k-steps")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("OpenAssistant/pythia-12b-sft-v8-7k-steps") model = AutoModelForCausalLM.from_pretrained("OpenAssistant/pythia-12b-sft-v8-7k-steps", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OpenAssistant/pythia-12b-sft-v8-7k-steps with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OpenAssistant/pythia-12b-sft-v8-7k-steps" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OpenAssistant/pythia-12b-sft-v8-7k-steps", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/OpenAssistant/pythia-12b-sft-v8-7k-steps
- SGLang
How to use OpenAssistant/pythia-12b-sft-v8-7k-steps 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 "OpenAssistant/pythia-12b-sft-v8-7k-steps" \ --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": "OpenAssistant/pythia-12b-sft-v8-7k-steps", "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 "OpenAssistant/pythia-12b-sft-v8-7k-steps" \ --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": "OpenAssistant/pythia-12b-sft-v8-7k-steps", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use OpenAssistant/pythia-12b-sft-v8-7k-steps with Docker Model Runner:
docker model run hf.co/OpenAssistant/pythia-12b-sft-v8-7k-steps
Inference API
Hello,
can we replace the previous pythia model with this latest iteration for the inference API widgets?
@sonatasv are you a member of the openassistant org? Thanks!
@julien-c Hello,
No, I'm not. just looking for default inference API to play with the model.
ok thanks! was just curious
@julien-c - on a completely different note, I saw you mentioning that you are running huggingface chat (https://huggingface.co/spaces/huggingchat/chat-ui) backend server models in AWS g5 instances. Would it be okay for you to share the server launch configuration parameters? I'm also using g5 instances with quantization, but generation speed is not as good as huggingface chat.
Huggingface chat is lightning fast.