Edit model card

 
  
    Model: PRIME 6.6B πŸ”₯
    Lang: IT
  
 

Model description

This model is a causal language model for the Italian language, based on a GPT-like [1] architecture (more specifically, the model has been obtained by modifying Meta's XGLM architecture [2] and exploiting its 7.5B checkpoint).

The model has ~6.6B parameters and a vocabulary of 50.335 tokens. It is a foundation model, pre-trained for causal language modeling, so it is mainly suitable for basic natural language generation. It also has some zero-shot and few-shots inference capabilities, but you will have to fine-tune it in order to use it on more specific downstream tasks.

Quantization

The released checkpoint is quantized in 8-bit, so that it can easily be loaded and used for training and inference on ordinary hardware like consumer GPUs, and it requires the installation of the transformers library version >= 4.30.1 and the bitsandbytes library, version >= 0.37.2

On Windows operating systems, the bitsandbytes-windows module also needs to be installed on top. However, it appears that the module is not yet updated with some recent features, like the possibility to save the 8-bit quantized models. In order to include this, you can install the fork in this repo, using:

pip install git+https://github.com/francesco-russo-githubber/bitsandbytes-windows.git

Quick usage

In order to use the model for inference, the following pipeline is needed:

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("osiria/prime-6.6b")
model = AutoModelForCausalLM.from_pretrained("osiria/prime-6.6b")

pipeline_nlg = pipeline("text-generation", model = model, tokenizer = tokenizer)
pipeline_nlg("Ciao, mi chiamo Marco Rossi e")

# [{'generated_text': 'Ciao, mi chiamo Marco Rossi e sono un fotografo professionista.'}]

Limitations

The model might behave erratically when presented with prompts which are too far away from its pre-training and, because of the probabilistic nature of its generation, it might occasionally produce biased or offensive content with respect to gender, race, ideologies, and political or religious beliefs. These limitations imply that the model and its outputs should be used with caution, and should not be involved in situations that require the generated text to be fair or true.

References

[1] https://arxiv.org/abs/2005.14165

[2] https://arxiv.org/abs/2112.10668

License

The model is released under MIT license

Downloads last month
3

Collection including osiria/prime-6.6b