Instructions to use Open-Orca/oo-phi-1_5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Open-Orca/oo-phi-1_5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Open-Orca/oo-phi-1_5", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Open-Orca/oo-phi-1_5", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Open-Orca/oo-phi-1_5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Open-Orca/oo-phi-1_5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open-Orca/oo-phi-1_5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Open-Orca/oo-phi-1_5
- SGLang
How to use Open-Orca/oo-phi-1_5 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 "Open-Orca/oo-phi-1_5" \ --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": "Open-Orca/oo-phi-1_5", "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 "Open-Orca/oo-phi-1_5" \ --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": "Open-Orca/oo-phi-1_5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Open-Orca/oo-phi-1_5 with Docker Model Runner:
docker model run hf.co/Open-Orca/oo-phi-1_5
"This model doesn't dramatically improve on the base model's general task performance"
I have been playing around a lot with 1B and of course 1.5B parameter models lately. They are super easy to play around with when you have limited compute, so I love them. I have noticed generalization limitations in every single model in this range I have tested so far. It seems to me that more generalized generalization requires a few more parameters than 1.5B.....
phi 1.5 is primarily to proof high-quality pretraining dataset is comparable to large amount of midocre internet corpora. These smaller models are trained for reasons to project loss prediction so as "foreplay" for larger models before commiting to sacle up.
Yes, I know that is why people construct them. People should research them more though. I am very interested in them for their research value. There are questions that do not get answered if you only treat it as a stepping stone to scaling up to more parameters.
@TuringsSolutions Have you tried using this model inside of the huggingface chat UI? I feel like utilizing some of the tricks written in OpenAI's cookbook would help; namely adding search results and making the model do another pass to first think through a problem before giving a final reply.
That would of course complicate the code to run the model (and the general inference time) quite a bit, but I figure it's worth trying out