Text Generation
Transformers
Safetensors
mistral
Merge
mergekit
lazymergekit
dpo
rlhf
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use mlabonne/NeuralBeagle14-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlabonne/NeuralBeagle14-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mlabonne/NeuralBeagle14-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mlabonne/NeuralBeagle14-7B") model = AutoModelForCausalLM.from_pretrained("mlabonne/NeuralBeagle14-7B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mlabonne/NeuralBeagle14-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlabonne/NeuralBeagle14-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlabonne/NeuralBeagle14-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mlabonne/NeuralBeagle14-7B
- SGLang
How to use mlabonne/NeuralBeagle14-7B 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 "mlabonne/NeuralBeagle14-7B" \ --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": "mlabonne/NeuralBeagle14-7B", "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 "mlabonne/NeuralBeagle14-7B" \ --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": "mlabonne/NeuralBeagle14-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mlabonne/NeuralBeagle14-7B with Docker Model Runner:
docker model run hf.co/mlabonne/NeuralBeagle14-7B
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,9 +12,9 @@ tags:
|
|
| 12 |
|
| 13 |

|
| 14 |
|
| 15 |
-
# NeuralBeagle14-7B
|
| 16 |
|
| 17 |
-
**Update 01/16/24: NeuralBeagle14-7B is probably the best 7B model you can find
|
| 18 |
|
| 19 |
NeuralBeagle14-7B is a DPO fine-tune of [mlabonne/Beagle14-7B](https://huggingface.co/mlabonne/Beagle14-7B) using the [argilla/distilabel-intel-orca-dpo-pairs](https://huggingface.co/datasets/argilla/distilabel-intel-orca-dpo-pairs) preference dataset and my DPO notebook from [this article](https://towardsdatascience.com/fine-tune-a-mistral-7b-model-with-direct-preference-optimization-708042745aac).
|
| 20 |
|
|
@@ -22,8 +22,26 @@ Thanks [Argilla](https://huggingface.co/argilla) for providing the dataset and t
|
|
| 22 |
|
| 23 |
You can try it out in this [Space](https://huggingface.co/spaces/mlabonne/NeuralBeagle14-7B-GGUF-Chat) (GGUF Q4_K_M).
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
## ๐ Evaluation
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
The evaluation was performed using [LLM AutoEval](https://github.com/mlabonne/llm-autoeval) on Nous suite. It is the best 7B model to date.
|
| 28 |
|
| 29 |
| Model | Average | AGIEval | GPT4All | TruthfulQA | Bigbench |
|
|
@@ -38,12 +56,6 @@ The evaluation was performed using [LLM AutoEval](https://github.com/mlabonne/ll
|
|
| 38 |
|
| 39 |
You can find the complete benchmark on [YALL - Yet Another LLM Leaderboard](https://huggingface.co/spaces/mlabonne/Yet_Another_LLM_Leaderboard).
|
| 40 |
|
| 41 |
-
It's also on top of the Open LLM Leaderboard:
|
| 42 |
-
|
| 43 |
-

|
| 44 |
-
|
| 45 |
-
Compared to Beagle14, there's no improvement in this benchmark. This might be due to an unlucky run, but I think I might be overexploiting argilla/distilabel-intel-orca-dpo-pairs at this point. Another preference dataset could improve it even further. Note that the Beagle models perform better than Turdus, which is purposely contaminated on Winogrande (very high score).
|
| 46 |
-
|
| 47 |
## ๐ป Usage
|
| 48 |
|
| 49 |
```python
|
|
|
|
| 12 |
|
| 13 |

|
| 14 |
|
| 15 |
+
# ๐ถ NeuralBeagle14-7B
|
| 16 |
|
| 17 |
+
**Update 01/16/24: NeuralBeagle14-7B is (probably) the best 7B model you can find! ๐**
|
| 18 |
|
| 19 |
NeuralBeagle14-7B is a DPO fine-tune of [mlabonne/Beagle14-7B](https://huggingface.co/mlabonne/Beagle14-7B) using the [argilla/distilabel-intel-orca-dpo-pairs](https://huggingface.co/datasets/argilla/distilabel-intel-orca-dpo-pairs) preference dataset and my DPO notebook from [this article](https://towardsdatascience.com/fine-tune-a-mistral-7b-model-with-direct-preference-optimization-708042745aac).
|
| 20 |
|
|
|
|
| 22 |
|
| 23 |
You can try it out in this [Space](https://huggingface.co/spaces/mlabonne/NeuralBeagle14-7B-GGUF-Chat) (GGUF Q4_K_M).
|
| 24 |
|
| 25 |
+
## โก Quantized models
|
| 26 |
+
|
| 27 |
+
* **GGUF**: https://huggingface.co/mlabonne/NeuralBeagle14-7B-GGUF
|
| 28 |
+
|
| 29 |
## ๐ Evaluation
|
| 30 |
|
| 31 |
+
### Open LLM Leaderboard
|
| 32 |
+
|
| 33 |
+
NeuralBeagle14-7B ranks first on the Open LLM Leaderboard in the ~7B category.
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
|
| 37 |
+
It has the same average score as Beagle14-7B ("Show merges"), which could be due to might be due to an unlucky run.
|
| 38 |
+
I think I might be overexploiting argilla/distilabel-intel-orca-dpo-pairs at this point, since this dataset or its original version are present in multiple models.
|
| 39 |
+
I need to find more high-quality preference data for the next DPO merge.
|
| 40 |
+
|
| 41 |
+
Note that some models like udkai/Turdus and nfaheem/Marcoroni-7b-DPO-Merge are unfortunately contaminated on purpose (see the very high Winogrande score).
|
| 42 |
+
|
| 43 |
+
### Nous
|
| 44 |
+
|
| 45 |
The evaluation was performed using [LLM AutoEval](https://github.com/mlabonne/llm-autoeval) on Nous suite. It is the best 7B model to date.
|
| 46 |
|
| 47 |
| Model | Average | AGIEval | GPT4All | TruthfulQA | Bigbench |
|
|
|
|
| 56 |
|
| 57 |
You can find the complete benchmark on [YALL - Yet Another LLM Leaderboard](https://huggingface.co/spaces/mlabonne/Yet_Another_LLM_Leaderboard).
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
## ๐ป Usage
|
| 60 |
|
| 61 |
```python
|