TinyPixel/orca-mini
Viewer • Updated • 56k • 155 • 2
How to use KnutJaegersberg/Yi-34B-200K-MiniOrca with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="KnutJaegersberg/Yi-34B-200K-MiniOrca") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("KnutJaegersberg/Yi-34B-200K-MiniOrca")
model = AutoModelForCausalLM.from_pretrained("KnutJaegersberg/Yi-34B-200K-MiniOrca")How to use KnutJaegersberg/Yi-34B-200K-MiniOrca with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "KnutJaegersberg/Yi-34B-200K-MiniOrca"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "KnutJaegersberg/Yi-34B-200K-MiniOrca",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/KnutJaegersberg/Yi-34B-200K-MiniOrca
How to use KnutJaegersberg/Yi-34B-200K-MiniOrca with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "KnutJaegersberg/Yi-34B-200K-MiniOrca" \
--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": "KnutJaegersberg/Yi-34B-200K-MiniOrca",
"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 "KnutJaegersberg/Yi-34B-200K-MiniOrca" \
--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": "KnutJaegersberg/Yi-34B-200K-MiniOrca",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use KnutJaegersberg/Yi-34B-200K-MiniOrca with Docker Model Runner:
docker model run hf.co/KnutJaegersberg/Yi-34B-200K-MiniOrca
Trained for 2.7 epochs on the 50k shortest records of miniorca dataset with NEFTune. The base model is the official yi-34b-200k model.
Prompt Example:
### System:
You are an AI assistant. You will be given a task. You must generate a detailed and long answer.
### User:
What is AGI?
### Assistant:
License The source code in this repo is licensed under the Apache 2.0 license. The Yi series models are fully open for academic research and free commercial usage with permission via applications. All usage must adhere to the Model License Agreement 2.0. To apply for the official commercial license, please contact us (yi@01.ai).