Take a look inside the Twitter algorithm now that it has been released as open-source code.  Why would Elon Musk would make a decision like this from a strategic business perspective?

#programming #tech #TheCodeReport

💬 Chat with Me on Discord

https://discord.gg/fireship

🔗 Resources

The Algorithm https://github.com/twitter/the-algorithm
Twitter Eng Blog https://blog.twitter.com/engineering/en_us/topics/open-source/2023/twitter-recommendation-algorithm
Elon want's GPT-5 stopped https://youtu.be/TpZcGhYp4rw

🔥 Get More Content - Upgrade to PRO

Upgrade at https://fireship.io/pro
Use code YT25 for 25% off PRO access 

🎨 My Editor Settings

- Atom One Dark 
- vscode-icons
- Fira Code Font

🔖 Topics Covered

- Is Twitter open-source?
- Controversial code inside twitter algorithm
- Elon Musk strategy to dominate the news media
- Twitter written with Scala and Java
2024-02-04T13:26:52.303Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
dbdca35f-02bf-431a-8ceb-0ad38ef5bc8d
8cf6ec4fb08c1a7765523db7395eb1c7448a7662fb5d6ba8904aacd54d661f4c
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
It is April 3, 2023, and you're watching the Code Report.
Less than 6 months ago, Elon Musk paid $44,000,000,000 for Twitter, and people have been dunking on him ever since.
He fired half the company, gave blue check marks to the peasants, and freed a bunch of people from Twitter jail.
Do not come.
Do not come.
I'm gonna come.
In some ways, it looks like Twitter is collapsing.
It's now only worth $20,000,000,000, many users have moved to Mastodon, on the New York Times just lost its blue check, and even LeBron James won't pay the 5.
So did Elon buy Twitter just to be the king and watch it burn?
Or is he actually playing a game of 5 d chess against the mainstream news media, like the Fox News and CNN channels that your grandparents watch.
He's playing the long game to take their advertisers by making Twitter the future platform for all journalism.
And if he plays his moves right, I predict he will become the richest man in the world, even richer than Elon Musk himself.
Yesterday, he made a crazy removed by open sourcing the code to Twitter's recommendation algorithm, and it's some of the most interesting code you'll ever see.
In today's video, we'll dissect the code and explain why they want to make Twitter like the Linux of on media companies.
Well, kind of.
Although it is real production code at Twitter, it's not 100% of the code, so it's really only useful for research and transparency.
The code base is mostly written in Scala, a JVM language that's kind of like Java, but concise and just way better.
Twitter was originally written with Ruby on Rails, but they moved away from it over a decade ago.
Everybody already kind of knows how these algorithms work, but it's extremely interesting to see the real deal implemented in code.
Like this method in the early bird web based similarity engine dot Scala file.
We have a bunch of ranking parameters, each with a default value.
Retweets provide a 20 x boost, while likes provide a 30 x boost.
And images and videos also provide a small boost.
And not surprisingly, you also get a boost for being a paying Twitter Blue member.
Like I said, the New York Times just lost its blue check mark, and now it's not verified, so it could just be a cap behind the screen.
On the flip side, a tweet can get a debuff if the account has a lot of mutes, blocks, or spam reports.
Also, though spelling errors and made up words will give you a debuff.
And there's also a long list of topics that won't be amplified, like anything that's been flagged as misinformation, harassment, putting bounties on people's heads and many other no nos.
The platform also keeps close track of elections, and there's actually tools in place like this government requested class that allows president Camacho to keep you save from bad content.
But taking a step back, we can break the total algorithm into 3 parts.
1st, it finds a pool of 1500 tweets that you might be interested in using a technique called candidate sourcing.
It includes accounts you follow, but also out of network sources by clustering similar accounts together, allowing it to find relevant tweets from accounts that you don't follow yet.
From there, it ranks that pool of tweets with a 48,000,000 parameter neural network, and then finally, it filters out content by static rules, like accounts that you've blocked or muted.
There's also a second repo called the algorithm ML that contains the machine learning models used at Twitter.
The project uses PyTorch, and they actually created their own in house embeddings that contain over a 1000000000 nodes and 100 of billions of edges.
On the home feed, it uses something called the heavy ranker, but some people have criticized for amplifying misinformation.
The most controversial block of code though was this one here that keeps track of whether or not an author is a Democrat or Republican or whether it's Elon or a power user, but apparently this code is only used for collecting metrics, but has already been removed.
One thing that's not found in the source code though is its apparent juicing of VIP accounts, like AOC on the left and CatTurd on the right, which was reported by Platformer.
The code is highly interesting, and I recommend you clone it and check it out yourself, but why would Elon do this?
Why would he release his trade secrets to the public.
It kinda makes Twitter like the Linux of social media.
The public can identify things that are unfair in the algorithm and address them in public.
It's mostly a marketing move to build trust.
It no longer feels like it's run by a mysterious cabal that can shadow ban and deboose content without some degree of transparency, and there's a huge opportunity here because the trust in mainstream media has fallen so low.
Many people already use Twitter to consume the news, and although Twitter is currently losing money, they've talked about compensating content creators just like YouTube and other platforms do.
When that happens, journalists could potentially make a living on Twitter and put their best content there.
Elon knows Twitter Blue is never going make Twitter any money, but rather it's designed to uplift independent creators while embarrassing the establishment.
The blue checks are now irrelevant, and by open sourcing the code, Twitter is laying the groundwork
for it to become the fair and balanced, most trusted name in news, and this may force other social media platforms to become more
transparent, putting Elon's balls in Zuckerberg's court.
This has been the Code Report.
Thanks for Shane, and I will see you in the next one.

Speaker 0: It is April 3, 2023, and you're watching the Code Report. Less than 6 months ago, Elon Musk paid $44,000,000,000 for Twitter, and people have been dunking on him ever since. He fired half the company, gave blue check marks to the peasants, and freed a bunch of people from Twitter jail. Do not come. Do not come.

Speaker 1: I'm gonna come.

Speaker 0: In some ways, it looks like Twitter is collapsing. It's now only worth $20,000,000,000, many users have moved to Mastodon, on the New York Times just lost its blue check, and even LeBron James won't pay the 5. So did Elon buy Twitter just to be the king and watch it burn? Or is he actually playing a game of 5 d chess against the mainstream news media, like the Fox News and CNN channels that your grandparents watch. He's playing the long game to take their advertisers by making Twitter the future platform for all journalism.

And if he plays his moves right, I predict he will become the richest man in the world, even richer than Elon Musk himself. Yesterday, he made a crazy removed by open sourcing the code to Twitter's recommendation algorithm, and it's some of the most interesting code you'll ever see. In today's video, we'll dissect the code and explain why they want to make Twitter like the Linux of on media companies. Well, kind of. Although it is real production code at Twitter, it's not 100% of the code, so it's really only useful for research and transparency.

The code base is mostly written in Scala, a JVM language that's kind of like Java, but concise and just way better. Twitter was originally written with Ruby on Rails, but they moved away from it over a decade ago. Everybody already kind of knows how these algorithms work, but it's extremely interesting to see the real deal implemented in code. Like this method in the early bird web based similarity engine dot Scala file. We have a bunch of ranking parameters, each with a default value.

Retweets provide a 20 x boost, while likes provide a 30 x boost. And images and videos also provide a small boost. And not surprisingly, you also get a boost for being a paying Twitter Blue member. Like I said, the New York Times just lost its blue check mark, and now it's not verified, so it could just be a cap behind the screen. On the flip side, a tweet can get a debuff if the account has a lot of mutes, blocks, or spam reports.

Also, though spelling errors and made up words will give you a debuff. And there's also a long list of topics that won't be amplified, like anything that's been flagged as misinformation, harassment, putting bounties on people's heads and many other no nos. The platform also keeps close track of elections, and there's actually tools in place like this government requested class that allows president Camacho to keep you save from bad content. But taking a step back, we can break the total algorithm into 3 parts. 1st, it finds a pool of 1500 tweets that you might be interested in using a technique called candidate sourcing.

It includes accounts you follow, but also out of network sources by clustering similar accounts together, allowing it to find relevant tweets from accounts that you don't follow yet. From there, it ranks that pool of tweets with a 48,000,000 parameter neural network, and then finally, it filters out content by static rules, like accounts that you've blocked or muted. There's also a second repo called the algorithm ML that contains the machine learning models used at Twitter. The project uses PyTorch, and they actually created their own in house embeddings that contain over a 1000000000 nodes and 100 of billions of edges. On the home feed, it uses something called the heavy ranker, but some people have criticized for amplifying misinformation.

The most controversial block of code though was this one here that keeps track of whether or not an author is a Democrat or Republican or whether it's Elon or a power user, but apparently this code is only used for collecting metrics, but has already been removed. One thing that's not found in the source code though is its apparent juicing of VIP accounts, like AOC on the left and CatTurd on the right, which was reported by Platformer. The code is highly interesting, and I recommend you clone it and check it out yourself, but why would Elon do this? Why would he release his trade secrets to the public. It kinda makes Twitter like the Linux of social media.

The public can identify things that are unfair in the algorithm and address them in public. It's mostly a marketing move to build trust. It no longer feels like it's run by a mysterious cabal that can shadow ban and deboose content without some degree of transparency, and there's a huge opportunity here because the trust in mainstream media has fallen so low. Many people already use Twitter to consume the news, and although Twitter is currently losing money, they've talked about compensating content creators just like YouTube and other platforms do. When that happens, journalists could potentially make a living on Twitter and put their best content there.

Elon knows Twitter Blue is never going make Twitter any money, but rather it's designed to uplift independent creators while embarrassing the establishment. The blue checks are now irrelevant, and by open sourcing the code, Twitter is laying the groundwork

Speaker 1: for it to become the fair and balanced, most trusted name in news, and this may force other social media platforms to become more

Speaker 0: transparent, putting Elon's balls in Zuckerberg's court. This has been the Code Report. Thanks for Shane, and I will see you in the next one.
It is April 3, 2023, and you're watching the Code Report. Less than 6 months ago, Elon Musk paid $44,000,000,000 for Twitter, and people have been dunking on him ever since.
He fired half the company, gave blue check marks to the peasants, and freed a bunch of people from Twitter jail. Do not come. Do not come. I'm gonna come. In some ways, it looks like Twitter is collapsing. It's now only worth $20,000,000,000, many users have moved to Mastodon, on the New York Times just lost its blue check, and even LeBron James won't pay the 5. So did Elon buy Twitter just to be the king and watch it burn? Or is he actually playing a game of 5 d chess against the mainstream news media, like the Fox News and CNN channels that your grandparents watch. He's playing the long game to take their advertisers by making Twitter the future platform for all journalism.
twitter
social media
And if he plays his moves right, I predict he will become the richest man in the world, even richer than Elon Musk himself.
Yesterday, he made a crazy removed by open sourcing the code to Twitter's recommendation algorithm, and it's some of the most interesting code you'll ever see. In today's video, we'll dissect the code and explain why they want to make Twitter like the Linux of on media companies. Well, kind of. Although it is real production code at Twitter, it's not 100% of the code, so it's really only useful for research and transparency. The code base is mostly written in Scala, a JVM language that's kind of like Java, but concise and just way better. Twitter was originally written with Ruby on Rails, but they moved away from it over a decade ago. Everybody already kind of knows how these algorithms work, but it's extremely interesting to see the real deal implemented in code. Like this method in the early bird web based similarity engine dot Scala file. We have a bunch of ranking parameters, each with a default value. Retweets provide a 20 x boost, while likes provide a 30 x boost. And images and videos also provide a small boost. And not surprisingly, you also get a boost for being a paying Twitter Blue member. Like I said, the New York Times just lost its blue check mark, and now it's not verified, so it could just be a cap behind the screen.
twitter
social media
On the flip side, a tweet can get a debuff if the account has a lot of mutes, blocks, or spam reports. Also, though spelling errors and made up words will give you a debuff. And there's also a long list of topics that won't be amplified, like anything that's been flagged as misinformation, harassment, putting bounties on people's heads and many other no nos. The platform also keeps close track of elections, and there's actually tools in place like this government requested class that allows president Camacho to keep you save from bad content. But taking a step back, we can break the total algorithm into 3 parts. 1st, it finds a pool of 1500 tweets that you might be interested in using a technique called candidate sourcing. It includes accounts you follow, but also out of network sources by clustering similar accounts together, allowing it to find relevant tweets from accounts that you don't follow yet. From there, it ranks that pool of tweets with a 48,000,000 parameter neural network, and then finally, it filters out content by static rules, like accounts that you've blocked or muted. There's also a second repo called the algorithm ML that contains the machine learning models used at Twitter. The project uses PyTorch, and they actually created their own in house embeddings that contain over a 1000000000 nodes and 100 of billions of edges. On the home feed, it uses something called the heavy ranker, but some people have criticized for amplifying misinformation.
twitter
machine learning
elections
neural networks
political science
politics
artificial intelligence
deep learning
democracy
social media
government
The most controversial block of code though was this one here that keeps track of whether or not an author is a Democrat or Republican or whether it's Elon or a power user, but apparently this code is only used for collecting metrics, but has already been removed. One thing that's not found in the source code though is its apparent juicing of VIP accounts, like AOC on the left and CatTurd on the right, which was reported by Platformer. The code is highly interesting, and I recommend you clone it and check it out yourself, but why would Elon do this? Why would he release his trade secrets to the public.
It kinda makes Twitter like the Linux of social media. The public can identify things that are unfair in the algorithm and address them in public. It's mostly a marketing move to build trust. It no longer feels like it's run by a mysterious cabal that can shadow ban and deboose content without some degree of transparency, and there's a huge opportunity here because the trust in mainstream media has fallen so low. Many people already use Twitter to consume the news, and although Twitter is currently losing money, they've talked about compensating content creators just like YouTube and other platforms do. When that happens, journalists could potentially make a living on Twitter and put their best content there. Elon knows Twitter Blue is never going make Twitter any money, but rather it's designed to uplift independent creators while embarrassing the establishment. The blue checks are now irrelevant, and by open sourcing the code, Twitter is laying the groundwork for it to become the fair and balanced, most trusted name in news, and this may force other social media platforms to become more transparent, putting Elon's balls in Zuckerberg's court. This has been the Code Report.
social media
twitter
media
youtube
internet
pornography
google
Thanks for Shane, and I will see you in the next one.
It is April 3, 2023, and you're watching the Code Report. Less than 6 months ago, Elon Musk paid $44,000,000,000 for Twitter, and people have been dunking on him ever since. He fired half the company, gave blue check marks to the peasants, and freed a bunch of people from Twitter jail. Do not come. Do not come. I'm gonna come. In some ways, it looks like Twitter is collapsing. It's now only worth $20,000,000,000, many users have moved to Mastodon, on the New York Times just lost its blue check, and even LeBron James won't pay the 5. So did Elon buy Twitter just to be the king and watch it burn? Or is he actually playing a game of 5 d chess against the mainstream news media, like the Fox News and CNN channels that your grandparents watch. He's playing the long game to take their advertisers by making Twitter the future platform for all journalism. And if he plays his moves right, I predict he will become the richest man in the world, even richer than Elon Musk himself. Yesterday, he made a crazy removed by open sourcing the code to Twitter's recommendation algorithm, and it's some of the most interesting code you'll ever see. In today's video, we'll dissect the code and explain why they want to make Twitter like the Linux of on media companies. Well, kind of. Although it is real production code at Twitter, it's not 100% of the code, so it's really only useful for research and transparency. The code base is mostly written in Scala, a JVM language that's kind of like Java, but concise and just way better. Twitter was originally written with Ruby on Rails, but they moved away from it over a decade ago. Everybody already kind of knows how these algorithms work, but it's extremely interesting to see the real deal implemented in code. Like this method in the early bird web based similarity engine dot Scala file. We have a bunch of ranking parameters, each with a default value. Retweets provide a 20 x boost, while likes provide a 30 x boost. And images and videos also provide a small boost. And not surprisingly, you also get a boost for being a paying Twitter Blue member. Like I said, the New York Times just lost its blue check mark, and now it's not verified, so it could just be a cap behind the screen. On the flip side, a tweet can get a debuff if the account has a lot of mutes, blocks, or spam reports. Also, though spelling errors and made up words will give you a debuff. And there's also a long list of topics that won't be amplified, like anything that's been flagged as misinformation, harassment, putting bounties on people's heads and many other no nos. The platform also keeps close track of elections, and there's actually tools in place like this government requested class that allows president Camacho to keep you save from bad content. But taking a step back, we can break the total algorithm into 3 parts. 1st, it finds a pool of 1500 tweets that you might be interested in using a technique called candidate sourcing. It includes accounts you follow, but also out of network sources by clustering similar accounts together, allowing it to find relevant tweets from accounts that you don't follow yet. From there, it ranks that pool of tweets with a 48,000,000 parameter neural network, and then finally, it filters out content by static rules, like accounts that you've blocked or muted. There's also a second repo called the algorithm ML that contains the machine learning models used at Twitter. The project uses PyTorch, and they actually created their own in house embeddings that contain over a 1000000000 nodes and 100 of billions of edges. On the home feed, it uses something called the heavy ranker, but some people have criticized for amplifying misinformation. The most controversial block of code though was this one here that keeps track of whether or not an author is a Democrat or Republican or whether it's Elon or a power user, but apparently this code is only used for collecting metrics, but has already been removed. One thing that's not found in the source code though is its apparent juicing of VIP accounts, like AOC on the left and CatTurd on the right, which was reported by Platformer. The code is highly interesting, and I recommend you clone it and check it out yourself, but why would Elon do this? Why would he release his trade secrets to the public. It kinda makes Twitter like the Linux of social media. The public can identify things that are unfair in the algorithm and address them in public. It's mostly a marketing move to build trust. It no longer feels like it's run by a mysterious cabal that can shadow ban and deboose content without some degree of transparency, and there's a huge opportunity here because the trust in mainstream media has fallen so low. Many people already use Twitter to consume the news, and although Twitter is currently losing money, they've talked about compensating content creators just like YouTube and other platforms do. When that happens, journalists could potentially make a living on Twitter and put their best content there. Elon knows Twitter Blue is never going make Twitter any money, but rather it's designed to uplift independent creators while embarrassing the establishment. The blue checks are now irrelevant, and by open sourcing the code, Twitter is laying the groundwork for it to become the fair and balanced, most trusted name in news, and this may force other social media platforms to become more transparent, putting Elon's balls in Zuckerberg's court. This has been the Code Report. Thanks for Shane, and I will see you in the next one.
It
it
is
is
April
april
3,
3
2023,
2023
and
and
you're
you're
watching
watching
the
the
Code
code
Report.
report
Less
less
than
than
6
6
months
months
ago,
ago
Elon
elon
Musk
musk
paid
paid
$44,000,000,000
$44,000,000,000
for
for
Twitter,
twitter
and
and
people
people
have
have
been
been
dunking
dunking
on
on
him
him
ever
ever
since.
since
He
he
fired
fired
half
half
the
the
company,
company
gave
gave
blue
blue
check
check
marks
marks
to
to
the
the
peasants,
peasants
and
and
freed
freed
a
a
bunch
bunch
of
of
people
people
from
from
Twitter
twitter
jail.
jail
Do
do
not
not
come.
come
Do
do
not
not
come.
come
I'm
i'm
gonna
gonna
come.
come
In
in
some
some
ways,
ways
it
it
looks
looks
like
like
Twitter
twitter
is
is
collapsing.
collapsing
It's
it's
now
now
only
only
worth
worth
$20,000,000,000,
$20,000,000,000
many
many
users
users
have
have
moved
moved
to
to
Mastodon,
mastodon
on
on
the
the
New
new
York
york
Times
times
just
just
lost
lost
its
its
blue
blue
check,
check
and
and
even
even
LeBron
lebron
James
james
won't
won't
pay
pay
the
the
5.
5
So
so
did
did
Elon
elon
buy
buy
Twitter
twitter
just
just
to
to
be
be
the
the
king
king
and
and
watch
watch
it
it
burn?
burn
Or
or
is
is
he
he
actually
actually
playing
playing
a
a
game
game
of
of
5
5
d
d
chess
chess
against
against
the
the
mainstream
mainstream
news
news
media,
media
like
like
the
the
Fox
fox
News
news
and
and
CNN
cnn
channels
channels
that
that
your
your
grandparents
grandparents
watch.
watch
He's
he's
playing
playing
the
the
long
long
game
game
to
to
take
take
their
their
advertisers
advertisers
by
by
making
making
Twitter
twitter
the
the
future
future
platform
platform
for
for
all
all
journalism.
journalism
And
and
if
if
he
he
plays
plays
his
his
moves
moves
right,
right
I
i
predict
predict
he
he
will
will
become
become
the
the
richest
richest
man
man
in
in
the
the
world,
world
even
even
richer
richer
than
than
Elon
elon
Musk
musk
himself.
himself
Yesterday,
yesterday
he
he
made
made
a
a
crazy
crazy
removed
removed
by
by
open
open
sourcing
sourcing
the
the
code
code
to
to
Twitter's
twitter's
recommendation
recommendation
algorithm,
algorithm
and
and
it's
it's
some
some
of
of
the
the
most
most
interesting
interesting
code
code
you'll
you'll
ever
ever
see.
see
In
in
today's
today's
video,
video
we'll
we'll
dissect
dissect
the
the
code
code
and
and
explain
explain
why
why
they
they
want
want
to
to
make
make
Twitter
twitter
like
like
the
the
Linux
linux
of
of
on
on
media
media
companies.
companies
Well,
well
kind
kind
of.
of
Although
although
it
it
is
is
real
real
production
production
code
code
at
at
Twitter,
twitter
it's
it's
not
not
100%
100%
of
of
the
the
code,
code
so
so
it's
it's
really
really
only
only
useful
useful
for
for
research
research
and
and
transparency.
transparency
The
the
code
code
base
base
is
is
mostly
mostly
written
written
in
in
Scala,
scala
a
a
JVM
jvm
language
language
that's
that's
kind
kind
of
of
like
like
Java,
java
but
but
concise
concise
and
and
just
just
way
way
better.
better
Twitter
twitter
was
was
originally
originally
written
written
with
with
Ruby
ruby
on
on
Rails,
rails
but
but
they
they
moved
moved
away
away
from
from
it
it
over
over
a
a
decade
decade
ago.
ago
Everybody
everybody
already
already
kind
kind
of
of
knows
knows
how
how
these
these
algorithms
algorithms
work,
work
but
but
it's
it's
extremely
extremely
interesting
interesting
to
to
see
see
the
the
real
real
deal
deal
implemented
implemented
in
in
code.
code
Like
like
this
this
method
method
in
in
the
the
early
early
bird
bird
web
web
based
based
similarity
similarity
engine
engine
dot
dot
Scala
scala
file.
file
We
we
have
have
a
a
bunch
bunch
of
of
ranking
ranking
parameters,
parameters
each
each
with
with
a
a
default
default
value.
value
Retweets
retweets
provide
provide
a
a
20
20
x
x
boost,
boost
while
while
likes
likes
provide
provide
a
a
30
30
x
x
boost.
boost
And
and
images
images
and
and
videos
videos
also
also
provide
provide
a
a
small
small
boost.
boost
And
and
not
not
surprisingly,
surprisingly
you
you
also
also
get
get
a
a
boost
boost
for
for
being
being
a
a
paying
paying
Twitter
twitter
Blue
blue
member.
member
Like
like
I
i
said,
said
the
the
New
new
York
york
Times
times
just
just
lost
lost
its
its
blue
blue
check
check
mark,
mark
and
and
now
now
it's
it's
not
not
verified,
verified
so
so
it
it
could
could
just
just
be
be
a
a
cap
cap
behind
behind
the
the
screen.
screen
On
on
the
the
flip
flip
side,
side
a
a
tweet
tweet
can
can
get
get
a
a
debuff
debuff
if
if
the
the
account
account
has
has
a
a
lot
lot
of
of
mutes,
mutes
blocks,
blocks
or
or
spam
spam
reports.
reports
Also,
also
though
though
spelling
spelling
errors
errors
and
and
made
made
up
up
words
words
will
will
give
give
you
you
a
a
debuff.
debuff
And
and
there's
there's
also
also
a
a
long
long
list
list
of
of
topics
topics
that
that
won't
won't
be
be
amplified,
amplified
like
like
anything
anything
that's
that's
been
been
flagged
flagged
as
as
misinformation,
misinformation
harassment,
harassment
putting
putting
bounties
bounties
on
on
people's
people's
heads
heads
and
and
many
many
other
other
no
no
nos.
nos
The
the
platform
platform
also
also
keeps
keeps
close
close
track
track
of
of
elections,
elections
and
and
there's
there's
actually
actually
tools
tools
in
in
place
place
like
like
this
this
government
government
requested
requested
class
class
that
that
allows
allows
president
president
Camacho
camacho
to
to
keep
keep
you
you
save
save
from
from
bad
bad
content.
content
But
but
taking
taking
a
a
step
step
back,
back
we
we
can
can
break
break
the
the
total
total
algorithm
algorithm
into
into
3
3
parts.
parts
1st,
1st
it
it
finds
finds
a
a
pool
pool
of
of
1500
1500
tweets
tweets
that
that
you
you
might
might
be
be
interested
interested
in
in
using
using
a
a
technique
technique
called
called
candidate
candidate
sourcing.
sourcing
It
it
includes
includes
accounts
accounts
you
you
follow,
follow
but
but
also
also
out
out
of
of
network
network
sources
sources
by
by
clustering
clustering
similar
similar
accounts
accounts
together,
together
allowing
allowing
it
it
to
to
find
find
relevant
relevant
tweets
tweets
from
from
accounts
accounts
that
that
you
you
don't
don't
follow
follow
yet.
yet
From
from
there,
there
it
it
ranks
ranks
that
that
pool
pool
of
of
tweets
tweets
with
with
a
a
48,000,000
48,000,000
parameter
parameter
neural
neural
network,
network
and
and
then
then
finally,
finally
it
it
filters
filters
out
out
content
content
by
by
static
static
rules,
rules
like
like
accounts
accounts
that
that
you've
you've
blocked
blocked
or
or
muted.
muted
There's
there's
also
also
a
a
second
second
repo
repo
called
called
the
the
algorithm
algorithm
ML
ml
that
that
contains
contains
the
the
machine
machine
learning
learning
models
models
used
used
at
at
Twitter.
twitter
The
the
project
project
uses
uses
PyTorch,
pytorch
and
and
they
they
actually
actually
created
created
their
their
own
own
in
in
house
house
embeddings
embeddings
that
that
contain
contain
over
over
a
a
1000000000
1000000000
nodes
nodes
and
and
100
100
of
of
billions
billions
of
of
edges.
edges
On
on
the
the
home
home
feed,
feed
it
it
uses
uses
something
something
called
called
the
the
heavy
heavy
ranker,
ranker
but
but
some
some
people
people
have
have
criticized
criticized
for
for
amplifying
amplifying
misinformation.
misinformation
The
the
most
most
controversial
controversial
block
block
of
of
code
code
though
though
was
was
this
this
one
one
here
here
that
that
keeps
keeps
track
track
of
of
whether
whether
or
or
not
not
an
an
author
author
is
is
a
a
Democrat
democrat
or
or
Republican
republican
or
or
whether
whether
it's
it's
Elon
elon
or
or
a
a
power
power
user,
user
but
but
apparently
apparently
this
this
code
code
is
is
only
only
used
used
for
for
collecting
collecting
metrics,
metrics
but
but
has
has
already
already
been
been
removed.
removed
One
one
thing
thing
that's
that's
not
not
found
found
in
in
the
the
source
source
code
code
though
though
is
is
its
its
apparent
apparent
juicing
juicing
of
of
VIP
vip
accounts,
accounts
like
like
AOC
aoc
on
on
the
the
left
left
and
and
CatTurd
catturd
on
on
the
the
right,
right
which
which
was
was
reported
reported
by
by
Platformer.
platformer
The
the
code
code
is
is
highly
highly
interesting,
interesting
and
and
I
i
recommend
recommend
you
you
clone
clone
it
it
and
and
check
check
it
it
out
out
yourself,
yourself
but
but
why
why
would
would
Elon
elon
do
do
this?
this
Why
why
would
would
he
he
release
release
his
his
trade
trade
secrets
secrets
to
to
the
the
public.
public
It
it
kinda
kinda
makes
makes
Twitter
twitter
like
like
the
the
Linux
linux
of
of
social
social
media.
media
The
the
public
public
can
can
identify
identify
things
things
that
that
are
are
unfair
unfair
in
in
the
the
algorithm
algorithm
and
and
address
address
them
them
in
in
public.
public
It's
it's
mostly
mostly
a
a
marketing
marketing
move
move
to
to
build
build
trust.
trust
It
it
no
no
longer
longer
feels
feels
like
like
it's
it's
run
run
by
by
a
a
mysterious
mysterious
cabal
cabal
that
that
can
can
shadow
shadow
ban
ban
and
and
deboose
deboose
content
content
without
without
some
some
degree
degree
of
of
transparency,
transparency
and
and
there's
there's
a
a
huge
huge
opportunity
opportunity
here
here
because
because
the
the
trust
trust
in
in
mainstream
mainstream
media
media
has
has
fallen
fallen
so
so
low.
low
Many
many
people
people
already
already
use
use
Twitter
twitter
to
to
consume
consume
the
the
news,
news
and
and
although
although
Twitter
twitter
is
is
currently
currently
losing
losing
money,
money
they've
they've
talked
talked
about
about
compensating
compensating
content
content
creators
creators
just
just
like
like
YouTube
youtube
and
and
other
other
platforms
platforms
do.
do
When
when
that
that
happens,
happens
journalists
journalists
could
could
potentially
potentially
make
make
a
a
living
living
on
on
Twitter
twitter
and
and
put
put
their
their
best
best
content
content
there.
there
Elon
elon
knows
knows
Twitter
twitter
Blue
blue
is
is
never
never
going
going
make
make
Twitter
twitter
any
any
money,
money
but
but
rather
rather
it's
it's
designed
designed
to
to
uplift
uplift
independent
independent
creators
creators
while
while
embarrassing
embarrassing
the
the
establishment.
establishment
The
the
blue
blue
checks
checks
are
are
now
now
irrelevant,
irrelevant
and
and
by
by
open
open
sourcing
sourcing
the
the
code,
code
Twitter
twitter
is
is
laying
laying
the
the
groundwork
groundwork
for
for
it
it
to
to
become
become
the
the
fair
fair
and
and
balanced,
balanced
most
most
trusted
trusted
name
name
in
in
news,
news
and
and
this
this
may
may
force
force
other
other
social
social
media
media
platforms
platforms
to
to
become
become
more
more
transparent,
transparent
putting
putting
Elon's
elon's
balls
balls
in
in
Zuckerberg's
zuckerberg's
court.
court
This
this
has
has
been
been
the
the
Code
code
Report.
report
Thanks
thanks
for
for
Shane,
shane
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
In this video, Speaker 0 explains the history and potential of Twitter, including its role as the future platform for all journalism and the use of algorithms to rank tweets. Speaker 1 discusses the potential for Twitter to become a transparent platform and mentions the potential for other social media platforms to become more transparent. Speaker 0 also mentions a potential solution to the code issue of Twitter being a " unfairly priced" source, and Speaker 1 provides a brief overview of the code and its use.
Twitter algorithm open-sourced… Is Elon playing 5D chess?
It is April 3, 2023, and you're watching the Code Report. Less than 6 months ago, Elon Musk paid $44,000,000,000 for Twitter, and people have been dunking on him ever since. He fired half the company, gave blue check marks to the peasants, and freed a bunch of people from Twitter jail. Do not come. Do not come. I'm gonna come. In some ways, it looks like Twitter is collapsing. It's now only worth $20,000,000,000, many users have moved to Mastodon, on the New York Times just lost its blue check, and even LeBron James won't pay the 5. So did Elon buy Twitter just to be the king and watch it burn? Or is he actually playing a game of 5 d chess against the mainstream news media, like the Fox News and CNN channels that your grandparents watch. He's playing the long game to take their advertisers by making Twitter the future platform for all journalism. And if he plays his moves right, I predict he will become the richest man in the world, even richer than Elon Musk himself. Yesterday, he made a crazy removed by open sourcing the code to Twitter's recommendation algorithm, and it's some of the most interesting code you'll ever see. In today's video, we'll dissect the code and explain why they want to make Twitter like the Linux of on media companies. Well, kind of. Although it is real production code at Twitter, it's not 100% of the code, so it's really only useful for research and transparency. The code base is mostly written in Scala, a JVM language that's kind of like Java, but concise and just way better. Twitter was originally written with Ruby on Rails, but they moved away from it over a decade ago. Everybody already kind of knows how these algorithms work, but it's extremely interesting to see the real deal implemented in code. Like this method in the early bird web based similarity engine dot Scala file. We have a bunch of ranking parameters, each with a default value. Retweets provide a 20 x boost, while likes provide a 30 x boost. And images and videos also provide a small boost. And not surprisingly, you also get a boost for being a paying Twitter Blue member. Like I said, the New York Times just lost its blue check mark, and now it's not verified, so it could just be a cap behind the screen. On the flip side, a tweet can get a debuff if the account has a lot of mutes, blocks, or spam reports. Also, though spelling errors and made up words will give you a debuff. And there's also a long list of topics that won't be amplified, like anything that's been flagged as misinformation, harassment, putting bounties on people's heads and many other no nos. The platform also keeps close track of elections, and there's actually tools in place like this government requested class that allows president Camacho to keep you save from bad content. But taking a step back, we can break the total algorithm into 3 parts. 1st, it finds a pool of 1500 tweets that you might be interested in using a technique called candidate sourcing. It includes accounts you follow, but also out of network sources by clustering similar accounts together, allowing it to find relevant tweets from accounts that you don't follow yet. From there, it ranks that pool of tweets with a 48,000,000 parameter neural network, and then finally, it filters out content by static rules, like accounts that you've blocked or muted. There's also a second repo called the algorithm ML that contains the machine learning models used at Twitter. The project uses PyTorch, and they actually created their own in house embeddings that contain over a 1000000000 nodes and 100 of billions of edges. On the home feed, it uses something called the heavy ranker, but some people have criticized for amplifying misinformation. The most controversial block of code though was this one here that keeps track of whether or not an author is a Democrat or Republican or whether it's Elon or a power user, but apparently this code is only used for collecting metrics, but has already been removed. One thing that's not found in the source code though is its apparent juicing of VIP accounts, like AOC on the left and CatTurd on the right, which was reported by Platformer. The code is highly interesting, and I recommend you clone it and check it out yourself, but why would Elon do this? Why would he release his trade secrets to the public. It kinda makes Twitter like the Linux of social media. The public can identify things that are unfair in the algorithm and address them in public. It's mostly a marketing move to build trust. It no longer feels like it's run by a mysterious cabal that can shadow ban and deboose content without some degree of transparency, and there's a huge opportunity here because the trust in mainstream media has fallen so low. Many people already use Twitter to consume the news, and although Twitter is currently losing money, they've talked about compensating content creators just like YouTube and other platforms do. When that happens, journalists could potentially make a living on Twitter and put their best content there. Elon knows Twitter Blue is never going make Twitter any money, but rather it's designed to uplift independent creators while embarrassing the establishment. The blue checks are now irrelevant, and by open sourcing the code, Twitter is laying the groundwork for it to become the fair and balanced, most trusted name in news, and this may force other social media platforms to become more transparent, putting Elon's balls in Zuckerberg's court. This has been the Code Report. Thanks for Shane, and I will see you in the next one.
In this video, Speaker 0 explains the history and potential of Twitter, including its role as the future platform for all journalism and the use of algorithms to rank tweets. Speaker 1 discusses the potential for Twitter to become a transparent platform and mentions the potential for other social media platforms to become more transparent. Speaker 0 also mentions a potential solution to the code issue of Twitter being a " unfairly priced" source, and Speaker 1 provides a brief overview of the code and its use.

        [INST]
        You are youtuber called Fireship you make engaging high-intensity and entertaining coding tutorials and tech news. 
        you covers a wide range of topics relevant to programmers, aiming to help them learn and improve their skills quickly.
        
        Given the title of the video : Twitter algorithm open-sourced… Is Elon playing 5D chess? 
        and a small summary : In this video, Speaker 0 explains the history and potential of Twitter, including its role as the future platform for all journalism and the use of algorithms to rank tweets. Speaker 1 discusses the potential for Twitter to become a transparent platform and mentions the potential for other social media platforms to become more transparent. Speaker 0 also mentions a potential solution to the code issue of Twitter being a " unfairly priced" source, and Speaker 1 provides a brief overview of the code and its use.
        [/INST]
        
        Generate the video : It is April 3, 2023, and you're watching the Code Report. Less than 6 months ago, Elon Musk paid $44,000,000,000 for Twitter, and people have been dunking on him ever since. He fired half the company, gave blue check marks to the peasants, and freed a bunch of people from Twitter jail. Do not come. Do not come. I'm gonna come. In some ways, it looks like Twitter is collapsing. It's now only worth $20,000,000,000, many users have moved to Mastodon, on the New York Times just lost its blue check, and even LeBron James won't pay the 5. So did Elon buy Twitter just to be the king and watch it burn? Or is he actually playing a game of 5 d chess against the mainstream news media, like the Fox News and CNN channels that your grandparents watch. He's playing the long game to take their advertisers by making Twitter the future platform for all journalism. And if he plays his moves right, I predict he will become the richest man in the world, even richer than Elon Musk himself. Yesterday, he made a crazy removed by open sourcing the code to Twitter's recommendation algorithm, and it's some of the most interesting code you'll ever see. In today's video, we'll dissect the code and explain why they want to make Twitter like the Linux of on media companies. Well, kind of. Although it is real production code at Twitter, it's not 100% of the code, so it's really only useful for research and transparency. The code base is mostly written in Scala, a JVM language that's kind of like Java, but concise and just way better. Twitter was originally written with Ruby on Rails, but they moved away from it over a decade ago. Everybody already kind of knows how these algorithms work, but it's extremely interesting to see the real deal implemented in code. Like this method in the early bird web based similarity engine dot Scala file. We have a bunch of ranking parameters, each with a default value. Retweets provide a 20 x boost, while likes provide a 30 x boost. And images and videos also provide a small boost. And not surprisingly, you also get a boost for being a paying Twitter Blue member. Like I said, the New York Times just lost its blue check mark, and now it's not verified, so it could just be a cap behind the screen. On the flip side, a tweet can get a debuff if the account has a lot of mutes, blocks, or spam reports. Also, though spelling errors and made up words will give you a debuff. And there's also a long list of topics that won't be amplified, like anything that's been flagged as misinformation, harassment, putting bounties on people's heads and many other no nos. The platform also keeps close track of elections, and there's actually tools in place like this government requested class that allows president Camacho to keep you save from bad content. But taking a step back, we can break the total algorithm into 3 parts. 1st, it finds a pool of 1500 tweets that you might be interested in using a technique called candidate sourcing. It includes accounts you follow, but also out of network sources by clustering similar accounts together, allowing it to find relevant tweets from accounts that you don't follow yet. From there, it ranks that pool of tweets with a 48,000,000 parameter neural network, and then finally, it filters out content by static rules, like accounts that you've blocked or muted. There's also a second repo called the algorithm ML that contains the machine learning models used at Twitter. The project uses PyTorch, and they actually created their own in house embeddings that contain over a 1000000000 nodes and 100 of billions of edges. On the home feed, it uses something called the heavy ranker, but some people have criticized for amplifying misinformation. The most controversial block of code though was this one here that keeps track of whether or not an author is a Democrat or Republican or whether it's Elon or a power user, but apparently this code is only used for collecting metrics, but has already been removed. One thing that's not found in the source code though is its apparent juicing of VIP accounts, like AOC on the left and CatTurd on the right, which was reported by Platformer. The code is highly interesting, and I recommend you clone it and check it out yourself, but why would Elon do this? Why would he release his trade secrets to the public. It kinda makes Twitter like the Linux of social media. The public can identify things that are unfair in the algorithm and address them in public. It's mostly a marketing move to build trust. It no longer feels like it's run by a mysterious cabal that can shadow ban and deboose content without some degree of transparency, and there's a huge opportunity here because the trust in mainstream media has fallen so low. Many people already use Twitter to consume the news, and although Twitter is currently losing money, they've talked about compensating content creators just like YouTube and other platforms do. When that happens, journalists could potentially make a living on Twitter and put their best content there. Elon knows Twitter Blue is never going make Twitter any money, but rather it's designed to uplift independent creators while embarrassing the establishment. The blue checks are now irrelevant, and by open sourcing the code, Twitter is laying the groundwork for it to become the fair and balanced, most trusted name in news, and this may force other social media platforms to become more transparent, putting Elon's balls in Zuckerberg's court. This has been the Code Report. Thanks for Shane, and I will see you in the next one.
        