How a Machine ThinksCómo piensa una máquina

Page 1Página 1

Guess the next wordAdivina la siguiente palabra

This is a real AI, and it runs right here on your phone or computer. It learned one single trick: guessing what comes next. Esta es una IA de verdad, y funciona aquí mismo, en tu teléfono o tu computadora. Aprendió un solo truco: adivinar qué palabra sigue.

You already know a cousin of this. When you text, your phone keyboard suggests the next word. An AI chatbot works the same way, only much, much bigger: it writes its whole answer one guess at a time. Seguro ya conoces algo parecido. Cuando mandas un mensaje, el teclado del teléfono te sugiere la siguiente palabra. Un chatbot de IA hace lo mismo, pero en grande: escribe toda su respuesta adivinando una palabra a la vez.

Try itPruébala

Pick a brain. Each one is a separate little AI.Escoge un cerebro. Cada uno es una IA chiquita distinta.

The AI has to download to your device first. It only does this once. After that it opens fast, and what you type never leaves your device. Primero la IA tiene que bajarse a tu aparato. Eso pasa solo una vez. Después abre rápido, y lo que escribes nunca sale de tu aparato.

Tip: use Wi-Fi if your phone plan has limited data.Consejo: usa wifi si tu plan de datos es limitado.

What's going on in there?¿Qué está pasando ahí adentro?

  1. It chops your words into pieces. Short words stay whole. Long or rare words get split, like "un + believ + able." These pieces are called tokens. Corta tus palabras en pedacitos. Las palabras cortas quedan enteras. Las largas o raras se parten, como "in + creí + ble". A esos pedacitos les dicen tokens.

  2. It gives every possible piece a chance. It knows about 50,000 pieces, and every single one gets a score. The bars show you only the top 8. Le da una probabilidad a cada pedacito posible. Conoce unos 50,000 pedacitos y le pone una calificación a cada uno. Las barras te enseñan solo los 8 más altos.

  3. It picks one, adds it, and starts over. Then it reads everything again, new piece included, and guesses again. That loop is how every chatbot writes, even the big famous ones. Escoge uno, lo agrega y vuelve a empezar. Lee todo otra vez, con el pedacito nuevo, y vuelve a adivinar. Así escribe cualquier chatbot, hasta los más grandes y famosos.

Notice what is not on that list: looking anything up. It doesn't check a book or the internet. It just knows which words tend to follow which, from the text it read while it was learning. Fíjate en lo que no está en la lista: buscar información. No revisa un libro ni el internet. Nada más sabe qué palabras suelen ir después de otras, por todo lo que leyó cuando estaba aprendiendo.

A guess that starts with "…" finishes the last word instead of starting a new one. Una opción que empieza con "…" termina la última palabra en vez de empezar una nueva.

Things to tryCosas que puedes probar

The honest fine printLa letra chiquita, con honestidad

These two models are tiny and old on purpose, so they fit on a phone. The English one, DistilGPT-2, has about 82 million adjustable numbers and learned from web pages collected around 2019. The Spanish one, GPT-2 Spanish, has about 117 million and learned from Spanish Wikipedia, novels, stories, plays, poems and essays. The chatbots people use today are hundreds or thousands of times bigger. Estos dos modelos son chiquitos y viejitos a propósito, para que quepan en un teléfono. El de inglés, DistilGPT-2, tiene unos 82 millones de números ajustables y aprendió de páginas web juntadas por ahí del 2019. El de español, GPT-2 Spanish, tiene unos 117 millones y aprendió de Wikipedia en español, novelas, cuentos, obras de teatro, poemas y ensayos. Los chatbots que usa la gente hoy son cientos o miles de veces más grandes.

Because they learned from all kinds of text, they can say strange, wrong or rude things. This page hides a short list of rude words from the guesses, but it can't catch everything. Como aprendieron de todo tipo de textos, pueden decir cosas raras, equivocadas o groseras. Esta página esconde una lista corta de groserías, pero no las atrapa todas.

The model files come from Hugging Face, a public library of AI models. The math runs in your browser with Transformers.js. Los archivos de los modelos vienen de Hugging Face, una biblioteca pública de modelos de IA. Los cálculos corren en tu navegador con Transformers.js.

Next: page 2Sigue: página 2 Why an AI can be confidently wrongPor qué una IA puede equivocarse con seguridad