Views
No views yet

<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
| Name | Quant method | Bits | Size | Max RAM required | Use case |
|---|---|---|---|---|---|
| leo-hessianai-70b-chat.Q2_K.gguf | Q2_K | 2 | 29.28 GB | 31.78 GB | smallest, significant quality loss - not recommended for most purposes |
| leo-hessianai-70b-chat.Q3_K_S.gguf | Q3_K_S | 3 | 29.92 GB | 32.42 GB | very small, high quality loss |
| leo-hessianai-70b-chat.Q3_K_M.gguf | Q3_K_M | 3 | 33.19 GB | 35.69 GB | very small, high quality loss |
| leo-hessianai-70b-chat.Q3_K_L.gguf | Q3_K_L | 3 | 36.15 GB | 38.65 GB | small, substantial quality loss |
| leo-hessianai-70b-chat.Q4_0.gguf | Q4_0 | 4 | 38.87 GB | 41.37 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
| leo-hessianai-70b-chat.Q4_K_S.gguf | Q4_K_S | 4 | 39.08 GB | 41.58 GB | small, greater quality loss |
| leo-hessianai-70b-chat.Q4_K_M.gguf | Q4_K_M | 4 | 41.42 GB | 43.92 GB | medium, balanced quality - recommended |
| leo-hessianai-70b-chat.Q5_0.gguf | Q5_0 | 5 | 47.46 GB | 49.96 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
| leo-hessianai-70b-chat.Q5_K_S.gguf | Q5_K_S | 5 | 47.46 GB | 49.96 GB | large, low quality loss - recommended |
| leo-hessianai-70b-chat.Q5_K_M.gguf | Q5_K_M | 5 | 48.76 GB | 51.26 GB | large, very low quality loss - recommended |
| leo-hessianai-70b-chat.Q6_K.gguf | Q6_K | 6 | 56.59 GB | 59.09 GB | very large, extremely low quality loss |
| leo-hessianai-70b-chat.Q8_0.gguf | Q8_0 | 8 | 73.29 GB | 75.79 GB | very large, extremely low quality loss - not recommended |
leo-hessianai-70b-chat.Q6_K.gguf-split-aleo-hessianai-70b-chat.Q6_K.gguf-split-bleo-hessianai-70b-chat.Q8_0.gguf-split-aleo-hessianai-70b-chat.Q8_0.gguf-split-bcat leo-hessianai-70b-chat.Q6_K.gguf-split-* > leo-hessianai-70b-chat.Q6_K.gguf && rm leo-hessianai-70b-chat.Q6_K.gguf-split-*
cat leo-hessianai-70b-chat.Q8_0.gguf-split-* > leo-hessianai-70b-chat.Q8_0.gguf && rm leo-hessianai-70b-chat.Q8_0.gguf-split-*COPY /B leo-hessianai-70b-chat.Q6_K.gguf-split-a + leo-hessianai-70b-chat.Q6_K.gguf-split-b leo-hessianai-70b-chat.Q6_K.gguf
del leo-hessianai-70b-chat.Q6_K.gguf-split-a leo-hessianai-70b-chat.Q6_K.gguf-split-b
COPY /B leo-hessianai-70b-chat.Q8_0.gguf-split-a + leo-hessianai-70b-chat.Q8_0.gguf-split-b leo-hessianai-70b-chat.Q8_0.gguf
del leo-hessianai-70b-chat.Q8_0.gguf-split-a leo-hessianai-70b-chat.Q8_0.gguf-split-btext-generation-webuihuggingface-hub Python library:pip3 install huggingface-hubhuggingface-cli download TheBloke/leo-hessianai-70B-chat-GGUF leo-hessianai-70b-chat.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falsehuggingface-cli download TheBloke/leo-hessianai-70B-chat-GGUF --local-dir . --local-dir-use-symlinks False --include='*Q4_K*gguf'huggingface-cli, please see: HF -> Hub Python Library -> Download files -> Download from the CLI.hf_transfer:pip3 install hf_transferHF_HUB_ENABLE_HF_TRANSFER to 1:HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/leo-hessianai-70B-chat-GGUF leo-hessianai-70b-chat.Q4_K_M.gguf --local-dir . --local-dir-use-symlinks Falseset HF_HUB_ENABLE_HF_TRANSFER=1 before the download command.llama.cpp commandllama.cpp from commit d0cee0d or later../main -ngl 35 -m leo-hessianai-70b-chat.Q4_K_M.gguf --color -c 8192 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant"-ngl 32 to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.-c 8192 to the desired sequence length. For extended sequence models - eg 8K, 16K, 32K - the necessary RoPE scaling parameters are read from the GGUF file and set by llama.cpp automatically. Note that longer sequence lengths require much more resources, so you may need to reduce this value.-p <PROMPT> argument with -i -instext-generation-webui1# Base ctransformers with no GPU acceleration
2pip install llama-cpp-python
3# With NVidia CUDA acceleration
4CMAKE_ARGS="-DLLAMA_CUBLAS=on" pip install llama-cpp-python
5# Or with OpenBLAS acceleration
6CMAKE_ARGS="-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python
7# Or with CLBLast acceleration
8CMAKE_ARGS="-DLLAMA_CLBLAST=on" pip install llama-cpp-python
9# Or with AMD ROCm GPU acceleration (Linux only)
10CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
11# Or with Metal GPU acceleration for macOS systems only
12CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
13
14# In windows, to set the variables CMAKE_ARGS in PowerShell, follow this format; eg for NVidia CUDA:
15$env:CMAKE_ARGS = "-DLLAMA_OPENBLAS=on"
16pip install llama-cpp-python1from llama_cpp import Llama
2
3# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
4llm = Llama(
5 model_path="./leo-hessianai-70b-chat.Q4_K_M.gguf", # Download the model file first
6 n_ctx=8192, # The max sequence length to use - note that longer sequence lengths require much more resources
7 n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
8 n_gpu_layers=35 # The number of layers to offload to GPU, if you have GPU acceleration available
9)
10
11# Simple inference example
12output = llm(
13 "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant", # Prompt
14 max_tokens=512, # Generate up to 512 tokens
15 stop=["</s>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
16 echo=True # Whether to echo the prompt
17)
18
19# Chat Completion API
20
21llm = Llama(model_path="./leo-hessianai-70b-chat.Q4_K_M.gguf", chat_format="llama-2") # Set chat_format according to the model you are using
22llm.create_chat_completion(
23 messages = [
24 {"role": "system", "content": "You are a story writing assistant."},
25 {
26 "role": "user",
27 "content": "Write a story about llamas."
28 }
29 ]
30)leo-hessianai-70b, the largest model of this series based on Llama-2-70b.
With this release, we hope to bring a new wave of opportunities to German open-source and commercial LLM research and accelerate adoption.
Read our blog post or our paper (preprint coming soon) for more details!LeoLM/leo-hessianai-70b-chat is a German chat model built on our foundation model LeoLM/leo-hessianai-70b and finetuned on a selection of German instruction datasets.
The model performs exceptionally well on writing, explanation and discussion tasks but struggles somewhat with math and advanced reasoning. See our MT-Bench-DE scores:{
"first_turn": 7.2375,
"second_turn": 6.5375,
"categories": {
"writing": 8.55,
"roleplay": 7.15,
"reasoning": 4.2,
"math": 4.85,
"coding": 4.85,
"extraction": 7.75,
"stem": 8.45,
"humanities": 9.3
},
"average": 6.8875
}pip install transformers torch1from transformers import pipeline
2import torch
3
4system_prompt = """<|im_start|>system
5Dies ist eine Unterhaltung zwischen einem intelligenten, hilfsbereitem KI-Assistenten und einem Nutzer.
6Der Assistent gibt ausführliche, hilfreiche und ehrliche Antworten.<|im_end|>
7
8"""
9prompt_format = "<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n"
10prompt = "Erkläre mir wie die Fahrradwegesituation in Hamburg ist."
11
12generator = pipeline(model="LeoLM/leo-hessianai-70b-chat", device="cuda", torch_dtype=torch.float16)
13print(generator(prompt_format.format(prompt=prompt), do_sample=True, top_p=0.95, max_length=8192))"""
<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
"""<|im_start|>user
{prompt 1}<|im_end|>
<|im_start|>assistant
{reply 1}<|im_end|>
<|im_start|>user
{prompt 2}<|im_end|>
<|im_start|>assistant
(...)LeoLM/leo-hessianai-70b-chat cannot be predicted
in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses
to user prompts. Therefore, before deploying any applications of LeoLM/leo-hessianai-70b-chat, developers should
perform safety testing and tuning tailored to their specific applications of the model.| Hyperparameter | Value |
|---|---|
| Num epochs | 3 |
| Examples per epoch | 131214 |
| Global batch size | 256 |
| Learning rate | 1.5e-5 |
| Warmup steps | 15 |
| LR scheduler | Cosine |
| Adam betas | (0.9, 0.95) |
| Weight Decay | 0.01 |
## Stats for 'Subset of OpenAssistant/OASST-DE' (3534 samples (100.0%))
-----------------
Accepted: 3534/3534 (100.0%)
Accepted tokens: 2259302
Skipped: 0 (0.0%)
Min tokens per sample: 29
Max tokens per sample: 2484
Avg tokens per sample: 639.3044708545557
-----------------
## Stats for 'Subset of FreedomIntelligence/evol-instruct-deutsch' (57841 samples (100.0%))
-----------------
Accepted: 57841/57841 (100.0%)
Accepted tokens: 42958192
Skipped: 0 (0.0%)
Min tokens per sample: 33
Max tokens per sample: 5507
Avg tokens per sample: 742.6944900675991
-----------------
## Stats for 'Subset of FreedomIntelligence/alpaca-gpt4-deutsch' (48969 samples (100.0%))
-----------------
Accepted: 48969/48969 (100.0%)
Accepted tokens: 13372005
Skipped: 0 (0.0%)
Min tokens per sample: 19
Max tokens per sample: 1359
Avg tokens per sample: 273.07082031489307
-----------------
## Stats for 'Subset of LeoLM/OpenSchnabeltier' (21314 samples (100.0%))
-----------------
Accepted: 21314/21314 (100.0%)
Accepted tokens: 8134690
Skipped: 0 (0.0%)
Min tokens per sample: 25
Max tokens per sample: 1202
Avg tokens per sample: 381.65947264708643
-----------------
## Stats for 'Subset of LeoLM/German_Poems' (490 samples (100.0%))
-----------------
Accepted: 490/490 (100.0%)
Accepted tokens: 618642
Skipped: 0 (0.0%)
Min tokens per sample: 747
Max tokens per sample: 1678
Avg tokens per sample: 1262.534693877551
-----------------
## Stats for 'Subset of LeoLM/German_Songs' (392 samples (100.0%))
-----------------
Accepted: 392/392 (100.0%)
Accepted tokens: 187897
Skipped: 0 (0.0%)
Min tokens per sample: 231
Max tokens per sample: 826
Avg tokens per sample: 479.3290816326531
-----------------
## Stats for 'total' (132540 samples (100.0%))
-----------------
Accepted: 132540/132540 (100.0%)
Accepted tokens: 67530728
Skipped: 0 (0.0%)
Min tokens per sample: 19
Max tokens per sample: 5507
Avg tokens per sample: 509.51205673758864
-----------------