jalammar
This is the first in a series of articles I'm writing to introduce devs to practical applications of large NLP language models (for text generations like GPT and for language understanding like BERT).
I have been connecting the dots between the capabilities of these models and their business application. I still believe we're in the beginning of grasping the amount of potential value we can extract from these models. Happy to get to share these as I learn them from my exposure to the problem space.
Some of the key visual language I'm aiming to simplify is that of "prompts" and their use to shape model output (leading to practical applications). In this post, a key visual is [1] which shows an example of a summarization prompt and [2] showing a high-level process of "prompt engineering".
Would appreciate your feedback!
[1] https://docs.cohere.ai/img/intro-llms/language-model-prompt.... [2] https://docs.cohere.ai/img/intro-llms/prompt-engineering-and...
Show HN: Explainable AI Cheat Sheet
You're better off either: 1- Defining common "intents" that a lot of customer queries are categorized into, and having a model map the incoming message to the appropriate canned response. Look at Rasa, for an example of this.
2- if you insist on generating the text, have it be a recommendation to a human agent that either chooses to send it or writes their own response.
If you prefer video, I have also recently released a video [1] with PyData to provide an intro to language models and their applications and how we're trying to make Transformer-based ones more transparent with Ecco[2]. Contributors are welcome!
[1] https://www.youtube.com/watch?v=rHrItfNeuh0
[2] https://www.eccox.io/ and https://github.com/jalammar/ecco
Thanks mods for merging submissions. Happy to get feedback , thoughts, or questions.
Finding the Words to Say: Hidden State Visualizations for Language Models
Thanks for digging up the screenshot. Exploring contextualize word embeddings is truly fascinating. And thanks for sharing your experience!
It should be easy, yeah. for NMF, the activations vector is reshaped from (layers, neurons, token position) down into (layers/neurons, token position). And we present that to sklearn's NMF model. I would assume UMAP would operate on that same matrix. That matrix is called 'merged_act' and is located here: https://github.com/jalammar/ecco/blob/1e957a4c1c9bd49c203993...
I do get your point on interpretation. This work is just a starting point. I'm curious to arrive at ways to automatically select the appropriate number of factors for a specific sequence. Kind of like the elbow method for K-means clustering.
I am curious about those recent O(L) attention transformers (see slide 106 of http://gabrielilharco.com/publications/EMNLP_2020_Tutorial__...). If these methods are converging towards a new self-attention mechanism, I'd love to try illustrating that.
What other attention modes are you referring to? Did something in particular catch your attention?
Thanks for your kind words! It's a labor of passion, honestly. And while in previous years it was a nights-and-weekends project, I have recently been giving it my entire time and focus -- which is why I'm able to dip my toes more heavily into R&D like Ecco and the "Explaining Transformers" article.
Scroll down to "Factorizing Activations of a Single Layer" in https://jalammar.github.io/explaining-transformers/ to see those.
The figure above it, titled 'Explorable: Ten Activation Factors of XML' shows how neuron firing patterns in response to XML -- opening tags, closing tags, and even indentation.
It's still fresh, but I'm keen to see what other people uncover in their examinations (or what shortfalls/areas of improvement there are for such a method).
Author here. I had been fascinated with Andrej Karpathy's article (https://karpathy.github.io/2015/05/21/rnn-effectiveness/) -- especially where it shows neurons being activated in response to brackets and indentation.
I built Ecco to enable examining neurons inside Transformer-based language models.
You can use Ecco to simply interact with a language model and see its output token by token(as it's built on the awesome Hugging Face transformers package). But more interestingly you can use it to examine neuron activations. The article explains more: https://jalammar.github.io/explaining-transformers/
I have a couple more visualizations I'd like to add in the future. It's open source, so feel free to help me improve it.
Show HN: Ecco – See what your NLP language model is “thinking”
Interfaces for Explaining Transformer Language Models
How GPT3 Works. Visuals and Animations
This is the first video in a series where I gently explain AI/ML with an emphasis on applications rather than the math/stats/algorithms. It's meant for the general public, but I hope it helps the practitioners understand more about where the business applications are so they can optimize their careers or startups and specialize in domains that could benefit their careers.
It's also the first video on my channel. I hope to later create videos touching on other topics in my blog (https://jalammar.github.io/), like the Illustrated Transformers, BERT, Word2vec, and others.
I hope you enjoy it. All feedback is welcome!