Views
No views yet

<|user|>
{prompt}
<|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 | None | Yes | 0.1 | VMware Open Instruct | 2048 | 33.48 GB | Yes | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
| gptq-4bit-128g-actorder_True | 4 | 128 | Yes | 0.1 | VMware Open Instruct | 2048 | 34.73 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 | VMware Open Instruct | 2048 | 38.53 GB | Yes | 4-bit, with Act Order and group size 32g. Gives highest possible inference quality, with maximum VRAM usage. |
| gptq-3bit--1g-actorder_True | 3 | None | Yes | 0.1 | VMware Open Instruct | 2048 | 25.39 GB | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
| gptq-3bit-128g-actorder_True | 3 | 128 | Yes | 0.1 | VMware Open Instruct | 2048 | 26.57 GB | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False. |
| gptq-3bit-32g-actorder_True | 3 | 32 | Yes | 0.1 | VMware Open Instruct | 2048 | 30.18 GB | No | 3-bit, with group size 64g and act-order. Highest quality 3-bit option. |
main branch, enter TheBloke/open-instruct-human-mix-65B-GPTQ in the "Download model" box.:branchname to the end of the download name, eg TheBloke/open-instruct-human-mix-65B-GPTQ:gptq-4bit-128g-actorder_Truehuggingface-hub Python library:pip3 install huggingface-hubmain branch to a folder called open-instruct-human-mix-65B-GPTQ:1mkdir open-instruct-human-mix-65B-GPTQ
2huggingface-cli download TheBloke/open-instruct-human-mix-65B-GPTQ --local-dir open-instruct-human-mix-65B-GPTQ --local-dir-use-symlinks False--revision parameter:1mkdir open-instruct-human-mix-65B-GPTQ
2huggingface-cli download TheBloke/open-instruct-human-mix-65B-GPTQ --revision gptq-4bit-128g-actorder_True --local-dir open-instruct-human-mix-65B-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 open-instruct-human-mix-65B-GPTQ
2HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/open-instruct-human-mix-65B-GPTQ --local-dir open-instruct-human-mix-65B-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-128g-actorder_True https://huggingface.co/TheBloke/open-instruct-human-mix-65B-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/open-instruct-human-mix-65B-GPTQ.TheBloke/open-instruct-human-mix-65B-GPTQ:gptq-4bit-128g-actorder_Trueopen-instruct-human-mix-65B-GPTQquantize_config.json.ghcr.io/huggingface/text-generation-inference:1.1.0--model-id TheBloke/open-instruct-human-mix-65B-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'''<|user|>
7{prompt}
8<|assistant|>
9'''
10
11client = InferenceClient(endpoint_url)
12response = client.text_generation(prompt,
13 max_new_tokens=128,
14 do_sample=True,
15 temperature=0.7,
16 top_p=0.95,
17 top_k=40,
18 repetition_penalty=1.1)
19
20print(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/open-instruct-human-mix-65B-GPTQ"
4# To use a different branch, change revision
5# For example: revision="gptq-4bit-128g-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'''<|user|>
15{prompt}
16<|assistant|>
17'''
18
19print("\n\n*** Generate:")
20
21input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
22output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
23print(tokenizer.decode(output[0]))
24
25# Inference can also be done using transformers' pipeline
26
27print("*** Pipeline:")
28pipe = pipeline(
29 "text-generation",
30 model=model,
31 tokenizer=tokenizer,
32 max_new_tokens=512,
33 do_sample=True,
34 temperature=0.7,
35 top_p=0.95,
36 top_k=40,
37 repetition_penalty=1.1
38)
39
40print(pipe(prompt_template)[0]['generated_text'])tulu_license.txt for the model license and llama_license.txt for the Llama license.scripts/weight_diff.py
and install the minimal requirements listed in weight-diff-requirements.txt. Then download or clone this model diff to the same machine.python scripts/weight_diff.py recover --path_raw ${hf_llama_path} --path_tuned ${output_path} --path_diff ${diff_location}<|user|>
Your message here!
<|assistant|><|assistant|>, this can affect generation quality quite a bit.| MMLU 0-shot | MMLU 5-shot | GSM Direct | GSM CoT | BBH Direct | BBH CoT | TydiQA Gold-Passage | TydiQA Closed-book | Codex-Eval Pass@1 | Codex-Eval Pass@10 | AlpacaFarm vs Davinci-003 | Average |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 60.7 | 61.6 | 8.0 | 57.5 | 50.1 | 52.7 | 58.5 | 15.9 | 24.5 | 43.2 | 46.5 | 43.8 |
@misc{wang2023far,
title={How Far Can Camels Go? Exploring the State of Instruction Tuning on Open Resources},
author={Yizhong Wang and Hamish Ivison and Pradeep Dasigi and Jack Hessel and Tushar Khot and Khyathi Raghavi Chandu and David Wadden and Kelsey MacMillan and Noah A. Smith and Iz Beltagy and Hannaneh Hajishirzi},
year={2023},
eprint={2306.04751},
archivePrefix={arXiv},
primaryClass={cs.CL}
}@misc{touvron2023llama,
title={LLaMA: Open and Efficient Foundation Language Models},
author={Hugo Touvron and Thibaut Lavril and Gautier Izacard and Xavier Martinet and Marie-Anne Lachaux and Timothée Lacroix and Baptiste Rozière and Naman Goyal and Eric Hambro and Faisal Azhar and Aurelien Rodriguez and Armand Joulin and Edouard Grave and Guillaume Lample},
year={2023},
eprint={2302.13971},
archivePrefix={arXiv},
primaryClass={cs.CL}
}@misc{dolly,
author = {Databricks},
title = {Free Dolly: Introducing the World's First Truly Open Instruction-Tuned LLM},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {Blog post},
url = {https://www.databricks.com/blog/2023/04/12/dolly-first-open-commercially-viable-instruction-tuned-llm}
}@article{longpre2023flan,
title={The Flan Collection: Designing Data and Methods for Effective Instruction Tuning},
author={Longpre, Shayne and Hou, Le and Vu, Tu and Webson, Albert and Chung, Hyung Won and Tay, Yi and Zhou, Denny and Le, Quoc V and Zoph, Barret and Wei, Jason and others},
journal={arXiv preprint arXiv:2301.13688},
year={2023}
}@misc{köpf2023openassistant,
title={OpenAssistant Conversations -- Democratizing Large Language Model Alignment},
author={Andreas Köpf and Yannic Kilcher and Dimitri von Rütte and Sotiris Anagnostidis and Zhi-Rui Tam and Keith Stevens and Abdullah Barhoum and Nguyen Minh Duc and Oliver Stanley and Richárd Nagyfi and Shahul ES and Sameer Suri and David Glushkov and Arnav Dantuluri and Andrew Maguire and Christoph Schuhmann and Huu Nguyen and Alexander Mattick},
year={2023},
eprint={2304.07327},
archivePrefix={arXiv},
primaryClass={cs.CL}
}