Falcon-180B-Instruct-v0.1
This instruction model was built via parameter-efficient QLoRA finetuning of falcon-180b on the first 5k rows of ehartford/dolphin and the first 5k rows of garage-bAInd/Open-Platypus. Finetuning was executed on 4x A6000s (48 GB RTX) for roughly 32 hours on the Lambda Labs platform.
Benchmark metrics
Metric | Value |
---|---|
MMLU (5-shot) | Coming |
ARC (25-shot) | Coming |
HellaSwag (10-shot) | Coming |
TruthfulQA (0-shot) | Coming |
Avg. | Coming |
We use Eleuther.AI's Language Model Evaluation Harness to run the benchmark tests below, the same version as Hugging Face's Open LLM Leaderboard.
Helpful links
- Model license: Falcon-180B TII License
Loss curve
The above loss curve was generated from the run's private wandb.ai log.
Example prompts and responses
Example 1:
User:
Write me a numbered list of things to do in New York City.
Falcon-180B-Instruct-v0.1:
Visit the Empire State Building: Take in the breathtaking views of the city from the observation deck on the 86th floor.
Stroll through Central Park: Enjoy the lush greenery, lakes, and various attractions in this iconic urban park.
Explore the Metropolitan Museum of Art: Admire the vast collection of art from around the world, spanning thousands of years.
See a Broadway show: Experience the magic of live theater in one of the world's most famous theater districts.
Walk across the Brooklyn Bridge: Take in the stunning views of the Manhattan skyline and the East River as you cross this iconic bridge.
Visit the Statue of Liberty: Take a ferry to Liberty Island and climb to the top of the statue for a unique perspective of the city.
Visit the 9/11 Memorial and Museum: Pay tribute to the victims of the September 11th attacks and learn about the events that changed the world.
Visit Times Square: Experience the bright lights and bustling energy of this iconic intersection.
Visit the High Line: Stroll along this elevated park, built on a former railroad track, and ...
Example 2:
User:
Write a short email inviting my friends to a dinner party on Friday. Respond succinctly.
Falcon-180B-Instruct-v0.1:
Subject: Dinner Party Invitation - Friday, 7pm
Dear friends,
I would like to invite you to a dinner party at my place this Friday at 7pm. It would be a great opportunity to catch up and enjoy some delicious food together.
Please let me know if you can make it by Wednesday. I look forward to seeing you all!
Best, [Your Name]
P.S. Please let me know if you have any dietary restrictions.
Example 3:
User:
Tell me a recipe for vegan banana bread.
Falcon-180B-Instruct-v0.1:
Ingredients:
- 3 ripe bananas
- 1/3 cup melted coconut oil or vegan butter
- 1/4 cup non-dairy milk (almond, soy, or oat milk)
- 1 teaspoon vanilla extract
- 1/2 cup brown sugar
- 1 1/2 cups all-purpose flour
- 1 teaspoon baking powder
- 1/2 teaspoon baking soda
- 1/2 teaspoon salt
- 1/2 teaspoon ground cinnamon (optional)
- 1/2 cup chopped walnuts or chocolate chips (optional)
Instructions:
Preheat your oven to 350°F (175°C). Grease a 9x5-inch loaf pan with vegan butter or coconut oil.
In a large mixing bowl, mash the ripe bananas with a fork until they are smooth.
Add the melted coconut oil or vegan butter, non-dairy milk, vanilla extract, and brown sugar to the mashed bananas. Mix well until combined.
In a separate bowl, whisk together the all-purpose flour, baking powder, baking soda, salt, and ground cinnamon (if using).
Gradually add the dry ingredients to the wet ingredients, mixing until just combined. Do not overmix.
If you're using walnuts or chocolate chips, gently fold them into the batter.
Pour the batter into the prepared loaf pan and smooth the top with a spatula.
Bake for 45-55 minutes, or until a toothpick inserted into the center of the loaf comes out clean.
Allow the banana bread to cool in the pan for 10 minutes before transferring it to a wire rack to cool completely.
Slice and serve warm or at room temperature. Enjoy!
Note: You can also use whole wheat flour or a gluten-free flour blend in place of all-purpose flour. Adjust the baking time accordingly, as whole wheat flour or gluten-free flour may require a longer baking time.
Optional variations:
- Add 1/2 cup of chopped nuts (walnuts, pecans, or almonds) or chocolate chips to the batter for extra flavor and texture.
Limitations and biases
The following language is modified from EleutherAI's GPT-NeoX-20B
This model can produce factually incorrect output, and should not be relied on to produce factually accurate information. This model was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
Basic usage
!pip install -q -U huggingface_hub peft transformers torch accelerate
from huggingface_hub import notebook_login
import torch
from peft import PeftModel, PeftConfig
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
BitsAndBytesConfig,
pipeline,
)
notebook_login()
peft_model_id = "dfurman/Falcon-180B-Instruct-v0.1"
config = PeftConfig.from_pretrained(peft_model_id)
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
model = AutoModelForCausalLM.from_pretrained(
config.base_model_name_or_path,
quantization_config=bnb_config,
use_auth_token=True,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path, use_fast=True)
tokenizer.pad_token = tokenizer.eos_token
model = PeftModel.from_pretrained(model, peft_model_id)
format_template = "You are a helpful assistant. Write a response that appropriately completes the request. {query}\n"
# First, format the prompt
query = "Tell me a recipe for vegan banana bread."
prompt = format_template.format(query=query)
# Inference can be done using model.generate
print("\n\n*** Generate:")
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.cuda()
with torch.autocast("cuda", dtype=torch.bfloat16):
output = model.generate(
input_ids=input_ids,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
return_dict_in_generate=True,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id,
repetition_penalty=1.2,
)
print(tokenizer.decode(output["sequences"][0], skip_special_tokens=True))
Runtime tests
runtime / 50 tokens (sec) | GPU | attn | torch dtype | VRAM (GB) |
---|---|---|---|---|
27.15 | 4x A6000s (48 GB RTX) | torch | nf4 | 140 |
Acknowledgements
This model was finetuned by Daniel Furman on Sep 10, 2023 and is for research applications only.
Disclaimer
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please cosult an attorney before using this model for commercial purposes.
tiiuae/falcon-180B citation
@article{falcon,
title={The Falcon Series of Language Models: Towards Open Frontier Models},
author={Almazrouei, Ebtesam and Alobeidli, Hamza and Alshamsi, Abdulaziz and Cappelli, Alessandro and Cojocaru, Ruxandra and Alhammadi, Maitha and Daniele, Mazzotta and Heslow, Daniel and Launay, Julien and Malartic, Quentin and Noune, Badreddine and Pannier, Baptiste and Penedo, Guilherme},
year={2023}
}
Training procedure
The following bitsandbytes
quantization config was used during training:
- quant_method: bitsandbytes
- load_in_8bit: False
- load_in_4bit: True
- llm_int8_threshold: 6.0
- llm_int8_skip_modules: None
- llm_int8_enable_fp32_cpu_offload: False
- llm_int8_has_fp16_weight: False
- bnb_4bit_quant_type: nf4
- bnb_4bit_use_double_quant: False
- bnb_4bit_compute_dtype: bfloat16
Framework versions
- PEFT 0.6.0.dev0
- Downloads last month
- 13
Model tree for dfurman/Falcon-180B-Instruct-v0.1
Base model
tiiuae/falcon-180B