tiiuae / falcon-rw-1b

huggingface.co
Total runs: 21.8K
24-hour runs: 0
7-day runs: 3.5K
30-day runs: 8.7K
Model's Last Updated: July 13 2023
text-generation

Introduction of falcon-rw-1b

Model Details of falcon-rw-1b

Falcon-RW-1B

Falcon-RW-1B is a 1B parameters causal decoder-only model built by TII and trained on 350B tokens of RefinedWeb . It is made available under the Apache 2.0 license.

See the 📓 paper on arXiv for more details.

RefinedWeb is a high-quality web dataset built by leveraging stringent filtering and large-scale deduplication. Falcon-RW-1B, trained on RefinedWeb only, matches or outperforms comparable models trained on curated data.

⚠️ Falcon is now available as a core model in the transformers library! To use the in-library version, please install the latest version of transformers with pip install git+https://github.com/huggingface/transformers.git , then simply remove the trust_remote_code=True argument from from_pretrained() .

⚠️ This model is intended for use as a research artifact , to study the influence of training on web data alone. If you are interested in state-of-the-art models, we recommend using Falcon- 7B / 40B , both trained on >1,000 billion tokens.

from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch

model = "tiiuae/falcon-rw-1b"

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
sequences = pipeline(
   "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:",
    max_length=200,
    do_sample=True,
    top_k=10,
    num_return_sequences=1,
    eos_token_id=tokenizer.eos_token_id,
)
for seq in sequences:
    print(f"Result: {seq['generated_text']}")

💥 Falcon LLMs require PyTorch 2.0 for use with transformers !

Model Card for Falcon-RW-1B

Model Details
Model Description
  • Developed by: https://www.tii.ae ;
  • Model type: Causal decoder-only;
  • Language(s) (NLP): English;
  • License: Apache 2.0.
Model Source
Uses
Direct Use

Research on large language models, specifically the influence of adequately filtered and deduplicated web data on the properties of large language models (fairness, safety, limitations, capabilities, etc.).

Out-of-Scope Use

Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.

Broadly speaking, we would recommend Falcon- 7B / 40B for any use not directly related to research on web data pipelines.

Bias, Risks, and Limitations

Falcon-RW-1B is trained on English data only, 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-RW-1B to consider finetuning it for the specific set of tasks of interest, and for guardrails and appropriate precautions to be taken for any production use.

How to Get Started with the Model
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch

model = "tiiuae/falcon-rw-1b"

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
sequences = pipeline(
   "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:",
    max_length=200,
    do_sample=True,
    top_k=10,
    num_return_sequences=1,
    eos_token_id=tokenizer.eos_token_id,
)
for seq in sequences:
    print(f"Result: {seq['generated_text']}")
Training Details
Training Data

Falcon-RW-1B was trained on 350B tokens of RefinedWeb , a high-quality filtered and deduplicated web dataset. The data was tokenized with the GPT-2 tokenizer.

Training Procedure

Falcon-RW-1B was trained on 32 A100 40GB GPUs, using only data parallelism with ZeRO.

Training Hyperparameters

Hyperparameters were adapted from the GPT-3 paper ( Brown et al., 2020 ).

Hyperparameter Value Comment
Precision bfloat16
Optimizer AdamW
Learning rate 2e-4 500M tokens warm-up, cosine decay to 2e-5
Weight decay 1e-1
Batch size 512 4B tokens ramp-up
Speeds, Sizes, Times

Training happened in early December 2022 and took about six days.

Evaluation

See the 📓 paper on arXiv for in-depth evaluation.

Technical Specifications
Model Architecture and Objective

Falcon-RW-1B is a causal decoder-only model trained on a causal language modeling task (i.e., predict the next token).

The architecture is adapted from the GPT-3 paper ( Brown et al., 2020 ), but uses ALiBi ( Ofir et al., 2021 ) and FlashAttention ( Dao et al., 2022 ).

Hyperparameter Value Comment
Layers 24
d_model 2048
head_dim 64 Reduced to optimise for FlashAttention
Vocabulary 50304
Sequence length 2048
Compute Infrastructure
Hardware

Falcon-RW-1B was trained on AWS SageMaker, on 32 A100 40GB GPUs in P4d instances.

Software

Falcon-RW-1B 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
@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}
}
Contact

[email protected]

Runs of tiiuae falcon-rw-1b on huggingface.co

21.8K
Total runs
0
24-hour runs
986
3-day runs
3.5K
7-day runs
8.7K
30-day runs

More Information About falcon-rw-1b huggingface.co Model

More falcon-rw-1b license Visit here:

https://choosealicense.com/licenses/apache-2.0

falcon-rw-1b huggingface.co

falcon-rw-1b huggingface.co is an AI model on huggingface.co that provides falcon-rw-1b's model effect (), which can be used instantly with this tiiuae falcon-rw-1b model. huggingface.co supports a free trial of the falcon-rw-1b model, and also provides paid use of the falcon-rw-1b. Support call falcon-rw-1b model through api, including Node.js, Python, http.

falcon-rw-1b huggingface.co Url

https://huggingface.co/tiiuae/falcon-rw-1b

tiiuae falcon-rw-1b online free

falcon-rw-1b huggingface.co is an online trial and call api platform, which integrates falcon-rw-1b's modeling effects, including api services, and provides a free online trial of falcon-rw-1b, you can try falcon-rw-1b online for free by clicking the link below.

tiiuae falcon-rw-1b online free url in huggingface.co:

https://huggingface.co/tiiuae/falcon-rw-1b

falcon-rw-1b install

falcon-rw-1b is an open source model from GitHub that offers a free installation service, and any user can find falcon-rw-1b on GitHub to install. At the same time, huggingface.co provides the effect of falcon-rw-1b install, users can directly use falcon-rw-1b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

falcon-rw-1b install url in huggingface.co:

https://huggingface.co/tiiuae/falcon-rw-1b

Url of falcon-rw-1b

falcon-rw-1b huggingface.co Url

Provider of falcon-rw-1b huggingface.co

tiiuae
ORGANIZATIONS

Other API from tiiuae

huggingface.co

Total runs: 140.1K
Run Growth: 8.9K
Growth Rate: 6.34%
Updated: August 09 2024
huggingface.co

Total runs: 102.1K
Run Growth: 17.9K
Growth Rate: 17.82%
Updated: October 12 2024
huggingface.co

Total runs: 30.1K
Run Growth: 8.8K
Growth Rate: 30.23%
Updated: December 17 2024
huggingface.co

Total runs: 23.4K
Run Growth: 10.9K
Growth Rate: 47.85%
Updated: December 17 2024
huggingface.co

Total runs: 2.6K
Run Growth: -147
Growth Rate: -5.70%
Updated: November 07 2024
huggingface.co

Total runs: 1.5K
Run Growth: -3.2K
Growth Rate: -230.76%
Updated: September 06 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated: June 06 2024