Run this model with HF Jobs
Run openchat/openchat_v2_openorca_preview on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/openchat/openchat_v2_openorca_preview. Ask me which dataset to train on, then push the fine-tuned model to a new private model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/openchat/openchat_v2_openorca_preview on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/openchat/openchat_v2_openorca_preview. Ask me which benchmark to run, then save the scores and the per-example results to a new private dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/openchat/openchat_v2_openorca_preview. Push it to a new private model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use openchat/openchat_v2_openorca_preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openchat/openchat_v2_openorca_preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openchat/openchat_v2_openorca_preview")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openchat/openchat_v2_openorca_preview") model = AutoModelForCausalLM.from_pretrained("openchat/openchat_v2_openorca_preview", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openchat/openchat_v2_openorca_preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openchat/openchat_v2_openorca_preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openchat/openchat_v2_openorca_preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openchat/openchat_v2_openorca_preview
- SGLang
How to use openchat/openchat_v2_openorca_preview 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 "openchat/openchat_v2_openorca_preview" \ --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": "openchat/openchat_v2_openorca_preview", "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 "openchat/openchat_v2_openorca_preview" \ --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": "openchat/openchat_v2_openorca_preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openchat/openchat_v2_openorca_preview with Docker Model Runner:
docker model run hf.co/openchat/openchat_v2_openorca_preview
OpenChat V2 x OpenOrca Preview 2
This is a preview version of OpenChat V2 trained for 2 epochs (total 5 epochs) on full (4.5M) OpenOrca dataset.
Important Notice: Beta Release for Limited Testing Purposes Only
This release is intended solely for a small group of beta testers and is not an official release or preview. We caution against publicizing or sharing this version as it may contain bugs, errors, or incomplete features that could negatively impact performance. We are actively working on improving the model and preparing it for an official release.
Note: We have become aware that this beta release has been publicly shared on YouTube. Please be advised that the version tested on YouTube may have used parameters that could significantly harm performance. We will provide instructions on how to apply proper prompting format and sampling parameters prior to any official release to ensure optimal performance.
AGIEval Preliminary Results
OpenChat V2 OpenOrca Preview
name accuracy unmatched
aqua-rat.zero-shot 0.232283 0.0
logiqa-en.zero-shot 0.370200 0.0
lsat-ar.zero-shot 0.230435 0.0
lsat-lr.zero-shot 0.441176 0.0
lsat-rc.zero-shot 0.568773 0.0
sat-en-without-passage.zero-shot 0.393204 0.0
sat-en.zero-shot 0.747573 0.0
sat-math.zero-shot 0.295455 0.0
Average 0.409887 0.0
AGIEval Average reported in Orca paper: 0.417
Serving
This model is compatible with OpenChat V2 vLLM OpenAI API server. It can be used as a drop-in replacement for OpenChat V2 weights.
python -m ochat.serving.openai_api_server --model_type openchat_v2 --model openchat/openchat_v2_openorca_preview --engine-use-ray --worker-use-ray
Conversation Template
The conversation template involves concatenating tokens, and cannot be expressed in plain-text.
Besides base model vocabulary, an end-of-turn token <|end_of_turn|> is added.
Here is an example of single-round conversation template:
def tokenize_single_input(tokenizer, prompt):
# OpenChat V2
human_prefix = "User:"
prefix = "Assistant GPT4:"
eot_token = "<|end_of_turn|>"
bos_token = "<s>"
def _tokenize(text):
return tokenizer.convert_tokens_to_ids(tokenizer._tokenize(text))
def _tokenize_special(special_name):
return tokenizer.convert_tokens_to_ids(special_name)
return [_tokenize_special(bos_token)] + _tokenize(human_prefix) + _tokenize(prompt) + [_tokenize_special(eot_token)] + \
_tokenize(prefix)
To explore conditional language models, you can also set prefix = "Assistant GPT3:" to mimic ChatGPT behavior (this may cause performance degradation).
Hint: In BPE, tokenize(A) + tokenize(B) does not always equals to tokenize(A + B)
- Downloads last month
- -