Views
No views yet

SYSTEM: {system_message}
USER: {prompt}
ASSISTANT:
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|---|---|---|---|---|---|
| main | 4 | 128 | VMware Open Instruct | 8192 | 19.23 GB |
TheBloke/Yi-34B-200K-DARE-megamerge-v8-AWQ.Yi-34B-200K-DARE-megamerge-v8-AWQ--quantization awq parameter.python3 -m vllm.entrypoints.api_server --model TheBloke/Yi-34B-200K-DARE-megamerge-v8-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'''SYSTEM: {system_message}
10USER: {prompt}
11ASSISTANT:
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/Yi-34B-200K-DARE-megamerge-v8-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/Yi-34B-200K-DARE-megamerge-v8-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'''SYSTEM: {system_message}
7USER: {prompt}
8ASSISTANT:
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/Yi-34B-200K-DARE-megamerge-v8-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'''SYSTEM: {system_message}
17USER: {prompt}
18ASSISTANT:
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.SYSTEM: {system_message}
USER: {prompt}
ASSISTANT:max_position_embeddings in config.json to a lower value than 200,000, otherwise you will OOM! I do not recommend running high context without context-efficient backends like exllamav2, litellm or unsloth.1models:
2 - model: /home/alpha/Models/Raw/chargoddard_Yi-34B-Llama
3 # No parameters necessary for base model
4 - model: /home/alpha/Storage/Models/Raw/chargoddard_Yi-34B-200K-Llama
5 #200K base to extend the context of 4K models, max density as we *want* it to 'interfere'
6 parameters:
7 weight: 0.33
8 density: 1
9 - model: /home/alpha/Models/Raw/Weyaxi_Nous-Hermes-2-SUS-Chat-34B-Slerp
10 parameters:
11 weight: 0.15
12 density: 0.36
13 - model: /home/alpha/Models/Raw/jondurbin_bagel-dpo-34b-v0.2
14 #Mix dpo with sft to tone down dpo
15 parameters:
16 weight: 0.06
17 density: 0.36
18 - model: /home/alpha/Models/Raw/jondurbin_bagel-34b-v0.2
19 parameters:
20 weight: 0.06
21 density: 0.41
22 - model: /home/alpha/Models/Raw/bhenrym14_platypus-yi-34b
23 #Vicuna format
24 parameters:
25 weight: 0.19
26 density: 0.41
27 # - model: /home/alpha/Models/Raw/01-ai_Yi-34B-Chat #+/home/alpha/Models/Raw/Doctor-Shotgun_limarpv3-yi-llama-34b-lora
28 # #Can't get lora OR base model to work without erroring out?
29 # parameters:
30 # weight: 0.04
31 # density: 0.36
32 - model: /home/alpha/Models/Raw/TriadParty_deepsex-34b
33 #Base model with no prompt
34 parameters:
35 weight: 0.21
36 density: 0.39
37merge_method: dare_ties
38tokenizer_source: union
39base_model: /home/alpha/Models/Raw/chargoddard_Yi-34B-Llama
40parameters:
41 int8_mask: true
42dtype: bfloat16
43name: 4kmerge-v2
44---
45models:
46 - model: /home/alpha/Storage/Models/Raw/chargoddard_Yi-34B-200K-Llama
47 # No parameters necessary for base model
48 - model: /home/alpha/Storage/Models/Raw/migtissera_Tess-34B-v1.4
49 #Emphasize the beginning of Vicuna format models
50 parameters:
51 weight: [0.22, 0.113, 0.113, 0.113, 0.113, 0.113]
52 density: 0.61
53 - model: /home/alpha/Models/Raw/Mihaiii_Pallas-0.5
54 # Vicuna format
55 parameters:
56 weight: [0.22, 0.113, 0.113, 0.113, 0.113, 0.113]
57 density: 0.61
58 - model: /home/alpha//Storage/Models/Raw/bhenrym14_airoboros-3_1-yi-34b-200k
59 parameters:
60 weight: [0.02, 0.081, 0.081, 0.081, 0.081, 0.081]
61 density: 0.59
62 - model: /home/alpha/Storage/Models/Raw/jondurbin_bagel-34b-v0.2
63 #Only the SFT in the main merge since the DPO version seems to have no long context ability at all, and some overfitting(?) issues
64 parameters:
65 weight: [0.02, 0.093, 0.093, 0.093, 0.093, 0.093]
66 density: 0.4
67 - model: /home/alpha/Storage/Models/Raw/kyujinpy_PlatYi-34B-200k-Q-FastChat
68 parameters:
69 weight: [0.02, 0.081, 0.081, 0.081, 0.081, 0.081]
70 density: 0.59
71 #- model: /home/alpha/Storage/Models/Raw/ehartford_dolphin-2.2-yi-34b-200k
72 # Dolphin 200K seems to be funky according to multiple leaderboards and perplexity tests?
73 # parameters:
74 # weight: 0.15
75 # density: 0.6
76 - model: /home/alpha/Models/Raw/adamo1139_Yi-34B-200K-AEZAKMI-v2
77 parameters:
78 weight: [0.02, 0.096, 0.096, 0.096, 0.096, 0.096]
79 density: 0.59
80 - model: /home/alpha/Storage/Models/Raw/Nous-Capybara-34B
81 parameters:
82 weight: [0.21, 0.115, 0.115, 0.115, 0.115, 0.115]
83 density: 0.59
84 - model: 4kmerge-v2
85 #Previous merge
86 parameters:
87 weight: [0.02, 0.115, 0.115, 0.115, 0.115, 0.115]
88 density: 0.4
89 - model: /home/alpha/Models/Raw/migtissera_Tess-M-Creative-v1.0
90 # Vicuna format
91 parameters:
92 weight: [0.21, 0.09, 0.09, 0.09, 0.09, 0.09]
93 density: 0.61
94 - model: /home/alpha/Models/Raw/TriadParty_deepmoney-34b-200k-base
95 # No prompt format, native long context full finetune
96 parameters:
97 weight: [0.04, 0.103, 0.103, 0.103, 0.103, 0.103]
98 density: 0.61
99merge_method: dare_ties
100tokenizer_source: union
101base_model: /home/alpha/Storage/Models/Raw/chargoddard_Yi-34B-200K-Llama
102parameters:
103 int8_mask: true
104dtype: bfloat16