0:00.000–0:01.267
enHi guys, welcome back.
0:01.540–0:02.665
enIn this video,
0:02.665–0:04.447
enwe'll be talking about
0:04.447–0:06.134
enhow you can run a QN 3.8
0:06.134–0:07.822
en27 billion parameter
0:07.822–0:09.603
enmodel in an Apple M4 Mac
0:09.603–0:11.385
enMini machine with just
0:11.385–0:13.260
en24 GB of unified memory.
0:13.260–0:15.013
enWe know that QN 3.8 27
0:15.013–0:17.179
enbillion parameter model
0:17.179–0:19.860
enwill be of at least 15 GB of size.
0:19.860–0:21.918
enand loading the entire
0:21.918–0:23.760
enmodel in the unified
0:23.760–0:25.602
enmemory will not only
0:25.602–0:27.660
enload the model but also
0:27.660–0:29.098
enloads the kvcache
0:29.098–0:30.631
enruntime and the mac
0:30.631–0:32.356
enoperating system all
0:32.356–0:35.040
entogether and while you load all of
0:35.040–0:36.568
enthem in the vram it is
0:36.568–0:38.365
endefinitely going to hit
0:38.365–0:40.073
enthe memory ceiling for
0:40.073–0:41.780
enyou and it is going to be
0:41.780–0:43.280
engetting you the out of
0:43.280–0:44.947
enmemory exception so how
0:44.947–0:46.447
encan we even handle the
0:46.447–0:48.280
ensituation of these kind of
0:48.280–0:49.935
enmemory problem and can
0:49.935–0:51.415
enwe even run a QUEN 3.8
0:51.415–0:52.983
en27 billion parameter
0:52.983–0:55.160
enmodel in this machine and is it
0:55.160–0:56.689
enjust the problem with
0:56.689–0:58.218
enthe model itself or is
0:58.218–0:59.831
enit the problem with the
0:59.831–1:01.700
enquantization that we have
1:01.700–1:03.178
enbut what if we have a
1:03.178–1:05.117
enquantization of the same
1:05.117–1:06.779
enexact model with just
1:06.779–1:09.180
entwo-bit quantization instead
1:09.180–1:10.413
enof the four-bit
1:10.413–1:12.311
enquantization can we run
1:12.311–1:14.208
enthat at all well welcome
1:14.208–1:16.580
ento the QUEN model quantized to
1:16.580–1:19.263
en2-bit called as the
1:19.263–1:22.617
enQEN3.827BGSQRCOIQ2QS
1:22.617–1:25.971
enmodel and this model can
1:25.971–1:29.660
enload in the 24GB of unified
1:29.660–1:32.460
enmachine and it can support a full GPU
1:32.460–1:34.327
enoffloading as well as it
1:34.327–1:35.633
enhas multi-token
1:35.633–1:37.220
enprediction enabled
1:37.220–1:39.443
enas well and this model
1:39.443–1:41.418
encan easily fit in an
1:41.418–1:43.888
enApple M4 machine of 24GB
1:43.888–1:45.740
enof unified memory
1:45.740–1:47.415
enwhich includes the model
1:47.415–1:49.010
enkv cache runtime and mac
1:49.010–1:50.764
enoperating system without
1:50.764–1:52.040
enhitting the memory
1:52.040–1:54.312
enceiling as well so it can easily load
1:54.312–1:55.525
eneverything for you
1:55.525–1:56.661
enwithin your apple
1:56.661–1:58.100
enmachine which is quite
1:58.100–1:59.300
enamazing so the memory
1:59.300–2:00.633
enrequirement is going to
2:00.633–2:01.900
enbe so much less because
2:01.900–2:03.500
enof the two-bit quantization
2:03.500–2:04.567
enthat you have got in
2:04.567–2:05.967
enthis particular model so
2:05.967–2:07.033
enhow exactly is this
2:07.033–2:09.080
enpossible will the quen 3.8 right
2:09.080–2:10.297
ennow will lose its
2:10.297–2:12.123
enintelligence ability or
2:12.123–2:13.601
enthe output will be of
2:13.601–2:15.600
enless quality or how exactly
2:15.600–2:16.911
enis this happening what
2:16.911–2:18.015
enexactly is this new
2:18.015–2:19.050
enmodel of a two-bit
2:19.050–2:21.120
enquantization well this particular
2:21.120–2:22.760
enquen model is a standard
2:22.760–2:24.317
enquen model but instead
2:24.317–2:25.711
enof applying the same
2:25.711–2:27.760
enquantization everywhere the
2:27.760–2:29.254
entechnique will determine
2:29.254–2:30.544
enwhich tensor deserves
2:30.544–2:31.970
enmore precision and which
2:31.970–2:33.600
encan tolerate the aggressive
2:33.600–2:34.733
encompression that's
2:34.733–2:35.733
enexactly what this
2:35.733–2:37.000
enparticular technique
2:37.000–2:38.333
endoes and what exactly is
2:38.333–2:39.200
enthis technique
2:39.200–2:40.600
enthat we're talking about
2:40.600–2:42.171
enthe gsq rco or otherwise
2:42.171–2:43.677
encalled as the gumbel
2:43.677–2:45.360
ensoftmax quantization
2:45.360–2:47.982
enwhich intelligently optimizes the
2:47.982–2:49.905
enquantization value while
2:49.905–2:52.440
enRCO intelligently decide where to
2:52.440–2:54.446
enallocate more or fewer
2:54.446–2:57.613
enbits across the models or tens are so
2:57.613–3:00.780
enessentially even if the model sizes
3:00.780–3:02.758
enis going to be reduced
3:02.758–3:04.845
enfrom the 16 bpw which is
3:04.845–3:07.043
ena 16-bit original model
3:07.043–3:09.240
ento a 2-bit quantization
3:09.240–3:10.978
enmodel it is going to be
3:10.978–3:12.812
enof almost 6.4 times of a
3:12.812–3:14.742
ensize lower but still the
3:14.742–3:16.480
enmodel is going to give
3:16.480–3:18.128
enyou an amazing precision
3:18.128–3:19.462
enover here that is the
3:19.462–3:21.110
enpower of this particular
3:21.110–3:22.680
enmodel itself and that's
3:22.680–3:23.869
enthe reason why even
3:23.869–3:25.206
enthough the size of the
3:25.206–3:26.691
enmodel is so much smaller
3:26.691–3:28.400
enthe quality of the output is
3:28.400–3:29.908
enstill going to be way
3:29.908–3:31.504
enmore same like how you
3:31.504–3:32.746
encan expect with a
3:32.746–3:35.140
enquantization 4 model of the same
3:35.140–3:36.340
enQN model that you have
3:36.340–3:37.673
engot that's exactly what
3:37.673–3:39.073
enthis particular model is
3:39.073–3:40.273
enand we are going to see
3:40.273–3:42.307
enin this particular video
3:42.307–3:44.439
enhow we can run the same
3:44.439–3:46.690
enexact QN 2-bit model in
3:46.690–3:48.940
enthe Mac Mini M4 machine
3:48.940–3:50.693
enand we're also going to
3:50.693–3:52.446
ensee how fast it is going
3:52.446–3:53.553
ento be doing the
3:53.553–3:55.860
eninferencing for us and what it
3:55.860–3:57.225
enmeans with different
3:57.225–3:58.514
ensizes of the KV cache
3:58.514–3:59.803
enadjustment that I'm
3:59.803–4:01.320
engoing to be doing in this
4:01.320–4:02.958
enparticular video and i
4:02.958–4:04.510
enwill show you how it is
4:04.510–4:06.062
engoing to be affecting
4:06.062–4:07.700
enthe the speed as well as
4:07.700–4:09.068
enthe number of tokens per
4:09.068–4:10.162
ensecond as well so in
4:10.162–4:11.599
enthis particular video we
4:11.599–4:13.240
enare going to see which kv size
4:13.240–4:14.736
enor which kv cache is
4:14.736–4:16.513
engoing to be faster like
4:16.513–4:18.103
en16 bit or 4 bit or 8 bit
4:18.103–4:20.160
enquantization and which is
4:20.160–4:21.531
engoing to take more time
4:21.531–4:22.758
enand what is the total
4:22.758–4:23.985
ennumber of tokens per
4:23.985–4:25.500
ensecond that you are going
4:25.500–4:26.633
ento be getting uh with
4:26.633–4:27.700
endifferent kinds of
4:27.700–4:28.900
ensettings that you are
4:28.900–4:30.700
engoing to be doing in the lm studio
4:30.700–4:31.900
enand one more time this
4:31.900–4:33.160
enparticular model is
4:33.160–4:34.657
enactually not available
4:34.657–4:35.780
enin the mlx format i
4:35.780–4:37.113
enunfortunately have got
4:37.113–4:38.380
enonly the ggf format and
4:38.380–4:39.647
eni am going to be running
4:39.647–4:40.913
enthis particular model
4:40.913–4:42.047
enin the lm studio and i
4:42.047–4:43.180
enwill show you how the
4:43.180–4:44.527
entps is going to be for
4:44.527–4:46.520
enthe different kv cache that we
4:46.520–4:47.853
enare going to be setting
4:47.853–4:49.957
enand running it but you know what this
4:49.957–4:51.780
enparticular model is not really
4:51.780–4:53.085
engoing to hit the out of
4:53.085–4:54.535
enmemory exception based
4:54.535–4:55.695
enon the different kv
4:55.695–4:57.580
encache setting you can actually
4:57.580–4:58.780
ensee that this model is
4:58.780–4:59.913
enactually going to be
4:59.913–5:01.180
enperformant as well and
5:01.180–5:02.513
enthis is the good news for
5:02.513–5:03.780
enthis particular model
5:03.780–5:05.047
enwell as that said let's
5:05.047–5:06.380
enstart doing the testing
5:06.380–5:07.913
enof the model with different
5:07.913–5:09.247
enquantization so you can
5:09.247–5:10.380
ensee that i have got my
5:10.380–5:11.447
enmac mini m4 machine
5:11.447–5:12.847
entotal number of physical
5:12.847–5:14.066
enthat you can see over
5:14.066–5:15.632
enhere is 24 gig and i'm
5:15.632–5:17.382
engoing to be loading the
5:17.382–5:19.500
enuh the quen model uh in the lm
5:19.500–5:21.790
enstudio and i'm going to
5:21.790–5:24.081
enset the context length
5:24.081–5:26.371
enover here uh to at least
5:26.371–5:28.300
enlike a 30 31 or 32 000
5:28.300–5:29.567
enuh over here and you can
5:29.567–5:30.633
ensee that this is the
5:30.633–5:31.767
enmaximum concurrent
5:31.767–5:33.433
enprediction or instead of four
5:33.433–5:34.700
eni'm going to be setting
5:34.700–5:35.900
enit to one because it's
5:35.900–5:37.233
engoing to be reducing the
5:37.233–5:38.433
entotal lump compute as
5:38.433–5:39.700
enwell and i'm also going
5:39.700–5:40.986
ento change the kv cache
5:40.986–5:43.146
enquantization type there
5:43.146–5:45.100
enso instead of using the
5:45.100–5:46.367
endefault i'm going to be
5:46.367–5:47.567
ensetting the fp16 this
5:47.567–5:48.833
entime and i'm going to be
5:48.833–5:50.567
enloading this particular model
5:50.567–5:51.900
enand the moment i'm going
5:51.900–5:53.233
ento load this particular
5:53.233–5:54.433
enmodel you can see that
5:54.433–5:55.900
enit is going to be consuming
5:55.900–5:57.100
enaround 20 gig or 21 gig
5:57.100–5:59.340
enof the total memory uh
5:59.340–6:01.700
enin my uh in my ram there
6:01.700–6:04.060
enand now i'm going to be
6:04.060–6:05.000
enrunning the the
6:05.000–6:06.301
enquestions over there
6:06.301–6:07.747
eninferencing it without
6:07.747–6:09.193
enthe thinking enabled so
6:09.193–6:10.060
enthe moment i'm
6:10.060–6:11.558
engoing to run let's say
6:11.558–6:13.223
enhi over here i'm getting
6:13.223–6:14.805
enaround 4.57 tokens per
6:14.805–6:16.220
ensecond and now if i'm
6:16.220–6:17.884
engoing to say again like
6:17.884–6:19.460
enhi again it is going to
6:19.460–6:20.774
engive me around 4.9
6:20.774–6:22.700
entokens per second this is a
6:22.700–6:23.967
endense model that we're
6:23.967–6:25.300
entalking about guys look
6:25.300–6:26.433
enat that and now if i'm
6:26.433–6:27.900
engoing to pass a long prompt
6:27.900–6:29.033
ento write a selenium c
6:29.033–6:30.375
ensharp dot net code for
6:30.375–6:32.099
engoogle search operation
6:32.099–6:33.660
enwith page object model
6:33.660–6:35.127
enand dependency injection
6:35.127–6:36.327
enand if i'm going to run
6:36.327–6:37.460
enit i'm going to start
6:37.460–6:38.793
enthe timer as well just in
6:38.793–6:40.060
encase and if i'm going to
6:40.060–6:41.127
enshow you the memory
6:41.127–6:42.460
enspike there you see that
6:42.460–6:43.927
enthe memory pressure is not
6:43.927–6:45.327
enincreasing because it's
6:45.327–6:46.660
ena two-bit quantization
6:46.660–6:47.793
enmodel and at the same
6:47.793–6:49.127
entime you can see that i'm
6:49.127–6:50.327
enactually getting the
6:50.327–6:51.527
enoutput over here it is
6:51.527–6:52.660
ennot as fast as you can
6:52.660–6:54.193
enimagine it is not super fast
6:54.193–6:55.393
enlike how we can expect
6:55.393–6:56.460
enwith a like an m5 max
6:56.460–6:57.727
enmachine but you can see
6:57.727–6:59.127
enthat within four minutes
6:59.127–7:00.700
eni got the output with a
7:00.700–7:02.558
en5.67 tokens per second
7:02.558–7:04.122
enthis is not bad to be
7:04.122–7:05.980
enhonest this is working
7:05.980–7:07.313
enit's not really hitting
7:07.313–7:08.647
enthat memory ceiling and
7:08.647–7:09.580
enif you try to run a
7:09.580–7:11.313
enfour-bit quantization this is
7:11.313–7:12.247
ennever going to be
7:12.247–7:13.580
enrunning for you and four
7:13.580–7:14.847
enminutes is not that bad
7:14.847–7:16.647
enat all now i'm going to change the
7:16.647–7:18.047
enquantization to uh eight
7:18.047–7:19.313
enjust the quantization
7:19.313–7:20.513
eneight there for the kv
7:20.513–7:21.913
encache alone and i'm going
7:21.913–7:22.913
ento be loading this
7:22.913–7:24.446
enparticular model and i'm
7:24.446–7:25.875
engoing to ask the same
7:25.875–7:28.060
enexact prompt there sending a hi
7:28.060–7:29.681
enmessage and i'm going to
7:29.681–7:31.301
ensay hi again i'm getting
7:31.301–7:32.922
en5.47 token and i'm going
7:32.922–7:34.380
ento send the same exact
7:34.380–7:35.768
enSedium code prompt and
7:35.768–7:37.083
enI'm going to start the
7:37.083–7:38.545
entimer over there you can
7:38.545–7:39.860
ensee that this time the
7:39.860–7:41.211
entime is going to be a
7:41.211–7:42.983
enbit higher than compared
7:42.983–7:44.418
ento the FP16 there the
7:44.418–7:46.360
enreason is because actually
7:46.360–7:47.895
enit's not that even if
7:47.895–7:49.430
enyou try to reduce the
7:49.430–7:51.326
enquantization the things
7:51.326–7:52.680
enwill be faster the
7:52.680–7:54.473
eninferencing will exactly
7:54.473–7:56.102
enbe the same exact tokens
7:56.102–7:57.569
enper second because it
7:57.569–7:59.280
enalso need to de-quantize
7:59.280–7:59.840
zh安安
8:02.400–8:05.900
zh然後它會不會有更快。
8:05.900–8:09.700
zh所以,它會不會有更快。
8:09.700–8:14.900
zh所以,它會不會有更快。
8:14.900–8:19.160
enthan compared to the FP16 for you over there.
8:19.260–8:20.043
enSee now,
8:20.043–8:23.960
enthis is going to be the FP4 that we have got.
8:24.060–8:25.260
enI'm going to be asking
8:25.260–8:26.660
enthe same exact question.
8:26.660–8:27.727
enThe total number of
8:27.727–8:29.060
entokens per second is not
8:29.060–8:29.993
enchanging at all.
8:29.993–8:31.193
enAnd now if I'm going to
8:31.193–8:33.060
enbe running the same exact prompt,
8:33.060–8:34.393
enthe Serenium WebDriver
8:34.393–8:35.793
enquestion over there with
8:35.793–8:37.260
enthe quantization 4 there,
8:37.260–8:38.860
eninstead of the 4.04 minutes,
8:38.860–8:40.940
enwhich was taking in FP16,
8:41.160–8:43.940
enit is 4.46 as you can see here.
8:43.940–8:44.740
enso based on the
8:44.740–8:46.073
enquantization change it
8:46.073–8:47.407
enis also obviously going
8:47.407–8:49.007
ento change the time over there
8:49.007–8:50.477
enso this proves the point
8:50.477–8:51.950
enthat the inferencing
8:51.950–8:53.505
enactually works even in
8:53.505–8:55.060
enLM studio for us and you
8:55.060–8:56.327
encan see that the output
8:56.327–8:57.660
enhas got no compromise as
8:57.660–8:58.860
enwell the output looks
8:58.860–9:00.193
enpretty much exactly the
9:00.193–9:01.393
ensame and I can see that
9:01.393–9:02.527
enit is still working I
9:02.527–9:03.727
enmean there is a change
9:03.727–9:04.993
enin the output of course
9:04.993–9:06.127
enin the web driver for
9:06.127–9:07.593
enthe dependency injection
9:07.593–9:08.927
enit's there over here but
9:08.927–9:10.193
enin here you can see that
9:10.193–9:11.660
enthe dependency injection
9:11.660–9:12.660
ensetup has got a bit
9:12.660–9:13.793
endifferent with like
9:13.793–9:15.327
endriver factory class there
9:15.327–9:16.193
enthat's the only
9:16.193–9:17.593
endifference between both
9:17.593–9:18.727
enof them but overall i
9:18.727–9:20.660
encan actually see that it is working
9:20.660–9:21.993
enpretty much as expected
9:21.993–9:23.127
enthe last test which i
9:23.127–9:24.260
enwanted to do with the
9:24.260–9:25.460
enfp16 of the same exact
9:25.460–9:26.727
enmodel is by connecting
9:26.727–9:27.864
ento a pi coding agent i
9:27.864–9:29.330
enwant to really see if
9:29.330–9:31.400
enthis is going to work or not so
9:31.400–9:33.152
eni have set the fp16 over
9:33.152–9:34.904
enhere i'm running it and
9:34.904–9:36.656
eni'm going to be opening
9:36.656–9:38.500
enthe pi coding agent over
9:38.500–9:39.705
enhere and i'm going to
9:39.705–9:41.052
enchoose the model as you
9:41.052–9:42.328
encan see i'm going to be
9:42.328–9:44.100
enchasing choosing that gsq rco
9:44.100–9:46.053
enunsloth mtp model there
9:46.053–9:47.909
enand i'm going to be just
9:47.909–9:49.569
ensaying hi over there
9:49.569–9:51.620
eneven for a high message it
9:51.620–9:53.143
enwas taking a long time
9:53.143–9:54.581
enit's not very fast as
9:54.581–9:56.104
enyou can imagine it was
9:56.104–9:57.880
entaking a long time and the
9:57.880–9:59.193
enoutput you can see that
9:59.193–10:00.505
enit is going to be giving
10:00.505–10:01.818
enyou very very slow here
10:01.818–10:03.200
enwhich is quite expected
10:03.200–10:04.515
enbecause this is a dense
10:04.515–10:05.623
enmodel and now i have
10:05.623–10:06.869
entold it to analyze the
10:06.869–10:08.600
encode for me in this particular
10:08.600–10:10.875
enrepository and that took
10:10.875–10:12.932
enme more than 27 minutes
10:12.932–10:15.099
enjust to analyze the code
10:15.099–10:16.940
eni mean it went so deep
10:16.940–10:18.207
ento be honest like going
10:18.207–10:19.473
enthrough each and every
10:19.473–10:20.473
enfile even start to
10:20.473–10:21.940
enfigure out what exactly is
10:21.940–10:22.940
enthe problem in the
10:22.940–10:24.073
enparticular code but
10:24.073–10:25.473
enactually took 27 minutes
10:25.473–10:27.073
ento give me the output which is
10:27.073–10:28.273
enwhat really happened
10:28.273–10:29.540
enover here as you can see
10:29.540–10:30.917
enso long story short you
10:30.917–10:32.940
encan run a two-bit quantization
10:32.940–10:34.659
enQUEN 3.8 27 billion
10:34.659–10:36.593
enparameter model in an
10:36.593–10:38.097
enapple m4 mac mini
10:38.097–10:41.320
enmachine without hitting the memory
10:41.320–10:43.035
enceiling but what is the
10:43.035–10:44.840
enactual technique which
10:44.840–10:46.104
enmakes the two big
10:46.104–10:48.360
enquantization which helps you
10:48.360–10:49.360
enrun in a mac mini m4
10:49.360–10:50.693
enmachine is actually the
10:50.693–10:51.827
enmost important part
10:51.827–10:53.627
enthat's the reason why i actually
10:53.627–10:54.627
enwanted to show you
10:54.627–10:56.027
enwhat's really happening
10:56.027–10:57.093
enover here and other
10:57.093–10:58.893
enthing is you may ask what happens
10:58.893–11:00.024
enif you try to run the
11:00.024–11:01.881
ensame exact model in the
11:01.881–11:03.543
enApple M5 Max machine
11:03.543–11:05.400
enright so I'm going to be
11:05.400–11:07.153
enloading the same exact
11:07.153–11:08.629
enmodel as you can see
11:08.629–11:10.382
enover here and I'm going
11:10.382–11:12.320
ento be doing an FP16 here as
11:12.320–11:13.833
enwell so FP16 Max current
11:13.833–11:15.271
enprediction is going to
11:15.271–11:16.708
enbe one as well I'm going
11:16.708–11:18.600
ento be loading this particular
11:18.600–11:19.800
enmodel and let's try to
11:19.800–11:20.800
enask the same exact
11:20.800–11:22.067
enquestion over here and
11:22.067–11:23.867
ensee how this is actually going to
11:23.867–11:25.920
zh在我的 Apple M5 Max machine
11:25.920–11:28.120
zh所以这个是128GB machine
11:28.120–11:29.360
zh所以你可能会被担心
11:29.360–11:31.000
zh要是转买它快速
11:31.000–11:32.160
zh你会被担心
11:32.160–11:34.120
zh要是100兆兆的
11:34.120–11:35.400
zh如果我会被担心
11:35.400–11:36.720
zh但如果我会被担心
11:36.720–11:39.000
zh同样的同样
11:39.000–11:40.320
zh在这个机器
11:40.320–11:42.600
zh你能看到它是
11:42.600–11:45.600
zh连接到27兆兆的
11:45.600–11:48.320
zh它是127兆兆的
11:48.320–11:49.960
zh所以它试试了
11:49.960–11:51.783
enpoint that it's not just
11:51.783–11:53.150
enabout the two-bit
11:53.150–11:55.155
enquantization model which
11:55.155–11:56.340
encan run way more
11:56.340–11:57.861
enfaster in an apple m5
11:57.861–11:59.741
enmax machine because it's
11:59.741–12:01.351
eneven running in the m4
12:01.351–12:03.320
enmini machine but the thing
12:03.320–12:04.602
enis even though it is a
12:04.602–12:06.260
entwo-bit quantization the
12:06.260–12:07.617
enquality of the output
12:07.617–12:09.200
enstill remains and that's
12:09.200–12:10.556
enthe reason the the
12:10.556–12:12.363
entechnique of the gsq rco
12:12.363–12:13.809
ensits in so it safely
12:13.809–12:16.340
enchooses the best tensor which can
0:00.000–0:01.267
Hi guys, welcome back.
0:01.540–0:02.665
In this video,
0:02.665–0:04.447
we'll be talking about
0:04.447–0:06.134
how you can run a QN 3.8
0:06.134–0:07.822
27 billion parameter
0:07.822–0:09.603
model in an Apple M4 Mac
0:09.603–0:11.385
Mini machine with just
0:11.385–0:13.260
24 GB of unified memory.
0:13.260–0:15.013
We know that QN 3.8 27
0:15.013–0:17.179
billion parameter model
0:17.179–0:19.860
will be of at least 15 GB of size.
0:19.860–0:21.918
and loading the entire
0:21.918–0:23.760
model in the unified
0:23.760–0:25.602
memory will not only
0:25.602–0:27.660
load the model but also
0:27.660–0:29.098
loads the kvcache
0:29.098–0:30.631
runtime and the mac
0:30.631–0:32.356
operating system all
0:32.356–0:35.040
together and while you load all of
0:35.040–0:36.568
them in the vram it is
0:36.568–0:38.365
definitely going to hit
0:38.365–0:40.073
the memory ceiling for
0:40.073–0:41.780
you and it is going to be
0:41.780–0:43.280
getting you the out of
0:43.280–0:44.947
memory exception so how
0:44.947–0:46.447
can we even handle the
0:46.447–0:48.280
situation of these kind of
0:48.280–0:49.935
memory problem and can
0:49.935–0:51.415
we even run a QUEN 3.8
0:51.415–0:52.983
27 billion parameter
0:52.983–0:55.160
model in this machine and is it
0:55.160–0:56.689
just the problem with
0:56.689–0:58.218
the model itself or is
0:58.218–0:59.831
it the problem with the
0:59.831–1:01.700
quantization that we have
1:01.700–1:03.178
but what if we have a
1:03.178–1:05.117
quantization of the same
1:05.117–1:06.779
exact model with just
1:06.779–1:09.180
two-bit quantization instead
1:09.180–1:10.413
of the four-bit
1:10.413–1:12.311
quantization can we run
1:12.311–1:14.208
that at all well welcome
1:14.208–1:16.580
to the QUEN model quantized to
1:16.580–1:19.263
2-bit called as the
1:19.263–1:22.617
QEN3.827BGSQRCOIQ2QS
1:22.617–1:25.971
model and this model can
1:25.971–1:29.660
load in the 24GB of unified
1:29.660–1:32.460
machine and it can support a full GPU
1:32.460–1:34.327
offloading as well as it
1:34.327–1:35.633
has multi-token
1:35.633–1:37.220
prediction enabled
1:37.220–1:39.443
as well and this model
1:39.443–1:41.418
can easily fit in an
1:41.418–1:43.888
Apple M4 machine of 24GB
1:43.888–1:45.740
of unified memory
1:45.740–1:47.415
which includes the model
1:47.415–1:49.010
kv cache runtime and mac
1:49.010–1:50.764
operating system without
1:50.764–1:52.040
hitting the memory
1:52.040–1:54.312
ceiling as well so it can easily load
1:54.312–1:55.525
everything for you
1:55.525–1:56.661
within your apple
1:56.661–1:58.100
machine which is quite
1:58.100–1:59.300
amazing so the memory
1:59.300–2:00.633
requirement is going to
2:00.633–2:01.900
be so much less because
2:01.900–2:03.500
of the two-bit quantization
2:03.500–2:04.567
that you have got in
2:04.567–2:05.967
this particular model so
2:05.967–2:07.033
how exactly is this
2:07.033–2:09.080
possible will the quen 3.8 right
2:09.080–2:10.297
now will lose its
2:10.297–2:12.123
intelligence ability or
2:12.123–2:13.601
the output will be of
2:13.601–2:15.600
less quality or how exactly
2:15.600–2:16.911
is this happening what
2:16.911–2:18.015
exactly is this new
2:18.015–2:19.050
model of a two-bit
2:19.050–2:21.120
quantization well this particular
2:21.120–2:22.760
quen model is a standard
2:22.760–2:24.317
quen model but instead
2:24.317–2:25.711
of applying the same
2:25.711–2:27.760
quantization everywhere the
2:27.760–2:29.254
technique will determine
2:29.254–2:30.544
which tensor deserves
2:30.544–2:31.970
more precision and which
2:31.970–2:33.600
can tolerate the aggressive
2:33.600–2:34.733
compression that's
2:34.733–2:35.733
exactly what this
2:35.733–2:37.000
particular technique
2:37.000–2:38.333
does and what exactly is
2:38.333–2:39.200
this technique
2:39.200–2:40.600
that we're talking about
2:40.600–2:42.171
the gsq rco or otherwise
2:42.171–2:43.677
called as the gumbel
2:43.677–2:45.360
softmax quantization
2:45.360–2:47.982
which intelligently optimizes the
2:47.982–2:49.905
quantization value while
2:49.905–2:52.440
RCO intelligently decide where to
2:52.440–2:54.446
allocate more or fewer
2:54.446–2:57.613
bits across the models or tens are so
2:57.613–3:00.780
essentially even if the model sizes
3:00.780–3:02.758
is going to be reduced
3:02.758–3:04.845
from the 16 bpw which is
3:04.845–3:07.043
a 16-bit original model
3:07.043–3:09.240
to a 2-bit quantization
3:09.240–3:10.978
model it is going to be
3:10.978–3:12.812
of almost 6.4 times of a
3:12.812–3:14.742
size lower but still the
3:14.742–3:16.480
model is going to give
3:16.480–3:18.128
you an amazing precision
3:18.128–3:19.462
over here that is the
3:19.462–3:21.110
power of this particular
3:21.110–3:22.680
model itself and that's
3:22.680–3:23.869
the reason why even
3:23.869–3:25.206
though the size of the
3:25.206–3:26.691
model is so much smaller
3:26.691–3:28.400
the quality of the output is
3:28.400–3:29.908
still going to be way
3:29.908–3:31.504
more same like how you
3:31.504–3:32.746
can expect with a
3:32.746–3:35.140
quantization 4 model of the same
3:35.140–3:36.340
QN model that you have
3:36.340–3:37.673
got that's exactly what
3:37.673–3:39.073
this particular model is
3:39.073–3:40.273
and we are going to see
3:40.273–3:42.307
in this particular video
3:42.307–3:44.439
how we can run the same
3:44.439–3:46.690
exact QN 2-bit model in
3:46.690–3:48.940
the Mac Mini M4 machine
3:48.940–3:50.693
and we're also going to
3:50.693–3:52.446
see how fast it is going
3:52.446–3:53.553
to be doing the
3:53.553–3:55.860
inferencing for us and what it
3:55.860–3:57.225
means with different
3:57.225–3:58.514
sizes of the KV cache
3:58.514–3:59.803
adjustment that I'm
3:59.803–4:01.320
going to be doing in this
4:01.320–4:02.958
particular video and i
4:02.958–4:04.510
will show you how it is
4:04.510–4:06.062
going to be affecting
4:06.062–4:07.700
the the speed as well as
4:07.700–4:09.068
the number of tokens per
4:09.068–4:10.162
second as well so in
4:10.162–4:11.599
this particular video we
4:11.599–4:13.240
are going to see which kv size
4:13.240–4:14.736
or which kv cache is
4:14.736–4:16.513
going to be faster like
4:16.513–4:18.103
16 bit or 4 bit or 8 bit
4:18.103–4:20.160
quantization and which is
4:20.160–4:21.531
going to take more time
4:21.531–4:22.758
and what is the total
4:22.758–4:23.985
number of tokens per
4:23.985–4:25.500
second that you are going
4:25.500–4:26.633
to be getting uh with
4:26.633–4:27.700
different kinds of
4:27.700–4:28.900
settings that you are
4:28.900–4:30.700
going to be doing in the lm studio
4:30.700–4:31.900
and one more time this
4:31.900–4:33.160
particular model is
4:33.160–4:34.657
actually not available
4:34.657–4:35.780
in the mlx format i
4:35.780–4:37.113
unfortunately have got
4:37.113–4:38.380
only the ggf format and
4:38.380–4:39.647
i am going to be running
4:39.647–4:40.913
this particular model
4:40.913–4:42.047
in the lm studio and i
4:42.047–4:43.180
will show you how the
4:43.180–4:44.527
tps is going to be for
4:44.527–4:46.520
the different kv cache that we
4:46.520–4:47.853
are going to be setting
4:47.853–4:49.957
and running it but you know what this
4:49.957–4:51.780
particular model is not really
4:51.780–4:53.085
going to hit the out of
4:53.085–4:54.535
memory exception based
4:54.535–4:55.695
on the different kv
4:55.695–4:57.580
cache setting you can actually
4:57.580–4:58.780
see that this model is
4:58.780–4:59.913
actually going to be
4:59.913–5:01.180
performant as well and
5:01.180–5:02.513
this is the good news for
5:02.513–5:03.780
this particular model
5:03.780–5:05.047
well as that said let's
5:05.047–5:06.380
start doing the testing
5:06.380–5:07.913
of the model with different
5:07.913–5:09.247
quantization so you can
5:09.247–5:10.380
see that i have got my
5:10.380–5:11.447
mac mini m4 machine
5:11.447–5:12.847
total number of physical
5:12.847–5:14.066
that you can see over
5:14.066–5:15.632
here is 24 gig and i'm
5:15.632–5:17.382
going to be loading the
5:17.382–5:19.500
uh the quen model uh in the lm
5:19.500–5:21.790
studio and i'm going to
5:21.790–5:24.081
set the context length
5:24.081–5:26.371
over here uh to at least
5:26.371–5:28.300
like a 30 31 or 32 000
5:28.300–5:29.567
uh over here and you can
5:29.567–5:30.633
see that this is the
5:30.633–5:31.767
maximum concurrent
5:31.767–5:33.433
prediction or instead of four
5:33.433–5:34.700
i'm going to be setting
5:34.700–5:35.900
it to one because it's
5:35.900–5:37.233
going to be reducing the
5:37.233–5:38.433
total lump compute as
5:38.433–5:39.700
well and i'm also going
5:39.700–5:40.986
to change the kv cache
5:40.986–5:43.146
quantization type there
5:43.146–5:45.100
so instead of using the
5:45.100–5:46.367
default i'm going to be
5:46.367–5:47.567
setting the fp16 this
5:47.567–5:48.833
time and i'm going to be
5:48.833–5:50.567
loading this particular model
5:50.567–5:51.900
and the moment i'm going
5:51.900–5:53.233
to load this particular
5:53.233–5:54.433
model you can see that
5:54.433–5:55.900
it is going to be consuming
5:55.900–5:57.100
around 20 gig or 21 gig
5:57.100–5:59.340
of the total memory uh
5:59.340–6:01.700
in my uh in my ram there
6:01.700–6:04.060
and now i'm going to be
6:04.060–6:05.000
running the the
6:05.000–6:06.301
questions over there
6:06.301–6:07.747
inferencing it without
6:07.747–6:09.193
the thinking enabled so
6:09.193–6:10.060
the moment i'm
6:10.060–6:11.558
going to run let's say
6:11.558–6:13.223
hi over here i'm getting
6:13.223–6:14.805
around 4.57 tokens per
6:14.805–6:16.220
second and now if i'm
6:16.220–6:17.884
going to say again like
6:17.884–6:19.460
hi again it is going to
6:19.460–6:20.774
give me around 4.9
6:20.774–6:22.700
tokens per second this is a
6:22.700–6:23.967
dense model that we're
6:23.967–6:25.300
talking about guys look
6:25.300–6:26.433
at that and now if i'm
6:26.433–6:27.900
going to pass a long prompt
6:27.900–6:29.033
to write a selenium c
6:29.033–6:30.375
sharp dot net code for
6:30.375–6:32.099
google search operation
6:32.099–6:33.660
with page object model
6:33.660–6:35.127
and dependency injection
6:35.127–6:36.327
and if i'm going to run
6:36.327–6:37.460
it i'm going to start
6:37.460–6:38.793
the timer as well just in
6:38.793–6:40.060
case and if i'm going to
6:40.060–6:41.127
show you the memory
6:41.127–6:42.460
spike there you see that
6:42.460–6:43.927
the memory pressure is not
6:43.927–6:45.327
increasing because it's
6:45.327–6:46.660
a two-bit quantization
6:46.660–6:47.793
model and at the same
6:47.793–6:49.127
time you can see that i'm
6:49.127–6:50.327
actually getting the
6:50.327–6:51.527
output over here it is
6:51.527–6:52.660
not as fast as you can
6:52.660–6:54.193
imagine it is not super fast
6:54.193–6:55.393
like how we can expect
6:55.393–6:56.460
with a like an m5 max
6:56.460–6:57.727
machine but you can see
6:57.727–6:59.127
that within four minutes
6:59.127–7:00.700
i got the output with a
7:00.700–7:02.558
5.67 tokens per second
7:02.558–7:04.122
this is not bad to be
7:04.122–7:05.980
honest this is working
7:05.980–7:07.313
it's not really hitting
7:07.313–7:08.647
that memory ceiling and
7:08.647–7:09.580
if you try to run a
7:09.580–7:11.313
four-bit quantization this is
7:11.313–7:12.247
never going to be
7:12.247–7:13.580
running for you and four
7:13.580–7:14.847
minutes is not that bad
7:14.847–7:16.647
at all now i'm going to change the
7:16.647–7:18.047
quantization to uh eight
7:18.047–7:19.313
just the quantization
7:19.313–7:20.513
eight there for the kv
7:20.513–7:21.913
cache alone and i'm going
7:21.913–7:22.913
to be loading this
7:22.913–7:24.446
particular model and i'm
7:24.446–7:25.875
going to ask the same
7:25.875–7:28.060
exact prompt there sending a hi
7:28.060–7:29.681
message and i'm going to
7:29.681–7:31.301
say hi again i'm getting
7:31.301–7:32.922
5.47 token and i'm going
7:32.922–7:34.380
to send the same exact
7:34.380–7:35.768
Sedium code prompt and
7:35.768–7:37.083
I'm going to start the
7:37.083–7:38.545
timer over there you can
7:38.545–7:39.860
see that this time the
7:39.860–7:41.211
time is going to be a
7:41.211–7:42.983
bit higher than compared
7:42.983–7:44.418
to the FP16 there the
7:44.418–7:46.360
reason is because actually
7:46.360–7:47.895
it's not that even if
7:47.895–7:49.430
you try to reduce the
7:49.430–7:51.326
quantization the things
7:51.326–7:52.680
will be faster the
7:52.680–7:54.473
inferencing will exactly
7:54.473–7:56.102
be the same exact tokens
7:56.102–7:57.569
per second because it
7:57.569–7:59.280
also need to de-quantize
7:59.280–7:59.840
安安
8:02.400–8:05.900
然後它會不會有更快。
8:05.900–8:09.700
所以,它會不會有更快。
8:09.700–8:14.900
所以,它會不會有更快。
8:14.900–8:19.160
than compared to the FP16 for you over there.
8:19.260–8:20.043
See now,
8:20.043–8:23.960
this is going to be the FP4 that we have got.
8:24.060–8:25.260
I'm going to be asking
8:25.260–8:26.660
the same exact question.
8:26.660–8:27.727
The total number of
8:27.727–8:29.060
tokens per second is not
8:29.060–8:29.993
changing at all.
8:29.993–8:31.193
And now if I'm going to
8:31.193–8:33.060
be running the same exact prompt,
8:33.060–8:34.393
the Serenium WebDriver
8:34.393–8:35.793
question over there with
8:35.793–8:37.260
the quantization 4 there,
8:37.260–8:38.860
instead of the 4.04 minutes,
8:38.860–8:40.940
which was taking in FP16,
8:41.160–8:43.940
it is 4.46 as you can see here.
8:43.940–8:44.740
so based on the
8:44.740–8:46.073
quantization change it
8:46.073–8:47.407
is also obviously going
8:47.407–8:49.007
to change the time over there
8:49.007–8:50.477
so this proves the point
8:50.477–8:51.950
that the inferencing
8:51.950–8:53.505
actually works even in
8:53.505–8:55.060
LM studio for us and you
8:55.060–8:56.327
can see that the output
8:56.327–8:57.660
has got no compromise as
8:57.660–8:58.860
well the output looks
8:58.860–9:00.193
pretty much exactly the
9:00.193–9:01.393
same and I can see that
9:01.393–9:02.527
it is still working I
9:02.527–9:03.727
mean there is a change
9:03.727–9:04.993
in the output of course
9:04.993–9:06.127
in the web driver for
9:06.127–9:07.593
the dependency injection
9:07.593–9:08.927
it's there over here but
9:08.927–9:10.193
in here you can see that
9:10.193–9:11.660
the dependency injection
9:11.660–9:12.660
setup has got a bit
9:12.660–9:13.793
different with like
9:13.793–9:15.327
driver factory class there
9:15.327–9:16.193
that's the only
9:16.193–9:17.593
difference between both
9:17.593–9:18.727
of them but overall i
9:18.727–9:20.660
can actually see that it is working
9:20.660–9:21.993
pretty much as expected
9:21.993–9:23.127
the last test which i
9:23.127–9:24.260
wanted to do with the
9:24.260–9:25.460
fp16 of the same exact
9:25.460–9:26.727
model is by connecting
9:26.727–9:27.864
to a pi coding agent i
9:27.864–9:29.330
want to really see if
9:29.330–9:31.400
this is going to work or not so
9:31.400–9:33.152
i have set the fp16 over
9:33.152–9:34.904
here i'm running it and
9:34.904–9:36.656
i'm going to be opening
9:36.656–9:38.500
the pi coding agent over
9:38.500–9:39.705
here and i'm going to
9:39.705–9:41.052
choose the model as you
9:41.052–9:42.328
can see i'm going to be
9:42.328–9:44.100
chasing choosing that gsq rco
9:44.100–9:46.053
unsloth mtp model there
9:46.053–9:47.909
and i'm going to be just
9:47.909–9:49.569
saying hi over there
9:49.569–9:51.620
even for a high message it
9:51.620–9:53.143
was taking a long time
9:53.143–9:54.581
it's not very fast as
9:54.581–9:56.104
you can imagine it was
9:56.104–9:57.880
taking a long time and the
9:57.880–9:59.193
output you can see that
9:59.193–10:00.505
it is going to be giving
10:00.505–10:01.818
you very very slow here
10:01.818–10:03.200
which is quite expected
10:03.200–10:04.515
because this is a dense
10:04.515–10:05.623
model and now i have
10:05.623–10:06.869
told it to analyze the
10:06.869–10:08.600
code for me in this particular
10:08.600–10:10.875
repository and that took
10:10.875–10:12.932
me more than 27 minutes
10:12.932–10:15.099
just to analyze the code
10:15.099–10:16.940
i mean it went so deep
10:16.940–10:18.207
to be honest like going
10:18.207–10:19.473
through each and every
10:19.473–10:20.473
file even start to
10:20.473–10:21.940
figure out what exactly is
10:21.940–10:22.940
the problem in the
10:22.940–10:24.073
particular code but
10:24.073–10:25.473
actually took 27 minutes
10:25.473–10:27.073
to give me the output which is
10:27.073–10:28.273
what really happened
10:28.273–10:29.540
over here as you can see
10:29.540–10:30.917
so long story short you
10:30.917–10:32.940
can run a two-bit quantization
10:32.940–10:34.659
QUEN 3.8 27 billion
10:34.659–10:36.593
parameter model in an
10:36.593–10:38.097
apple m4 mac mini
10:38.097–10:41.320
machine without hitting the memory
10:41.320–10:43.035
ceiling but what is the
10:43.035–10:44.840
actual technique which
10:44.840–10:46.104
makes the two big
10:46.104–10:48.360
quantization which helps you
10:48.360–10:49.360
run in a mac mini m4
10:49.360–10:50.693
machine is actually the
10:50.693–10:51.827
most important part
10:51.827–10:53.627
that's the reason why i actually
10:53.627–10:54.627
wanted to show you
10:54.627–10:56.027
what's really happening
10:56.027–10:57.093
over here and other
10:57.093–10:58.893
thing is you may ask what happens
10:58.893–11:00.024
if you try to run the
11:00.024–11:01.881
same exact model in the
11:01.881–11:03.543
Apple M5 Max machine
11:03.543–11:05.400
right so I'm going to be
11:05.400–11:07.153
loading the same exact
11:07.153–11:08.629
model as you can see
11:08.629–11:10.382
over here and I'm going
11:10.382–11:12.320
to be doing an FP16 here as
11:12.320–11:13.833
well so FP16 Max current
11:13.833–11:15.271
prediction is going to
11:15.271–11:16.708
be one as well I'm going
11:16.708–11:18.600
to be loading this particular
11:18.600–11:19.800
model and let's try to
11:19.800–11:20.800
ask the same exact
11:20.800–11:22.067
question over here and
11:22.067–11:23.867
see how this is actually going to
11:23.867–11:25.920
在我的 Apple M5 Max machine
11:25.920–11:28.120
所以这个是128GB machine
11:28.120–11:29.360
所以你可能会被担心
11:29.360–11:31.000
要是转买它快速
11:31.000–11:32.160
你会被担心
11:32.160–11:34.120
要是100兆兆的
11:34.120–11:35.400
如果我会被担心
11:35.400–11:36.720
但如果我会被担心
11:36.720–11:39.000
同样的同样
11:39.000–11:40.320
在这个机器
11:40.320–11:42.600
你能看到它是
11:42.600–11:45.600
连接到27兆兆的
11:45.600–11:48.320
它是127兆兆的
11:48.320–11:49.960
所以它试试了
11:49.960–11:51.783
point that it's not just
11:51.783–11:53.150
about the two-bit
11:53.150–11:55.155
quantization model which
11:55.155–11:56.340
can run way more
11:56.340–11:57.861
faster in an apple m5
11:57.861–11:59.741
max machine because it's
11:59.741–12:01.351
even running in the m4
12:01.351–12:03.320
mini machine but the thing
12:03.320–12:04.602
is even though it is a
12:04.602–12:06.260
two-bit quantization the
12:06.260–12:07.617
quality of the output
12:07.617–12:09.200
still remains and that's
12:09.200–12:10.556
the reason the the
12:10.556–12:12.363
technique of the gsq rco
12:12.363–12:13.809
sits in so it safely
12:13.809–12:16.340
chooses the best tensor which can
0:00.000–0:01.267
enHi guys, welcome back.
Hi guys, welcome back.
0:01.540–0:02.665
enIn this video,
In this video,
0:02.665–0:04.447
enwe'll be talking about
we'll be talking about
0:04.447–0:06.134
enhow you can run a QN 3.8
how you can run a QN 3.8
0:06.134–0:07.822
en27 billion parameter
27 billion parameter
0:07.822–0:09.603
enmodel in an Apple M4 Mac
model in an Apple M4 Mac
0:09.603–0:11.385
enMini machine with just
Mini machine with just
0:11.385–0:13.260
en24 GB of unified memory.
24 GB of unified memory.
0:13.260–0:15.013
enWe know that QN 3.8 27
We know that QN 3.8 27
0:15.013–0:17.179
enbillion parameter model
billion parameter model
0:17.179–0:19.860
enwill be of at least 15 GB of size.
will be of at least 15 GB of size.
0:19.860–0:21.918
enand loading the entire
and loading the entire
0:21.918–0:23.760
enmodel in the unified
model in the unified
0:23.760–0:25.602
enmemory will not only
memory will not only
0:25.602–0:27.660
enload the model but also
load the model but also
0:27.660–0:29.098
enloads the kvcache
loads the kvcache
0:29.098–0:30.631
enruntime and the mac
runtime and the mac
0:30.631–0:32.356
enoperating system all
operating system all
0:32.356–0:35.040
entogether and while you load all of
together and while you load all of
0:35.040–0:36.568
enthem in the vram it is
them in the vram it is
0:36.568–0:38.365
endefinitely going to hit
definitely going to hit
0:38.365–0:40.073
enthe memory ceiling for
the memory ceiling for
0:40.073–0:41.780
enyou and it is going to be
you and it is going to be
0:41.780–0:43.280
engetting you the out of
getting you the out of
0:43.280–0:44.947
enmemory exception so how
memory exception so how
0:44.947–0:46.447
encan we even handle the
can we even handle the
0:46.447–0:48.280
ensituation of these kind of
situation of these kind of
0:48.280–0:49.935
enmemory problem and can
memory problem and can
0:49.935–0:51.415
enwe even run a QUEN 3.8
we even run a QUEN 3.8
0:51.415–0:52.983
en27 billion parameter
27 billion parameter
0:52.983–0:55.160
enmodel in this machine and is it
model in this machine and is it
0:55.160–0:56.689
enjust the problem with
just the problem with
0:56.689–0:58.218
enthe model itself or is
the model itself or is
0:58.218–0:59.831
enit the problem with the
it the problem with the
0:59.831–1:01.700
enquantization that we have
quantization that we have
1:01.700–1:03.178
enbut what if we have a
but what if we have a
1:03.178–1:05.117
enquantization of the same
quantization of the same
1:05.117–1:06.779
enexact model with just
exact model with just
1:06.779–1:09.180
entwo-bit quantization instead
two-bit quantization instead
1:09.180–1:10.413
enof the four-bit
of the four-bit
1:10.413–1:12.311
enquantization can we run
quantization can we run
1:12.311–1:14.208
enthat at all well welcome
that at all well welcome
1:14.208–1:16.580
ento the QUEN model quantized to
to the QUEN model quantized to
1:16.580–1:19.263
en2-bit called as the
2-bit called as the
1:19.263–1:22.617
enQEN3.827BGSQRCOIQ2QS
QEN3.827BGSQRCOIQ2QS
1:22.617–1:25.971
enmodel and this model can
model and this model can
1:25.971–1:29.660
enload in the 24GB of unified
load in the 24GB of unified
1:29.660–1:32.460
enmachine and it can support a full GPU
machine and it can support a full GPU
1:32.460–1:34.327
enoffloading as well as it
offloading as well as it
1:34.327–1:35.633
enhas multi-token
has multi-token
1:35.633–1:37.220
enprediction enabled
prediction enabled
1:37.220–1:39.443
enas well and this model
as well and this model
1:39.443–1:41.418
encan easily fit in an
can easily fit in an
1:41.418–1:43.888
enApple M4 machine of 24GB
Apple M4 machine of 24GB
1:43.888–1:45.740
enof unified memory
of unified memory
1:45.740–1:47.415
enwhich includes the model
which includes the model
1:47.415–1:49.010
enkv cache runtime and mac
kv cache runtime and mac
1:49.010–1:50.764
enoperating system without
operating system without
1:50.764–1:52.040
enhitting the memory
hitting the memory
1:52.040–1:54.312
enceiling as well so it can easily load
ceiling as well so it can easily load
1:54.312–1:55.525
eneverything for you
everything for you
1:55.525–1:56.661
enwithin your apple
within your apple
1:56.661–1:58.100
enmachine which is quite
machine which is quite
1:58.100–1:59.300
enamazing so the memory
amazing so the memory
1:59.300–2:00.633
enrequirement is going to
requirement is going to
2:00.633–2:01.900
enbe so much less because
be so much less because
2:01.900–2:03.500
enof the two-bit quantization
of the two-bit quantization
2:03.500–2:04.567
enthat you have got in
that you have got in
2:04.567–2:05.967
enthis particular model so
this particular model so
2:05.967–2:07.033
enhow exactly is this
how exactly is this
2:07.033–2:09.080
enpossible will the quen 3.8 right
possible will the quen 3.8 right
2:09.080–2:10.297
ennow will lose its
now will lose its
2:10.297–2:12.123
enintelligence ability or
intelligence ability or
2:12.123–2:13.601
enthe output will be of
the output will be of
2:13.601–2:15.600
enless quality or how exactly
less quality or how exactly
2:15.600–2:16.911
enis this happening what
is this happening what
2:16.911–2:18.015
enexactly is this new
exactly is this new
2:18.015–2:19.050
enmodel of a two-bit
model of a two-bit
2:19.050–2:21.120
enquantization well this particular
quantization well this particular
2:21.120–2:22.760
enquen model is a standard
quen model is a standard
2:22.760–2:24.317
enquen model but instead
quen model but instead
2:24.317–2:25.711
enof applying the same
of applying the same
2:25.711–2:27.760
enquantization everywhere the
quantization everywhere the
2:27.760–2:29.254
entechnique will determine
technique will determine
2:29.254–2:30.544
enwhich tensor deserves
which tensor deserves
2:30.544–2:31.970
enmore precision and which
more precision and which
2:31.970–2:33.600
encan tolerate the aggressive
can tolerate the aggressive
2:33.600–2:34.733
encompression that's
compression that's
2:34.733–2:35.733
enexactly what this
exactly what this
2:35.733–2:37.000
enparticular technique
particular technique
2:37.000–2:38.333
endoes and what exactly is
does and what exactly is
2:38.333–2:39.200
enthis technique
this technique
2:39.200–2:40.600
enthat we're talking about
that we're talking about
2:40.600–2:42.171
enthe gsq rco or otherwise
the gsq rco or otherwise
2:42.171–2:43.677
encalled as the gumbel
called as the gumbel
2:43.677–2:45.360
ensoftmax quantization
softmax quantization
2:45.360–2:47.982
enwhich intelligently optimizes the
which intelligently optimizes the
2:47.982–2:49.905
enquantization value while
quantization value while
2:49.905–2:52.440
enRCO intelligently decide where to
RCO intelligently decide where to
2:52.440–2:54.446
enallocate more or fewer
allocate more or fewer
2:54.446–2:57.613
enbits across the models or tens are so
bits across the models or tens are so
2:57.613–3:00.780
enessentially even if the model sizes
essentially even if the model sizes
3:00.780–3:02.758
enis going to be reduced
is going to be reduced
3:02.758–3:04.845
enfrom the 16 bpw which is
from the 16 bpw which is
3:04.845–3:07.043
ena 16-bit original model
a 16-bit original model
3:07.043–3:09.240
ento a 2-bit quantization
to a 2-bit quantization
3:09.240–3:10.978
enmodel it is going to be
model it is going to be
3:10.978–3:12.812
enof almost 6.4 times of a
of almost 6.4 times of a
3:12.812–3:14.742
ensize lower but still the
size lower but still the
3:14.742–3:16.480
enmodel is going to give
model is going to give
3:16.480–3:18.128
enyou an amazing precision
you an amazing precision
3:18.128–3:19.462
enover here that is the
over here that is the
3:19.462–3:21.110
enpower of this particular
power of this particular
3:21.110–3:22.680
enmodel itself and that's
model itself and that's
3:22.680–3:23.869
enthe reason why even
the reason why even
3:23.869–3:25.206
enthough the size of the
though the size of the
3:25.206–3:26.691
enmodel is so much smaller
model is so much smaller
3:26.691–3:28.400
enthe quality of the output is
the quality of the output is
3:28.400–3:29.908
enstill going to be way
still going to be way
3:29.908–3:31.504
enmore same like how you
more same like how you
3:31.504–3:32.746
encan expect with a
can expect with a
3:32.746–3:35.140
enquantization 4 model of the same
quantization 4 model of the same
3:35.140–3:36.340
enQN model that you have
QN model that you have
3:36.340–3:37.673
engot that's exactly what
got that's exactly what
3:37.673–3:39.073
enthis particular model is
this particular model is
3:39.073–3:40.273
enand we are going to see
and we are going to see
3:40.273–3:42.307
enin this particular video
in this particular video
3:42.307–3:44.439
enhow we can run the same
how we can run the same
3:44.439–3:46.690
enexact QN 2-bit model in
exact QN 2-bit model in
3:46.690–3:48.940
enthe Mac Mini M4 machine
the Mac Mini M4 machine
3:48.940–3:50.693
enand we're also going to
and we're also going to
3:50.693–3:52.446
ensee how fast it is going
see how fast it is going
3:52.446–3:53.553
ento be doing the
to be doing the
3:53.553–3:55.860
eninferencing for us and what it
inferencing for us and what it
3:55.860–3:57.225
enmeans with different
means with different
3:57.225–3:58.514
ensizes of the KV cache
sizes of the KV cache
3:58.514–3:59.803
enadjustment that I'm
adjustment that I'm
3:59.803–4:01.320
engoing to be doing in this
going to be doing in this
4:01.320–4:02.958
enparticular video and i
particular video and i
4:02.958–4:04.510
enwill show you how it is
will show you how it is
4:04.510–4:06.062
engoing to be affecting
going to be affecting
4:06.062–4:07.700
enthe the speed as well as
the the speed as well as
4:07.700–4:09.068
enthe number of tokens per
the number of tokens per
4:09.068–4:10.162
ensecond as well so in
second as well so in
4:10.162–4:11.599
enthis particular video we
this particular video we
4:11.599–4:13.240
enare going to see which kv size
are going to see which kv size
4:13.240–4:14.736
enor which kv cache is
or which kv cache is
4:14.736–4:16.513
engoing to be faster like
going to be faster like
4:16.513–4:18.103
en16 bit or 4 bit or 8 bit
16 bit or 4 bit or 8 bit
4:18.103–4:20.160
enquantization and which is
quantization and which is
4:20.160–4:21.531
engoing to take more time
going to take more time
4:21.531–4:22.758
enand what is the total
and what is the total
4:22.758–4:23.985
ennumber of tokens per
number of tokens per
4:23.985–4:25.500
ensecond that you are going
second that you are going
4:25.500–4:26.633
ento be getting uh with
to be getting uh with
4:26.633–4:27.700
endifferent kinds of
different kinds of
4:27.700–4:28.900
ensettings that you are
settings that you are
4:28.900–4:30.700
engoing to be doing in the lm studio
going to be doing in the lm studio
4:30.700–4:31.900
enand one more time this
and one more time this
4:31.900–4:33.160
enparticular model is
particular model is
4:33.160–4:34.657
enactually not available
actually not available
4:34.657–4:35.780
enin the mlx format i
in the mlx format i
4:35.780–4:37.113
enunfortunately have got
unfortunately have got
4:37.113–4:38.380
enonly the ggf format and
only the ggf format and
4:38.380–4:39.647
eni am going to be running
i am going to be running
4:39.647–4:40.913
enthis particular model
this particular model
4:40.913–4:42.047
enin the lm studio and i
in the lm studio and i
4:42.047–4:43.180
enwill show you how the
will show you how the
4:43.180–4:44.527
entps is going to be for
tps is going to be for
4:44.527–4:46.520
enthe different kv cache that we
the different kv cache that we
4:46.520–4:47.853
enare going to be setting
are going to be setting
4:47.853–4:49.957
enand running it but you know what this
and running it but you know what this
4:49.957–4:51.780
enparticular model is not really
particular model is not really
4:51.780–4:53.085
engoing to hit the out of
going to hit the out of
4:53.085–4:54.535
enmemory exception based
memory exception based
4:54.535–4:55.695
enon the different kv
on the different kv
4:55.695–4:57.580
encache setting you can actually
cache setting you can actually
4:57.580–4:58.780
ensee that this model is
see that this model is
4:58.780–4:59.913
enactually going to be
actually going to be
4:59.913–5:01.180
enperformant as well and
performant as well and
5:01.180–5:02.513
enthis is the good news for
this is the good news for
5:02.513–5:03.780
enthis particular model
this particular model
5:03.780–5:05.047
enwell as that said let's
well as that said let's
5:05.047–5:06.380
enstart doing the testing
start doing the testing
5:06.380–5:07.913
enof the model with different
of the model with different
5:07.913–5:09.247
enquantization so you can
quantization so you can
5:09.247–5:10.380
ensee that i have got my
see that i have got my
5:10.380–5:11.447
enmac mini m4 machine
mac mini m4 machine
5:11.447–5:12.847
entotal number of physical
total number of physical
5:12.847–5:14.066
enthat you can see over
that you can see over
5:14.066–5:15.632
enhere is 24 gig and i'm
here is 24 gig and i'm
5:15.632–5:17.382
engoing to be loading the
going to be loading the
5:17.382–5:19.500
enuh the quen model uh in the lm
uh the quen model uh in the lm
5:19.500–5:21.790
enstudio and i'm going to
studio and i'm going to
5:21.790–5:24.081
enset the context length
set the context length
5:24.081–5:26.371
enover here uh to at least
over here uh to at least
5:26.371–5:28.300
enlike a 30 31 or 32 000
like a 30 31 or 32 000
5:28.300–5:29.567
enuh over here and you can
uh over here and you can
5:29.567–5:30.633
ensee that this is the
see that this is the
5:30.633–5:31.767
enmaximum concurrent
maximum concurrent
5:31.767–5:33.433
enprediction or instead of four
prediction or instead of four
5:33.433–5:34.700
eni'm going to be setting
i'm going to be setting
5:34.700–5:35.900
enit to one because it's
it to one because it's
5:35.900–5:37.233
engoing to be reducing the
going to be reducing the
5:37.233–5:38.433
entotal lump compute as
total lump compute as
5:38.433–5:39.700
enwell and i'm also going
well and i'm also going
5:39.700–5:40.986
ento change the kv cache
to change the kv cache
5:40.986–5:43.146
enquantization type there
quantization type there
5:43.146–5:45.100
enso instead of using the
so instead of using the
5:45.100–5:46.367
endefault i'm going to be
default i'm going to be
5:46.367–5:47.567
ensetting the fp16 this
setting the fp16 this
5:47.567–5:48.833
entime and i'm going to be
time and i'm going to be
5:48.833–5:50.567
enloading this particular model
loading this particular model
5:50.567–5:51.900
enand the moment i'm going
and the moment i'm going
5:51.900–5:53.233
ento load this particular
to load this particular
5:53.233–5:54.433
enmodel you can see that
model you can see that
5:54.433–5:55.900
enit is going to be consuming
it is going to be consuming
5:55.900–5:57.100
enaround 20 gig or 21 gig
around 20 gig or 21 gig
5:57.100–5:59.340
enof the total memory uh
of the total memory uh
5:59.340–6:01.700
enin my uh in my ram there
in my uh in my ram there
6:01.700–6:04.060
enand now i'm going to be
and now i'm going to be
6:04.060–6:05.000
enrunning the the
running the the
6:05.000–6:06.301
enquestions over there
questions over there
6:06.301–6:07.747
eninferencing it without
inferencing it without
6:07.747–6:09.193
enthe thinking enabled so
the thinking enabled so
6:09.193–6:10.060
enthe moment i'm
the moment i'm
6:10.060–6:11.558
engoing to run let's say
going to run let's say
6:11.558–6:13.223
enhi over here i'm getting
hi over here i'm getting
6:13.223–6:14.805
enaround 4.57 tokens per
around 4.57 tokens per
6:14.805–6:16.220
ensecond and now if i'm
second and now if i'm
6:16.220–6:17.884
engoing to say again like
going to say again like
6:17.884–6:19.460
enhi again it is going to
hi again it is going to
6:19.460–6:20.774
engive me around 4.9
give me around 4.9
6:20.774–6:22.700
entokens per second this is a
tokens per second this is a
6:22.700–6:23.967
endense model that we're
dense model that we're
6:23.967–6:25.300
entalking about guys look
talking about guys look
6:25.300–6:26.433
enat that and now if i'm
at that and now if i'm
6:26.433–6:27.900
engoing to pass a long prompt
going to pass a long prompt
6:27.900–6:29.033
ento write a selenium c
to write a selenium c
6:29.033–6:30.375
ensharp dot net code for
sharp dot net code for
6:30.375–6:32.099
engoogle search operation
google search operation
6:32.099–6:33.660
enwith page object model
with page object model
6:33.660–6:35.127
enand dependency injection
and dependency injection
6:35.127–6:36.327
enand if i'm going to run
and if i'm going to run
6:36.327–6:37.460
enit i'm going to start
it i'm going to start
6:37.460–6:38.793
enthe timer as well just in
the timer as well just in
6:38.793–6:40.060
encase and if i'm going to
case and if i'm going to
6:40.060–6:41.127
enshow you the memory
show you the memory
6:41.127–6:42.460
enspike there you see that
spike there you see that
6:42.460–6:43.927
enthe memory pressure is not
the memory pressure is not
6:43.927–6:45.327
enincreasing because it's
increasing because it's
6:45.327–6:46.660
ena two-bit quantization
a two-bit quantization
6:46.660–6:47.793
enmodel and at the same
model and at the same
6:47.793–6:49.127
entime you can see that i'm
time you can see that i'm
6:49.127–6:50.327
enactually getting the
actually getting the
6:50.327–6:51.527
enoutput over here it is
output over here it is
6:51.527–6:52.660
ennot as fast as you can
not as fast as you can
6:52.660–6:54.193
enimagine it is not super fast
imagine it is not super fast
6:54.193–6:55.393
enlike how we can expect
like how we can expect
6:55.393–6:56.460
enwith a like an m5 max
with a like an m5 max
6:56.460–6:57.727
enmachine but you can see
machine but you can see
6:57.727–6:59.127
enthat within four minutes
that within four minutes
6:59.127–7:00.700
eni got the output with a
i got the output with a
7:00.700–7:02.558
en5.67 tokens per second
5.67 tokens per second
7:02.558–7:04.122
enthis is not bad to be
this is not bad to be
7:04.122–7:05.980
enhonest this is working
honest this is working
7:05.980–7:07.313
enit's not really hitting
it's not really hitting
7:07.313–7:08.647
enthat memory ceiling and
that memory ceiling and
7:08.647–7:09.580
enif you try to run a
if you try to run a
7:09.580–7:11.313
enfour-bit quantization this is
four-bit quantization this is
7:11.313–7:12.247
ennever going to be
never going to be
7:12.247–7:13.580
enrunning for you and four
running for you and four
7:13.580–7:14.847
enminutes is not that bad
minutes is not that bad
7:14.847–7:16.647
enat all now i'm going to change the
at all now i'm going to change the
7:16.647–7:18.047
enquantization to uh eight
quantization to uh eight
7:18.047–7:19.313
enjust the quantization
just the quantization
7:19.313–7:20.513
eneight there for the kv
eight there for the kv
7:20.513–7:21.913
encache alone and i'm going
cache alone and i'm going
7:21.913–7:22.913
ento be loading this
to be loading this
7:22.913–7:24.446
enparticular model and i'm
particular model and i'm
7:24.446–7:25.875
engoing to ask the same
going to ask the same
7:25.875–7:28.060
enexact prompt there sending a hi
exact prompt there sending a hi
7:28.060–7:29.681
enmessage and i'm going to
message and i'm going to
7:29.681–7:31.301
ensay hi again i'm getting
say hi again i'm getting
7:31.301–7:32.922
en5.47 token and i'm going
5.47 token and i'm going
7:32.922–7:34.380
ento send the same exact
to send the same exact
7:34.380–7:35.768
enSedium code prompt and
Sedium code prompt and
7:35.768–7:37.083
enI'm going to start the
I'm going to start the
7:37.083–7:38.545
entimer over there you can
timer over there you can
7:38.545–7:39.860
ensee that this time the
see that this time the
7:39.860–7:41.211
entime is going to be a
time is going to be a
7:41.211–7:42.983
enbit higher than compared
bit higher than compared
7:42.983–7:44.418
ento the FP16 there the
to the FP16 there the
7:44.418–7:46.360
enreason is because actually
reason is because actually
7:46.360–7:47.895
enit's not that even if
it's not that even if
7:47.895–7:49.430
enyou try to reduce the
you try to reduce the
7:49.430–7:51.326
enquantization the things
quantization the things
7:51.326–7:52.680
enwill be faster the
will be faster the
7:52.680–7:54.473
eninferencing will exactly
inferencing will exactly
7:54.473–7:56.102
enbe the same exact tokens
be the same exact tokens
7:56.102–7:57.569
enper second because it
per second because it
7:57.569–7:59.280
enalso need to de-quantize
also need to de-quantize
7:59.280–7:59.840
zh安安
安安
8:02.400–8:05.900
zh然後它會不會有更快。
然後它會不會有更快。
8:05.900–8:09.700
zh所以,它會不會有更快。
所以,它會不會有更快。
8:09.700–8:14.900
zh所以,它會不會有更快。
所以,它會不會有更快。
8:14.900–8:19.160
enthan compared to the FP16 for you over there.
than compared to the FP16 for you over there.
8:19.260–8:20.043
enSee now,
See now,
8:20.043–8:23.960
enthis is going to be the FP4 that we have got.
this is going to be the FP4 that we have got.
8:24.060–8:25.260
enI'm going to be asking
I'm going to be asking
8:25.260–8:26.660
enthe same exact question.
the same exact question.
8:26.660–8:27.727
enThe total number of
The total number of
8:27.727–8:29.060
entokens per second is not
tokens per second is not
8:29.060–8:29.993
enchanging at all.
changing at all.
8:29.993–8:31.193
enAnd now if I'm going to
And now if I'm going to
8:31.193–8:33.060
enbe running the same exact prompt,
be running the same exact prompt,
8:33.060–8:34.393
enthe Serenium WebDriver
the Serenium WebDriver
8:34.393–8:35.793
enquestion over there with
question over there with
8:35.793–8:37.260
enthe quantization 4 there,
the quantization 4 there,
8:37.260–8:38.860
eninstead of the 4.04 minutes,
instead of the 4.04 minutes,
8:38.860–8:40.940
enwhich was taking in FP16,
which was taking in FP16,
8:41.160–8:43.940
enit is 4.46 as you can see here.
it is 4.46 as you can see here.
8:43.940–8:44.740
enso based on the
so based on the
8:44.740–8:46.073
enquantization change it
quantization change it
8:46.073–8:47.407
enis also obviously going
is also obviously going
8:47.407–8:49.007
ento change the time over there
to change the time over there
8:49.007–8:50.477
enso this proves the point
so this proves the point
8:50.477–8:51.950
enthat the inferencing
that the inferencing
8:51.950–8:53.505
enactually works even in
actually works even in
8:53.505–8:55.060
enLM studio for us and you
LM studio for us and you
8:55.060–8:56.327
encan see that the output
can see that the output
8:56.327–8:57.660
enhas got no compromise as
has got no compromise as
8:57.660–8:58.860
enwell the output looks
well the output looks
8:58.860–9:00.193
enpretty much exactly the
pretty much exactly the
9:00.193–9:01.393
ensame and I can see that
same and I can see that
9:01.393–9:02.527
enit is still working I
it is still working I
9:02.527–9:03.727
enmean there is a change
mean there is a change
9:03.727–9:04.993
enin the output of course
in the output of course
9:04.993–9:06.127
enin the web driver for
in the web driver for
9:06.127–9:07.593
enthe dependency injection
the dependency injection
9:07.593–9:08.927
enit's there over here but
it's there over here but
9:08.927–9:10.193
enin here you can see that
in here you can see that
9:10.193–9:11.660
enthe dependency injection
the dependency injection
9:11.660–9:12.660
ensetup has got a bit
setup has got a bit
9:12.660–9:13.793
endifferent with like
different with like
9:13.793–9:15.327
endriver factory class there
driver factory class there
9:15.327–9:16.193
enthat's the only
that's the only
9:16.193–9:17.593
endifference between both
difference between both
9:17.593–9:18.727
enof them but overall i
of them but overall i
9:18.727–9:20.660
encan actually see that it is working
can actually see that it is working
9:20.660–9:21.993
enpretty much as expected
pretty much as expected
9:21.993–9:23.127
enthe last test which i
the last test which i
9:23.127–9:24.260
enwanted to do with the
wanted to do with the
9:24.260–9:25.460
enfp16 of the same exact
fp16 of the same exact
9:25.460–9:26.727
enmodel is by connecting
model is by connecting
9:26.727–9:27.864
ento a pi coding agent i
to a pi coding agent i
9:27.864–9:29.330
enwant to really see if
want to really see if
9:29.330–9:31.400
enthis is going to work or not so
this is going to work or not so
9:31.400–9:33.152
eni have set the fp16 over
i have set the fp16 over
9:33.152–9:34.904
enhere i'm running it and
here i'm running it and
9:34.904–9:36.656
eni'm going to be opening
i'm going to be opening
9:36.656–9:38.500
enthe pi coding agent over
the pi coding agent over
9:38.500–9:39.705
enhere and i'm going to
here and i'm going to
9:39.705–9:41.052
enchoose the model as you
choose the model as you
9:41.052–9:42.328
encan see i'm going to be
can see i'm going to be
9:42.328–9:44.100
enchasing choosing that gsq rco
chasing choosing that gsq rco
9:44.100–9:46.053
enunsloth mtp model there
unsloth mtp model there
9:46.053–9:47.909
enand i'm going to be just
and i'm going to be just
9:47.909–9:49.569
ensaying hi over there
saying hi over there
9:49.569–9:51.620
eneven for a high message it
even for a high message it
9:51.620–9:53.143
enwas taking a long time
was taking a long time
9:53.143–9:54.581
enit's not very fast as
it's not very fast as
9:54.581–9:56.104
enyou can imagine it was
you can imagine it was
9:56.104–9:57.880
entaking a long time and the
taking a long time and the
9:57.880–9:59.193
enoutput you can see that
output you can see that
9:59.193–10:00.505
enit is going to be giving
it is going to be giving
10:00.505–10:01.818
enyou very very slow here
you very very slow here
10:01.818–10:03.200
enwhich is quite expected
which is quite expected
10:03.200–10:04.515
enbecause this is a dense
because this is a dense
10:04.515–10:05.623
enmodel and now i have
model and now i have
10:05.623–10:06.869
entold it to analyze the
told it to analyze the
10:06.869–10:08.600
encode for me in this particular
code for me in this particular
10:08.600–10:10.875
enrepository and that took
repository and that took
10:10.875–10:12.932
enme more than 27 minutes
me more than 27 minutes
10:12.932–10:15.099
enjust to analyze the code
just to analyze the code
10:15.099–10:16.940
eni mean it went so deep
i mean it went so deep
10:16.940–10:18.207
ento be honest like going
to be honest like going
10:18.207–10:19.473
enthrough each and every
through each and every
10:19.473–10:20.473
enfile even start to
file even start to
10:20.473–10:21.940
enfigure out what exactly is
figure out what exactly is
10:21.940–10:22.940
enthe problem in the
the problem in the
10:22.940–10:24.073
enparticular code but
particular code but
10:24.073–10:25.473
enactually took 27 minutes
actually took 27 minutes
10:25.473–10:27.073
ento give me the output which is
to give me the output which is
10:27.073–10:28.273
enwhat really happened
what really happened
10:28.273–10:29.540
enover here as you can see
over here as you can see
10:29.540–10:30.917
enso long story short you
so long story short you
10:30.917–10:32.940
encan run a two-bit quantization
can run a two-bit quantization
10:32.940–10:34.659
enQUEN 3.8 27 billion
QUEN 3.8 27 billion
10:34.659–10:36.593
enparameter model in an
parameter model in an
10:36.593–10:38.097
enapple m4 mac mini
apple m4 mac mini
10:38.097–10:41.320
enmachine without hitting the memory
machine without hitting the memory
10:41.320–10:43.035
enceiling but what is the
ceiling but what is the
10:43.035–10:44.840
enactual technique which
actual technique which
10:44.840–10:46.104
enmakes the two big
makes the two big
10:46.104–10:48.360
enquantization which helps you
quantization which helps you
10:48.360–10:49.360
enrun in a mac mini m4
run in a mac mini m4
10:49.360–10:50.693
enmachine is actually the
machine is actually the
10:50.693–10:51.827
enmost important part
most important part
10:51.827–10:53.627
enthat's the reason why i actually
that's the reason why i actually
10:53.627–10:54.627
enwanted to show you
wanted to show you
10:54.627–10:56.027
enwhat's really happening
what's really happening
10:56.027–10:57.093
enover here and other
over here and other
10:57.093–10:58.893
enthing is you may ask what happens
thing is you may ask what happens
10:58.893–11:00.024
enif you try to run the
if you try to run the
11:00.024–11:01.881
ensame exact model in the
same exact model in the
11:01.881–11:03.543
enApple M5 Max machine
Apple M5 Max machine
11:03.543–11:05.400
enright so I'm going to be
right so I'm going to be
11:05.400–11:07.153
enloading the same exact
loading the same exact
11:07.153–11:08.629
enmodel as you can see
model as you can see
11:08.629–11:10.382
enover here and I'm going
over here and I'm going
11:10.382–11:12.320
ento be doing an FP16 here as
to be doing an FP16 here as
11:12.320–11:13.833
enwell so FP16 Max current
well so FP16 Max current
11:13.833–11:15.271
enprediction is going to
prediction is going to
11:15.271–11:16.708
enbe one as well I'm going
be one as well I'm going
11:16.708–11:18.600
ento be loading this particular
to be loading this particular
11:18.600–11:19.800
enmodel and let's try to
model and let's try to
11:19.800–11:20.800
enask the same exact
ask the same exact
11:20.800–11:22.067
enquestion over here and
question over here and
11:22.067–11:23.867
ensee how this is actually going to
see how this is actually going to
11:23.867–11:25.920
zh在我的 Apple M5 Max machine
在我的 Apple M5 Max machine
11:25.920–11:28.120
zh所以这个是128GB machine
所以这个是128GB machine
11:28.120–11:29.360
zh所以你可能会被担心
所以你可能会被担心
11:29.360–11:31.000
zh要是转买它快速
要是转买它快速
11:31.000–11:32.160
zh你会被担心
你会被担心
11:32.160–11:34.120
zh要是100兆兆的
要是100兆兆的
11:34.120–11:35.400
zh如果我会被担心
如果我会被担心
11:35.400–11:36.720
zh但如果我会被担心
但如果我会被担心
11:36.720–11:39.000
zh同样的同样
同样的同样
11:39.000–11:40.320
zh在这个机器
在这个机器
11:40.320–11:42.600
zh你能看到它是
你能看到它是
11:42.600–11:45.600
zh连接到27兆兆的
连接到27兆兆的
11:45.600–11:48.320
zh它是127兆兆的
它是127兆兆的
11:48.320–11:49.960
zh所以它试试了
所以它试试了
11:49.960–11:51.783
enpoint that it's not just
point that it's not just
11:51.783–11:53.150
enabout the two-bit
about the two-bit
11:53.150–11:55.155
enquantization model which
quantization model which
11:55.155–11:56.340
encan run way more
can run way more
11:56.340–11:57.861
enfaster in an apple m5
faster in an apple m5
11:57.861–11:59.741
enmax machine because it's
max machine because it's
11:59.741–12:01.351
eneven running in the m4
even running in the m4
12:01.351–12:03.320
enmini machine but the thing
mini machine but the thing
12:03.320–12:04.602
enis even though it is a
is even though it is a
12:04.602–12:06.260
entwo-bit quantization the
two-bit quantization the
12:06.260–12:07.617
enquality of the output
quality of the output
12:07.617–12:09.200
enstill remains and that's
still remains and that's
12:09.200–12:10.556
enthe reason the the
the reason the the
12:10.556–12:12.363
entechnique of the gsq rco
technique of the gsq rco
12:12.363–12:13.809
ensits in so it safely
sits in so it safely
12:13.809–12:16.340
enchooses the best tensor which can
chooses the best tensor which can