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 | 128 | Yes | 0.1 | wikitext | 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 | wikitext | 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 | wikitext | 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 | wikitext | 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 | wikitext | 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 | wikitext | 4096 | 4.29 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/CollectiveCognition-v1-Mistral-7B-GPTQ in the "Download model" box.:branchname to the end of the download name, eg TheBloke/CollectiveCognition-v1-Mistral-7B-GPTQ:gptq-4bit-32g-actorder_Truehuggingface-hub Python library:pip3 install huggingface-hubmain branch to a folder called CollectiveCognition-v1-Mistral-7B-GPTQ:1mkdir CollectiveCognition-v1-Mistral-7B-GPTQ
2huggingface-cli download TheBloke/CollectiveCognition-v1-Mistral-7B-GPTQ --local-dir CollectiveCognition-v1-Mistral-7B-GPTQ --local-dir-use-symlinks False--revision parameter:1mkdir CollectiveCognition-v1-Mistral-7B-GPTQ
2huggingface-cli download TheBloke/CollectiveCognition-v1-Mistral-7B-GPTQ --revision gptq-4bit-32g-actorder_True --local-dir CollectiveCognition-v1-Mistral-7B-GPTQ --local-dir-use-symlinks False--local-dir-use-symlinks False parameter, the files will instead be stored in the central Huggingface 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 CollectiveCognition-v1-Mistral-7B-GPTQ
2HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download TheBloke/CollectiveCognition-v1-Mistral-7B-GPTQ --local-dir CollectiveCognition-v1-Mistral-7B-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/CollectiveCognition-v1-Mistral-7B-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/CollectiveCognition-v1-Mistral-7B-GPTQ.TheBloke/CollectiveCognition-v1-Mistral-7B-GPTQ:gptq-4bit-32g-actorder_TrueCollectiveCognition-v1-Mistral-7B-GPTQquantize_config.json.ghcr.io/huggingface/text-generation-inference:1.1.0--model-id TheBloke/CollectiveCognition-v1-Mistral-7B-GPTQ --port 3000 --quantize awq --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: {prompt}
7ASSISTANT:
8'''
9
10client = InferenceClient(endpoint_url)
11response = client.text_generation(prompt,
12 max_new_tokens=128,
13 do_sample=True,
14 temperature=0.7,
15 top_p=0.95,
16 top_k=40,
17 repetition_penalty=1.1)
18
19print(f"Model output: {response}")1pip3 install transformers optimum
2pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.71pip3 uninstall -y auto-gptq
2git clone https://github.com/PanQiWei/AutoGPTQ
3cd AutoGPTQ
4git checkout v0.4.2
5pip3 install .1from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
2
3model_name_or_path = "TheBloke/CollectiveCognition-v1-Mistral-7B-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'''USER: {prompt}
15ASSISTANT:
16'''
17
18print("\n\n*** Generate:")
19
20input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
21output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
22print(tokenizer.decode(output[0]))
23
24# Inference can also be done using transformers' pipeline
25
26print("*** Pipeline:")
27pipe = pipeline(
28 "text-generation",
29 model=model,
30 tokenizer=tokenizer,
31 max_new_tokens=512,
32 do_sample=True,
33 temperature=0.7,
34 top_p=0.95,
35 top_k=40,
36 repetition_penalty=1.1
37)
38
39print(pipe(prompt_template)[0]['generated_text'])
USER: <prompt>
ASSISTANT:<system message>
USER: <prompt>
ASSISTANT:| Task |Version|Metric|Value | |Stderr|
|-------------|------:|------|-----:|---|-----:|
|truthfulqa_mc| 1|mc1 |0.3794|± |0.0170|
| | |mc2 |0.5394|± |0.0158|Collective Cognition v1.0 GPT4All:
| Task |Version| Metric |Value | |Stderr|
|-------------|------:|--------|-----:|---|-----:|
|arc_challenge| 0|acc |0.5401|± |0.0146|
| | |acc_norm|0.5572|± |0.0145|
|arc_easy | 0|acc |0.8102|± |0.0080|
| | |acc_norm|0.7992|± |0.0082|
|boolq | 1|acc |0.8538|± |0.0062|
|hellaswag | 0|acc |0.6459|± |0.0048|
| | |acc_norm|0.8297|± |0.0038|
|openbookqa | 0|acc |0.3380|± |0.0212|
| | |acc_norm|0.4360|± |0.0222|
|piqa | 0|acc |0.8085|± |0.0092|
| | |acc_norm|0.8232|± |0.0089|
|winogrande | 0|acc |0.7451|± |0.0122|
Average: 72.06%| Task |Version| Metric |Value | |Stderr|
|------------------------------|------:|--------|-----:|---|-----:|
|agieval_aqua_rat | 0|acc |0.1890|± |0.0246|
| | |acc_norm|0.2047|± |0.0254|
|agieval_logiqa_en | 0|acc |0.2611|± |0.0172|
| | |acc_norm|0.3134|± |0.0182|
|agieval_lsat_ar | 0|acc |0.2087|± |0.0269|
| | |acc_norm|0.2217|± |0.0275|
|agieval_lsat_lr | 0|acc |0.3373|± |0.0210|
| | |acc_norm|0.3196|± |0.0207|
|agieval_lsat_rc | 0|acc |0.4201|± |0.0301|
| | |acc_norm|0.3978|± |0.0299|
|agieval_sat_en | 0|acc |0.5971|± |0.0343|
| | |acc_norm|0.5631|± |0.0346|
|agieval_sat_en_without_passage| 0|acc |0.4029|± |0.0343|
| | |acc_norm|0.3398|± |0.0331|
|agieval_sat_math | 0|acc |0.3045|± |0.0311|
| | |acc_norm|0.2864|± |0.0305|
Average: 33.08%