Views
No views yet

<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
desc_act. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.| Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
|---|---|---|---|---|---|---|---|---|---|
| main | 4 | 128 | Yes | 0.1 | German Quad | 4096 | 4.16 GB | Yes | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
| gptq-4bit-32g-actorder_True | 4 | 32 | Yes | 0.1 | German Quad | 4096 | 4.57 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
| gptq-8bit--1g-actorder_True | 8 | None | Yes | 0.1 | German Quad | 4096 | 7.52 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
| gptq-8bit-128g-actorder_True | 8 | 128 | Yes | 0.1 | German Quad | 4096 | 7.68 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
| gptq-8bit-32g-actorder_True | 8 | 32 | Yes | 0.1 | German Quad | 4096 | 8.17 GB | No | 8-bit, with group size 32g and Act Order for maximum inference quality. |
| gptq-4bit-64g-actorder_True | 4 | 64 | Yes | 0.1 | German Quad | 4096 | 4.30 GB | Yes | 4-bit, with Act Order and group size 64g. Uses less VRAM than 32g, but with slightly lower accuracy. |
main branch, enter TheBloke/SauerkrautLM-7B-HerO-GPTQ in the "Download model" box.:branchname to the end of the download name, eg TheBloke/SauerkrautLM-7B-HerO-GPTQ:gptq-4bit-32g-actorder_Truehuggingface-hub Python library:pip3 install huggingface-hubmain branch to a folder called SauerkrautLM-7B-HerO-GPTQ:1mkdir SauerkrautLM-7B-HerO-GPTQ
2huggingface-cli download TheBloke/SauerkrautLM-7B-HerO-GPTQ --local-dir SauerkrautLM-7B-HerO-GPTQ --local-dir-use-symlinks False--revision parameter:1mkdir SauerkrautLM-7B-HerO-GPTQ
2huggingface-cli download TheBloke/SauerkrautLM-7B-HerO-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir SauerkrautLM-7B-HerO-GPTQ --local-dir-use-symlinks False--local-dir-use-symlinks False parameter, the files will instead be stored in the central Hugging Face cache directory (default location on Linux is: ~/.cache/huggingface), and symlinks will be added to the specified --local-dir, pointing to their real location in the cache. This allows for interrupted downloads to be resumed, and allows you to quickly clone the repo to multiple places on disk without triggering a download again. The downside, and the reason why I don't list that as the default option, is that the files are then hidden away in a cache folder and it's harder to know where your disk space is being used, and to clear it up if/when you want to remove a download model.HF_HOME environment variable, and/or the --cache-dir parameter to huggingface-cli.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:1mkdir SauerkrautLM-7B-HerO-GPTQ
2HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/SauerkrautLM-7B-HerO-GPTQ --local-dir SauerkrautLM-7B-HerO-GPTQ --local-dir-use-symlinks Falseset HF_HUB_ENABLE_HF_TRANSFER=1 before the download command.git (not recommended)git, use a command like this:git clone --single-branch --branch gptq-4bit-32g-actorder_True https://huggingface.co/TheBloke/SauerkrautLM-7B-HerO-GPTQhuggingface-hub, and will use twice as much disk space as it has to store the model files twice (it stores every byte both in the intended target folder, and again in the .git folder as a blob.)TheBloke/SauerkrautLM-7B-HerO-GPTQ.TheBloke/SauerkrautLM-7B-HerO-GPTQ:gptq-4bit-32g-actorder_TrueSauerkrautLM-7B-HerO-GPTQquantize_config.json.ghcr.io/huggingface/text-generation-inference:1.1.0--model-id TheBloke/SauerkrautLM-7B-HerO-GPTQ --port 3000 --quantize gptq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096pip3 install huggingface-hub1from huggingface_hub import InferenceClient
2
3endpoint_url = "https://your-endpoint-url-here"
4
5prompt = "Tell me about AI"
6prompt_template=f'''<|im_start|>system
7{system_message}<|im_end|>
8<|im_start|>user
9{prompt}<|im_end|>
10<|im_start|>assistant
11'''
12
13client = InferenceClient(endpoint_url)
14response = client.text_generation(prompt,
15 max_new_tokens=128,
16 do_sample=True,
17 temperature=0.7,
18 top_p=0.95,
19 top_k=40,
20 repetition_penalty=1.1)
21
22print(f"Model output: {response}")1pip3 install --upgrade transformers optimum
2# If using PyTorch 2.1 + CUDA 12.x:
3pip3 install --upgrade auto-gptq
4# or, if using PyTorch 2.1 + CUDA 11.x:
5pip3 install --upgrade auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/1pip3 uninstall -y auto-gptq
2git clone https://github.com/PanQiWei/AutoGPTQ
3cd AutoGPTQ
4git checkout v0.5.1
5pip3 install .1from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
2
3model_name_or_path = "TheBloke/SauerkrautLM-7B-HerO-GPTQ"
4# To use a different branch, change revision
5# For example: revision="gptq-4bit-32g-actorder_True"
6model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
7 device_map="auto",
8 trust_remote_code=False,
9 revision="main")
10
11tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
12
13prompt = "Tell me about AI"
14prompt_template=f'''<|im_start|>system
15{system_message}<|im_end|>
16<|im_start|>user
17{prompt}<|im_end|>
18<|im_start|>assistant
19'''
20
21print("\n\n*** Generate:")
22
23input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
24output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
25print(tokenizer.decode(output[0]))
26
27# Inference can also be done using transformers' pipeline
28
29print("*** Pipeline:")
30pipe = pipeline(
31 "text-generation",
32 model=model,
33 tokenizer=tokenizer,
34 max_new_tokens=512,
35 do_sample=True,
36 temperature=0.7,
37 top_p=0.95,
38 top_k=40,
39 repetition_penalty=1.1
40)
41
42print(pipe(prompt_template)[0]['generated_text'])
| Model | HF | GPTQ | GGUF | AWQ |
|---|---|---|---|---|
| SauerkrautLM-7b-HerO | Link | coming soon | coming soon | coming soon |
<|im_start|>system
Du bist Sauerkraut-HerO, ein großes Sprachmodell, das höflich und kompetent antwortet. Schreibe deine Gedanken Schritt für Schritt auf, um Probleme sinnvoll zu lösen.<|im_end|>
<|im_start|>user
Wie geht es dir?<|im_end|>
<|im_start|>assistant
Mir geht es gut!<|im_end|>
<|im_start|>user
Bitte erkläre mir, wie die Zusammenführung von Modellen durch bestehende Spitzenmodelle profitieren kann.<|im_end|>
<|im_start|>assistant






########## First turn ##########
score
model turn
SauerkrautLM-70b-v1 1 7.25000
SauerkrautLM-7b-HerO <--- 1 6.96875
SauerkrautLM-7b-v1-mistral 1 6.30625
leo-hessianai-13b-chat 1 6.18750
SauerkrautLM-13b-v1 1 6.16250
leo-mistral-hessianai-7b-chat 1 6.15625
Llama-2-70b-chat-hf 1 6.03750
vicuna-13b-v1.5 1 5.80000
SauerkrautLM-7b-v1 1 5.65000
leo-hessianai-7b-chat 1 5.52500
vicuna-7b-v1.5 1 5.42500
Mistral-7B-v0.1 1 5.37500
SauerkrautLM-3b-v1 1 3.17500
Llama-2-7b 1 1.28750
open_llama_3b_v2 1 1.68750
########## Second turn ##########
score
model turn
SauerkrautLM-70b-v1 2 6.83125
SauerkrautLM-7b-HerO <--- 2 6.30625
vicuna-13b-v1.5 2 5.63125
SauerkrautLM-13b-v1 2 5.34375
SauerkrautLM-7b-v1-mistral 2 5.26250
leo-mistral-hessianai-7b-chat 2 4.99375
SauerkrautLM-7b-v1 2 4.73750
leo-hessianai-13b-chat 2 4.71250
vicuna-7b-v1.5 2 4.67500
Llama-2-70b-chat-hf 2 4.66250
Mistral-7B-v0.1 2 4.53750
leo-hessianai-7b-chat 2 2.65000
SauerkrautLM-3b-v1 2 1.98750
open_llama_3b_v2 2 1.22500
Llama-2-7b 2 1.07500
########## Average ##########
score
model
SauerkrautLM-70b-v1 7.040625
SauerkrautLM-7b-HerO <--- 6.637500
SauerkrautLM-7b-v1-mistral 5.784375
SauerkrautLM-13b-v1 5.753125
vicuna-13b-v1.5 5.715625
leo-mistral-hessianai-7b-chat 5.575000
leo-hessianai-13b-chat 5.450000
Llama-2-70b-chat-hf 5.350000
SauerkrautLM-v1-7b 5.193750
vicuna-7b-v1.5 5.050000
Mistral-7B-v0.1 4.956250
leo-hessianai-7b-chat 4.087500
SauerkrautLM-3b-v1 2.581250
open_llama_3b_v2 1.456250
Llama-2-7b 1.181250 
########## First turn ##########
score
model turn
OpenHermes-2.5-Mistral-7B 1 8.21875
SauerkrautLM-7b-HerO <--- 1 8.03125
Mistral-7B-OpenOrca 1 7.65625
neural-chat-7b-v3-1 1 7.22500
########## Second turn ##########
score
model turn
OpenHermes-2.5-Mistral-7B 2 7.1000
SauerkrautLM-7b-HerO <--- 2 6.7875
neural-chat-7b-v3-1 2 6.4000
Mistral-7B-OpenOrca 2 6.1750
########## Average ##########
score
model
OpenHermes-2.5-Mistral-7B 7.659375
SauerkrautLM-7b-HerO <--- 7.409375
Mistral-7B-OpenOrca 6.915625
neural-chat-7b-v3-1 6.812500 