SPB Git

Repository Public License Research preview

S01-F04-boucle-generation.tex 1.9 KB 32 lines latex

1% S01-F04 — La génération autorégressive : prédire, choisir, ajouter, recommencer jusqu'à un critère d'arrêt.2% Exemple réel : démonstration, contexte de 2 mots, graine 1 → « le chat dort sur le tapis . »3\begin{tikzpicture}[x=1mm, y=1mm]4  % Texte en cours5  \node[atlas note, anchor=south west] at (0,37.5) {Texte produit jusqu'ici};6  \AtlasTokenRow{t}{(0,33)}{le,chat,dort}7  \node[atlas token ghost] (new) at ([xshift=9.5mm]t-3.east) {sur};8  \node[atlas note, anchor=west] at ([xshift=1.5mm]new.east) {nouveau mot};9  % Étapes10  \node[atlas block flow, text width=27mm, minimum height=14mm] (p) at (17,13)11    {\textbf{Prédire}\\ une probabilité pour chaque mot possible};12  \node[atlas block flow, text width=25mm, minimum height=14mm] (c) at (55,13)13    {\textbf{Choisir}\\ tirer un mot selon ces probabilités};14  \node[atlas block flow, text width=23mm, minimum height=14mm] (a) at (90,13)15    {\textbf{Ajouter}\\ le mot rejoint le texte};16  \node[atlas gate, text width=13mm] (g) at (122,13) {Arrêt ?};17  \node[atlas step] at (p.north west) {1};18  \node[atlas step] at (c.north west) {2};19  \node[atlas step] at (a.north west) {3};20  \node[atlas step=atlasUncertain] at (112.5,20.5) {4};21  \draw[atlas arrow] (p) -- (c);22  \draw[atlas arrow] (c) -- (a);23  \draw[atlas arrow] (a) -- (g);24  \draw[atlas arrow] (t-2.south) -- (t-2.south |- p.north);25  \draw[atlas arrow] (a.north) |- (new.east |- 0,27) -| (new.south);26  % Sorties du critère d'arrêt27  \node[atlas block valid, text width=17mm] (fin) at (122,35) {Texte final};28  \draw[atlas arrow valid] (g.north) -- node[atlas note, right] {oui} (fin.south);29  \draw[atlas arrow] (g.south) -- ++(0,-6.5) -| node[atlas note, pos=.25, above] {non : on recommence avec le texte allongé} (p.south);30  \node[atlas note, anchor=north east, align=right] at (131,-1.8) {Critère d'arrêt : point final ou longueur maximale atteinte};31\end{tikzpicture}32
Files main
Menu

Theme