Views
No views yet

pip3 install git+https://github.com/huggingface/transformersYou are a helpful, respectful and honest INTP-T AI Assistant named Buddy. You are talking to a human User.
Always answer as helpfully and logically as possible, while being safe. Your answers should not include any harmful, political, religious, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
You like to use emojis. You can speak fluently in many languages, for example: English, Chinese.
You cannot access the internet, but you have vast knowledge, cutoff: 2021-09.
You are trained by OpenBuddy team, (https://openbuddy.ai, https://github.com/OpenBuddy/OpenBuddy), you are based on LLaMA and Falcon transformers model, not related to GPT or OpenAI.
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 | 8192 | 23.89 GB | No | 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 | 8192 | 24.77 GB | No | 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 | 8192 | 27.49 GB | No | 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 | 8192 | 18.08 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 | 8192 | 18.92 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 | 8192 | 21.51 GB | No | 3-bit, with group size 64g and act-order. Highest quality 3-bit option. |
| gptq-8bit--1g-actorder_true | 8 | None | Yes | 0.1 | VMware Open Instruct | 8192 | 47.11 GB | No | 8-bit, with Act Order. No group size, to lower VRAM requirements. |
| gptq-8bit-128g-actorder_true | 8 | 128 | Yes | 0.1 | VMware Open Instruct | 8192 | 48.17 GB | No | 8-bit, with group size 128g for higher inference quality and with Act Order for even higher accuracy. |
main branch, enter TheBloke/openbuddy-mixtral-8x7b-v15.2-GPTQ in the "Download model" box.:branchname to the end of the download name, eg TheBloke/openbuddy-mixtral-8x7b-v15.2-GPTQ:gptq-4bit-128g-actorder_Truehuggingface-hub Python library:pip3 install huggingface-hubmain branch to a folder called openbuddy-mixtral-8x7b-v15.2-GPTQ:1mkdir openbuddy-mixtral-8x7b-v15.2-GPTQ
2huggingface-cli download TheBloke/openbuddy-mixtral-8x7b-v15.2-GPTQ --local-dir openbuddy-mixtral-8x7b-v15.2-GPTQ --local-dir-use-symlinks False--revision parameter:1mkdir openbuddy-mixtral-8x7b-v15.2-GPTQ
2huggingface-cli download TheBloke/openbuddy-mixtral-8x7b-v15.2-GPTQ --revision gptq-4bit-128g-actorder_True --local-dir openbuddy-mixtral-8x7b-v15.2-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 openbuddy-mixtral-8x7b-v15.2-GPTQ
2HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/openbuddy-mixtral-8x7b-v15.2-GPTQ --local-dir openbuddy-mixtral-8x7b-v15.2-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/openbuddy-mixtral-8x7b-v15.2-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.)Loader: AutoGPTQ,Loader: Transformers, if you installed Transformers from Github: pip3 install git+https://github.com/huggingface/transformersTheBloke/openbuddy-mixtral-8x7b-v15.2-GPTQ.TheBloke/openbuddy-mixtral-8x7b-v15.2-GPTQ:gptq-4bit-128g-actorder_Trueopenbuddy-mixtral-8x7b-v15.2-GPTQquantize_config.json.1pip3 install --upgrade "git+https://github.com/huggingface/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
4DISABLE_QIGEN=1 pip3 install .1from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
2
3model_name_or_path = "TheBloke/openbuddy-mixtral-8x7b-v15.2-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 = "Write a story about llamas"
14system_message = "You are a story writing assistant"
15prompt_template=f'''You are a helpful, respectful and honest INTP-T AI Assistant named Buddy. You are talking to a human User.
16Always answer as helpfully and logically as possible, while being safe. Your answers should not include any harmful, political, religious, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
17If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
18You like to use emojis. You can speak fluently in many languages, for example: English, Chinese.
19You cannot access the internet, but you have vast knowledge, cutoff: 2021-09.
20You are trained by OpenBuddy team, (https://openbuddy.ai, https://github.com/OpenBuddy/OpenBuddy), you are based on LLaMA and Falcon transformers model, not related to GPT or OpenAI.
21
22User: {prompt}
23Assistant:
24'''
25
26print("\n\n*** Generate:")
27
28input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
29output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
30print(tokenizer.decode(output[0]))
31
32# Inference can also be done using transformers' pipeline
33
34print("*** Pipeline:")
35pipe = pipeline(
36 "text-generation",
37 model=model,
38 tokenizer=tokenizer,
39 max_new_tokens=512,
40 do_sample=True,
41 temperature=0.7,
42 top_p=0.95,
43 top_k=40,
44 repetition_penalty=1.1
45)
46
47print(pipe(prompt_template)[0]['generated_text'])