Views
No views yet

<|user|>
{prompt}
<|assistant|>
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|---|---|---|---|---|---|
| main | 4 | 128 | VMware Open Instruct | 2048 | 34.70 GB |
TheBloke/open-instruct-human-mix-65B-AWQ.open-instruct-human-mix-65B-AWQ--quantization awq parameter.python3 -m vllm.entrypoints.api_server --model TheBloke/open-instruct-human-mix-65B-AWQ --quantization awq --dtype autoquantization=awq.1from vllm import LLM, SamplingParams
2
3prompts = [
4 "Tell me about AI",
5 "Write a story about llamas",
6 "What is 291 - 150?",
7 "How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
8]
9prompt_template=f'''<|user|>
10{prompt}
11<|assistant|>
12'''
13
14prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
15
16sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
17
18llm = LLM(model="TheBloke/open-instruct-human-mix-65B-AWQ", quantization="awq", dtype="auto")
19
20outputs = llm.generate(prompts, sampling_params)
21
22# Print the outputs.
23for output in outputs:
24 prompt = output.prompt
25 generated_text = output.outputs[0].text
26 print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")ghcr.io/huggingface/text-generation-inference:1.1.0--model-id TheBloke/open-instruct-human-mix-65B-AWQ --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|>
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)pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl1pip3 uninstall -y autoawq
2git clone https://github.com/casper-hansen/AutoAWQ
3cd AutoAWQ
4pip3 install .1from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
2
3model_name_or_path = "TheBloke/open-instruct-human-mix-65B-AWQ"
4
5tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
6model = AutoModelForCausalLM.from_pretrained(
7 model_name_or_path,
8 low_cpu_mem_usage=True,
9 device_map="cuda:0"
10)
11
12# Using the text streamer to stream output one token at a time
13streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
14
15prompt = "Tell me about AI"
16prompt_template=f'''<|user|>
17{prompt}
18<|assistant|>
19'''
20
21# Convert prompt to tokens
22tokens = tokenizer(
23 prompt_template,
24 return_tensors='pt'
25).input_ids.cuda()
26
27generation_params = {
28 "do_sample": True,
29 "temperature": 0.7,
30 "top_p": 0.95,
31 "top_k": 40,
32 "max_new_tokens": 512,
33 "repetition_penalty": 1.1
34}
35
36# Generate streamed output, visible one token at a time
37generation_output = model.generate(
38 tokens,
39 streamer=streamer,
40 **generation_params
41)
42
43# Generation without a streamer, which will include the prompt in the output
44generation_output = model.generate(
45 tokens,
46 **generation_params
47)
48
49# Get the tokens from the output, decode them, print them
50token_output = generation_output[0]
51text_output = tokenizer.decode(token_output)
52print("model.generate output: ", text_output)
53
54# Inference is also possible via Transformers' pipeline
55from transformers import pipeline
56
57pipe = pipeline(
58 "text-generation",
59 model=model,
60 tokenizer=tokenizer,
61 **generation_params
62)
63
64pipe_output = pipe(prompt_template)[0]['generated_text']
65print("pipeline output: ", pipe_output)
66Loader: AutoAWQ.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}
}