OpenAssistant/oasst1
Viewer • Updated • 88.8k • 51k • 1.58k
How to use Monero/oasst-alpaca13b-4epoch-4bit-128g with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Monero/oasst-alpaca13b-4epoch-4bit-128g") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Monero/oasst-alpaca13b-4epoch-4bit-128g")
model = AutoModelForCausalLM.from_pretrained("Monero/oasst-alpaca13b-4epoch-4bit-128g", device_map="auto")How to use Monero/oasst-alpaca13b-4epoch-4bit-128g with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Monero/oasst-alpaca13b-4epoch-4bit-128g"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Monero/oasst-alpaca13b-4epoch-4bit-128g",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Monero/oasst-alpaca13b-4epoch-4bit-128g
How to use Monero/oasst-alpaca13b-4epoch-4bit-128g with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Monero/oasst-alpaca13b-4epoch-4bit-128g" \
--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": "Monero/oasst-alpaca13b-4epoch-4bit-128g",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "Monero/oasst-alpaca13b-4epoch-4bit-128g" \
--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": "Monero/oasst-alpaca13b-4epoch-4bit-128g",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Monero/oasst-alpaca13b-4epoch-4bit-128g with Docker Model Runner:
docker model run hf.co/Monero/oasst-alpaca13b-4epoch-4bit-128g
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Monero/oasst-alpaca13b-4epoch-4bit-128g")
model = AutoModelForCausalLM.from_pretrained("Monero/oasst-alpaca13b-4epoch-4bit-128g", device_map="auto")Information
OpenAssistant-Alpaca-13B-4-bit working with GPTQ versions used in Oobabooga's Text Generation Webui and KoboldAI.python llama.py /Models/alpaca13b-oaast4ep-lora c4 --wbits 4 --true-sequential --groupsize 128 --save_safetensors oasst-alpaca13b-4ep-lora-4bit-128g.safetensors
Benchmarks
--true-sequential --groupsize 128
Wikitext2: 6.854333400726318
Ptb-New: 12.411578178405762
C4-New: 9.355494499206543
Note: This version uses --groupsize 128, resulting in better evaluations.
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Monero/oasst-alpaca13b-4epoch-4bit-128g")