Carousel Studio

Repurpose X Threads into LinkedIn & Instagram Carousels

Canvas & Ratio

Choose your destination platform format


Layout Template

Choose a content structure for your slides


Preset Themes


Typography & Sizing

Title Font Size36px
Body Font Size18px
Header & Footer Size12px

Brand Kit Customization

AGENCY

Configure brand assets for headers & footers

MULTI-PROFILES (AGENCY)
AGENCY
SAVE PRESETS (AGENCY)

Outro Slide CTA

Customize your closing call-to-action slide

#1
#2
#3

Background Pattern

Source Content

Build Your Carousel

Drag and drop any post card below onto a slide, or use the quick buttons to insert content/images instantly!

Drag Post #1
Akshay ๐Ÿš€
@akshay_pachaar

How LLMs understand relative positions of input words, clearly explained:

Drag Post #2
Akshay ๐Ÿš€
@akshay_pachaar

RoPE (Rotary Positional Embeddings) revolutionised the way positional information is encoded in LLMs and it's widely used by models like Llama-3. Today, I'll clearly explain what they are & how positional embeddings evolved over time. Let's go! ๐Ÿš€

Apply Image
Drag Post #3
Akshay ๐Ÿš€
@akshay_pachaar

Why Positional embeddingsโ“ Let's first understand the concept of positional embeddings and why they are essential in the first place. Without positional embeddings a transformer doesn't understand the relative arrangement of words in a sentence.

Apply Image
Drag Post #4
Akshay ๐Ÿš€
@akshay_pachaar

Absolute Positional embeddings So, let's start with the simplest way to encode position of tokens (words) in an input.

Apply Image
Drag Post #5
Akshay ๐Ÿš€
@akshay_pachaar

Problem with absolute positional embeddings! โš ๏ธ Each positional embedding is independent of each other, they don't capture relative arrangements/positioning. Check this out๐Ÿ‘‡

Apply Image
Drag Post #6
Akshay ๐Ÿš€
@akshay_pachaar

Next up, let's talk about relative positional embeddings! They definitely overcome the limitations of absolute positional embeddings, but they come with the drawback of increased parameters. For a sequence of length N, we require 2N+1 positional embeddings.

Apply Image
Drag Post #7
Akshay ๐Ÿš€
@akshay_pachaar

Introducing Rotary Positional Embeddings (RoPE), the best of both worlds! Instead of adding a token & its positional embedding, we rotate the token embedding by a fixed factor (theta) depending on its position in the sequence. Imagine our token embeddings are 2-dimensional!

Apply Image
Drag Post #8
Akshay ๐Ÿš€
@akshay_pachaar

RoPE preserves relative position and relation. For example, in the scenario below, the embedding vectors for the words 'love' and 'Tennis' will have the same cosine similarity as long as their relative positions stay the same, regardless of the sequence length. Check this out๐Ÿ‘‡

Apply Image
Drag Post #9
Akshay ๐Ÿš€
@akshay_pachaar

Mathematical representation. This can be easily generalised to N dimensions by taking a pair at a time. (I have also shared my detailed blog on self-attention at the end) Check this out๐Ÿ‘‡

Apply Image
Drag Post #10
Akshay ๐Ÿš€
@akshay_pachaar

If you interested in: - Python ๐Ÿ - ML/AI Engineering โš™๏ธ 1. Find me โ†’ @akshay_pachaar โœ”๏ธ 2. Subscribe to our Newsletter โ†’ @DailyDoseOfDS_ and get a FREE eBook, covering 150+ core DS/ML lessons! Cheers!