license: apache-2.0
BLOOMChat V1.0
BLOOMChat is BigScience Group BLOOM model instruction-tuned on a subset of 100k datapoints per data source from the OIG dataset from the OpenChatKit. Then aligned using Dolly 2.0 and Oasst1.
Model Details
Model Description
- Developed by: SambaNova Systems
- Co-developed by: Together Computer
- Model type: Language Model
- Language(s): Multiple; see training data from BLOOM
- License: apache-2.0 with RAIL restrictions
- Instruction Tuned from model: BigScience Group BLOOM
Additional Information
- Blog Post: [More Information Needed]
Uses
Click to expand
Direct Use
This model is intended for commercial and research use.
Out-of-Scope Use
Bloom chat should NOT be used for:
- Mission-critical applications
- Applications that involve the safety of others
- Making highly important decisions
- Important automated pipelines
This model is still in early development and can be prone to mistakes and hallucinations, there is still room for improvement. This model is intended to provide the community with a good baseline.
Recommendations
Users should be made aware of the risks, biases, limitations, and restrictions of the model, which are listed down at the bottom of the page.
How to Get Started with the Model
Click to expand
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("sambanovasystems/BLOOMChat-176B-v1")
model = AutoModelForCausalLM.from_pretrained("sambanovasystems/BLOOMChat-176B-v1", device_map="auto", torch_dtype="auto")
Tutorial on using the model for text generation
Specifically we tested BLOOM inference via command-line in this repository.
Running command:
python -m inference_server.cli --model_name sambanovasystems/BLOOMChat-176B-v1 --model_class AutoModelForCausalLM --dtype int8 --deployment_framework hf_accelerate --generate_kwargs '{"do_sample": false, "temperature": 0.8, "repetition_penalty": 1.2, "top_p": 0.9, "max_new_tokens": 512}'
NOTE: Things that we had to modify in order for BLOOMChat to work:
- Install transformers version 4.27.0
pip install transformers==4.27.0
- Change the model name from
bigscience/bloom
tosambanovasystems/BLOOMChat-176B-v1
- Modifying
inference_server/models/hf_accelerate.py
- This is because for our testing of this repo we used 4 80GB A100 GPUs and would run into memory issues
Modifications for inference_server/models/hf_accelerate.py
:
from accelerate.utils.modeling import get_max_memory
...
class HFAccelerateModel(Model):
def __init__(self, args: Namespace) -> None:
...
original_max_memory_dict = get_max_memory()
reduce_max_memory_dict = {device_key: int(original_max_memory_dict[device_key] * 0.85) for device_key in original_max_memory_dict}
kwargs["max_memory"] = reduce_max_memory_dict
Suggested Inference Parameters
- Temperature: 0.8
- Repetition penalty: 1.2
- Top-p: 0.9
- Max generated tokens: 512
Suggested Prompts To Try
<human>: Write a script in which Bob accidentally breaks his dad's guitar
<bot>:
<human>: give a python code to open a http server in 8080 port using python 3.7
<bot>:
<human>: Create an itemized list of tasks to complete to start a clothing brand
<bot>:
Some example completions
Click to expand
<human>: What does it mean for the Fed to raise or lower interest rates?
<bot>: The Federal Reserve (also known as the Fed) is the central banking system of the United States. It was created in 1913, and is an independent agency of the federal government. The Fed has a dual mandate of maximizing employment and stabilizing prices. The Fed sets interest rates, and can influence the money supply and the credit markets through its actions.
Raising interest rates means that the Fed is trying to reduce the money supply in the economy, and is trying to discourage borrowing and encourage saving. Lowering interest rates means that the Fed is trying to stimulate economic growth by encouraging borrowing and reducing the cost of credit.
The Fed raises or lowers interest rates in order to influence the economy and achieve its goals for employment and price stability. Interest rates are one of the primary tools that the Fed uses to achieve its goals.
<human>: Write an engaging and well-written property listing description for selling a house. Address of the house and some of the details are given to you. Fill in the information gap with hallucinations if needed.
Property Address: 412 Monterey Ave, Capitola, CA 95010
Parking: 3 cars + a finished single car garage
Details:
- open floorplan
- window with views to park/mountains
- Kitchen with shaker cabinetry and white Calcatta quartz counters
<bot>: This home at 412 Monterey Ave, Capitola, CA 95010 is the perfect place to call home. With its open floor plan, it provides the perfect space for entertaining guests. The kitchen is equipped with shaker cabinetry and white Calcatta quartz counters, providing the perfect space to create culinary masterpieces. The window with views to the park and mountains provide a beautiful view of the outdoors, making this home feel like a piece of paradise. The three-car garage and finished single car garage provide ample parking space, making this home a must-see for anyone looking for a new home.
<human>: What is artificial intelligence? Explain it so an 8 year old will understand.
<bot>: Artificial Intelligence (AI) is a computer program or machine that can do things that would normally require human intelligence, such as recognizing patterns, making decisions, and learning from experience. AI can be found in many places, such as self-driving cars, smartphones, and even robots. AI is used to make things easier for people, like when your smartphone can translate text into another language or when your voice-controlled speaker can play music for you.
AI works by using algorithms and big data to learn and improve over time. For example, self-driving cars use AI to analyze the environment around them and make decisions about how to drive. The car gathers data from its sensors, processes it using algorithms, and adjusts its behavior accordingly. This process is called machine learning.
AI is still a developing technology, and there are still many things that AI programs cannot do yet. However, as AI continues to evolve, it is likely that it will become more and more capable of performing tasks that were once thought to require human intelligence.
Evaluation Graphs
Click to expand
Training Details
Click to expand
Training Data
Training Procedure
We trained BLOOMChat with SambaStudio, a platform built on SambaNova's in-house Reconfigurable Dataflow Unit (RDU). We started from BLOOM, an OSS multilingual 176B GPT model pretrained by the BigScience group. There was also some preprocessing done on the training datasets.
Prompting Style Used For Training
<human>: {input that the user wants from the bot}
<bot>:
<human>: {fewshot1 input}
<bot>: {fewshot1 response}
<human>: {fewshot2 input}
<bot>: {fewshot2 response}
<human>: {input that the user wants from the bot}
<bot>:
Hyperparameters
Instruction-tuned Training on OIG
- Hardware: SambaNova Reconfigurable Dataflow Unit (RDU)
- Optimizer: AdamW
- Grad accumulation: 1
- Epochs: 1
- Global Batch size: 128
- Batch tokens: 128 * 2048 = 262,144 tokens
- Learning Rate: 1e-5
- Learning Rate Scheduler: Cosine Schedule with Warmup
- Warmup Steps: 0
- End Learning Ratio: 0.1
- Weight decay: 0.1
Instruction-tuned Training on Dolly 2.0 and Oasst1
- Hardware: SambaNova Reconfigurable Dataflow Unit (RDU)
- Optimizer: AdamW
- Grad accumulation: 1
- Epochs: 3
- Global Batch size: 128
- Batch tokens: 128 * 2048 = 262,144 tokens
- Learning Rate: 1e-5
- Learning Rate Scheduler: Cosine Schedule with Warmup
- Warmup Steps: 0
- End Learning Ratio: 0.1
- Weight decay: 0.1
RAIL Restrictions
As the original model BLOOM is on the RAIL License, we need to follow the same restrictions.
You agree not to use the Model or Derivatives of the Model:
- In any way that violates any applicable national, federal, state, local or international law or regulation;
- For the purpose of exploiting, harming or attempting to exploit or harm minors in any way;
- To generate or disseminate verifiably false information with the purpose of harming others;
- To generate or disseminate personal identifiable information that can be used to harm an individual;
- To generate or disseminate information or content, in any context (e.g. posts, articles, tweets, chatbots or other kinds of automated bots) without expressly and intelligibly disclaiming that the text is machine generated;
- To defame, disparage or otherwise harass others;
- To impersonate or attempt to impersonate others;
- For fully automated decision making that adversely impacts an individual’s legal rights or otherwise creates or modifies a binding, enforceable obligation;
- For any use intended to or which has the effect of discriminating against or harming individuals or groups based on online or offline social behavior or known or predicted personal or personality characteristics
- To exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological harm;
- For any use intended to or which has the effect of discriminating against individuals or groups based on legally protected characteristics or categories;
- To provide medical advice and medical results interpretation;
- To generate or disseminate information for the purpose to be used for administration of justice, law enforcement, immigration or asylum processes, such as predicting an individual will commit fraud/crime commitment (e.g. by text profiling, drawing causal relationships between assertions made in documents, indiscriminate and arbitrarily-targeted use).
Bias, Risks, and Limitations
Like all LLMs, BLOOMChat has certain limitations:
- Hallucination: BLOOMChat may sometimes generate responses that contain plausible-sounding but factually incorrect or irrelevant information.
- Code Switching: The model might unintentionally switch between languages or dialects within a single response, affecting the coherence and understandability of the output.
- Repetition: BLOOMChat may produce repetitive phrases or sentences, leading to less engaging and informative responses.
- Coding and Math: The model's performance in generating accurate code or solving complex mathematical problems may be limited.
- Toxicity: BLOOMChat may inadvertently generate responses containing inappropriate or harmful content.
Acknowledgment
We would like to extend our gratitude to Together for their insightful technical discussions on overall project planning, data processing, model training, human evaluation experiment design, open-source endeavors, and their contributions on data processing code on OpenChatKit, OASST1, and Dolly 2.0.