Kyojin: open-source engine that runs 100 GB-class open models (GLM-5.3, Qwen3.8, DeepSeek V4.1) on one desktop machine. AMD Strix Halo, NVIDIA RTX and Apple Mac. OpenAI API, built on ExLlamaV3.
Python amdapple-siliconcudadeepseekexl3exllamav3glminferencellmllm-inferencelocal-llmnvidiaopenai-apiquantizationqwenrocmstrix-halo
"""Lloyd-Max centroids of one coordinate of a uniform random unit vector in R^D, (D, bits) -> ascending list (fp64 solve, stored as fp32 values).
Generated by the Lloyd iteration on the density (1-t^2)^((D-3)/2); see cache/tq.py."""
CODEBOOKS = {
(64, 4): [
-0.33074527978897095, -0.2528544068336487, -0.19879400730133057, -0.15486541390419006,
-0.11643224954605103, -0.08126740902662277, -0.04806011915206909, -0.015909498557448387,
0.01590452343225479, 0.048055149614810944, 0.08126243948936462, 0.11642728745937347,
0.15486259758472443, 0.19879400730133057, 0.2528544068336487, 0.33074527978897095,
],
(64, 5): [
-0.3880903720855713, -0.3232688009738922, -0.27978938817977905, -0.245649054646492,
-0.2168390154838562, -0.19148829579353333, -0.16856415569782257, -0.1474212408065796,
-0.1276273876428604, -0.10887894034385681, -0.09094265103340149, -0.07363530993461609,
-0.05680711939930916, -0.04033255577087402, -0.02410297840833664, -0.008019482716917992,
0.008014488965272903, 0.02409798465669155, 0.040327563881874084, 0.05680212751030922,
0.07363031804561615, 0.09093765914440155, 0.10887394845485687, 0.12762239575386047,
0.14741624891757965, 0.16855916380882263, 0.1914833039045334, 0.21683403849601746,
0.24564409255981445, 0.2797844409942627, 0.32326391339302063, 0.38808581233024597,
],
(64, 6): [
-0.42331260442733765, -0.36531782150268555, -0.3270800709724426, -0.297568678855896,
-0.2731202244758606, -0.2520291805267334, -0.23335996270179749, -0.2165384739637375,
-0.20118291676044464, -0.18703152239322662, -0.1738928258419037, -0.1616206020116806,
-0.15009714663028717, -0.1392318457365036, -0.1289505660533905, -0.11919178068637848,
-0.10990341752767563, -0.1010359451174736, -0.09254972636699677, -0.08440997451543808,
-0.07658186554908752, -0.06903308629989624, -0.06173625588417053, -0.05466143786907196,
-0.04778127372264862, -0.04107079282402992, -0.034507591277360916, -0.028071686625480652,
-0.021735619753599167, -0.015476950444281101, -0.009270694106817245, -0.0030894011724740267,
0.0030844020657241344, 0.00926569476723671, 0.015471951104700565, 0.02173062041401863,
0.028066687285900116, 0.03450259193778038, 0.04106579348444939, 0.047776274383068085,
0.05465644225478172, 0.061731260269880295, 0.0690280869603157, 0.07657687366008759,
0.08440497517585754, 0.09254472702741623, 0.10103094577789307, 0.10989841818809509,
0.11918678879737854, 0.12894555926322937, 0.13922683894634247, 0.15009215474128723,
0.16161800920963287, 0.1738928258419037, 0.18703152239322662, 0.20118291676044464,
0.2165384739637375, 0.23335996270179749, 0.2520291805267334, 0.2731202244758606,
0.297568678855896, 0.3270800709724426, 0.36531782150268555, 0.42331260442733765,
],
(128, 4): [
-0.23762281239032745, -0.18078890442848206, -0.14175525307655334, -0.11023858189582825,
-0.0827830582857132, -0.0577348992228508, -0.03412646800279617, -0.011294822208583355,
0.01129042636603117, 0.034122075885534286, 0.05773050710558891, 0.08277866989374161,
0.11023420095443726, 0.14175090193748474, 0.18078459799289703, 0.2376188486814499,
],
(128, 5): [
-0.28060710430145264, -0.23250362277030945, -0.2006063163280487, -0.17574602365493774,
-0.15488150715827942, -0.13660143315792084, -0.1201292872428894, -0.1049799770116806,
-0.09082579612731934, -0.07743936777114868, -0.06465330719947815, -0.05233139172196388,
-0.040360912680625916, -0.028652740642428398, -0.017123816534876823, -0.005697738844901323,
0.005693325772881508, 0.017119403928518295, 0.02864832803606987, 0.04035649821162224,
0.052326980978250504, 0.06464888900518417, 0.0774349570274353, 0.09082138538360596,
0.10497556626796722, 0.12012488394975662, 0.13659702241420746, 0.15487709641456604,
0.17574162781238556, 0.20060193538665771, 0.23249928653240204, 0.2806030511856079,
],
(128, 6): [
-0.3072315752506256, -0.263621062040329, -0.23521403968334198, -0.2134648561477661,
-0.19554923474788666, -0.1801668107509613, -0.16660109162330627, -0.1544143259525299,
-0.1433236300945282, -0.13312450051307678, -0.12366984784603119, -0.11485400795936584,
-0.10659264773130417, -0.09881617873907089, -0.09147036075592041, -0.08450695872306824,
-0.07788462191820145, -0.07157041132450104, -0.06553594022989273, -0.05975477397441864,
-0.054198358207941055, -0.04884476214647293, -0.0436696857213974, -0.0386534258723259,
-0.03378273546695709, -0.02903331071138382, -0.024387603625655174, -0.019834555685520172,
-0.015352090820670128, -0.010924804024398327, -0.00654164794832468, -0.002180551178753376,
0.002176132518798113, 0.0065372297540307045, 0.010920385830104351, 0.015347672626376152,
0.019830137491226196, 0.0243831854313612, 0.029028892517089844, 0.033778317272663116,
0.03864900767803192, 0.043665267527103424, 0.048840343952178955, 0.05419394001364708,
0.059750355780124664, 0.06553152203559875, 0.07156599313020706, 0.07788020372390747,
0.08450254052877426, 0.09146595001220703, 0.09881176054477692, 0.10658823698759079,
0.11484959721565247, 0.12366543710231781, 0.1331200748682022, 0.14331920444965363,
0.15440991520881653, 0.1665966808795929, 0.18016240000724792, 0.19554482400417328,
0.21346046030521393, 0.235209658741951, 0.2636167109012604, 0.3072274625301361,
],
(256, 4): [
-0.16938146948814392, -0.12855473160743713, -0.10066360235214233, -0.07821600139141083,
-0.058701179921627045, -0.04092295467853546, -0.024183209985494614, -0.008003042079508305,
0.007999934256076813, 0.024180101230740547, 0.04091985151171684, 0.058698076754808426,
0.07821290194988251, 0.1006605252623558, 0.1285516768693924, 0.1693786382675171,
],
(256, 5): [
-0.20067812502384186, -0.16582781076431274, -0.14285434782505035, -0.1250145137310028,
-0.11008388549089432, -0.09703247249126434, -0.08529040217399597, -0.0745031014084816,
-0.0644363984465599, -0.05492452532052994, -0.04584331065416336, -0.03709806129336357,
-0.02860899455845356, -0.02030843123793602, -0.012136178091168404, -0.004038180690258741,
0.004035060293972492, 0.012133057229220867, 0.020306849852204323, 0.02860899455845356,
0.03709806129336357, 0.04584331065416336, 0.05492303520441055, 0.06443475186824799,
0.0745016410946846, 0.08528728038072586, 0.09702935814857483, 0.1100807785987854,
0.1250113993883133, 0.14285124838352203, 0.1658247411251068, 0.20067524909973145,
],
(256, 6): [
-0.22014178335666656, -0.18833738565444946, -0.16774427890777588, -0.15203975141048431,
-0.13914182782173157, -0.1280912160873413, -0.11836604028940201, -0.10964564979076385,
-0.10171680152416229, -0.09443400800228119, -0.08769290894269943, -0.0814126506447792,
-0.07553227245807648, -0.07000245153903961, -0.06478016078472137, -0.05983305722475052,
-0.05513327196240425, -0.050654470920562744, -0.04637500271201134, -0.04227463901042938,
-0.03833635896444321, -0.03454456850886345, -0.03088216297328472, -0.027333572506904602,
-0.023886362090706825, -0.020526472479104996, -0.017241470515727997, -0.01402198988944292,
-0.010852416977286339, -0.007723425514996052, -0.004624068737030029, -0.0015403173165395856,
0.0015371928457170725, 0.004620944149792194, 0.007720300927758217, 0.010849292390048504,
0.014018865302205086, 0.017238346859812737, 0.020523346960544586, 0.023883236572146416,
0.027330446988344193, 0.03087903931736946, 0.03454144299030304, 0.038333237171173096,
0.04227151721715927, 0.04637187719345093, 0.05065134912729263, 0.05513014644384384,
0.05982993543148041, 0.06477703899145126, 0.0699993297457695, 0.07552915066480637,
0.0814095288515091, 0.08768978714942932, 0.09443088620901108, 0.10171368718147278,
0.10964252799749374, 0.1183629259467125, 0.1280881017446518, 0.13913871347904205,
0.152036651968956, 0.16774232685565948, 0.18833649158477783, 0.22013887763023376,
],
(512, 4): [
-0.12025641649961472, -0.0911591574549675, -0.07133294641971588, -0.0554020069539547,
-0.04156791418790817, -0.028973806649446487, -0.017120173200964928, -0.0056653437204658985,
0.005663146264851093, 0.017117975279688835, 0.028971612453460693, 0.04156571999192238,
0.0553998202085495, 0.07133077085018158, 0.09115700423717499, 0.12025441974401474,
],
(512, 5): [
-0.1427084505558014, -0.11776427924633026, -0.1013677716255188, -0.08865982294082642,
-0.07803760468959808, -0.06876077502965927, -0.060422383248806, -0.052769895642995834,
-0.04563198983669281, -0.03889099135994911, -0.032458677887916565, -0.026263916864991188,
-0.020251423120498657, -0.014374407939612865, -0.008589198812842369, -0.0028576022014021873,
0.002856496023014188, 0.008589198812842369, 0.014374407939612865, 0.020251423120498657,
0.026263916864991188, 0.032458677887916565, 0.03889099135994911, 0.04563198983669281,
0.052769895642995834, 0.060422383248806, 0.06876077502965927, 0.07803760468959808,
0.08865982294082642, 0.1013677716255188, 0.11776427924633026, 0.1427084505558014,
],
(512, 6): [
-0.15670321881771088, -0.13386626541614532, -0.11912287771701813, -0.10790243744850159,
-0.09870021045207977, -0.09082639962434769, -0.08390287309885025, -0.07769869267940521,
-0.07206156849861145, -0.06688794493675232, -0.06210148334503174, -0.0576443187892437,
-0.05347191542387009, -0.049548614770174026, -0.04584715887904167, -0.04234129562973976,
-0.03901036083698273, -0.03583676740527153, -0.03280523791909218, -0.02990143746137619,
-0.02711336314678192, -0.024429962038993835, -0.021838048473000526, -0.01932772621512413,
-0.016890184953808784, -0.014514388516545296, -0.012191545218229294, -0.009913922287523746,
-0.0076727066189050674, -0.005461279768496752, -0.0032697063870728016, -0.0010891675483435392,
0.0010869582183659077, 0.00326749705709517, 0.005459070671349764, 0.0076704975217580795,
0.009911713190376759, 0.012189336121082306, 0.014512178488075733, 0.016887975856661797,
0.019325517117977142, 0.02183583937585354, 0.024427752941846848, 0.027111155912280083,
0.029899228364229202, 0.03280302882194519, 0.03583455830812454, 0.03900815173983574,
0.04233908653259277, 0.04584495350718498, 0.04954640567302704, 0.0534697100520134,
0.05764210969209671, 0.06209927424788475, 0.06688573956489563, 0.07205935567617416,
0.0776975080370903, 0.08390187472105026, 0.0908251702785492, 0.09870021045207977,
0.10790243744850159, 0.11912287771701813, 0.13386626541614532, 0.15670321881771088,
],
}