Text Generation
Transformers
PyTorch
Safetensors
GGUF
English
Danish
mistral
text-generation-inference
unsloth
trl
Instructions to use Mabeck/Heidrun-Mistral-7B-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mabeck/Heidrun-Mistral-7B-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Mabeck/Heidrun-Mistral-7B-chat")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Mabeck/Heidrun-Mistral-7B-chat") model = AutoModelForCausalLM.from_pretrained("Mabeck/Heidrun-Mistral-7B-chat") - llama-cpp-python
How to use Mabeck/Heidrun-Mistral-7B-chat with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Mabeck/Heidrun-Mistral-7B-chat", filename="Heidrun-Mistral-7B-chat-Q6_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Mabeck/Heidrun-Mistral-7B-chat 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 Mabeck/Heidrun-Mistral-7B-chat:Q6_K # Run inference directly in the terminal: llama cli -hf Mabeck/Heidrun-Mistral-7B-chat:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mabeck/Heidrun-Mistral-7B-chat:Q6_K # Run inference directly in the terminal: llama cli -hf Mabeck/Heidrun-Mistral-7B-chat:Q6_K
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 Mabeck/Heidrun-Mistral-7B-chat:Q6_K # Run inference directly in the terminal: ./llama-cli -hf Mabeck/Heidrun-Mistral-7B-chat:Q6_K
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 Mabeck/Heidrun-Mistral-7B-chat:Q6_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf Mabeck/Heidrun-Mistral-7B-chat:Q6_K
Use Docker
docker model run hf.co/Mabeck/Heidrun-Mistral-7B-chat:Q6_K
- LM Studio
- Jan
- vLLM
How to use Mabeck/Heidrun-Mistral-7B-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mabeck/Heidrun-Mistral-7B-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mabeck/Heidrun-Mistral-7B-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Mabeck/Heidrun-Mistral-7B-chat:Q6_K
- SGLang
How to use Mabeck/Heidrun-Mistral-7B-chat 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 "Mabeck/Heidrun-Mistral-7B-chat" \ --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": "Mabeck/Heidrun-Mistral-7B-chat", "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 "Mabeck/Heidrun-Mistral-7B-chat" \ --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": "Mabeck/Heidrun-Mistral-7B-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use Mabeck/Heidrun-Mistral-7B-chat with Ollama:
ollama run hf.co/Mabeck/Heidrun-Mistral-7B-chat:Q6_K
- Unsloth Studio
How to use Mabeck/Heidrun-Mistral-7B-chat 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 Mabeck/Heidrun-Mistral-7B-chat 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 Mabeck/Heidrun-Mistral-7B-chat to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mabeck/Heidrun-Mistral-7B-chat to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Mabeck/Heidrun-Mistral-7B-chat with Docker Model Runner:
docker model run hf.co/Mabeck/Heidrun-Mistral-7B-chat:Q6_K
- Lemonade
How to use Mabeck/Heidrun-Mistral-7B-chat with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mabeck/Heidrun-Mistral-7B-chat:Q6_K
Run and chat with the model
lemonade run user.Heidrun-Mistral-7B-chat-Q6_K
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -21,7 +21,9 @@ datasets:
|
|
| 21 |
# Model description
|
| 22 |
Heidrun-Mistral-7B-chat is a chat-model based on [Heidrun-Mistral-7B-base](https://huggingface.co/Mabeck/Heidrun-Mistral-7B-base), finetuned on [danish-OpenHermes](https://huggingface.co/datasets/Mabeck/danish-OpenHermes) and [skoleGPT](https://huggingface.co/datasets/kobprof/skolegpt-instruct) for a instruction/chat format.
|
| 23 |
|
| 24 |
-
It achieved 35.66%+-0.85%/51.68+-0.63% on MMLU-Da in [ScandEval](https://github.com/ScandEval/ScandEval)
|
|
|
|
|
|
|
| 25 |
|
| 26 |
# Datasets
|
| 27 |
This model is trained on Danish instruction datasets [danish-OpenHermes](Mabeck/danish-OpenHermes) and [skoleGPT](https://huggingface.co/datasets/kobprof/skolegpt-instruct), which have not been safeguarded or alligned.
|
|
@@ -30,19 +32,38 @@ Most of the data has been machine-translated and may contain incorrect responses
|
|
| 30 |
|
| 31 |
# Samples
|
| 32 |
|
| 33 |
-
This model uses the ChatML format. Using other formats
|
| 34 |
-
ChatML format:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
```
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
<
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
<
|
| 42 |
-
|
| 43 |
-
<
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
```
|
| 47 |
|
| 48 |
# Uploaded model
|
|
|
|
| 21 |
# Model description
|
| 22 |
Heidrun-Mistral-7B-chat is a chat-model based on [Heidrun-Mistral-7B-base](https://huggingface.co/Mabeck/Heidrun-Mistral-7B-base), finetuned on [danish-OpenHermes](https://huggingface.co/datasets/Mabeck/danish-OpenHermes) and [skoleGPT](https://huggingface.co/datasets/kobprof/skolegpt-instruct) for a instruction/chat format.
|
| 23 |
|
| 24 |
+
It achieved 35.66%+-0.85%/51.68+-0.63% on MMLU-Da in [ScandEval](https://github.com/ScandEval/ScandEval) which is the best non-merged opensource model score to date (13/02/24).
|
| 25 |
+
|
| 26 |
+
Further evaluations will be tested.
|
| 27 |
|
| 28 |
# Datasets
|
| 29 |
This model is trained on Danish instruction datasets [danish-OpenHermes](Mabeck/danish-OpenHermes) and [skoleGPT](https://huggingface.co/datasets/kobprof/skolegpt-instruct), which have not been safeguarded or alligned.
|
|
|
|
| 32 |
|
| 33 |
# Samples
|
| 34 |
|
| 35 |
+
This model uses the ChatML format. Using other formats may degrade the model's performance.
|
| 36 |
+
Samples from the model using ChatML format:
|
| 37 |
+
```
|
| 38 |
+
"<s> <im_start>system
|
| 39 |
+
Du er en AI-hjælper. Du får en opgave fra en bruger hvor du kort og præcist skal forklare svaret.
|
| 40 |
+
<im_end>
|
| 41 |
+
<im_start>user
|
| 42 |
+
Hvilke 3 områder skal fokuseres på for at effektivt tackle klimaforandringer?
|
| 43 |
+
<im_end>
|
| 44 |
+
<im_start>assistant
|
| 45 |
+
1. Energiproduktion: Fokus på vedvarende energikilder som sol, vind og vandkraft for at reducere afhængigheden af fossile brændstoffer og minimere drivhusgasemissioner.
|
| 46 |
+
|
| 47 |
+
2. Transport: Fremme bæredygtige transportformer som offentlig transport, cykling og elektriske køretøjer for at reducere luftforurening og afhængigheden af fossile brændstoffer.
|
| 48 |
+
|
| 49 |
+
3. Skovbevarelse og affaldshåndtering: Fremme skovbevarelse og bæredygtig skovdrift for at fange kuldioxid og reducere drivhusgasemissioner, samt fremme genbrug og reducere affaldsproduktion for at mindske mængden af drivhusgasemissioner fra affald.
|
| 50 |
+
<im_end></s>"
|
| 51 |
```
|
| 52 |
+
|
| 53 |
+
```
|
| 54 |
+
"<s> <im_start>system
|
| 55 |
+
Du er en AI-hjælper. Du får en opgave fra en bruger hvor du kort og præcist skal forklare svaret.
|
| 56 |
+
<im_end>
|
| 57 |
+
<im_start>user
|
| 58 |
+
Hvilke 3 populære retter findes der i dansk madlavning?
|
| 59 |
+
<im_end>
|
| 60 |
+
<im_start>assistant
|
| 61 |
+
1. Smørrebrød: Smørrebrød er en populær dansk ret, der består af brød med forskellige toppings som røget laks, rejer, ost eller andre ingredienser.
|
| 62 |
+
|
| 63 |
+
2. Frikadeller: Frikadeller er en traditionel dansk ret lavet af kødboller af kalvekød, svinekød eller lam, krydret med krydderurter og kogt i smør eller olie.
|
| 64 |
+
|
| 65 |
+
3. Rød kål: Rød kål er en populær side ret i dansk madlavning.
|
| 66 |
+
<im_end></s>"
|
| 67 |
```
|
| 68 |
|
| 69 |
# Uploaded model
|