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
| language: | |
| - en | |
| - da | |
| tags: | |
| - text-generation-inference | |
| - transformers | |
| - unsloth | |
| - mistral | |
| - trl | |
| base_model: Mabeck/Heidrun-Mistral-7B-base | |
| datasets: | |
| - Mabeck/danish-OpenHermes | |
| - kobprof/skolegpt-instruct | |
| license: mit | |
| pipeline_tag: text-generation | |
| <img src="https://huggingface.co/Mabeck/Heidrun-Mistral-7B-chat/resolve/main/heidrun.jpeg" alt="Heidrun Logo" width="400"> | |
| # Model description | |
| 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. | |
| It is a new SOTA Danish open-source LLM and shows very strong performance in logic and reasoning tasks. | |
| Heidrun-7B ranks 1st among Danish open-sourced LLMs based on the [ScandEval](https://scandeval.com/mainland-scandinavian-nlg/) benchmark and shares 1st place on all Scandinavian languages. | |
| # Benchmarks | |
| The following benchmarks have been tested using [ScandEval](https://github.com/ScandEval/ScandEval). Rankings don't include merged models and GPT4 and GPT3.5 ranks 1 and 2: | |
| - **MMLU-da**: 35.66%+-0.85%/51.68+-0.63%, ranks 3rd | |
| - **DANSK**: 50.80% ± 2.33% / 34.04% ± 1.76%, ranks 3rd= | |
| - **Hellaswag-da**: 29.18% ± 0.99%/ 46.64% ± 0.76%, ranks 4th | |
| # Datasets | |
| 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. | |
| Most of the data has been machine-translated and may contain incorrect responses. | |
| # Samples | |
| This model uses the ChatML format. Using other formats may degrade the model's performance. | |
| Samples from the model using ChatML format: | |
| ``` | |
| "<s> <im_start>system | |
| Du er en AI-hjælper. Du får en opgave fra en bruger hvor du kort og præcist skal forklare svaret. | |
| <im_end> | |
| <im_start>user | |
| Hvilke 3 populære retter findes der i dansk madlavning? | |
| <im_end> | |
| <im_start>assistant | |
| 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. | |
| 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. | |
| 3. Rød kål: Rød kål er en populær side ret i dansk madlavning. | |
| <im_end></s>" | |
| ``` | |
| ``` | |
| "<s> <im_start>system | |
| Du er en AI-hjælper. Du får en opgave fra en bruger hvor du kort og præcist skal forklare svaret. | |
| <im_end> | |
| <im_start>user | |
| Hvilke 3 områder skal fokuseres på for at effektivt tackle klimaforandringer? | |
| <im_end> | |
| <im_start>assistant | |
| 1. Energiproduktion: Fokus på vedvarende energikilder som sol, vind og vandkraft for at reducere afhængigheden af fossile brændstoffer og minimere drivhusgasemissioner. | |
| 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. | |
| 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. | |
| <im_end></s>" | |
| ``` | |
| # Uploaded model | |
| - **Developed by:** Mabeck | |
| - **Finetuned from model :** Mabeck/Heidrun-Mistral-7B-base | |
| This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library. | |
| [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth) |