These files were quantised using hardware kindly provided by Massed Compute.
About AWQ
AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
Please ensure you are using vLLM version 0.2 or later.
When using vLLM as a server, pass the --quantization awq parameter.
For example:
python3 -m vllm.entrypoints.api_server --model TheBloke/tulu-2-7B-AWQ --quantization awq --dtype auto
When using vLLM from Python code, again set quantization=awq.
For example:
python
1from vllm import LLM, SamplingParams
23prompts =[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'''1314prompts =[prompt_template.format(prompt=prompt)for prompt in prompts]1516sampling_params = SamplingParams(temperature=0.8, top_p=0.95)1718llm = LLM(model="TheBloke/tulu-2-7B-AWQ", quantization="awq", dtype="auto")1920outputs = llm.generate(prompts, sampling_params)2122# Print the outputs.23for output in outputs:24 prompt = output.prompt
25 generated_text = output.outputs[0].text
26print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
Multi-user inference server: Hugging Face Text Generation Inference (TGI)
Use TGI version 1.1.0 or later. The official Docker container is: ghcr.io/huggingface/text-generation-inference:1.1.0
Transformers example code (requires Transformers 4.35.0 and later)
python
1from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
23model_name_or_path ="TheBloke/tulu-2-7B-AWQ"45tokenizer = 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)1112# Using the text streamer to stream output one token at a time13streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)1415prompt ="Tell me about AI"16prompt_template=f'''<|user|>
17{prompt}18<|assistant|>
19'''2021# Convert prompt to tokens22tokens = tokenizer(23 prompt_template,24 return_tensors='pt'25).input_ids.cuda()2627generation_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.134}3536# Generate streamed output, visible one token at a time37generation_output = model.generate(38 tokens,39 streamer=streamer,40**generation_params
41)4243# Generation without a streamer, which will include the prompt in the output44generation_output = model.generate(45 tokens,46**generation_params
47)4849# Get the tokens from the output, decode them, print them50token_output = generation_output[0]51text_output = tokenizer.decode(token_output)52print("model.generate output: ", text_output)5354# Inference is also possible via Transformers' pipeline55from transformers import pipeline
5657pipe = pipeline(58"text-generation",59 model=model,60 tokenizer=tokenizer,61**generation_params
62)6364pipe_output = pipe(prompt_template)[0]['generated_text']65print("pipeline output: ", pipe_output)66
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: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
Thank you to all my generous patrons and donaters!
And thank you again to a16z for their generous grant.
Original model card: Allen Institute for AI's Tulu 2 7B
TuluV2 banner
Model Card for Tulu 2 7B
Tulu is a series of language models that are trained to act as helpful assistants.
Tulu 2 7B is a fine-tuned version of Llama 2 that was trained on a mix of publicly available, synthetic and human datasets.
Model type: A model belonging to a suite of instruction and RLHF tuned chat models on a mix of publicly available, synthetic and human-created datasets.
Model Family: Other models and the dataset are found in the Tulu V2 collection.
Performance
Model
Size
Alignment
MT-Bench (score)
AlpacaEval (win rate %)
Tulu-v2-7b 🐪
7B
SFT
6.30
73.9
Tulu-v2-dpo-7b 🐪
7B
DPO
6.29
85.1
Tulu-v2-13b 🐪
13B
SFT
6.70
78.9
Tulu-v2-dpo-13b 🐪
13B
DPO
7.00
89.5
Tulu-v2-70b 🐪
70B
SFT
7.49
86.6
Tulu-v2-dpo-70b 🐪
70B
DPO
7.89
95.1
Input Format
The model is trained to use the following format (note the newlines):
<|user|>
Your message here!
<|assistant|>
For best results, format all inputs in this manner. Make sure to include a newline after <|assistant|>, this can affect generation quality quite a bit.
Intended uses & limitations
The model was fine-tuned on a filtered and preprocessed of the Tulu V2 mix dataset, which contains a diverse range of human created instructions and synthetic dialogues generated primarily by other LLMs.
Bias, Risks, and Limitations
The Tulu models have not been aligned to generate safe completions within the RLHF phase or deployed with in-the-loop filtering of responses like ChatGPT, so the model can produce problematic outputs (especially when prompted to do so).
It is also unknown what the size and composition of the corpus was used to train the base Llama 2 models, however it is likely to have included a mix of Web data and technical sources like books and code. See the Falcon 180B model card for an example of this.
Training hyperparameters
The following hyperparameters were used during DPO training:
learning_rate: 2e-5
total_train_batch_size: 128
optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
lr_scheduler_type: linear
lr_scheduler_warmup_ratio: 0.03
num_epochs: 2.0
Citation
If you find Tulu 2 is useful in your work, please cite it with:
@misc{ivison2023camels,
title={Camels in a Changing Climate: Enhancing LM Adaptation with Tulu 2},
author={Hamish Ivison and Yizhong Wang and Valentina Pyatkin and Nathan Lambert and Matthew Peters and Pradeep Dasigi and Joel Jang and David Wadden and Noah A. Smith and Iz Beltagy and Hannaneh Hajishirzi},
year={2023},
eprint={2311.10702},
archivePrefix={arXiv},
primaryClass={cs.CL}
}