ipt-350m is a decoder-style transformer pretrained from scratch on ~13B tokens of Italian text (wip: trained on unfiltered oscar).
It uses a modified transformer architecture optimized for efficient training and inference. Positional embeddings are replaced with Attention with Linear Biases (ALiBi).
ipt-350m is:
Licensed for the possibility of commercial use
Prepared to handle extremely long inputs thanks to ALiBi.
Note: This model requires that trust_remote_code=True be passed to the from_pretrained method.
To use the optimized triton implementation of FlashAttention, you can load the model on GPU (cuda:0) with attn_impl='triton' and with bfloat16 precision:
Although the model was trained with a sequence length of 2048, ALiBi enables to increase the maximum sequence length during finetuning and/or inference.
python
1import transformers
23name ='efederici/ipt-350m'45config = transformers.AutoConfig.from_pretrained(name, trust_remote_code=True)6config.max_seq_len =4096# (input + output) tokens can now be up to 409678model = transformers.AutoModelForCausalLM.from_pretrained(9 name,10 config=config,11 trust_remote_code=True12)
Model Description
The architecture is a modification of a standard decoder-only transformer.
The model has been modified from a standard transformer in the following ways:
The model was trained for ~13B tokens (with batch size 64 and sequence length 2048) on OSCAR-2301.
Each example was constructed from as many sequences from that dataset as were necessary to fill the 2048 sequence length.
Vocabulary size is 50432, a multiple of 128 as suggested in MEGATRON-LM, model flop utilization (MFU) increased by up to four percentage points.