dialogpt
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
dialogpt [2020/04/25 17:15] – [Test sur Nvidia 1060 GTX] serge | dialogpt [2020/07/20 15:57] – [Sur le serveur] serge | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== DialoGPT ====== | ====== DialoGPT ====== | ||
- | <WRAP center round box 60% centeralign> | + | <WRAP center round box 80% centeralign> |
**{{tagpage> | **{{tagpage> | ||
</ | </ | ||
- | <WRAP center round box 60% centeralign > | + | <WRAP center round box 80% centeralign > |
- | **Large-scale pretraining for dialogue** | + | **Large-scale pretraining for dialogue**\\ |
+ | Encore un truc Microsoft qui ne passe pas un test de Turing en 3 questions.\\ | ||
+ | Seul point positif, il n'est pas raciste !\\ | ||
+ | Une carte graphique n'est pas nécessaire. | ||
</ | </ | ||
Ligne 14: | Ligne 17: | ||
The model is trained on 147M multi-turn dialogue from **Reddit** discussion thread. | The model is trained on 147M multi-turn dialogue from **Reddit** discussion thread. | ||
- | =====Test sur Nvidia 1060 GTX===== | ||
- | |||
- | sudo pip3 install pytorch_pretrained_bert | ||
- | Successfully installed boto3-1.12.46 botocore-1.15.46 jmespath-0.9.5 pytorch-pretrained-bert-0.6.2 regex-2020.4.4 s3transfer-0.3.3 torch-1.5.0 tqdm-4.45.0 | ||
=====Installation===== | =====Installation===== | ||
- | ====Installation de Conda==== | + | ====Préalable==== |
- | cd DialoGPT | + | Il faut installer CUDA si l' |
- | conda env create | + | |
- | | + | |
- | To activate this environment, | + | |
- | conda activate LSP | + | |
- | To deactivate an active environment, | + | |
- | conda deactivate | + | |
- | ====Install | + | |
- | Install Docker on Ubuntu Using Default Repositories | + | |
- | * https://phoenixnap.com/kb/how-to-install-docker-on-ubuntu-18-04 | + | Par contre PyTorch Pretrained BERT est nécessaire: |
+ | [[https://github.com/google-research/bert|Google' | ||
+ | sudo pip3 install | ||
- | sudo apt-get remove docker docker-engine docker.io | + | ====DialoGPT2-Interact==== |
- | | + | |
- | sudo apt install docker.io | + | |
| | ||
- | ====NVIDIA Container Toolkit==== | + | Script python supplémentaire récupéré à [[https:// |
- | * https:// | + | |
- | ====Erreur de dépendance avec libcurl==== | + | La première execution de cette commande télécharge les fichiers nécessaires (2 Go) du modèle medium |
- | * https://askubuntu.com/questions/1029273/ | + | python3.6 interact.py --model_name_or_path ./ |
+ | |||
+ | Ensuite, les relances suivantes ouvrent des prompts qui permettent de dialoguer avec l' | ||
+ | =====Chat Bot sur IRC===== | ||
+ | ====Sur le serveur==== | ||
+ | * Les sources des fichiers à ajouter dans le dossier DialoGPT: [[https://github.com/sergeLabo/dialogpt-irc|dialogpt-irc sur github.com/ | ||
- | | + | |
- | apt install | + | |
| | ||
- | ====Erreur de GPG==== | + | Autres options possibles: (voir la fonction run_model()) |
- | W: Erreur de GPG : https:// | + | * --top_k 0 (--top_k 1 ne va pas du tout) |
+ | * --max_history 5 # par défaut 2 | ||
+ | * --gpu 1 # par défaut 0 | ||
+ | * --max_seq_length 256 # par défaut 128 | ||
- | * https://github.com/NVIDIA/nvidia-docker/issues/1081 | + | Test avec: |
+ | python3.6 main.py --model_name_or_path | ||
+ | |||
+ | --top_k 1 ne va pas du tout | ||
- | curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - | + | ===Sur mon PC sans GPU=== |
+ | cd /media/data/3D/big_data/dialo_sans_gpu | ||
+ | |||
+ | --top_k 0 | ||
- | ====Test==== | + | python3.7 main.py |
- | sudo docker run nvidia/ | + | |
- | < | + | |
- | docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \" | + | |
- | ERRO[0130] error waiting for container: context canceled | + | |
- | </code> | + | |
- | erreur aussi avec: | + | --top_k 0 --max_history 5 --max_seq_length 128 |
- | sudo apt install nvidia-container-runtime | + | |
- | sudo docker run nvidia/ | + | |
- | + | ||
- | A essayer: | + | |
- | | + | |
+ | |||
+ | ====Pour les clients==== | ||
+ | * Pour vous connecter à l'IRC, allez à https:// | ||
- | mais sans le --gpus all que docker run refuse | + | Comment envoyer un message au robot ? \\ |
+ | Le message doit avoir cette structure: | ||
+ | TheGeneral: puis votre message en anglais ! | ||
+ | |||
+ | | ||
- | {{tag>ia python3 sb}} | + | {{tag>ia python3 sb page_de_qualité}} |
dialogpt.txt · Dernière modification : 2021/09/03 05:39 de serge