The Falcon has landed in the Hugging Face ecosystem
Falcon-7B and Falcon-40B are Apache 2.0 language models from TII, trained mostly on the deduplicated, filtered RefinedWeb dataset. They use multiquery attention, which shrinks the K,V-cache roughly 10-100x (20MB vs 1,100MB for LLaMA-7B at 2,048 context). The walkthrough covers running them with transformers in bfloat16 with remote code, fitting Falcon-40B into about 45GB with 8-bit or about 27GB with 4-bit loading, and serving them via Text Generation Inference. It also covers leaderboard results where the 40B models ranked first and second, and QLoRA fine-tuning with PEFT and TRL's SFTTrainer on a single T4 (7B) or A100 (40B), producing a 65MB adapter.
Related posts
- Spread Your Wings: Falcon 180B is here
Hugging Face mediumAdeptFalcon 180B from TII is the largest openly available language model, with 180 billion parameters, trained on 3.5 trillion tokens (mostly RefinedWeb) across up to 4096 GPUs for about 7M GPU hours. It scales up Falcon 40B's architecture, including multiquery attention, and scored on par with Llama 2 70B and PaLM 2-Large on common benchmarks. Running it needs serious hardware: 640GB for BF16 inference, 320GB with GPTQ/int4, and 160GB for QLoRA fine-tuning. 8-bit and 4-bit quantization barely change eval scores, and Transformers 4.33 supports loading, quantizing and chat-style prompting.
- Welcome Falcon Mamba: The first strong attention-free 7B model
Hugging Face mediumAdeptFalcon Mamba 7B from TII is a pure Mamba state space language model with extra RMS normalization layers for stable training at scale. Trained on roughly 5,500 GT of mostly RefinedWeb data, it matches or beats similarly sized transformers and hybrid SSM models on Open LLM Leaderboard benchmarks, averaging 15.04 on v2 and 64.09 on v1. Because an SSM keeps only a recurrent state, decoding runs at constant throughput and memory regardless of context length. Parallel prefill still makes memory grow with prompt length, but sequential or chunked prefill lets the model handle arbitrarily long prompts on a single 24GB A10. The model loads through Hugging Face transformers (>4.45.0) and supports 4-bit bitsandbytes quantization, torch.compile and an instruction-tuned variant.
- Welcome to the Falcon 3 Family of Open Models!
Hugging Face easyNoviceFalcon3 is TII's family of open decoder-only LLMs under 10B parameters (1B, 3B, 7B, 10B transformers plus Mamba-7B SSM), focused on math, science and code. A single 14T-token pretraining run on 1024 H100s produced the 7B model; the 10B was made by depth up-scaling (duplicating layers plus 2T more tokens), and the 1B/3B by pruning and knowledge distillation on under 100B tokens. Reported results include 83.0 GSM8K and 73.1 MMLU for the 10B base, up to 32K context, Llama-architecture compatibility, and quantized variants (GGUF, GPTQ, AWQ, 1.58-bit).
- Llama 2 is here - get it on Hugging Face
Hugging Face mediumAdeptMeta's Llama 2 family (7B, 13B, 70B base and RLHF-tuned chat models) is released under a commercially usable license, trained on 40% more tokens than Llama 1 with 4k context and grouped-query attention for the 70B model, and is integrated across the Hugging Face ecosystem. Inference runs through transformers 4.31 or Text Generation Inference and Inference Endpoints, with recommended GPU sizes per model (A10G for 7B, A100 for 13B, 2-4x A100 for 70B). The 7B model can be fine-tuned on a single 16GB T4 using QLoRA and trl's SFTTrainer. The chat prompt format uses [INST] and <<SYS>> delimiters, and prompts must match the training template exactly for system prompts and multi-turn conversations to work.
- Making LLMs even more accessible with bitsandbytes, 4-bit quantization and QLoRA
Hugging Face mediumAdeptbitsandbytes now integrates 4-bit quantization into Hugging Face transformers, letting most accelerate-loadable models (text, vision, multimodal) run in 4-bit and be fine-tuned via QLoRA, which backpropagates through a frozen 4-bit base model into LoRA adapters. QLoRA stores weights in NF4 and dequantizes to bfloat16 for compute, adds double quantization (saving ~0.4 bits per parameter) and paged optimizers, and matches 16-bit fine-tuning while fitting a 33B model on a 24GB GPU or 65B on a 48GB GPU. The post explains FP8/FP4 bit layouts and shows BitsAndBytesConfig usage. Recommended defaults are NF4 for precision, double quant for memory pressure, and a 16-bit compute dtype for speed.