Instructions to use PetroGPT/Breeze-Petro-7B-Instruct-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PetroGPT/Breeze-Petro-7B-Instruct-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PetroGPT/Breeze-Petro-7B-Instruct-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PetroGPT/Breeze-Petro-7B-Instruct-v1") model = AutoModelForCausalLM.from_pretrained("PetroGPT/Breeze-Petro-7B-Instruct-v1", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PetroGPT/Breeze-Petro-7B-Instruct-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PetroGPT/Breeze-Petro-7B-Instruct-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PetroGPT/Breeze-Petro-7B-Instruct-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PetroGPT/Breeze-Petro-7B-Instruct-v1
- SGLang
How to use PetroGPT/Breeze-Petro-7B-Instruct-v1 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 "PetroGPT/Breeze-Petro-7B-Instruct-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PetroGPT/Breeze-Petro-7B-Instruct-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "PetroGPT/Breeze-Petro-7B-Instruct-v1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PetroGPT/Breeze-Petro-7B-Instruct-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PetroGPT/Breeze-Petro-7B-Instruct-v1 with Docker Model Runner:
docker model run hf.co/PetroGPT/Breeze-Petro-7B-Instruct-v1
Breeze-Petro-7B-Instruct-v1
- Model creator: MediaTek Research
- Original model: MediaTek-Research/Breeze-7B-Instruct-v1_0
Model Description
This is a model fine-tuned based on Breeze-7B-Instruct-v1_0. The training set is mainly based on chemical knowledge and procedural knowledge. Supplement knowledge about the petroleum industry.
- Developed by: RebeccaChou
- License: apache-2.0
- Finetuned from model : [MediaTek-Research/Breeze-7B-Instruct-v1_0
- Language(s) (NLP): [English.็น้ซไธญๆ]
๐ Table of Contents
1.Open LLM Leaderboard - ARC - HellaSwag - MMLU - TruthfulQA - Winogrande - GSM8K 3. EvalPlus Leaderboard - HumanEval - HumanEval_Plus - MBPP - MBPP_Plus 4. Prompt Format 5. Quantized Models 6. Gratitude
๐ Open LLM Leaderboard
WestSeverus-7B-DPO-v2 is one of the top 7B model in Open LLM Leaderboard and it outperforms on TruthfulQA and GSM8K.
| Metric | Value |
|---|---|
| Avg. | 59.32 |
| AI2 Reasoning Challenge (25-Shot) | 58.87 |
| HellaSwag (10-Shot) | 79.17 |
| MMLU (5-Shot) | 56.62 |
| TruthfulQA (0-shot) | 46.36 |
| Winogrande (5-shot) | 73.64 |
| GSM8k (5-shot) | 41.24 |
Detailed results can be found here
โก EvalPlus Leaderboard
| Model | HumanEval | HumanEval_Plus | MBPP | MBPP_Plus |
|---|---|---|---|---|
| phi-2-2.7B | 48.2 | 43.3 | 61.9 | 51.4 |
| SOLAR-10.7B-Instruct-v1.0 | 42.1 | 34.3 | 42.9 | 34.6 |
| CodeLlama-7B | 37.8 | 34.1 | 57.6 | 45.4 |
๐ ๏ธ Quantized Models
Training Details
Training Data
- Dataset: Rebecca19990101/petro-dataset-v2
- Downloads last month
- 15