Instructions to use MetaIX/OpenAssistant-Llama-30b-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MetaIX/OpenAssistant-Llama-30b-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MetaIX/OpenAssistant-Llama-30b-4bit")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MetaIX/OpenAssistant-Llama-30b-4bit") model = AutoModelForCausalLM.from_pretrained("MetaIX/OpenAssistant-Llama-30b-4bit") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use MetaIX/OpenAssistant-Llama-30b-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MetaIX/OpenAssistant-Llama-30b-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MetaIX/OpenAssistant-Llama-30b-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MetaIX/OpenAssistant-Llama-30b-4bit
- SGLang
How to use MetaIX/OpenAssistant-Llama-30b-4bit 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 "MetaIX/OpenAssistant-Llama-30b-4bit" \ --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": "MetaIX/OpenAssistant-Llama-30b-4bit", "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 "MetaIX/OpenAssistant-Llama-30b-4bit" \ --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": "MetaIX/OpenAssistant-Llama-30b-4bit", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MetaIX/OpenAssistant-Llama-30b-4bit with Docker Model Runner:
docker model run hf.co/MetaIX/OpenAssistant-Llama-30b-4bit
Works fine with llama.cpp / kobold.cpp!
Thank you! Model generates answers quite similar to what I get on https://open-assistant.io/chat/.
Remember to use markers:
<|prompter|>:
<|assistant|>:
When I asked this model --- "Generate a script for a new Fallout game. Come up with a new character and his story. Let the action take place in New York City. Come up with 4 different factions. Describe their morals and goals. Come up with an original plot that includes several complex moral choices of the main character when interacting with each of the factions. Outline several endings of the game, which ultimately have different effects on the factions." ---- the model started it very well, but then it wrote ".. sorry, I can't complete the task"