Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
These models were quantised using hardware kindly provided by Latitude.sh.
1from transformers import AutoTokenizer, pipeline, logging
2from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
34model_name_or_path ="TheBloke/selfee-7B-GPTQ"5model_basename ="selfee-7B-GPTQ-4bit-128g.no-act.order"67use_triton =False89tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)1011model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,12 model_basename=model_basename
13 use_safetensors=True,14 trust_remote_code=True,15 device="cuda:0",16 use_triton=use_triton,17 quantize_config=None)1819"""
20To download from a specific branch, use the revision parameter, as in this example:
2122model = AutoGPTQForCausalLM.from_quantized(model_name_or_path,
23 revision="gptq-4bit-32g-actorder_True",
24 model_basename=model_basename,
25 use_safetensors=True,
26 trust_remote_code=True,
27 device="cuda:0",
28 quantize_config=None)
29"""3031prompt ="Tell me about AI"32prompt_template=f'''Below is an instruction that describes a task. Write a response that appropriately completes the request.
3334### Instruction: {prompt}3536### Response:
37'''3839print("\n\n*** Generate:")4041input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()42output = model.generate(inputs=input_ids, temperature=0.7, max_new_tokens=512)43print(tokenizer.decode(output[0]))4445# Inference can also be done using transformers' pipeline4647# Prevent printing spurious transformers error when using pipeline with AutoGPTQ48logging.set_verbosity(logging.CRITICAL)4950print("*** Pipeline:")51pipe = pipeline(52"text-generation",53 model=model,54 tokenizer=tokenizer,55 max_new_tokens=512,56 temperature=0.7,57 top_p=0.95,58 repetition_penalty=1.1559)6061print(pipe(prompt_template)[0]['generated_text'])
Compatibility
The files provided will work with AutoGPTQ (CUDA and Triton modes), GPTQ-for-LLaMa (only CUDA has been tested), and Occ4m's GPTQ-for-LLaMa fork.
ExLlama works with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
Discord
For further support, and discussions on these models and AI in general, join us at:
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
Patreon special mentions: Sam, theTransient, Jonathan Leane, Steven Wood, webtim, Johann-Peter Hartmann, Geoffrey Montalvo, Gabriel Tamborski, Willem Michiel, John Villwock, Derek Yates, Mesiah Bishop, Eugene Pentland, Pieter, Chadd, Stephen Murray, Daniel P. Andersen, terasurfer, Brandon Frisco, Thomas Belote, Sid, Nathan LeClaire, Magnesian, Alps Aficionado, Stanislav Ovsiannikov, Alex, Joseph William Delisle, Nikolai Manek, Michael Davis, Junyu Yang, K, J, Spencer Kim, Stefan Sabev, Olusegun Samson, transmissions 11, Michael Levine, Cory Kujawski, Rainer Wilmers, zynix, Kalila, Luke @flexchar, Ajan Kanaga, Mandus, vamX, Ai Maven, Mano Prime, Matthew Berman, subjectnull, Vitor Caleffi, Clay Pascal, biorpg, alfie_i, 阿明, Jeffrey Morgan, ya boyyy, Raymond Fosdick, knownsqashed, Olakabola, Leonard Tan, ReadyPlayerEmma, Enrico Ros, Dave, Talal Aujan, Illia Dulskyi, Sean Connelly, senxiiz, Artur Olbinski, Elle, Raven Klaugh, Fen Risland, Deep Realms, Imad Khwaja, Fred von Graf, Will Dee, usrbinkat, SuperWojo, Alexandros Triantafyllidis, Swaroop Kallakuri, Dan Guido, John Detwiler, Pedro Madruga, Iucharbius, Viktor Bowallius, Asp the Wyvern, Edmond Seymore, Trenton Dambrowitz, Space Cruiser, Spiking Neurons AB, Pyrater, LangChain4j, Tony Hughes, Kacper Wikieł, Rishabh Srivastava, David Ziegler, Luke Pendergrass, Andrey, Gabriel Puliatti, Lone Striker, Sebastain Graf, Pierre Kircher, Randy H, NimbleBox.ai, Vadim, danny, Deo Leter
Thank you to all my generous patrons and donaters!
And thank you again to a16z for their generous grant.