These files will not work in llama.cpp, text-generation-webui or KoboldCpp.
GGCC is a new format created in a new fork of llama.cpp that introduced this new Falcon GGML-based support: cmp-nc/ggllm.cpp.
Currently these files will also not work with code that previously supported Falcon, such as LoLLMs Web UI and ctransformers. But support should be added soon.
Compiling on Windows: developer cmp-nct notes: 'I personally compile it using VScode. When compiling with CUDA support using the Microsoft compiler it's essential to select the "Community edition build tools". Otherwise CUDA won't compile.'
Once compiled you can then use bin/falcon_main just like you would use llama.cpp. For example:
bin/falcon_main -t 8 -ngl 100 -b 1 -m falcon7b-instruct.ggmlv3.q4_0.bin -p "What is a falcon?\n### Response:"
You can specify -ngl 100 regardles of your VRAM, as it will automatically detect how much VRAM is available to be used.
Adjust -t 8 (the number of CPU cores to use) according to what performs best on your system. Do not exceed the number of physical CPU cores you have.
-b 1 reduces batch size to 1. This slightly lowers prompt evaluation time, but frees up VRAM to load more of the model on to your GPU. If you find prompt evaluation too slow and have enough spare VRAM, you can remove this parameter.
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.
Special thanks to: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
Patreon special mentions: Spiking Neurons AB, Kevin Schuppel, Cory Kujawski, senxiiz, Luke Pendergrass, John Villwock, Ghost , Alex , Sean Connelly, Space Cruiser, Eugene Pentland, Pyrater, Matthew Berman, Dave, Derek Yates, Jonathan Leane, Viktor Bowallius, Michael Levine, Joseph William Delisle, Fred von Graf, Asp the Wyvern, Nikolai Manek, Pierre Kircher, webtim, K, RoA, Karl Bernard, Artur Olbinski, Rainer Wilmers, Ai Maven, Nathan LeClaire, Ajan Kanaga, Stephen Murray, Edmond Seymore, zynix , Imad Khwaja, John Detwiler, Randy H, subjectnull, Alps Aficionado, Greatston Gnanesh, Trenton Dambrowitz, Junyu Yang, Raven Klaugh, biorpg, Deep Realms, vamX, Talal Aujan, Johann-Peter Hartmann, WelcomeToTheClub, Chris McCloskey, Luke, chris gileta, terasurfer , Iucharbius , Preetika Verma, Willem Michiel, Fen Risland, SuperWojo, Khalefa Al-Ahmad, Daniel P. Andersen, Gabriel Puliatti, Illia Dulskyi, Willian Hasse, Oscar Rangel, ya boyyy, Mano Prime, Lone Striker, Kalila
Thank you to all my generous patrons and donaters!
Original model card: Falcon 40B-Instruct GGML
✨ Falcon-40B-Instruct
Falcon-40B-Instruct is a 40B parameters causal decoder-only model built by TII based on Falcon-40B and finetuned on a mixture of Baize. It is made available under the Apache 2.0 license.
Paper coming soon 😊.
🤗 To get started with Falcon (inference, finetuning, quantization, etc.), we recommend reading this great blogpost fron HF!
Why use Falcon-40B-Instruct?
You are looking for a ready-to-use chat/instruct model based on Falcon-40B.
💬 This is an instruct model, which may not be ideal for further finetuning. If you are interested in building your own instruct/chat model, we recommend starting from Falcon-40B.
💸 Looking for a smaller, less expensive model?Falcon-7B-Instruct is Falcon-40B-Instruct's little brother!
python
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import transformers
3import torch
45model ="tiiuae/falcon-40b-instruct"67tokenizer = AutoTokenizer.from_pretrained(model)8pipeline = transformers.pipeline(9"text-generation",10 model=model,11 tokenizer=tokenizer,12 torch_dtype=torch.bfloat16,13 trust_remote_code=True,14 device_map="auto",15)16sequences = pipeline(17"Girafatron is obsessed with giraffes, the most glorious animal on the face of this Earth. Giraftron believes all other animals are irrelevant when compared to the glorious majesty of the giraffe.\nDaniel: Hello, Girafatron!\nGirafatron:",18 max_length=200,19 do_sample=True,20 top_k=10,21 num_return_sequences=1,22 eos_token_id=tokenizer.eos_token_id,23)24for seq in sequences:25print(f"Result: {seq['generated_text']}")26
Falcon-40B-Instruct has been finetuned on a chat dataset.
Out-of-Scope Use
Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.
Bias, Risks, and Limitations
Falcon-40B-Instruct is mostly trained on English data, and will not generalize appropriately to other languages. Furthermore, as it is trained on a large-scale corpora representative of the web, it will carry the stereotypes and biases commonly encountered online.
Recommendations
We recommend users of Falcon-40B-Instruct to develop guardrails and to take appropriate precautions for any production use.
How to Get Started with the Model
python
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import transformers
3import torch
45model ="tiiuae/falcon-40b-instruct"67tokenizer = AutoTokenizer.from_pretrained(model)8pipeline = transformers.pipeline(9"text-generation",10 model=model,11 tokenizer=tokenizer,12 torch_dtype=torch.bfloat16,13 trust_remote_code=True,14 device_map="auto",15)16sequences = pipeline(17"Girafatron is obsessed with giraffes, the most glorious animal on the face of this Earth. Giraftron believes all other animals are irrelevant when compared to the glorious majesty of the giraffe.\nDaniel: Hello, Girafatron!\nGirafatron:",18 max_length=200,19 do_sample=True,20 top_k=10,21 num_return_sequences=1,22 eos_token_id=tokenizer.eos_token_id,23)24for seq in sequences:25print(f"Result: {seq['generated_text']}")26
Training Details
Training Data
Falcon-40B-Instruct was finetuned on a 150M tokens from Bai ze mixed with 5% of RefinedWeb data.
The data was tokenized with the Falcon-7B/40B tokenizer.
Decoder-block: parallel attention/MLP with a single layer norm.
For multiquery, we are using an internal variant which uses independent key and values per tensor parallel degree.
Hyperparameter
Value
Comment
Layers
60
d_model
8192
head_dim
64
Reduced to optimise for FlashAttention
Vocabulary
65024
Sequence length
2048
Compute Infrastructure
Hardware
Falcon-40B-Instruct was trained on AWS SageMaker, on 64 A100 40GB GPUs in P4d instances.
Software
Falcon-40B-Instruct was trained a custom distributed training codebase, Gigatron. It uses a 3D parallelism approach combined with ZeRO and high-performance Triton kernels (FlashAttention, etc.)
Citation
Paper coming soon 😊. In the meanwhile, you can use the following information to cite:
@article{falcon40b,
title={{Falcon-40B}: an open large language model with state-of-the-art performance},
author={Almazrouei, Ebtesam and Alobeidli, Hamza and Alshamsi, Abdulaziz and Cappelli, Alessandro and Cojocaru, Ruxandra and Debbah, Merouane and Goffinet, Etienne and Heslow, Daniel and Launay, Julien and Malartic, Quentin and Noune, Badreddine and Pannier, Baptiste and Penedo, Guilherme},
year={2023}
}
To learn more about the pretraining dataset, see the 📓 RefinedWeb paper.
@article{refinedweb,
title={The {R}efined{W}eb dataset for {F}alcon {LLM}: outperforming curated corpora with web data, and web data only},
author={Guilherme Penedo and Quentin Malartic and Daniel Hesslow and Ruxandra Cojocaru and Alessandro Cappelli and Hamza Alobeidli and Baptiste Pannier and Ebtesam Almazrouei and Julien Launay},
journal={arXiv preprint arXiv:2306.01116},
eprint={2306.01116},
eprinttype = {arXiv},
url={https://arxiv.org/abs/2306.01116},
year={2023}
}
To cite the Baize instruction dataset used for this model:
@article{xu2023baize,
title={Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data},
author={Xu, Canwen and Guo, Daya and Duan, Nan and McAuley, Julian},
journal={arXiv preprint arXiv:2304.01196},
year={2023}
}
License
Falcon-40B-Instruct is made available under the Apache 2.0 license.