gguf endpoints_compatible region:us conversational
---
{}
---
Quantization made by Richard Erkhov.

[Github](https://github.com/RichardErkhov)

[Discord](https://discord.gg/pvy7H8DZMG)

[Request more models](https://github.com/RichardErkhov/quant_request)


Llama-3-NeuralHercules-5.0-8B - GGUF
- Model creator: https://huggingface.co/Locutusque/
- Original model: https://huggingface.co/Locutusque/Llama-3-NeuralHercules-5.0-8B/


| Name | Quant method | Size |
| ---- | ---- | ---- |
| [Llama-3-NeuralHercules-5.0-8B.Q2_K.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q2_K.gguf) | Q2_K | 2.96GB |
| [Llama-3-NeuralHercules-5.0-8B.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.IQ3_XS.gguf) | IQ3_XS | 3.28GB |
| [Llama-3-NeuralHercules-5.0-8B.IQ3_S.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.IQ3_S.gguf) | IQ3_S | 2.44GB |
| [Llama-3-NeuralHercules-5.0-8B.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q3_K_S.gguf) | Q3_K_S | 3.41GB |
| [Llama-3-NeuralHercules-5.0-8B.IQ3_M.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.IQ3_M.gguf) | IQ3_M | 3.52GB |
| [Llama-3-NeuralHercules-5.0-8B.Q3_K.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q3_K.gguf) | Q3_K | 3.74GB |
| [Llama-3-NeuralHercules-5.0-8B.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q3_K_M.gguf) | Q3_K_M | 3.74GB |
| [Llama-3-NeuralHercules-5.0-8B.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q3_K_L.gguf) | Q3_K_L | 4.03GB |
| [Llama-3-NeuralHercules-5.0-8B.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.IQ4_XS.gguf) | IQ4_XS | 4.18GB |
| [Llama-3-NeuralHercules-5.0-8B.Q4_0.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q4_0.gguf) | Q4_0 | 4.34GB |
| [Llama-3-NeuralHercules-5.0-8B.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.IQ4_NL.gguf) | IQ4_NL | 4.38GB |
| [Llama-3-NeuralHercules-5.0-8B.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q4_K_S.gguf) | Q4_K_S | 4.37GB |
| [Llama-3-NeuralHercules-5.0-8B.Q4_K.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q4_K.gguf) | Q4_K | 4.58GB |
| [Llama-3-NeuralHercules-5.0-8B.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q4_K_M.gguf) | Q4_K_M | 4.58GB |
| [Llama-3-NeuralHercules-5.0-8B.Q4_1.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q4_1.gguf) | Q4_1 | 4.78GB |
| [Llama-3-NeuralHercules-5.0-8B.Q5_0.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q5_0.gguf) | Q5_0 | 5.21GB |
| [Llama-3-NeuralHercules-5.0-8B.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q5_K_S.gguf) | Q5_K_S | 5.21GB |
| [Llama-3-NeuralHercules-5.0-8B.Q5_K.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q5_K.gguf) | Q5_K | 5.34GB |
| [Llama-3-NeuralHercules-5.0-8B.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q5_K_M.gguf) | Q5_K_M | 5.34GB |
| [Llama-3-NeuralHercules-5.0-8B.Q5_1.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q5_1.gguf) | Q5_1 | 5.65GB |
| [Llama-3-NeuralHercules-5.0-8B.Q6_K.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q6_K.gguf) | Q6_K | 6.14GB |
| [Llama-3-NeuralHercules-5.0-8B.Q8_0.gguf](https://huggingface.co/RichardErkhov/Locutusque_-_Llama-3-NeuralHercules-5.0-8B-gguf/blob/main/Llama-3-NeuralHercules-5.0-8B.Q8_0.gguf) | Q8_0 | 7.95GB |




Original model description:
---
library_name: transformers
tags:
- code
- chemistry
- medical
license: llama3
language:
- en
---
# Llama-3-NeuralHercules-5.0-8B

## Model Details
- **Model Name**: Locutusque/Llama-3-NeuralHercules-5.0-8B
- **Base Model**: meta-llama/Meta-Llama-3-8B
- **Publisher**: Locutusque  
- **Model Type**: Question answering, conversational AI, code generation, medical text comprehension, mathematical reasoning, logical reasoning.  
- **Language**: multi-lingual
- **License**: Apache-2.0  

## Model Description
`Locutusque/Llama-3-NeuralHercules-5.0-8B` is a state-of-the-art language model fine-tuned on the hercules-v5.0 and mlabonne/orpo-dpo-mix-40k dataset for advanced reasoning across scientific domains. This model is designed to handle complex inquiries and instructions, leveraging the diverse and rich information contained in the Hercules dataset. Its primary use cases include but are not limited to complex question answering, conversational understanding, code generation, medical text comprehension, mathematical reasoning, and logical reasoning. 

## Intended Use
This model is intended for researchers and practitioners looking for a powerful tool to tackle challenging problems in scientific domains. It can be used in the following scenarios:
- AI-driven tutoring systems for science, medicine, mathematics, and computer science.
- Assistive tools for professionals requiring fast and accurate domain-specific information retrieval.
- Platforms that require conversational AI capabilities with a focus on technical and scientific reasoning.
- Automation in code generation and understanding complex programming context.

## Training Data
The `Locutusque/Llama-3-NeuralHercules-5.0-8B` model was fine-tuned on all examples of the hercules-v5.0 dataset for 2 epochs, which amalgamates various datasets rich in diversity and complexity, including programming, medical texts, mathematical problems, and reasoning tasks. Then, it is further fine-tuned on the mlabonne/orpo-dpo-mix-40k dataset using DPO. 

## Evaluation Results

|              Tasks              |Version|     Filter     |n-shot|  Metric   |   |Value |   |Stderr|
|---------------------------------|-------|----------------|-----:|-----------|---|-----:|---|-----:|
|agieval_nous                     |N/A    |none            |     0|acc_norm   |↑  |0.3943|±  |0.0094|
|                                 |       |none            |     0|acc        |↑  |0.3928|±  |0.0094|
| - agieval_aqua_rat              |      1|none            |     0|acc        |↑  |0.2126|±  |0.0257|
|                                 |       |none            |     0|acc_norm   |↑  |0.2323|±  |0.0265|
| - agieval_logiqa_en             |      1|none            |     0|acc        |↑  |0.3425|±  |0.0186|
|                                 |       |none            |     0|acc_norm   |↑  |0.3625|±  |0.0189|
| - agieval_lsat_ar               |      1|none            |     0|acc        |↑  |0.2174|±  |0.0273|
|                                 |       |none            |     0|acc_norm   |↑  |0.2000|±  |0.0264|
| - agieval_lsat_lr               |      1|none            |     0|acc        |↑  |0.4020|±  |0.0217|
|                                 |       |none            |     0|acc_norm   |↑  |0.3843|±  |0.0216|
| - agieval_lsat_rc               |      1|none            |     0|acc        |↑  |0.5651|±  |0.0303|
|                                 |       |none            |     0|acc_norm   |↑  |0.5651|±  |0.0303|
| - agieval_sat_en                |      1|none            |     0|acc        |↑  |0.6602|±  |0.0331|
|                                 |       |none            |     0|acc_norm   |↑  |0.6456|±  |0.0334|
| - agieval_sat_en_without_passage|      1|none            |     0|acc        |↑  |0.4466|±  |0.0347|
|                                 |       |none            |     0|acc_norm   |↑  |0.4563|±  |0.0348|
| - agieval_sat_math              |      1|none            |     0|acc        |↑  |0.4000|±  |0.0331|
|                                 |       |none            |     0|acc_norm   |↑  |0.4000|±  |0.0331|
|gsm8k                            |      3|strict-match    |     5|exact_match|↑  |0.4920|±  |0.0138|
|                                 |       |flexible-extract|     5|exact_match|↑  |0.4958|±  |0.0138|
|truthfulqa_mc2                   |      2|none            |     0|acc        |↑  |0.5465|±  |0.0152|
|arc_challenge|    1.0|none  |     0|acc              |↑  |  0.5606|±  |0.0145|
|             |       |none  |     0|acc_norm         |↑  |  0.5836|±  |0.0144|
|arc_easy  |      1|none  |     0|acc     |↑  |0.8325|±  |0.0077|
|          |       |none  |     0|acc_norm|↑  |0.8056|±  |0.0081|
|boolq     |      2|none  |     0|acc     |↑  |0.8260|±  |0.0066|
|hellaswag |      1|none  |     0|acc     |↑  |0.6534|±  |0.0047|
|          |       |none  |     0|acc_norm|↑  |0.8372|±  |0.0037|
|openbookqa|      1|none  |     0|acc     |↑  |0.3500|±  |0.0214|
|          |       |none  |     0|acc_norm|↑  |0.4660|±  |0.0223|
|piqa      |      1|none  |     0|acc     |↑  |0.8096|±  |0.0092|
|          |       |none  |     0|acc_norm|↑  |0.8270|±  |0.0088|
|winogrande|      1|none  |     0|acc     |↑  |0.7640|±  |0.0119|
|eq_bench     |    2.1|none  |     0|eqbench          |↑  | 52.9249|±  |3.0923|
  


## How to Use
```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Locutusque/Llama-3-NeuralHercules-5.0-8B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

# For a text generation task
input_text = "<|im_start|>user\nWhat are the implications of Einstein's theory of relativity in modern physics?<|im_end|>\n<|im_start|>assistant\n"
input_ids = tokenizer.encode(input_text, return_tensors="pt")

# Generate a response
outputs = model.generate(input_ids, max_length=200, num_return_sequences=1, temperature=0.8, top_p=0.95, top_k=40, repetition_penalty=1.1)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```
## Known Limitations

The diversity of the dataset could lead to inconsistencies in the model's responses due to variations in data formatting and annotation quality.


