初始化项目,由ModelHub XC社区提供模型
Model: lightonai/pagnol-small Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
101
README.md
Normal file
101
README.md
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
---
|
||||||
|
license: mit
|
||||||
|
datasets:
|
||||||
|
- ccnet-fr
|
||||||
|
language:
|
||||||
|
- fr
|
||||||
|
tags:
|
||||||
|
- pagnol
|
||||||
|
---
|
||||||
|
|
||||||
|
# PAGnol: An Extra-Large French Generative Model
|
||||||
|
|
||||||
|
Paper: [ARXIV](https://arxiv.org/abs/2110.08554), [ACL ANTHOLOGY](https://aclanthology.org/2022.lrec-1.455/)
|
||||||
|
|
||||||
|
Code: [GITHUB](https://github.com/lightonai/lairgpt)
|
||||||
|
|
||||||
|
PAGnol is a collection of large French language models, geared towards free-form text generation. With 1.5 billion parameters. PAGnol is based on the [GPT](https://arxiv.org/abs/2005.14165) architecture. PAGnol is the first language model trained by [LightOn](https://lighton.ai/), in cooperation with the [ALMAnaCH team of Inria](http://almanach.inria.fr/index-en.html).
|
||||||
|
|
||||||
|
These model were trained in early 2021 following the then [scaling laws](https://arxiv.org/abs/2001.08361) and using the exact same training data as the [CamemBERT](https://camembert-model.fr/) model trained on [CCNet](https://github.com/facebookresearch/cc_net). We make it available for reproducibility purposes.
|
||||||
|
They do not constitute the current state of the art nor are they aiming at it.
|
||||||
|
|
||||||
|
PAGnol was built by [Julien Launay](https://lolo.science/), E.L. Tommasone, [Baptiste Pannier](https://www.linkedin.com/in/baptiste-pannier-b30758154/), [François Boniface](https://www.linkedin.com/in/fran%c3%a7ois-boniface-26313610b/), [Amélie Chatelain](https://www.instagram.com/amelietabatta/), [Iacopo Poli](https://twitter.com/iacopo_poli), and [Djamé Seddah](http://pauillac.inria.fr/~seddah/). It is named after Marcel Pagnol (with PAG standing for pré-apprentissage génératif), and was trained on the IDRIS Jean Zay supercomputer thanks to a GENCI allocation.
|
||||||
|
|
||||||
|
The model was converted to the Hugging Face format by [Wissam Antoun](https://wissamantoun.com) ([ALMAnaCH](http://almanach.inria.fr/index-en.html)'s PhD student, co-supervised by [Benoît Sagot](https://pauillac.inria.fr/~sagot/) and [Djamé Seddah](http://pauillac.inria.fr/~seddah/))
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
### Using PAGnol with Huggingface
|
||||||
|
```python
|
||||||
|
from transformers import pipeline
|
||||||
|
|
||||||
|
generator = pipeline('text-generation', model='lightonai/pagnol-small', trust_remote_code=True)
|
||||||
|
|
||||||
|
output = generator(
|
||||||
|
"Salut PAGnol, comment ça va ?",
|
||||||
|
max_length=50,
|
||||||
|
do_sample=True,
|
||||||
|
temperature=0.7,
|
||||||
|
)[0]["generated_text"]
|
||||||
|
|
||||||
|
>>> "Très bien! Les jours d’été sont là ! Bientôt les premiers festivals..."
|
||||||
|
```
|
||||||
|
|
||||||
|
### Using PAGnol with lairgpt
|
||||||
|
Head over to our [GitHub repository](https://github.com/lightonai/lairgpt) to access our PyTorch inference code.
|
||||||
|
Using PAGnol is as simple as running the following code:
|
||||||
|
```python
|
||||||
|
from lairgpt.models import PAGnol
|
||||||
|
|
||||||
|
pagnol = PAGnol.small()
|
||||||
|
pagnol("Salut PAGnol, comment ça va ?")
|
||||||
|
|
||||||
|
>>> "Très bien! Les jours d’été sont là ! Bientôt les premiers festivals..."
|
||||||
|
```
|
||||||
|
|
||||||
|
# License
|
||||||
|
PAGnol is made available under the MIT licence: by downloading the models available below, you agree with the terms of the MIT licence agreement. Under no circumstances will LightOn and/or Inria be held responsible or liable in any way for any claims, damages, losses, expenses, costs or liabilities whatsoever (including, without limitation, any direct or indirect damages for loss of profits, business interruption or loss of information) resulting or arising directly or indirectly from your use of or inability to use PAGnol.
|
||||||
|
|
||||||
|
# Available Models
|
||||||
|
- [`lightonai/pagnol-small`](https://huggingface.co/lightonai/pagnol-small): 125M parameters
|
||||||
|
- [`lightonai/pagnol-medium`](https://huggingface.co/lightonai/pagnol-medium): 355M parameters
|
||||||
|
- [`lightonai/pagnol-large`](https://huggingface.co/lightonai/pagnol-large): 773M parameters
|
||||||
|
- [`lightonai/pagnol-xl`](https://huggingface.co/lightonai/pagnol-xl): 1.5B parameters
|
||||||
|
|
||||||
|
# Citation
|
||||||
|
```
|
||||||
|
@inproceedings{launay-etal-2022-pagnol,
|
||||||
|
title = "{PAG}nol: An Extra-Large {F}rench Generative Model",
|
||||||
|
author = "Launay, Julien and
|
||||||
|
Tommasone, E.l. and
|
||||||
|
Pannier, Baptiste and
|
||||||
|
Boniface, Fran{\c{c}}ois and
|
||||||
|
Chatelain, Am{\'e}lie and
|
||||||
|
Cappelli, Alessandro and
|
||||||
|
Poli, Iacopo and
|
||||||
|
Seddah, Djam{\'e}",
|
||||||
|
editor = "Calzolari, Nicoletta and
|
||||||
|
B{\'e}chet, Fr{\'e}d{\'e}ric and
|
||||||
|
Blache, Philippe and
|
||||||
|
Choukri, Khalid and
|
||||||
|
Cieri, Christopher and
|
||||||
|
Declerck, Thierry and
|
||||||
|
Goggi, Sara and
|
||||||
|
Isahara, Hitoshi and
|
||||||
|
Maegaard, Bente and
|
||||||
|
Mariani, Joseph and
|
||||||
|
Mazo, H{\'e}l{\`e}ne and
|
||||||
|
Odijk, Jan and
|
||||||
|
Piperidis, Stelios",
|
||||||
|
booktitle = "Proceedings of the Thirteenth Language Resources and Evaluation Conference",
|
||||||
|
month = jun,
|
||||||
|
year = "2022",
|
||||||
|
address = "Marseille, France",
|
||||||
|
publisher = "European Language Resources Association",
|
||||||
|
url = "https://aclanthology.org/2022.lrec-1.455",
|
||||||
|
pages = "4275--4284",
|
||||||
|
}
|
||||||
|
```
|
||||||
|
# Contact
|
||||||
|
For research enquiries: pagnol@lighton.ai
|
||||||
|
For business enquiries: customer.relations@lighton.ai
|
||||||
32
config.json
Normal file
32
config.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"activation_function": "gelu",
|
||||||
|
"add_prefix_space": true,
|
||||||
|
"architectures": [
|
||||||
|
"GPT2LMHeadModel"
|
||||||
|
],
|
||||||
|
"attn_pdrop": 0.1,
|
||||||
|
"bos_token_id": 1,
|
||||||
|
"embd_pdrop": 0.1,
|
||||||
|
"eos_token_id": 1,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"layer_norm_epsilon": 1e-05,
|
||||||
|
"model_type": "gpt2",
|
||||||
|
"n_embd": 768,
|
||||||
|
"n_head": 12,
|
||||||
|
"n_inner": null,
|
||||||
|
"n_layer": 12,
|
||||||
|
"n_positions": 1024,
|
||||||
|
"reorder_and_upcast_attn": false,
|
||||||
|
"resid_pdrop": 0.1,
|
||||||
|
"scale_attn_by_inverse_layer_idx": false,
|
||||||
|
"scale_attn_weights": true,
|
||||||
|
"summary_activation": null,
|
||||||
|
"summary_first_dropout": 0.1,
|
||||||
|
"summary_proj_to_labels": true,
|
||||||
|
"summary_type": "cls_index",
|
||||||
|
"summary_use_proj": true,
|
||||||
|
"torch_dtype": "float32",
|
||||||
|
"transformers_version": "4.26.0",
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 50262
|
||||||
|
}
|
||||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||||
3
pytorch_model.bin
Normal file
3
pytorch_model.bin
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:522744484cd222a0a30c2c2b383c5d64efe7b2b76522327d8e6341d220c8c45e
|
||||||
|
size 510407273
|
||||||
1
tokenizer.json
Normal file
1
tokenizer.json
Normal file
File diff suppressed because one or more lines are too long
52
tokenizer_config.json
Normal file
52
tokenizer_config.json
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"tokenizer_class": "GPT2TokenizerFast",
|
||||||
|
"eos_token": {
|
||||||
|
"content": "<EOS>",
|
||||||
|
"single_word": false,
|
||||||
|
"lstrip": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"__type": "AddedToken"
|
||||||
|
},
|
||||||
|
"unk_token": {
|
||||||
|
"content": "<UNK>",
|
||||||
|
"single_word": false,
|
||||||
|
"lstrip": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"__type": "AddedToken"
|
||||||
|
},
|
||||||
|
"pad_token": {
|
||||||
|
"content": "<PAD>",
|
||||||
|
"single_word": false,
|
||||||
|
"lstrip": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"__type": "AddedToken"
|
||||||
|
},
|
||||||
|
"bos_token": {
|
||||||
|
"content": "<EOS>",
|
||||||
|
"single_word": false,
|
||||||
|
"lstrip": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"__type": "AddedToken"
|
||||||
|
},
|
||||||
|
"sep_token": {
|
||||||
|
"content": "<SEP>",
|
||||||
|
"single_word": false,
|
||||||
|
"lstrip": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"__type": "AddedToken"
|
||||||
|
},
|
||||||
|
"mask_token": {
|
||||||
|
"content": "<MASK>",
|
||||||
|
"single_word": false,
|
||||||
|
"lstrip": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"__type": "AddedToken"
|
||||||
|
},
|
||||||
|
"model_max_length": 2048
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user