Instructions to use leafspark/WizardHermes-2-Pro-Llama-3-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="leafspark/WizardHermes-2-Pro-Llama-3-8b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("leafspark/WizardHermes-2-Pro-Llama-3-8b", dtype="auto") - llama-cpp-python
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="leafspark/WizardHermes-2-Pro-Llama-3-8b", filename="WizardHermes-2-Pro-Llama-3-8b.Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M # Run inference directly in the terminal: llama cli -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M # Run inference directly in the terminal: llama cli -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
Use Docker
docker model run hf.co/leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leafspark/WizardHermes-2-Pro-Llama-3-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leafspark/WizardHermes-2-Pro-Llama-3-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
- SGLang
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b 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 "leafspark/WizardHermes-2-Pro-Llama-3-8b" \ --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": "leafspark/WizardHermes-2-Pro-Llama-3-8b", "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 "leafspark/WizardHermes-2-Pro-Llama-3-8b" \ --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": "leafspark/WizardHermes-2-Pro-Llama-3-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with Ollama:
ollama run hf.co/leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
- Unsloth Studio
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for leafspark/WizardHermes-2-Pro-Llama-3-8b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for leafspark/WizardHermes-2-Pro-Llama-3-8b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for leafspark/WizardHermes-2-Pro-Llama-3-8b to start chatting
- Atomic Chat new
- Docker Model Runner
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with Docker Model Runner:
docker model run hf.co/leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
- Lemonade
How to use leafspark/WizardHermes-2-Pro-Llama-3-8b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull leafspark/WizardHermes-2-Pro-Llama-3-8b:Q4_K_M
Run and chat with the model
lemonade run user.WizardHermes-2-Pro-Llama-3-8b-Q4_K_M
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)WizardHermes-2-Pro-Llama-3-8b
Finetuned from Meta-Llama-3-8b, 0.55 epoches
Merged with Hermes-2-Pro-Llama-3-8b
Eval (0.0 temp) (https://inflection.ai/assets/MMLU-Examples.pdf, 0-shot):
Hermes 2 Pro LoRA (merged) (checkpoint 1): 7/12
Hermes 2 Pro LoRA (merged) (checkpoint 2): 9/12
Hermes 2 Pro Llama 3 8b: 8/12
TruthfulQA (0-shot):
Hermes 2 Pro LoRA (merged) (checkpoint 2): 9/15
Hermes 2 Pro Llama 3 8b: 7/15
Trained using MonsterAPI
LoRA training parameters:
{
"deployment_name": "wizardlm-llama-3-8b",
"pretrainedmodel_config": {
"model_path": "meta-llama/Meta-Llama-3-8B",
"other_model_info": null,
"resume_checkpoint_path": "",
"use_lora": true,
"lora_r": 8,
"lora_alpha": 16,
"lora_dropout": 0,
"lora_bias": "none",
"use_quantization": false,
"use_gradient_checkpointing": false,
"parallelization": "nmp"
},
"data_config": {
"data_path": "cognitivecomputations/WizardLM_alpaca_evol_instruct_70k_unfiltered",
"data_subset": "default",
"data_source_type": "hub_link",
"cutoff_len": 4096,
"data_split_config": {
"train": 0.9,
"validation": 0.1
},
"prevalidated": true,
"concat_config": {
"0": {
"text": "Below is an instruction that describes a task. Write a response that appropriately completes the request. \n\n\n###Instruction:",
"column": false
},
"1": {
"text": "instruction",
"column": true
},
"2": {
"text": "\n\n\n###Response:",
"column": false
},
"3": {
"text": "output",
"column": true
}
}
},
"training_config": {
"early_stopping_patience": 5,
"num_train_epochs": 5,
"gradient_accumulation_steps": 1,
"warmup_steps": 300,
"learning_rate": 0.0005,
"lr_scheduler_type": "reduce_lr_on_plateau",
"group_by_length": false,
"use_hugging_face": false
},
"logging_config": {
"use_wandb": false,
"wandb_username": "",
"wandb_login_key": "",
"wandb_project": "",
"wandb_run_name": ""
},
"accessorytasks_config": {
"run_eval_report": false,
"run_quantize_merge": false
}
}
- Downloads last month
- 12
2-bit
3-bit
4-bit
6-bit
8-bit
16-bit
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="leafspark/WizardHermes-2-Pro-Llama-3-8b", filename="", )