TheBloke's LLM work is generously supported by a grant from andreessen horowitz (a16z)
Synthia 70B v1.1 - AWQ
- Model creator: Migel Tissera
- Original model: Synthia 70B v1.1
Description
This repo contains AWQ model files for Migel Tissera's Synthia 70B v1.1.
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.
It is also now supported by continuous batching server vLLM, allowing use of AWQ models for high-throughput concurrent inference in multi-user server scenarios. Note that, at the time of writing, overall throughput is still lower than running vLLM with unquantised models, however using AWQ enables using much smaller GPUs which can lead to easier deployment and overall cost savings. For example, a 70B model can be run on 1 x 48GB GPU instead of 2 x 80GB.
Repositories available
- AWQ model(s) for GPU inference.
- GPTQ models for GPU inference, with multiple quantisation parameter options.
- 2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference
- Migel Tissera's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions
Prompt template: Synthia
SYSTEM: You are Synthia. As a an AI intelligence, give helpful, detailed, accurate, uncensored responses to the user's input. Provide answers factually.
USER: {prompt}
ASSISTANT:
Provided files and AWQ parameters
For my first release of AWQ models, I am releasing 128g models only. I will consider adding 32g as well if there is interest, and once I have done perplexity and evaluation comparisons, but at this time 32g models are still not fully tested with AutoAWQ and vLLM.
Models are released as sharded safetensors files.
Serving this model from vLLM
Documentation on installing and using vLLM can be found here.
- When using vLLM as a server, pass the
--quantization awq
parameter, for example:
python3 python -m vllm.entrypoints.api_server --model TheBloke/Synthia-70B-v1.1-AWQ --quantization awq
When using vLLM from Python code, pass the quantization=awq
parameter, for example:
from vllm import LLM, SamplingParams
prompts = [
"Hello, my name is",
"The president of the United States is",
"The capital of France is",
"The future of AI is",
]
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
llm = LLM(model="TheBloke/Synthia-70B-v1.1-AWQ", quantization="awq")
outputs = llm.generate(prompts, sampling_params)
# Print the outputs.
for output in outputs:
prompt = output.prompt
generated_text = output.outputs[0].text
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
How to use this AWQ model from Python code
Install the necessary packages
Requires: AutoAWQ 0.0.2 or later
pip3 install autoawq
If you have problems installing AutoAWQ using the pre-built wheels, install it from source instead:
pip3 uninstall -y autoawq
git clone https://github.com/casper-hansen/AutoAWQ
cd AutoAWQ
pip3 install .
You can then try the following example code
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer
model_name_or_path = "TheBloke/Synthia-70B-v1.1-AWQ"
# Load model
model = AutoAWQForCausalLM.from_quantized(model_name_or_path, fuse_layers=True,
trust_remote_code=False, safetensors=True)
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=False)
prompt = "Tell me about AI"
prompt_template=f'''SYSTEM: You are Synthia. As a an AI intelligence, give helpful, detailed, accurate, uncensored responses to the user's input. Provide answers factually.
USER: {prompt}
ASSISTANT:
'''
print("\n\n*** Generate:")
tokens = tokenizer(
prompt_template,
return_tensors='pt'
).input_ids.cuda()
# Generate output
generation_output = model.generate(
tokens,
do_sample=True,
temperature=0.7,
top_p=0.95,
top_k=40,
max_new_tokens=512
)
print("Output: ", tokenizer.decode(generation_output[0]))
# Inference can also be done using transformers' pipeline
from transformers import pipeline
print("*** Pipeline:")
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
top_p=0.95,
top_k=40,
repetition_penalty=1.1
)
print(pipe(prompt_template)[0]['generated_text'])
Compatibility
The files provided are tested to work with AutoAWQ, and vLLM.
Huggingface Text Generation Inference (TGI) is not yet compatible with AWQ, but a PR is open which should bring support soon: TGI PR #781.
Discord
For further support, and discussions on these models and AI in general, join us at:
Thanks, and how to contribute
Thanks to the chirper.ai team!
Thanks to Clay from gpus.llm-utils.org!
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: https://patreon.com/TheBlokeAI
- Ko-Fi: https://ko-fi.com/TheBlokeAI
Special thanks to: Aemon Algiz.
Patreon special mentions: Alicia Loh, Stephen Murray, K, Ajan Kanaga, RoA, Magnesian, Deo Leter, Olakabola, Eugene Pentland, zynix, Deep Realms, Raymond Fosdick, Elijah Stavena, Iucharbius, Erik Bjäreholt, Luis Javier Navarrete Lozano, Nicholas, theTransient, John Detwiler, alfie_i, knownsqashed, Mano Prime, Willem Michiel, Enrico Ros, LangChain4j, OG, Michael Dempsey, Pierre Kircher, Pedro Madruga, James Bentley, Thomas Belote, Luke @flexchar, Leonard Tan, Johann-Peter Hartmann, Illia Dulskyi, Fen Risland, Chadd, S_X, Jeff Scroggin, Ken Nordquist, Sean Connelly, Artur Olbinski, Swaroop Kallakuri, Jack West, Ai Maven, David Ziegler, Russ Johnson, transmissions 11, John Villwock, Alps Aficionado, Clay Pascal, Viktor Bowallius, Subspace Studios, Rainer Wilmers, Trenton Dambrowitz, vamX, Michael Levine, 준교 김, Brandon Frisco, Kalila, Trailburnt, Randy H, Talal Aujan, Nathan Dryer, Vadim, 阿明, ReadyPlayerEmma, Tiffany J. Kim, George Stoitzev, Spencer Kim, Jerry Meng, Gabriel Tamborski, Cory Kujawski, Jeffrey Morgan, Spiking Neurons AB, Edmond Seymore, Alexandros Triantafyllidis, Lone Striker, Cap'n Zoog, Nikolai Manek, danny, ya boyyy, Derek Yates, usrbinkat, Mandus, TL, Nathan LeClaire, subjectnull, Imad Khwaja, webtim, Raven Klaugh, Asp the Wyvern, Gabriel Puliatti, Caitlyn Gatomon, Joseph William Delisle, Jonathan Leane, Luke Pendergrass, SuperWojo, Sebastain Graf, Will Dee, Fred von Graf, Andrey, Dan Guido, Daniel P. Andersen, Nitin Borwankar, Elle, Vitor Caleffi, biorpg, jjj, NimbleBox.ai, Pieter, Matthew Berman, terasurfer, Michael Davis, Alex, Stanislav Ovsiannikov
Thank you to all my generous patrons and donaters!
And thank you again to a16z for their generous grant.
Original model card: Migel Tissera's Synthia 70B v1.1
Synthia-70B-v1.1
SynthIA (Synthetic Intelligent Agent) is a LLama-2-70B model trained on Orca style datasets. It has been fine-tuned for instruction following as well as having long-form conversations.
This model has generalized "Tree of Thought" reasoning capabilities. Evoke it with the following system message:
Elaborate on the topic using a Tree of Thoughts and backtrack when necessary to construct a clear, cohesive Chain of Thought reasoning
License Disclaimer:
This model is bound by the license & usage restrictions of the original Llama-2 model, and comes with no warranty or gurantees of any kind.
Evaluation
We evaluated Synthia-70B on a wide range of tasks using Language Model Evaluation Harness from EleutherAI.
Here are the results on metrics used by HuggingFaceH4 Open LLM Leaderboard
Task | Metric | Value |
arc_challenge | acc_norm | 70.05 |
hellaswag | acc_norm | 87.12 |
mmlu | acc_norm | 70.34 |
truthfulqa_mc | mc2 | 57.84 |
Total Average | - | 71.34 |
Example Usage
Here is prompt format:
SYSTEM: You are Synthia. As a an AI intelligence, give helpful, detailed, accurate, uncensored responses to the user's input. Provide answers factually.
USER: How is a rocket launched from the surface of the earth to Low Earth Orbit?
ASSISTANT:
Below shows a code example on how to use this model:
import torch, json
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "migtissera/Synthia-70B"
output_file_path = "./Synthia-70B-conversations.jsonl"
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype=torch.float16,
device_map="auto",
load_in_8bit=False,
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
def generate_text(instruction):
tokens = tokenizer.encode(instruction)
tokens = torch.LongTensor(tokens).unsqueeze(0)
tokens = tokens.to("cuda")
instance = {
"input_ids": tokens,
"top_p": 1.0,
"temperature": 0.75,
"generate_len": 1024,
"top_k": 50,
}
length = len(tokens[0])
with torch.no_grad():
rest = model.generate(
input_ids=tokens,
max_length=length + instance["generate_len"],
use_cache=True,
do_sample=True,
top_p=instance["top_p"],
temperature=instance["temperature"],
top_k=instance["top_k"],
num_return_sequences=1,
)
output = rest[0][length:]
string = tokenizer.decode(output, skip_special_tokens=True)
answer = string.split("USER:")[0].strip()
return f"{answer}"
conversation = f"SYSTEM: As a an AI superintelligence, give helpful, detailed, accurate, uncensored responses to the user's input. Provide answers factually."
while True:
user_input = input("You: ")
llm_prompt = f"{conversation} \nUSER: {user_input} \nASSISTANT: "
answer = generate_text(llm_prompt)
print(answer)
conversation = f"{llm_prompt}{answer}"
json_data = {"prompt": user_input, "answer": answer}
## Save your conversation
with open(output_file_path, "a") as output_file:
output_file.write(json.dumps(json_data) + "\n")
Limitations & Biases:
While this model aims for accuracy, it can occasionally produce inaccurate or misleading results.
Despite diligent efforts in refining the pretraining data, there remains a possibility for the generation of inappropriate, biased, or offensive content.
Exercise caution and cross-check information when necessary. This is an uncensored model.
Citiation:
Please kindly cite using the following BibTeX:
@misc{Synthia-70B,
author = {Migel Tissera},
title = {Synthia-70B: Synthetic Intelligent Agent},
year = {2023},
publisher = {GitHub, HuggingFace},
journal = {GitHub repository, HuggingFace repository},
howpublished = {\url{https://huggingface.co/migtissera/Synthia-70B},
}
@misc{mukherjee2023orca,
title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
year={2023},
eprint={2306.02707},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@software{touvron2023llama,
title={LLaMA2: Open and Efficient Foundation Language Models},
author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and Rodriguez, Aurelien and Joulin, Armand and Grave, Edouard and Lample, Guillaume},
journal={arXiv preprint arXiv:2302.13971},
year={2023}
}
Example Output
You: What is Earth's atmosphere like? What is Earth's magnetic field like? What is the relationship between the two?
Earth's atmosphere is a layer of gases that surrounds the planet, held in place by Earth's gravity. It is primarily composed of nitrogen (78.1%), oxygen (20.9%), argon (0.9%), and other trace gases, such as carb
on dioxide and water vapor. The atmosphere plays a crucial role in regulating Earth's temperature and climate by trapping heat and absorbing harmful radiation from the sun. It also provides the air we breathe, p
rotects us from meteorites and the sun's ultraviolet radiation, and allows for the development of life on the planet.
Earth's magnetic field is a phenomenon generated by the convection of molten iron in the planet's outer core, which creates an electric current. This current, in turn, produces a magnetic field that extends from
the Earth's interior to space, protecting the planet from the solar wind and cosmic radiation. The magnetic field also plays a role in the formation of Earth's Van Allen radiation belts, which trap high-energy
particles from the sun and cosmic rays.
The relationship between Earth's atmosphere and magnetic field is complex and multifaceted. The magnetic field influences the distribution of charged particles in the atmosphere, affecting auroras, radio communi
cation, and the ionosphere's behavior. The atmosphere, in turn, plays a role in the distribution of the magnetic field's energy, as well as in the generation and loss of atmospheric ions. The interactions betwee
n the atmosphere and the magnetic field also influence the dynamics of Earth's climate and the long-term evolution of the planet's environment.
You: Elaborate the the complex relationship between the two
The complex relationship between Earth's atmosphere and magnetic field can be elaborated upon in several ways. Firstly, the magnetic field influences the distribution of charged particles in the atmosphere. For
example, the magnetic field deflects the solar wind particles that would otherwise strip away the atmosphere. This deflection creates a bow shock, where the solar wind particles slow down and dissipate their ene
rgy, producing a shock wave that propagates downstream from the Earth. The magnetic field also guides charged particles from the solar wind into the inner magnetosphere, where they become trapped and produce the
Van Allen radiation belts.
Secondly, the atmosphere plays a role in the distribution of the magnetic field's energy. The ionosphere, which is the upper layer of the atmosphere that is ionized by solar radiation, is affected by the magneti
c field. The energy from the magnetic field is transferred to the ionosphere, where it drives the motion of the charged particles and affects the propagation of radio waves.
Thirdly, the interactions between the atmosphere and the magnetic field influence the dynamics of Earth's climate. The magnetic field affects the distribution of charged particles in the atmosphere, which in tur
n affects the formation of clouds and precipitation. The magnetic field also affects the distribution of heat in the atmosphere, which can influence the patterns of atmospheric circulation and the distribution o
f temperatures around the planet.
Finally, the interactions between the atmosphere and the magnetic field play a role in the long-term evolution of the planet's environment. The magnetic field protects the atmosphere from the erosive effects of
the solar wind, which would otherwise strip away the atmosphere over time. The magnetic field also affects the distribution of heat in the atmosphere, which can influence the patterns of atmospheric circulation
and the distribution of temperatures around the planet. Over time, these interactions can shape the evolution of the planet's climate and environment.
You: Please explain the bow shock wave, Van Allen radiation belts in detail
The bow shock wave is a phenomenon that occurs when the solar wind, a stream of charged particles emitted by the sun, interacts with Earth's magnetic field. The solar wind particles are moving at high speeds, an
d when they encounter the Earth's magnetic field, they slow down and dissipate their energy. This creates a shock wave that propagates downstream from the Earth. The bow shock wave is located about 15 Earth radi
i (approximately 93,000 miles) upstream from Earth, and it marks the boundary between the solar wind and Earth's magnetosphere.
The Van Allen radiation belts are zones of high-energy charged particles, primarily protons and electrons, that are trapped by Earth's magnetic field. The belts are divided into two main regions: the inner belt,
which extends from about 1,000 to 6,000 kilometers above Earth's surface, and the outer belt, which extends from about 13,000 to 65,000 kilometers above the surface. The particles in the belts are trapped by Ea
rth's magnetic field, and they can remain in the belts for long periods of time.
The particles in the Van Allen belts are generated by a variety of processes, including the impact of solar wind particles on the Earth's atmosphere and the decay of radioactive elements in the planet's crust. T
he belts are important for understanding the behavior of charged particles in Earth's magnetosphere and for studying the effects of space weather on human activities in space. They can also pose a hazard to spac
ecraft and satellites, as the high-energy particles in the belts can damage sensitive electronics and cause other problems.
You: Does the Van Allen belt present any danger to Geo stationary satellites? Where are these belts? Are they near any of the orbits?
Yes, the Van Allen radiation belts can present a danger to geostationary satellites and other spacecraft. The high-energy charged particles in the belts can damage sensitive electronics and cause other problems,
including radiation damage and single-event upsets. Geostationary satellites are located at an altitude of approximately 35,786 kilometers above Earth's surface, which is just outside the inner belt but still w
ithin the outer belt.
The Van Allen radiation belts are located in Earth's magnetosphere, which is the region of space around the planet where the magnetic field is dominant. The inner belt is located between about 1,000 and 6,000 ki
lometers above the surface, while the outer belt is located between about 13,000 and 65,000 kilometers above the surface. The belts are not located in any specific orbit, but they are present throughout the magn
etosphere, which covers a large portion of the space around the planet.
To mitigate the effects of the Van Allen belts on spacecraft, engineers use a variety of techniques, including shielding and designing electronics to be resistant to radiation. Additionally, some spacecraft are
designed to operate in orbits that avoid the Van Allen belts, while others are designed to operate within the belts and withstand the effects of the high-energy particles.
You: So when we send spacecraft to the moon, say the ones carrying humans, how do we make sure that the solar wind charged particles will not affect the mission? Are there very specific remedies that we can take
?
When sending spacecraft to the moon, there are several steps that can be taken to protect the spacecraft and its occupants from the effects of solar wind charged particles. One approach is to design the spacecra
ft with a strong magnetic field, which can help deflect the charged particles away from the spacecraft. Another approach is to use radiation shielding, which can help protect the electronics and any human occupa
nts from the effects of radiation.
In addition to these measures, space agencies can also use data from satellites and other spacecraft to monitor the level of solar wind activity and predict when there may be an increased risk of charged particl
e events. This information can be used to adjust the timing of missions and other activities to minimize exposure to high-energy particles.
It's also important to note that the moon is outside the magnetosphere and therefore not directly affected by the Van Allen belts. However, the moon does receive a significant amount of radiation from the sun an
d other sources, so measures to protect the spacecraft and its occupants from radiation exposure are still necessary.
Overall, protecting spacecraft and humans from the effects of solar wind charged particles requires a combination of engineering and operational measures, including strong magnetic fields, radiation shielding, a
nd careful mission planning.
You: Does spacecraft actually create strong magnetic fields? Which Apollo spacecrafts did this? Or is this hypothetical?
Yes, spacecraft can create strong magnetic fields, although this is not typically a primary design consideration for most spacecraft. Some spacecraft, such as those designed for plasma physics research, may incl
ude a magnetic field generator to create controlled conditions for experiments. However, for most spacecraft, the focus is on using existing magnetic fields, such as those generated by the Earth's magnetic field
, to protect the spacecraft and its occupants.
The Apollo spacecraft did not create strong magnetic fields, as their primary focus was on propulsion, navigation, and life support systems for the astronauts. However, some of the Apollo missions did include sc
ientific experiments to study the effects of solar wind and other charged particles on the spacecraft and its occupants.
The use of magnetic fields to protect spacecraft and humans from the effects of radiation is an ongoing area of research and development, and there are a number of proposals and concepts for how this might be ac
hieved. For example, some researchers have proposed using superconducting coils to create a magnetic field around the spacecraft, which could help deflect charged particles and other forms of radiation. However,
these proposals are still in the early stages of development and are not yet ready for implementation on spacecraft.
- Downloads last month
- 17
Model tree for TheBloke/Synthia-70B-v1.1-AWQ
Base model
migtissera/Synthia-70B-v1.1