Outils pour utilisateurs

Outils du site


dialogpt

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
dialogpt [2020/05/24 10:25] – [Sur le serveur] sergedialogpt [2021/09/03 05:39] (Version actuelle) – [Préalable] serge
Ligne 1: Ligne 1:
 ====== DialoGPT ====== ====== DialoGPT ======
-<WRAP center round box 80% centeralign> +<WRAP center round box 60% centeralign> 
-**{{tagpage>ia|Intelligence Artificielle}}**+**{{tagpage>ia|Intelligence Artificielle}}**     **[[http://translate.google.com/translate?hl=&sl=auto&tl=en&u=https%3A%2F%2Fressources.labomedia.org%2Fdialogpt|English Version]]** 
 +</WRAP> 
 +<WRAP center round box 60% centeralign> 
 +**[[les_pages_intelligence_artificielle_en_details|Les Pages Intelligence Artificielle en détails]]**
 </WRAP> </WRAP>
  
Ligne 24: Ligne 27:
 Par contre PyTorch Pretrained BERT est nécessaire: Par contre PyTorch Pretrained BERT est nécessaire:
 [[https://github.com/google-research/bert|Google's pre-trained models]] The Big & Extending Repository of pretrained Transformers: PyTorch version of Google AI's BERT model with script to load Google's pre-trained models. [[https://github.com/google-research/bert|Google's pre-trained models]] The Big & Extending Repository of pretrained Transformers: PyTorch version of Google AI's BERT model with script to load Google's pre-trained models.
 +  
   sudo pip3 install pytorch_pretrained_bert irc   sudo pip3 install pytorch_pretrained_bert irc
  
 +===Ubuntu 20.04===
 +~ 900Mo
 +  python3 -m pip install pytorch_pretrained_bert irc --user
 +  
 +Bien sûr, installer ces packages dans un [[virtualenv|venv]] est une bien meilleure solution.
 ====DialoGPT2-Interact==== ====DialoGPT2-Interact====
   git clone https://github.com/microsoft/DialoGPT.git   git clone https://github.com/microsoft/DialoGPT.git
Ligne 32: Ligne 41:
  
 La première execution de cette commande télécharge les fichiers nécessaires (2 Go) du modèle medium La première execution de cette commande télécharge les fichiers nécessaires (2 Go) du modèle medium
-  python3.6 interact.py --model_name_or_path ./models/medium --load_checkpoint ./models/medium/medium_ft.pkl --top_k 0+  python3 interact.py --model_name_or_path ./models/medium --load_checkpoint ./models/medium/medium_ft.pkl --top_k 0
      
 Ensuite, les relances suivantes ouvrent des prompts qui permettent de dialoguer avec l'IA. Ensuite, les relances suivantes ouvrent des prompts qui permettent de dialoguer avec l'IA.
 =====Chat Bot sur IRC===== =====Chat Bot sur IRC=====
-====Sur le serveur==== +====Sur la tour avec la carte graphique==== 
-  * Les sources des fichiers à ajouter dans le dossier DialoGPT: [[https://github.com/sergeLabo/dialogpt-irc|dialogpt-irc sur github.com/sergeLabo]]+  * Les sources des fichiers à ajouter (uniquement les *.py) dans le dossier DialoGPT: [[https://github.com/sergeLabo/dialogpt-irc|dialogpt-irc sur github.com/sergeLabo]]
  
-  python3.6 main.py --model_name_or_path ./models/medium --load_checkpoint ./models/medium/medium_ft.pkl --top_k 0  + 
-   +Options possibles: (voir la fonction run_model()) 
-Autres options possibles: (voir la fonction run_model()) +  * --top_k 0 (--top_k 1 ne va pas du tout)
-  * --top_k 1+
   * --max_history 5 # par défaut 2   * --max_history 5 # par défaut 2
   * --gpu 1 # par défaut 0   * --gpu 1 # par défaut 0
Ligne 48: Ligne 56:
  
 Test avec: Test avec:
-  python3.6 main.py --model_name_or_path ./models/medium --load_checkpoint ./models/medium/medium_ft.pkl --top_k 0 --max_history 5 --gpu 1 --max_seq_length 128+  python3 main.py --model_name_or_path ./models/medium --load_checkpoint ./models/medium/medium_ft.pkl --top_k 0 --max_history 5 --gpu 1 --max_seq_length 128
      
---top_k 1 ne va pas du tout 
  
-===Sur mon PC sans GPU=== + 
-  cd /media/data/3D/dialo_sans_gpu +
-  python3.7 main.py --model_name_or_path ./models/medium --load_checkpoint ./models/medium/medium_ft.pkl --top_k 0 +
-ou +
-  python3.7 main.py --model_name_or_path ./models/medium --load_checkpoint ./models/medium/medium_ft.pkl --top_k 0 --max_history 5 --max_seq_length 128 +
-  +
 ====Pour les clients==== ====Pour les clients====
   * Pour vous connecter à l'IRC, allez à https://kiwiirc.com/nextclient/   * Pour vous connecter à l'IRC, allez à https://kiwiirc.com/nextclient/
 +<code text> 
 +    server = "irc.libera.chat" 
 +    port = 6667 
 +    channel = "#lalabomedia" 
 +    nickname = "TheGeneral" 
 +    realname = "IA Computer at The Prisoner" 
 +</code>
 Comment envoyer un message au robot ? \\ Comment envoyer un message au robot ? \\
 Le message doit avoir cette structure: Le message doit avoir cette structure:
Ligne 68: Ligne 77:
  
  
-{{tag>ia python3 sb page_de_qualité}}+{{tag> ia python sb }}
dialogpt.1590315928.txt.gz · Dernière modification : 2020/05/24 10:25 de serge