Views
No views yet
safetensors and compressed using llmcompressor.| Setting | Value |
|---|---|
| Method | GPTQ (W4A16) |
| Group Size | 128 |
| Dampening Fraction | 0.01 |
| Calibration Dataset | neuralmagic/LLM_compression_calibration (512 samples) |
| Ignored Modules | lm_head |
lm_head was kept in full precision to ensure stability in text generation.1from vllm import LLM, SamplingParams
2
3# Load Model
4llm = LLM(
5 model="Ryex/Lotus-12B-GPTQ",
6 trust_remote_code=True,
7 max_model_len=2048
8)
9
10# Prompt
11prompt = '''[ Title: The Dunwich Horror; Author: H. P. Lovecraft; Genre: Horror ]
12***
13When a traveler'''
14
15# Generate
16params = SamplingParams(temperature=1.0, top_p=0.9, max_tokens=256)
17outputs = llm.generate([prompt], sampling_params=params)
18
19print(outputs[0].outputs[0].text)transformers with auto_gptq or compressed-tensors installed.1from transformers import AutoTokenizer, AutoModelForCausalLM
2
3model_id = "YOUR_USERNAME/Lotus-12B-GPTQ"
4
5model = AutoModelForCausalLM.from_pretrained(
6 model_id,
7 device_map="auto",
8 trust_remote_code=True
9)
10tokenizer = AutoTokenizer.from_pretrained(model_id)
11
12prompt = '''[ Title: The Dunwich Horror; Author: H. P. Lovecraft; Genre: Horror ]
13***
14When a traveler'''
15
16input_ids = tokenizer.encode(prompt, return_tensors='pt').to(model.device)
17output = model.generate(
18 input_ids,
19 do_sample=True,
20 temperature=1.0,
21 top_p=0.9,
22 repetition_penalty=1.2,
23 max_new_tokens=200,
24 pad_token_id=tokenizer.eos_token_id
25)
26
27print(tokenizer.decode(output[0]))[ Title: The Dunwich Horror; Author: H. P. Lovecraft; Genre: Horror; Tags: 3rdperson, scary; Style: Dark ]
***
When a traveler in north central Massachusetts takes the wrong fork...[ Title: (2019) Cars getting transported on an open deck catch on fire after salty water shorts their batteries; Genre: CatastrophicFailure ]
***
Anonymous: Daaaaaamn try explaining that one to the owners
EDIT: who keeps reposting this for my comment to get 3k upvotes?
Anonymous: "Your car caught fire from some water"
Irythros: Lol, I wonder if any compensation was in order
Anonymous: Almost all of the carriers offer insurance but it isn’t cheap. I guarantee most of those owners declined the insurance.