OpenAssistant/oasst1
Viewer β’ Updated β’ 88.8k β’ 23.6k β’ 1.53k
How to use jordiclive/Llama-2-70b-oasst-1-200 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="jordiclive/Llama-2-70b-oasst-1-200") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("jordiclive/Llama-2-70b-oasst-1-200")
model = AutoModelForCausalLM.from_pretrained("jordiclive/Llama-2-70b-oasst-1-200")How to use jordiclive/Llama-2-70b-oasst-1-200 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "jordiclive/Llama-2-70b-oasst-1-200"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "jordiclive/Llama-2-70b-oasst-1-200",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/jordiclive/Llama-2-70b-oasst-1-200
How to use jordiclive/Llama-2-70b-oasst-1-200 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "jordiclive/Llama-2-70b-oasst-1-200" \
--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": "jordiclive/Llama-2-70b-oasst-1-200",
"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 "jordiclive/Llama-2-70b-oasst-1-200" \
--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": "jordiclive/Llama-2-70b-oasst-1-200",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use jordiclive/Llama-2-70b-oasst-1-200 with Docker Model Runner:
docker model run hf.co/jordiclive/Llama-2-70b-oasst-1-200
This model is a fine-tuning of Llama2 70B LLM. It was trained on a mixture of OASST top-1 threads.
Two special tokens are used to mark the beginning of user and assistant turns:
<|prompter|> and <|assistant|>. Each turn ends with a </s> token.
Input prompt example:
<|prompter|>What is a meme, and what's the history behind this word?</s><|assistant|>
The input ends with the <|assistant|> token to signal that the model should
start generating the assistant reply.
@misc{jordiclive_llama2_70b_oasst_1_200,
title={{Open-Assistant Llama2 70B SFT OASST}},
author={{Jordan Clive}},
howpublished={\url{https://huggingface.co/jordiclive/Llama-2-70b-oasst-1-200}},
year={2023},
note={Apache 2.0 License. Finetuned on OASST top-1 threads. Languages supported: English, German, Spanish, French.},
url={https://huggingface.co/jordiclive/Llama-2-70b-oasst-1-200},
}