Open-Orca/OpenOrca
Viewer • Updated • 2.94M • 23.5k • 1.55k
How to use HWERI/llama2-exams-orca-sharegpt with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="HWERI/llama2-exams-orca-sharegpt") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("HWERI/llama2-exams-orca-sharegpt")
model = AutoModelForCausalLM.from_pretrained("HWERI/llama2-exams-orca-sharegpt")How to use HWERI/llama2-exams-orca-sharegpt with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "HWERI/llama2-exams-orca-sharegpt"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "HWERI/llama2-exams-orca-sharegpt",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/HWERI/llama2-exams-orca-sharegpt
How to use HWERI/llama2-exams-orca-sharegpt with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "HWERI/llama2-exams-orca-sharegpt" \
--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": "HWERI/llama2-exams-orca-sharegpt",
"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 "HWERI/llama2-exams-orca-sharegpt" \
--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": "HWERI/llama2-exams-orca-sharegpt",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use HWERI/llama2-exams-orca-sharegpt with Docker Model Runner:
docker model run hf.co/HWERI/llama2-exams-orca-sharegpt
This model is a Llama2-7B model finetuned on the union of ShareGPT, the exams dataset and a subset of the Orca dataset. The finetuning was performed with DeepSpeed Chat toolkit (step 1, sft). The model run for three epochs before reaching a plateau on the validation dataset. We used a cosine scheduler, with an initial LR of 2e-5.