Views
No views yet
fairseq library (v0.12.2) and converted to HuggingFace's transformers format. For best compatibility, we recommend using transformers==4.57.0 or 4.56.2, together with tokenizers==0.22.1 and sentencepiece==0.1.99.camtok in their name use CamemBERT's tokenizer, which is used for comparison our models to a BERT-based counterpart. If no tokenizer is specified, the model uses our custom tokenizer. All text-based models are trained using the data2vec 2.0 masked feature prediction objective. Models with an MLM suffix additionally incorporate the masked language modeling (MLM) objective alongside the main data2vec 2.0 objective.| HuggingFace name | Model name (paper) | Arch/ Params | Pretrained dataset | Accuracy on XNLI (FR) (dev / test) |
|---|---|---|---|---|
| text-base-camtok-wiki | Pantagruel-B-camtok-Wk | Base / 110M | French Wikipedia 2019 (4GB) | 76.94% / 77.43% |
| text-base-wiki | Pantagruel-B-Wk | Base / 125M | French Wikipedia 2019 (4GB) | 77.40% / 78.41% |
| text-base-wiki-mlm | Pantagruel-B-Wk-MLM | Base / 125M | French Wikipedia 2019 (4GB) | 78.25% / 78.41% |
| text-base-camtok-oscar | Pantagruel-B-camtok-Osc | Base / 110M | OSCAR 2019 (138GB) | 80.40% / 80.53% |
| text-base-oscar-mlm | Pantagruel-B-Osc-MLM | Base / 125M | OSCAR 2019 (138GB) | 81.11% / 81.52% |
| text-base-croissant-mlm | Pantagruel-B-Crs-MLM | Base / 125M | croissantLLM (1.5GB) | 81.05% / 80.69% |
AutoModel and AutoConfig classes to extract features as below. Other common classes for text-related downstream tasks, including AutoModelForMaskedLM, AutoModelForSequenceClassification, AutoModelForMultipleChoice, AutoModelForTokenClassification, and AutoModelForQuestionAnswering are also supported. We are currently working to merge the modeling files into the official Hugging Face repository, which will enable native use of the Pantagruel classes.1import torch
2from transformers import AutoTokenizer, AutoModel
3
4# Load the tokenizer and model
5model_name = "PantagrueLLM/text-base-croissant-mlm"
6tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
7model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
8model.eval()
9
10# Example input
11sentences = [
12 "Bonjour, comment allez-vous ?",
13 "Le chat dort sur le tapis."
14]
15
16# Tokenize input
17inputs = tokenizer(
18 sentences,
19 padding=True,
20 truncation=True,
21 return_tensors="pt"
22)
23
24# Forward pass to get hidden states
25with torch.no_grad():
26 outputs = model(**inputs)
27
28# Token-level embeddings
29token_embeddings = outputs.last_hidden_state
30print(token_embeddings.shape)
31# Shape: (batch_size, sequence_length, hidden_size)1@article{le2026pantagruel,
2 title={Pantagruel: Unified Self-Supervised Encoders for French Text and Speech},
3 author={Le, Phuong-Hang and Pelloin, Valentin and Chatelain, Arnault and Bouziane, Maryem and Ghennai, Mohammed and Guan, Qianwen and Milintsevich, Kirill and Mdhaffar, Salima and Mannion, Aidan and Defauw, Nils and others},
4 journal={arXiv preprint arXiv:2601.05911},
5 year={2026}
6}