vector
sequencelengths 1.02k
1.02k
| text
stringlengths 2
11.8k
|
---|---|
[
0.04804328,
-0.0055972408,
-0.050598774,
0.027088232,
0.018058822,
-0.022900062,
0.00040950012,
-0.047503788,
-0.004617635,
0.053466607,
0.006388734,
-0.007964622,
0.019222992,
-0.07337106,
-0.01554592,
0.019492738,
0.016979836,
-0.02987088,
-0.046254434,
0.0070772977,
0.026250599,
-0.024688907,
-0.07706233,
0.00008690231,
-0.042875506,
0.014417243,
0.026151218,
-0.010896341,
0.07865241,
0.029615331,
0.0053878324,
-0.013387947,
0.026818486,
0.001393099,
-0.041399,
-0.0075529036,
0.022204401,
-0.021338372,
-0.03518063,
-0.029302994,
0.028422767,
-0.052614775,
0.02714502,
-0.07155382,
-0.05218886,
0.013480229,
0.048639562,
-0.02265871,
-0.006654931,
-0.052614775,
-0.03830401,
0.022587724,
-0.0038545362,
0.008752566,
0.007006312,
-0.043784123,
0.0020213246,
0.010761468,
-0.028181415,
-0.005898931,
0.028195612,
0.028536346,
-0.012081806,
-0.10369625,
-0.004954818,
0.017675499,
0.012940736,
-0.00051154237,
-0.010612397,
-0.008688678,
-0.07700554,
0.005252959,
0.008617693,
-0.015574314,
-0.019052625,
0.032852292,
0.046651956,
0.02593826,
-0.0020319724,
0.019450147,
0.016355159,
0.0479581,
-0.05244441,
0.0011011693,
-0.046254434,
-0.043017477,
0.026264796,
-0.01140744,
-0.019109413,
-0.05440362,
-0.010867947,
0.03901387,
-0.01256451,
0.02781229,
0.0327955,
0.019166201,
-0.030609135,
0.04043359,
-0.007801354,
-0.024802485,
0.023453753,
0.0746772,
-0.03901387,
-0.0011845778,
-0.051195055,
-0.010768566,
0.0068820864,
0.017419947,
0.013920342,
-0.012053411,
-0.009781862,
0.02558333,
-0.01584406,
0.016340962,
0.005973466,
0.0020213246,
0.016411947,
0.01937916,
-0.051393818,
-0.033391785,
0.0062609594,
-0.024816683,
0.01301882,
0.02846536,
0.010640792,
-0.025640119,
-0.010860848,
0.043642152,
-0.019847667,
0.012685186,
0.06479596,
0.012812961,
-0.010037411,
0.031659726,
0.024106823,
-0.005132283,
0.0069885654,
0.07212171,
-0.0007267185,
0.00005595688,
-0.013771271,
-0.021466147,
0.029785698,
0.083820194,
-0.0030346487,
-0.009874144,
0.009313354,
-0.019322371,
-0.012678088,
0.013025919,
-0.03557815,
0.0227155,
-0.018129807,
0.032539953,
-0.039127447,
0.010172284,
-0.014005525,
0.011400341,
0.014594708,
0.037168235,
-0.02311302,
-0.030211614,
-0.018953245,
0.06865759,
-0.020642709,
0.052501198,
-0.022772288,
0.008688678,
0.01392744,
-0.04168294,
0.00088643684,
0.011080904,
0.003804846,
-0.002085212,
0.054375224,
0.054034494,
0.024291387,
-0.01115189,
0.0073825372,
-0.0026229303,
0.013813863,
-0.021210598,
-0.00595572,
0.024916062,
0.017050821,
-0.0063780863,
-0.011457129,
-0.000613141,
0.01619899,
-0.0016380005,
-0.009292059,
0.026605528,
-0.040689137,
0.017448343,
-0.036515165,
0.012976229,
-0.056249253,
-0.005203269,
0.012841355,
-0.029700514,
0.00043634165,
0.049235843,
0.0146373,
0.025796289,
-0.05440362,
-0.0092636645,
-0.013402144,
0.036202826,
-0.033988066,
0.017192794,
0.038644742,
0.0018296625,
0.0056859734,
-0.018342765,
0.055539396,
0.010243271,
-0.03921263,
-0.016908849,
0.014679891,
0.018101413,
0.01529037,
0.008546706,
0.049548183,
-0.04162615,
0.023581527,
-0.03245477,
0.016624905,
0.034357194,
0.005547551,
0.016128004,
0.03589049,
0.021082822,
0.012734877,
0.05434683,
0.00973927,
0.0058669876,
0.030807896,
0.028607331,
-0.017434146,
0.0067081708,
-0.028280796,
0.020898258,
0.043386605,
0.021693302,
0.003128705,
0.021437753,
-0.04063235,
-0.002528874,
-0.026619725,
0.002548395,
-0.032085642,
0.027443161,
0.0012449158,
-0.028067838,
-0.030296797,
0.00089353544,
0.010392341,
0.0058421423,
-0.01004451,
-0.0059486213,
0.048611168,
0.032227613,
-0.027826486,
-0.04986052,
0.003467663,
0.051053084,
0.005572396,
0.02992767,
-0.0105201155,
-0.0041952687,
-0.044039674,
-0.057470214,
-0.09148667,
-0.040916294,
-0.017178597,
-0.023524739,
-0.00027351768,
-0.037764516,
0.029217811,
-0.008532509,
-0.014083609,
0.014580511,
-0.0011100426,
0.030495558,
0.043812517,
0.0018846765,
-0.029388176,
0.06439844,
-0.0403768,
0.025498148,
-0.006605241,
-0.034272008,
-0.0031979163,
0.0017151976,
0.0009210425,
0.016227385,
-0.004848339,
-0.034272008,
-0.043273024,
-0.019705696,
0.006889185,
-0.046595167,
0.010463326,
-0.0191804,
-0.038815107,
0.029956065,
0.007950424,
-0.0135086235,
0.030240009,
0.02538457,
-0.045942098,
0.039780516,
0.01322468,
0.05258638,
-0.0063071004,
0.047106266,
0.016596511,
0.019620512,
-0.02542716,
-0.04653838,
-0.027059838,
0.036912687,
-0.019208794,
-0.08012892,
-0.027769698,
0.046453197,
-0.007056002,
-0.052756745,
0.0086815795,
-0.05323945,
-0.043670546,
0.038445983,
-0.041257024,
0.025796289,
0.03214243,
0.023283387,
-0.020869864,
0.009966426,
0.005071945,
0.011024116,
0.0019254935,
0.007815551,
-0.005717917,
0.061388634,
-0.028067838,
-0.013132398,
0.054545593,
-0.021338372,
0.009022312,
-0.018626709,
0.00008595953,
0.008752566,
-0.009476623,
-0.011386144,
-0.010257468,
0.024177808,
-0.014083609,
0.0029530148,
-0.010569805,
0.04883832,
-0.0067543117,
0.03296587,
0.0067756074,
-0.006530706,
-0.054261647,
0.0028199162,
-0.017675499,
0.035549756,
0.07268959,
-0.047163054,
0.014523722,
-0.0027169867,
-0.036912687,
0.017320568,
-0.015517525,
-0.05375055,
0.037707727,
0.018300174,
0.041370604,
-0.03461274,
0.004553748,
0.0069672693,
0.02331178,
0.0057853535,
0.034584347,
0.045828518,
-0.023084626,
0.011698482,
-0.030098036,
0.0144740315,
-0.014452736,
-0.006300002,
-0.05227404,
0.008035608,
-0.015403948,
-0.020614315,
0.03824722,
0.035549756,
0.0018314371,
0.0035102544,
0.08052644,
-0.051961705,
-0.012188285,
0.031460967,
0.00010342873,
-0.019152004,
-0.054375224,
0.02700305,
0.023751894,
-0.0018864512,
0.01609961,
-0.036288008,
-0.018882258,
0.0030488458,
-0.0056895227,
-0.011229975,
-0.05979855,
-0.022843273,
0.008624791,
0.037054658,
-0.020259386,
-0.027230205,
-0.03557815,
0.023680907,
0.03759415,
-0.017377356,
0.032256007,
-0.022871668,
0.04077432,
0.011244172,
-0.03401646,
-0.010037411,
0.009859947,
-0.031432573,
-0.01629837,
0.08336588,
0.03992249,
-0.017547723,
-0.005870537,
-0.051734548,
0.008773861,
0.020174202,
-0.019137807,
-0.021380963,
0.041058265,
-0.0130330175,
-0.0026939162,
0.012053411,
0.02155133,
0.00014252645,
0.029615331,
-0.0076522836,
0.049633365,
-0.021494541,
-0.014665694,
-0.034839895,
-0.028706713,
-0.008866143,
0.033476967,
0.049690153,
-0.05394931,
-0.008773861,
0.054943115,
-0.069111906,
-0.06337624,
0.02644936,
0.013451834,
0.0014170567,
0.028948063,
0.021693302,
-0.03608925,
0.028451163,
0.026208008,
-0.02593826,
0.028522149,
0.0037587052,
0.006044452,
-0.01619899,
-0.021963049,
-0.006484565,
-0.05420486,
0.04841241,
-0.0042201136,
-0.0067649595,
0.03594728,
-0.05434683,
-0.038474377,
-0.019606315,
-0.02226119,
-0.024050035,
0.04244959,
-0.008738369,
0.026051838,
0.00666203,
-0.009426932,
-0.015886651,
-0.0065484527,
0.0051145367,
0.0292746,
0.04446559,
0.062240466,
-0.027045641,
-0.029899275,
0.05233083,
-0.060082495,
0.0043975785,
-0.041711334,
0.007730368,
-0.008908735,
0.00244724,
0.007985918,
-0.018257583,
0.0067756074,
0.0020674653,
0.033391785,
-0.008042706,
0.0073115514,
-0.0041313814,
-0.0061296355,
0.022601921,
-0.019166201,
-0.05233083,
-0.025114823,
0.0267475,
-0.012621299,
-0.0010009017,
0.029189415,
-0.023794485,
-0.026222205,
-0.05996892,
0.04915066,
-0.037764516,
-0.0025856628,
-0.02659133,
-0.036713924,
-0.014112004,
0.0004429966,
-0.0018491836,
-0.028649922,
-0.0039645643,
-0.038616348,
0.035237417,
-0.057555396,
-0.012805862,
-0.037083052,
0.018058822,
-0.031801697,
0.042676743,
0.032880686,
-0.010371045,
-0.005895382,
-0.010839552,
0.021764288,
0.020103216,
-0.016639102,
-0.04219404,
-0.0008806692,
-0.022885865,
0.018853864,
0.03219922,
-0.004365635,
0.020259386,
-0.029132627,
0.0043230434,
-0.053608578,
-0.030978262,
-0.0023886766,
-0.03038198,
0.04375573,
-0.027869077,
0.017675499,
0.0058918325,
0.024177808,
0.016724287,
0.025611725,
-0.040036067,
0.014694088,
-0.034499165,
-0.03773612,
0.005930875,
-0.04355697,
-0.0009068453,
-0.022843273,
-0.010867947,
0.018129807,
-0.038275614,
0.035237417,
0.05258638,
0.015233582,
0.01277037,
-0.050201252,
-0.0051358324,
0.021806879,
-0.004479212,
-0.0034090995,
-0.027798092,
-0.0052849026,
0.011634595,
-0.052699957,
-0.047248237,
0.0010798735,
0.015943442,
0.04401128,
-0.011982426,
0.01584406,
0.0045608464,
-0.02669071,
-0.056561593,
0.03185849,
-0.03779291,
0.006665579,
0.055993706,
0.009455326,
-0.0026264796,
0.0292746,
-0.011883046,
-0.050996296,
-0.048071675,
0.062637985,
-0.012436735,
-0.011968228,
0.032341193,
0.00827696,
0.0001285511,
-0.06280836,
0.00560079,
0.030523952,
-0.009923833,
-0.02099764,
-0.0013371975,
-0.009952228,
-0.014750877,
-0.0045643956,
0.04122863,
0.009213975,
-0.006935326,
0.044096462,
-0.0005181973,
-0.044777926,
0.013700285,
0.043017477,
-0.04869635,
-0.017136004,
-0.016724287,
-0.0141829895,
-0.030438768,
-0.055369027,
0.025909865,
-0.021153808,
0.027911669,
0.021210598,
0.0035617193,
0.053977706,
-0.0036344798,
-0.011549411,
0.0037019164,
-0.03830401,
-0.030978262,
-0.014516624,
0.005040001,
0.0017311695,
0.028067838,
-0.02544136,
0.025072232,
0.031233812,
0.022687105,
0.000617134,
-0.071326666,
-0.015787272,
-0.032710318,
-0.00933465,
-0.0012103101,
-0.006282255,
-0.00074490864,
0.0429039,
0.004244959,
-0.026406767,
0.018953245,
0.013104004,
-0.042676743,
-0.011698482,
-0.009178481,
0.0034783108,
-0.050229646,
0.018144004,
0.006136734,
-0.014921243,
-0.0045998883,
0.02583888,
-0.03694108,
0.018498935,
0.06791934,
-0.0040107053,
-0.022786485,
0.011634595,
-0.024561133,
0.010463326,
-0.026278993,
0.0112867635,
-0.004809297,
0.035407785,
0.039269418,
-0.033647332,
-0.0009050707,
-0.0053523392,
0.014225582,
-0.04273353,
0.019620512,
0.041257024,
-0.014481131,
0.027641922,
-0.024177808,
0.046595167,
-0.016241582,
-0.03699787,
-0.00878096,
-0.0032405078,
-0.048866715,
0.013331158,
0.005022255,
0.026208008,
0.03109184,
0.023993246,
0.029061642,
0.025924062,
-0.008937129,
0.012670989,
0.01942175,
-0.0076664807,
0.0068359454,
-0.077630214,
0.02811043,
0.06348982,
-0.024901865,
0.020912455,
0.03265353,
-0.022985246,
-0.018200794,
0.004032001,
0.020273583,
0.05596531,
0.03713984,
-0.01584406,
-0.014963835,
-0.0039645643,
-0.070985936,
-0.007630988,
-0.0383608,
-0.016866257,
0.019166201,
-0.022332175,
-0.0053594382,
-0.00928496,
0.0021029583,
0.017419947,
0.036969475,
0.04168294,
-0.025086429,
-0.024234599,
0.032227613,
-0.0040284516,
-0.090350896,
-0.049775336,
-0.01069758,
0.027045641,
-0.061445426,
-0.044096462,
0.050400015,
0.020372963,
-0.010065805,
0.013061412,
-0.04648159,
0.005338142,
0.0043230434,
0.04395449,
-0.0686008,
0.006317748,
-0.048611168,
0.02781229,
-0.010150989,
0.0070631006,
0.021238992,
0.030949866,
0.009419833,
0.020770485,
-0.009100397,
0.014594708,
0.051507395,
-0.041370604,
0.023425357,
0.015716286,
0.013622201,
0.008475721,
-0.0030914375,
-0.016128004,
0.08824971,
0.03563494,
0.064171284,
-0.017079215,
0.055738155,
0.033647332,
-0.027088232,
0.037565757,
0.04849759,
-0.00037600362,
0.0023886766,
-0.020429753,
-0.022516739,
0.042080462,
-0.031006657,
-0.0051109875,
0.016624905,
-0.014388849,
-0.013025919,
0.041711334,
-0.03915584,
0.017533526,
0.021537133,
-0.04929263,
-0.04318784,
0.011173186,
0.046112463,
0.042676743,
-0.0020532683,
0.01120158,
0.04486311,
0.015020624,
0.024859274,
0.010420735,
0.0072902553,
0.019691499,
-0.01306851,
0.057470214,
0.015858257,
-0.010981524,
0.0051855226,
-0.016624905,
-0.043471787,
0.05585173,
0.006399382,
-0.05778255,
-0.013544116,
-0.014126201,
-0.02125319,
-0.041370604,
0.028522149,
-0.048014887,
0.01499223,
0.025725303,
-0.021693302,
-0.004376283,
0.037480574,
-0.01786006,
0.007993016,
0.06547742,
0.03961015,
-0.027059838,
0.09671123,
0.026960459,
0.019876061,
0.05181973,
0.033732515,
-0.043216236,
-0.017320568,
0.017334765,
-0.011364848,
-0.012997525,
-0.03526581,
-0.053125873,
0.016028624,
0.014104906,
-0.0046921703,
-0.016951442,
-0.013409243,
0.020940851,
-0.047674153,
-0.010065805,
0.09120273,
0.013650595,
0.017050821,
0.014339158,
-0.036515165,
-0.059060298,
-0.026960459,
0.0032032402,
0.031886883,
-0.011521017,
-0.02866412,
0.00620772,
-0.041399,
-0.028749304,
-0.005622086,
-0.01256451,
-0.035521362,
0.045601364,
0.03895708,
0.03750897,
0.017774878,
-0.0037374094,
-0.042080462,
0.044579167,
-0.0016131554,
-0.011840453,
0.03594728,
0.029161021,
0.0077374666,
-0.019364962,
0.017576117,
0.0021970146,
0.0007768523,
-0.024887668,
-0.0064064804,
0.01206051,
-0.041711334,
-0.04713466,
0.016184794,
0.02003223,
0.03185849,
-0.031716514,
-0.051393818,
-0.03915584,
-0.06280836,
-0.020940851,
-0.0292746,
0.0068004527,
-0.0038971277,
-0.018640906,
-0.0040249024,
-0.036429983,
0.2391942,
0.062637985,
0.0045856913,
-0.0032866488,
0.02609443,
0.045232236,
0.01014389,
0.020472344,
0.06070717,
-0.027996853,
0.01377837,
-0.015872454,
0.0019095216,
0.0066584805,
-0.041881703,
0.030154824,
-0.03699787,
0.016539723,
-0.047872912,
-0.025554936,
-0.018172398,
0.012230877,
0.011031214,
0.028933866,
0.02013161,
0.0016628455,
-0.03674232,
-0.030410374,
-0.01671009,
-0.010285862,
0.0046105366,
-0.024050035,
0.011457129,
-0.042619955,
-0.011457129,
0.010541411,
0.024717303,
-0.016269976,
-0.0119611295,
0.04662356,
0.020103216,
-0.03713984,
0.031773303,
-0.021565527,
-0.019308174,
0.05116666,
-0.003371832,
0.00022205287,
0.026946262,
-0.05088272,
0.009682481,
-0.039241023,
0.020912455,
-0.042847108,
-0.029359782,
-0.002200564,
-0.049037084,
-0.040689137,
-0.02084147,
0.010165186,
0.021664906,
-0.01584406,
0.021168005,
0.04526063,
-0.024518542,
0.046850715,
-0.011414538,
-0.013338257,
-0.03154615,
-0.03154615,
0.0050541987,
-0.0016566343,
0.0015315216,
-0.014445637,
0.02058592,
0.028451163,
0.010285862,
0.039354604,
-0.022914259,
-0.018697696,
-0.008262763,
-0.007645185,
0.01574468,
-0.018044624,
0.033448573,
0.036004066,
-0.050967902,
0.005323945,
-0.0063780863,
0.034385588,
-0.004401128,
0.037253417,
0.007829748,
-0.036146037,
-0.0019396907
] | Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Model
🤗 Transformers status: not yet implemented, since we have no PP and TP.
FlexFlow
FlexFlow also solves the parallelization problem in a slightly different approach.
Paper: "Beyond Data and Model Parallelism for Deep Neural Networks" by Zhihao Jia, Matei Zaharia, Alex Aiken
It performs a sort of 4D Parallelism over Sample-Operator-Attribute-Parameter. |
[
0.044338454,
0.005567112,
0.02076593,
0.001979142,
-0.015436245,
-0.021942431,
-0.0042276033,
-0.006786136,
-0.018923221,
0.06395623,
-0.021871557,
0.004103575,
0.030050358,
-0.043799814,
0.0064990986,
0.052049488,
0.007966179,
-0.012487908,
-0.054572582,
0.00021992928,
0.019589432,
0.0012331987,
-0.07047659,
-0.001250031,
-0.023260677,
0.019121666,
0.011857134,
-0.008504818,
0.06395623,
0.029369973,
-0.01272179,
0.00019135841,
0.023884363,
0.018327883,
-0.02704532,
0.00044185188,
-0.0013315356,
0.0008447233,
-0.062028475,
-0.0043516317,
0.020142244,
-0.014642462,
0.0071192416,
-0.024224557,
-0.034472864,
0.0040858565,
0.032630153,
-0.014770034,
-0.045500778,
-0.06611079,
-0.0038413429,
0.014075474,
0.0122682005,
0.008150451,
-0.04592602,
-0.024238732,
-0.0018692882,
0.028193472,
0.0074771526,
0.013862854,
0.02272204,
0.036570717,
-0.0049859495,
-0.06843544,
0.023402425,
0.020553311,
-0.017590798,
-0.0031272925,
-0.014883432,
-0.015748087,
-0.06361604,
-0.009100155,
0.004188623,
0.0001713145,
-0.025089214,
0.052616473,
-0.0071688527,
0.0077819084,
-0.0041319244,
-0.0037244016,
0.031609572,
0.041248366,
-0.024663972,
0.014089649,
-0.0303622,
-0.022466894,
0.0198304,
-0.05139745,
0.027272116,
-0.05094386,
-0.02945502,
0.01309742,
0.009022195,
0.026464159,
-0.01611663,
0.0151811,
-0.028321045,
0.049923282,
0.030078707,
-0.013721107,
0.037959836,
0.09071806,
-0.015620516,
0.0055210446,
-0.045018837,
-0.020028846,
0.023076406,
0.03968915,
-0.003132608,
-0.012516257,
0.027229592,
0.01820031,
-0.018809823,
0.043743115,
0.017094685,
0.024692321,
-0.02242437,
-0.026520858,
-0.05145415,
-0.009560833,
0.033820827,
-0.044480197,
0.014869257,
0.03311209,
0.048760958,
-0.044338454,
-0.012537519,
0.024380479,
-0.020411564,
-0.013458875,
0.011637426,
0.006417594,
-0.009539571,
0.024919117,
0.0027658378,
-0.026577557,
-0.015195275,
0.04535903,
0.007703948,
-0.003155642,
-0.0041709044,
-0.0051312405,
-0.015634691,
0.088960394,
-0.018327883,
-0.0042701275,
-0.0018728318,
-0.027924152,
-0.028717935,
0.05519627,
-0.024238732,
0.01379198,
-0.014713336,
-0.0017434877,
-0.0064778365,
-0.015946534,
0.014174697,
0.013763631,
0.0090151075,
0.026209014,
0.021162823,
-0.025372708,
-0.023033882,
0.066961266,
0.006187255,
0.065770596,
-0.04759863,
-0.040000994,
-0.0061943424,
-0.014358968,
0.045018837,
0.0022254274,
-0.027725708,
0.004861921,
0.047059994,
0.029738514,
0.038016535,
0.01087908,
0.007980354,
0.014614113,
0.0009957724,
-0.018512154,
0.018001866,
0.03132608,
-0.0072716195,
0.02199913,
0.018186135,
-0.028632887,
-0.000120484925,
0.004004352,
0.002264408,
-0.0038661486,
-0.03180802,
0.025401056,
-0.02662008,
0.0093623875,
-0.04632291,
0.010014423,
0.026549207,
-0.066961266,
-0.014089649,
0.021134473,
-0.030277152,
0.026364936,
-0.01937681,
-0.00088591856,
-0.016272552,
0.063275844,
-0.027272116,
0.005166677,
0.027853278,
-0.011176748,
0.018299533,
-0.04150351,
0.0085686045,
0.012048492,
-0.009858502,
-0.00037275022,
0.011205098,
0.012735965,
0.032375008,
0.011935094,
0.04209885,
0.003109574,
0.0021492385,
-0.024267081,
-0.014826733,
0.009192291,
0.025514454,
0.057861112,
0.011743736,
0.06457992,
0.020581659,
0.07591967,
0.011779173,
-0.031921417,
0.035805285,
0.03135443,
-0.014125085,
0.0034355922,
-0.020879328,
0.011970531,
0.031864718,
-0.009738017,
0.044338454,
0.013933727,
0.0040185265,
-0.014330618,
-0.034501214,
0.042382345,
-0.012998197,
-0.0038590613,
-0.016074106,
-0.047853775,
-0.07121368,
-0.009823065,
-0.016003232,
0.017732546,
-0.0065203607,
-0.02435213,
0.03039055,
0.03685421,
-0.0005948943,
-0.017760895,
0.050376873,
0.0014387317,
0.0021775877,
0.03084414,
0.015025179,
-0.002654212,
-0.03373578,
-0.03881032,
-0.054402485,
-0.021857383,
-0.050206777,
-0.022977185,
0.022240099,
-0.011190923,
0.003678334,
-0.015308673,
0.01101374,
0.0018852347,
0.021446316,
0.048307367,
0.0444235,
-0.0014475909,
-0.021262046,
0.014713336,
-0.023969412,
0.00970258,
-0.047513586,
-0.006527448,
0.014883432,
-0.0027977307,
0.0016983058,
-0.0058116256,
0.03682586,
-0.031864718,
-0.032063164,
-0.021687286,
-0.021120299,
-0.01654187,
0.028122598,
-0.019362636,
0.001620345,
0.03175132,
0.010297917,
-0.03220491,
0.03835673,
0.032573454,
-0.02731464,
0.012558782,
0.05085881,
0.047740377,
-0.028859682,
0.07608977,
0.02525931,
-0.0031361517,
-0.04399826,
-0.03316879,
-0.009978986,
-0.023062231,
0.014210134,
-0.074558906,
-0.027257942,
0.030759092,
-0.00086554245,
-0.039830897,
0.03693926,
-0.054544233,
-0.023926888,
0.0210636,
-0.05193609,
0.043261174,
0.024550576,
0.014557414,
0.010687721,
-0.030192105,
-0.020298166,
-0.014344793,
-0.0031007149,
-0.033310536,
0.008093752,
0.049299594,
-0.013536835,
-0.019206714,
0.0234166,
-0.034586262,
0.010765682,
-0.020014672,
0.0047591543,
-0.0013076158,
0.018597202,
-0.0074700653,
0.0129840225,
0.027470563,
-0.03370743,
-0.0019118122,
-0.0053863847,
0.009660056,
-0.006155362,
0.013898291,
0.02993696,
0.005049736,
-0.07830103,
-0.021389617,
0.0025319553,
0.0328286,
0.057776064,
-0.028420268,
0.06633758,
0.023756793,
-0.041078273,
0.02870376,
0.015039354,
-0.03183637,
0.04816562,
0.0061305566,
0.014125085,
-0.015833136,
-0.044565246,
0.00036145476,
0.037279453,
0.007923655,
0.008320547,
0.04260914,
-0.01403295,
0.020581659,
-0.021871557,
0.0027817842,
0.0054997825,
-0.0123248985,
-0.030277152,
0.009227728,
0.024536401,
-0.017675847,
0.038696922,
0.022566117,
0.032573454,
0.0011702984,
0.04544408,
-0.0054324525,
0.014670812,
0.043601368,
0.010857818,
-0.044338454,
-0.028746285,
0.025216786,
-0.00519857,
-0.0036712466,
-0.0066089523,
-0.021049425,
-0.023487473,
-0.0015689618,
-0.010482188,
-0.000260903,
-0.028590364,
-0.019773701,
-0.0034107864,
0.037789743,
0.013735281,
-0.009582095,
-0.05088716,
0.041049924,
0.022339322,
-0.034302767,
-0.00263295,
-0.038980417,
0.0059143924,
0.023969412,
-0.06775505,
-0.036740813,
-0.019887099,
-0.024890767,
-0.013969163,
0.015549642,
0.02402611,
0.007083805,
-0.019036617,
-0.07280124,
-0.024550576,
0.012459558,
0.016910413,
-0.008214237,
0.004482748,
0.019518558,
0.010326266,
-0.0094970465,
0.012530432,
0.011070439,
0.00020176795,
-0.017789245,
0.002446907,
-0.031893067,
-0.026931925,
-0.059987318,
0.014599938,
-0.0016859031,
0.060497604,
-0.0005895788,
-0.013409263,
0.0016265465,
0.03648567,
-0.03739285,
-0.040341187,
0.03143948,
-0.008469381,
-0.013940814,
0.055111222,
0.015620516,
-0.036769163,
0.038186632,
0.030107057,
0.0090151075,
0.020298166,
-0.021361269,
-0.0046528443,
0.016102456,
0.0006334318,
0.010786944,
-0.03883867,
0.085048184,
0.012367423,
-0.025344359,
0.0011543519,
-0.0701364,
-0.04297768,
-0.021545539,
-0.03418937,
0.032091513,
0.019901274,
-0.056982283,
0.046946596,
-0.0131186815,
0.0061695366,
0.016031582,
-0.020624183,
0.03356568,
0.038498476,
0.043204475,
0.03373578,
-0.014054212,
0.0018622008,
0.041815355,
-0.099336274,
-0.012608393,
-0.0077393847,
-0.015322847,
-0.008731613,
-0.00044938218,
-0.040567983,
0.0053013368,
0.014011688,
-0.0052942494,
0.015790612,
-0.020850979,
0.010567237,
-0.023529997,
-0.031921417,
0.059987318,
-0.012565869,
-0.04263749,
-0.0467765,
0.0019773701,
0.026535032,
0.00852608,
-0.0007423998,
-0.059987318,
-0.019915449,
-0.055508114,
0.040029343,
-0.031524524,
0.010538887,
-0.026506683,
-0.018653901,
0.008150451,
0.03934896,
0.024011936,
-0.040936526,
0.0147842085,
-0.056245197,
0.052162886,
-0.08323382,
0.022636991,
-0.0444235,
-0.0050320174,
-0.017789245,
0.027470563,
-0.00022812403,
-0.02498999,
-0.0034054709,
0.029880261,
0.039235562,
0.050405223,
-0.029284924,
-0.07178067,
0.019972147,
0.0145715885,
-0.0009257849,
-0.007321231,
-0.061461486,
0.022920486,
-0.006049052,
0.055451415,
-0.01841293,
-0.01980205,
-0.006541623,
-0.03169462,
0.035436742,
-0.048931055,
-0.011793348,
0.006754243,
-0.011764999,
0.037137706,
0.014982655,
-0.024196208,
0.02197078,
-0.03141113,
-0.061404787,
0.018257009,
-0.038668573,
-0.020638358,
-0.02897308,
0.014684986,
0.030674044,
-0.019263413,
0.07529599,
0.043317873,
0.053637054,
-0.0018497979,
-0.046011064,
-0.044621944,
0.009603357,
0.046011064,
-0.00890171,
-0.04011439,
-0.029568417,
-0.020454088,
-0.056386944,
-0.06673447,
-0.029199876,
0.0015503574,
0.013026547,
-0.04065303,
0.020992726,
-0.03226161,
-0.021219522,
-0.0421839,
0.026038919,
-0.069059126,
0.0023335095,
0.044196706,
0.012105191,
-0.031524524,
0.034784704,
-0.0032814422,
-0.033310536,
-0.009064719,
0.03172297,
-0.044111658,
-0.043091077,
0.011878396,
-0.015620516,
-0.0124808205,
-0.052985016,
-0.029738514,
0.012813926,
0.0053261425,
-0.017718371,
0.0106806345,
0.013565185,
-0.03280025,
-0.0033027043,
0.045529127,
0.002556761,
-0.02830687,
0.033764128,
0.0056202672,
-0.03033385,
0.0054005594,
0.069172524,
0.0034781161,
-0.03614548,
-0.009582095,
0.02996531,
-0.013083246,
-0.035294995,
0.053580355,
-0.024819894,
-0.025386883,
-0.0076401616,
0.009929375,
0.04017109,
-0.009546658,
-0.013295866,
-0.023770967,
-0.037194405,
-0.015535467,
-0.030163756,
0.02713037,
0.0018852347,
0.018242834,
-0.003306248,
0.029171526,
0.030503947,
0.018143613,
-0.028647061,
-0.1026815,
-0.018583028,
-0.050688718,
-0.000021192833,
0.021644762,
-0.0049753184,
-0.010949953,
-0.028831333,
0.015251974,
-0.032941997,
0.016697792,
-0.038413428,
-0.0350682,
0.007335406,
-0.037336152,
-0.009532483,
-0.055451415,
-0.009624619,
-0.0003142796,
-0.028618714,
0.023048056,
0.0027605223,
0.0013085017,
0.009263164,
0.05324016,
-0.04065303,
-0.0037598384,
0.010227044,
-0.03637227,
-0.0035861982,
-0.08000199,
0.013572272,
-0.020496612,
0.057294123,
0.0049753184,
-0.026577557,
-0.0025797947,
-0.01355101,
-0.0088591855,
-0.024508052,
-0.006449487,
0.038016535,
-0.00014495842,
-0.028831333,
-0.009256077,
0.02704532,
-0.016952937,
-0.019518558,
-0.008455207,
-0.044451848,
-0.04669145,
0.022466894,
0.012707615,
0.045103885,
0.0026683868,
0.04289263,
0.01822866,
0.025868822,
-0.0002697622,
0.017193908,
-0.0029873173,
0.012934411,
0.00839142,
-0.0022466895,
0.046946596,
0.019589432,
-0.003731489,
0.012714703,
0.021219522,
-0.024309605,
-0.019220889,
-0.019036617,
0.040000994,
0.07654336,
0.025599502,
0.0058009946,
-0.018370407,
-0.009518309,
-0.059080135,
0.021191172,
-0.07779074,
-0.0032247435,
0.0059356545,
-0.054884426,
0.030078707,
0.008823749,
-0.028051725,
0.0033434567,
0.016683618,
0.04910115,
-0.010510538,
0.0075763753,
0.042325646,
0.01681119,
-0.055111222,
-0.04357302,
-0.002904041,
-0.0021067143,
-0.06798185,
-0.05746422,
-0.0013873484,
0.027711533,
-0.019008268,
-0.009929375,
-0.04255244,
-0.012743052,
0.02175816,
0.039887596,
-0.030617345,
-0.0036074603,
-0.04944134,
0.02239602,
-0.016371775,
-0.027839104,
-0.013926639,
0.046493005,
0.039462358,
0.014394404,
-0.015705565,
0.018455455,
0.031099284,
-0.05856985,
0.043686416,
0.007930743,
0.046918247,
0.0069774943,
0.021021076,
0.046379607,
0.019575257,
0.011552378,
0.05202114,
0.019220889,
0.041418463,
0.016485173,
0.016230028,
0.042382345,
-0.0002547016,
-0.018370407,
-0.034813054,
0.023941062,
-0.000587364,
0.012650917,
0.020936027,
0.037959836,
0.0007698632,
-0.04737184,
0.014160522,
0.018001866,
0.027300466,
0.020638358,
-0.023544172,
-0.017973516,
-0.0051702205,
-0.03603208,
0.019518558,
0.0028863226,
0.0016584395,
0.018129438,
0.043119427,
0.02541523,
-0.00426304,
0.023260677,
0.017463226,
0.038696922,
-0.03370743,
0.028817158,
-0.00033354835,
-0.008171713,
-0.009468698,
-0.052644823,
-0.0134447,
0.02619484,
-0.0074558905,
-0.034359466,
0.0072857942,
-0.03223326,
-0.01841293,
-0.02902978,
0.029568417,
-0.070363194,
0.016797015,
0.004808766,
-0.029596766,
-0.038073234,
0.04161691,
0.0014493627,
0.017009636,
0.049356293,
0.04340292,
0.0010347528,
0.112376995,
0.030192105,
0.051680945,
0.042750884,
0.03688256,
-0.050150078,
0.03883867,
0.024961641,
0.011268884,
-0.019050792,
0.0048548337,
-0.033027045,
0.019561082,
0.03875362,
0.04626621,
-0.020666707,
0.020723406,
0.007689773,
-0.039093815,
-0.010794031,
0.075692885,
0.01910749,
-0.002207709,
-0.0045217285,
-0.014812558,
-0.055848304,
-0.0035365869,
-0.017548274,
0.05085881,
0.011977619,
-0.041418463,
-0.019305937,
-0.06599739,
-0.040057693,
-0.003382437,
-0.01333839,
-0.03319714,
0.041418463,
0.033764128,
0.028179297,
0.048505813,
0.017094685,
-0.03084414,
0.030447248,
0.042750884,
-0.027385514,
0.01841293,
0.04260914,
0.03557849,
0.008363071,
0.0022041653,
-0.020978551,
-0.028590364,
0.015492944,
-0.0011694125,
-0.0028880944,
-0.011687038,
-0.03637227,
-0.028958905,
0.071894065,
-0.02528766,
0.0155212935,
-0.038044885,
-0.021531364,
-0.033934224,
-0.013210817,
-0.026520858,
-0.0009753963,
-0.03316879,
-0.03143948,
0.013295866,
-0.017959341,
0.2383617,
0.061064593,
-0.0151811,
-0.0027144544,
0.015677216,
0.061915077,
0.022254273,
-0.0013155891,
0.025145913,
-0.05942033,
0.009752192,
-0.007966179,
-0.006123469,
-0.016882064,
-0.03787479,
0.0033859806,
-0.034529563,
-0.010283742,
-0.028618714,
-0.03560684,
-0.0064459434,
0.016896239,
-0.02411116,
-0.0005417392,
0.0021031706,
0.0052659,
-0.014897606,
-0.047825426,
-0.007048368,
-0.0024061548,
0.014812558,
-0.012870625,
0.038044885,
-0.046039414,
0.027569786,
0.022197574,
0.035380043,
-0.026152316,
-0.012140628,
-0.008582779,
0.00008637706,
0.02036904,
0.023104755,
-0.015308673,
-0.02405446,
0.054856077,
-0.014557414,
0.006775505,
0.026605906,
-0.08964078,
0.052361332,
-0.060611002,
0.023728443,
0.01868225,
-0.023941062,
-0.02523096,
-0.035209946,
-0.009865589,
0.026308237,
0.018455455,
0.05652869,
0.0015450419,
-0.010517625,
-0.0013058439,
0.011205098,
0.018937396,
-0.0012916692,
0.003905129,
0.016924588,
-0.013154118,
0.014238483,
-0.0060738577,
0.00031073592,
-0.013480137,
0.046379607,
0.055905003,
0.04731514,
0.0093623875,
0.0019206714,
-0.012750139,
-0.019305937,
-0.031297732,
-0.0036428971,
-0.03634392,
0.024678146,
0.026265712,
-0.027697358,
-0.0079874415,
-0.005861237,
0.009929375,
-0.022679515,
0.051794343,
-0.034472864,
-0.019957973,
-0.008051228
] |
Here it's important to see how DP rank 0 doesn't see GPU2 and DP rank 1 doesn't see GPU3. To DP there is just GPUs 0
and 1 where it feeds data as if there were just 2 GPUs. GPU0 "secretly" offloads some of its load to GPU2 using PP.
And GPU1 does the same by enlisting GPU3 to its aid.
Since each dimension requires at least 2 GPUs, here you'd need at least 4 GPUs.
Implementations:
- DeepSpeed
- Megatron-LM
- Varuna
- SageMaker
- OSLO
🤗 Transformers status: not yet implemented
Data Parallelism + Pipeline Parallelism + Tensor Parallelism
To get an even more efficient training a 3D parallelism is used where PP is combined with TP and DP. This can be seen in the following diagram. |
[
0.015846463,
-0.0172742,
-0.014107735,
-0.0038308578,
0.016864257,
-0.01812236,
0.028059974,
-0.013556431,
-0.0093509685,
0.08125377,
0.029261535,
-0.003940412,
-0.011181582,
-0.03550965,
-0.0068488955,
0.01781137,
-0.009153064,
-0.054678075,
-0.028625414,
0.0144611355,
0.007569832,
0.00068206235,
-0.08492913,
-0.018037545,
-0.02779139,
0.011485506,
0.010107245,
0.043878164,
0.05937123,
0.030590318,
-0.026745325,
-0.018659528,
0.0018588849,
-0.024031213,
-0.00028161576,
0.0028448715,
0.046564005,
-0.0084604,
-0.012128694,
-0.030675136,
0.04701636,
0.010439442,
0.059031963,
-0.012771882,
-0.06491254,
0.009068249,
-0.021585682,
-0.035877187,
-0.017175248,
-0.017726554,
0.01769828,
-0.008099932,
0.020228626,
-0.00209743,
-0.043030005,
-0.018815026,
0.042210117,
0.042436294,
0.018249584,
-0.0019154289,
-0.036866706,
-0.011655138,
-0.01543652,
-0.08317626,
0.017684145,
0.008191816,
-0.03893056,
-0.040881332,
-0.014001715,
-0.068814084,
-0.046168197,
0.003640022,
0.002314771,
-0.013945171,
-0.013351458,
0.020468937,
0.017387288,
-0.025670988,
-0.018065818,
0.025020732,
0.02945944,
0.019182561,
0.014256163,
0.016185729,
-0.0407117,
-0.018390944,
0.022900332,
-0.04763834,
0.027480397,
-0.025670988,
-0.00048769225,
0.03791277,
0.025755804,
0.0076758517,
0.012679998,
0.019960042,
0.0050536226,
0.06304659,
0.014227891,
-0.009301493,
0.07904855,
0.072659075,
0.011471369,
0.031608112,
-0.053829916,
0.045178678,
0.0392981,
0.042040486,
-0.016468449,
-0.026505014,
0.024172572,
0.0084604,
0.011266397,
0.005859375,
-0.037121154,
0.03299344,
0.006424815,
0.031268846,
-0.017302472,
0.007704124,
0.039382916,
0.014404591,
0.040881332,
-0.0076122396,
-0.015478928,
-0.07248944,
-0.032428,
0.036272995,
-0.03553792,
-0.0148710795,
-0.016949072,
-0.0025232772,
0.0050854287,
0.023621267,
0.041786037,
0.023550587,
0.0003434608,
0.031466752,
0.033219617,
0.02357886,
0.01253157,
-0.020384122,
-0.03225837,
0.07723914,
0.020044858,
-0.026745325,
0.03539656,
-0.024865236,
-0.014065327,
0.014411659,
-0.031608112,
0.0065944474,
-0.049221575,
0.018518168,
0.01936633,
-0.008524012,
-0.0075274236,
-0.00401816,
-0.028088246,
0.016906664,
0.009054112,
-0.040937874,
0.0091459965,
0.019239105,
-0.030816495,
0.017118704,
-0.018249584,
0.024752147,
-0.022999283,
0.01115331,
0.045009047,
0.0006202173,
-0.0051278365,
-0.015478928,
0.051624697,
0.03844994,
0.016722897,
-0.042973462,
0.018376809,
0.021331234,
-0.017443832,
-0.023352683,
-0.009435785,
-0.011959062,
0.00083049043,
-0.0021822462,
-0.016539128,
0.012255918,
0.00412418,
-0.01908361,
0.013605907,
0.06304659,
-0.029742159,
0.00075892685,
-0.026123341,
0.0016998549,
-0.0032230096,
0.011344146,
-0.019069474,
-0.040372435,
-0.02357886,
0.020511346,
-0.014701447,
0.005523645,
-0.047977608,
-0.00973264,
-0.025077276,
0.05235977,
-0.029572526,
0.024116028,
0.05742046,
0.019960042,
0.002279431,
0.002077993,
0.003887402,
0.0069407793,
-0.008905685,
0.030222783,
-0.00216811,
0.048740953,
0.045857206,
-0.017981,
0.016652215,
-0.02247625,
0.025996117,
-0.07678679,
-0.002016148,
0.036583986,
0.01330905,
0.052048776,
0.024738012,
0.04028762,
-0.012312462,
0.019338058,
0.037686594,
0.0053964206,
0.016327089,
0.030024879,
-0.027437989,
0.018716073,
0.027536942,
0.008863277,
0.01249623,
-0.016595673,
-0.0017360783,
0.022872059,
0.02364954,
-0.03228664,
-0.0023889851,
0.039891813,
-0.020652706,
0.045433126,
0.005219721,
-0.013810879,
-0.02828615,
-0.060162846,
0.0125527745,
-0.015592015,
-0.030929584,
-0.027678302,
0.016454313,
-0.00043512398,
-0.009414581,
-0.038223762,
-0.01642604,
0.034633216,
0.052331496,
0.025162091,
-0.0099305445,
0.0025974913,
-0.0244977,
-0.046026837,
-0.03805413,
-0.0052479925,
-0.026250565,
0.024907645,
0.0015646793,
-0.056911565,
0.024130164,
-0.033078257,
-0.004346822,
-0.0142915035,
-0.011485506,
0.017825505,
0.002153974,
-0.042577654,
-0.0003949247,
0.040796515,
0.0053999545,
0.050635178,
0.0030410085,
-0.036301266,
0.026674645,
0.013040466,
-0.034350496,
-0.0005954793,
0.021401914,
-0.02640606,
-0.0034403508,
-0.053010028,
0.007880824,
-0.04365199,
-0.033247888,
0.0015673297,
-0.025953708,
0.04715772,
0.062650785,
-0.022985147,
0.025388269,
0.037234243,
-0.037658323,
-0.027197678,
0.02651915,
0.030448958,
-0.023592995,
0.05674193,
0.022985147,
0.0025232772,
-0.0052444586,
-0.01908361,
-0.030675136,
-0.014955895,
-0.02056789,
-0.046705365,
-0.0033343306,
0.055639323,
-0.025784077,
-0.060162846,
0.0255579,
-0.054875977,
0.008580556,
-0.0058876467,
-0.020186218,
0.024511836,
0.013662451,
0.0054777027,
-0.03847821,
0.013535227,
0.01341507,
-0.0028448715,
0.006237513,
-0.029007087,
-0.033728514,
0.018108224,
0.012623454,
-0.024935916,
0.058070716,
-0.03805413,
-0.003809654,
-0.011202785,
0.01171875,
0.0033979428,
-0.0025603843,
0.0030657465,
-0.0013994647,
0.014644903,
-0.042719014,
-0.0027918613,
-0.029996607,
-0.009958817,
0.028752638,
-0.020242762,
-0.017005617,
0.016298816,
-0.020878883,
-0.032936897,
0.011959062,
0.00056632375,
0.035707552,
-0.07542973,
0.033332705,
-0.00419486,
0.020794066,
-0.0051879147,
-0.0052479925,
-0.016270544,
0.05626131,
0.022179395,
0.04633783,
-0.034180865,
0.0025109083,
0.057674907,
0.014404591,
0.005933589,
0.030222783,
0.048118968,
0.0110543575,
0.00385913,
-0.034435313,
0.00771826,
0.005986599,
0.010015361,
-0.0072022956,
0.012199374,
-0.043001734,
-0.04633783,
0.009654893,
0.038817476,
0.032230094,
-0.009895205,
0.043284453,
-0.03288035,
0.034350496,
0.07339415,
0.0065979813,
-0.017118704,
-0.028752638,
0.05334929,
-0.0002120401,
0.010439442,
-0.059484318,
-0.03005315,
-0.017203521,
-0.037008066,
-0.0005278915,
0.013188895,
-0.034124322,
0.014856943,
0.021599818,
0.052727304,
0.004474046,
-0.03734733,
-0.00087289844,
0.03932637,
0.04028762,
-0.05419745,
0.006163299,
-0.04842996,
0.05317966,
0.001929565,
-0.06723085,
-0.05292521,
-0.0030851834,
-0.015097256,
-0.030844767,
0.03511384,
0.03327616,
-0.0052904007,
-0.008304904,
-0.06276387,
0.0073860637,
-0.0002752104,
-0.04181431,
-0.008622964,
0.0048239124,
0.0071846256,
0.0032565827,
-0.020610299,
-0.021896675,
0.01249623,
0.014885215,
-0.0442457,
-0.008439196,
-0.038082402,
-0.00438923,
0.012750679,
0.01472972,
-0.010149653,
0.022561068,
0.053123113,
0.0010973075,
-0.00403583,
0.043284453,
-0.00066483405,
-0.04452842,
0.049730472,
0.028130654,
-0.03635781,
0.06163299,
0.0076263756,
-0.020511346,
-0.0068135555,
0.028809182,
-0.02658983,
-0.007916164,
0.001228949,
-0.020313442,
-0.003834392,
0.025953708,
-0.037714865,
-0.031664655,
0.013521091,
0.017019752,
-0.016171591,
0.014644903,
-0.0875867,
-0.027141133,
-0.010842318,
-0.022773108,
-0.009704369,
-0.007280044,
-0.03245627,
0.03288035,
-0.010495985,
-0.042351477,
-0.029515982,
-0.014545951,
0.0100012245,
0.02945944,
0.027890341,
0.03915674,
-0.0025391802,
0.014814535,
0.017571056,
-0.060162846,
0.006725205,
0.010814046,
-0.0027211814,
0.037149426,
-0.03748869,
-0.035000753,
0.010609074,
-0.015068984,
0.017952729,
0.016510855,
-0.010609074,
0.014673175,
0.02014381,
-0.029289806,
0.034491856,
0.014157211,
-0.055045612,
-0.016963208,
0.044302247,
0.030307598,
-0.0052409247,
-0.0035569728,
-0.03519866,
-0.05043727,
-0.07311143,
0.0690968,
-0.014100667,
0.0069867214,
-0.017924456,
-0.011160377,
0.016751168,
0.034237407,
-0.026575694,
-0.020129673,
0.008962228,
-0.06259424,
0.026490876,
-0.026533285,
0.012185238,
-0.017316608,
0.034746304,
-0.0073789954,
0.015196208,
-0.002039119,
-0.0223773,
0.023338547,
0.0073295194,
0.0601063,
0.009435785,
0.002116867,
-0.012234714,
-0.01887157,
0.026632236,
-0.009230812,
-0.001177706,
-0.0073507237,
0.006188037,
-0.02765003,
0.009803321,
-0.0052267886,
-0.04187085,
-0.019196697,
-0.0096973,
0.0447546,
-0.061237182,
0.0033025246,
0.021105058,
0.011026085,
0.008234224,
0.05349065,
-0.022108715,
0.0075768996,
-0.012679998,
-0.04187085,
0.043538902,
-0.041022692,
-0.02113333,
-0.013408002,
-0.0025868893,
0.060162846,
-0.014899352,
0.043171365,
0.07124548,
0.02945944,
-0.0091813365,
-0.0056685386,
0.01670876,
-0.019592505,
-0.0007231451,
0.012658794,
-0.040004898,
-0.05891888,
-0.028158925,
-0.040542066,
-0.083232805,
0.011245194,
0.018320264,
0.02244798,
-0.021825995,
0.013853286,
-0.022631748,
-0.02120401,
-0.034096047,
0.021515002,
-0.03635781,
0.036159907,
0.034887664,
0.0009824525,
0.021317098,
-0.009449921,
-0.029883519,
-0.03288035,
-0.021175738,
0.03214528,
0.0029508914,
-0.066495776,
0.04390644,
-0.032908626,
-0.054791164,
-0.04068343,
0.018306129,
0.018065818,
-0.0352552,
-0.004580066,
-0.0068170894,
-0.0046507465,
-0.034887664,
-0.01936633,
0.008531081,
0.026080932,
0.03005315,
0.023183051,
-0.0068877693,
-0.02499246,
-0.0024525973,
0.048458233,
-0.039128467,
0.014998304,
-0.0018049914,
-0.036527444,
0.017076297,
0.028837454,
0.033587154,
-0.0017263598,
0.015973687,
0.018504033,
-0.0014392223,
0.052868664,
-0.015959552,
0.06191571,
0.021995626,
0.0029526583,
-0.04167295,
0.00090735493,
0.0056013926,
0.008417992,
0.030986127,
-0.008594692,
0.009753845,
0.063781664,
0.038252033,
-0.019903498,
-0.09069662,
0.01224885,
-0.07842657,
0.0035216326,
-0.026702916,
-0.030618591,
0.031127486,
0.0127577465,
0.0030887176,
-0.05713774,
0.00039514556,
-0.0118742455,
0.0065767774,
0.031466752,
-0.051822603,
0.0148004,
-0.05993667,
0.009746777,
-0.009308561,
-0.0133726625,
-0.011739953,
0.009301493,
-0.040881332,
-0.029883519,
0.014489407,
0.0077818716,
-0.02209458,
0.029798703,
-0.020200353,
-0.003707168,
-0.027042182,
-0.006654525,
-0.04187085,
0.05812726,
0.029261535,
0.0027582883,
0.0223773,
0.025176229,
0.0013597072,
-0.022575203,
0.010199129,
0.056063402,
-0.014263231,
-0.031495024,
-0.0248511,
0.027904477,
-0.017613465,
-0.013464547,
-0.020228626,
-0.01649672,
-0.0051667104,
0.023112372,
-0.021854267,
0.057759725,
-0.014856943,
0.042492837,
0.0075556957,
0.0012660561,
-0.004541192,
0.01557788,
0.02350818,
0.012835494,
-0.022108715,
-0.010969541,
0.015323431,
0.0035322348,
0.0032247766,
0.0057710246,
0.014659039,
-0.045715846,
-0.019210834,
-0.014454067,
0.052727304,
0.06429056,
0.020341715,
0.004064102,
0.0015054847,
-0.035962,
-0.05207705,
-0.019281514,
-0.081479944,
-0.072941795,
0.009563008,
-0.033049986,
0.016680488,
0.0088067325,
-0.0269715,
-0.013832083,
0.026999773,
0.00007294401,
0.0008675974,
-0.007803076,
0.020836474,
0.024257388,
-0.019634914,
-0.044415332,
0.009018772,
0.016524993,
-0.05824035,
-0.045546215,
-0.0241443,
0.0010875891,
0.008241292,
-0.010962473,
-0.027126998,
-0.005371683,
0.030392416,
-0.002176945,
0.0006688098,
-0.017161112,
-0.0156202875,
0.012453822,
-0.037545234,
-0.021189874,
0.018079953,
-0.0048839906,
0.018602986,
0.0027847933,
-0.013082874,
0.04322791,
0.030844767,
-0.025713397,
0.01781137,
0.07282871,
0.018334402,
0.027466262,
-0.01161273,
-0.03649917,
0.027706573,
0.043284453,
0.031070944,
-0.004102976,
0.010432373,
0.018673666,
-0.0014003481,
-0.0008309322,
0.02506314,
0.034293953,
0.018390944,
0.0045871343,
-0.007774804,
-0.023974668,
0.010291013,
0.002355412,
0.04831687,
-0.0338416,
-0.005774559,
-0.0013287846,
-0.021939082,
0.0031770675,
-0.035170384,
-0.05544142,
-0.0029349884,
0.03562274,
-0.021472594,
0.010453577,
-0.0032777865,
-0.042181846,
0.067909375,
0.030759951,
0.0069973236,
0.027268358,
0.036583986,
0.028611278,
-0.0012095121,
0.025190365,
0.019620778,
0.008559352,
-0.03565101,
-0.048345145,
-0.0034438847,
0.024695605,
-0.033643696,
-0.0016079708,
0.013358527,
-0.028809182,
-0.026278837,
-0.046366103,
0.031608112,
-0.0657607,
0.031410206,
0.033360977,
-0.026278837,
-0.028031701,
0.045998566,
-0.0066863312,
0.0114289615,
0.050352458,
0.027833797,
0.0066262535,
0.100818,
0.011443098,
-0.006177435,
0.010778706,
0.045320038,
-0.017938593,
-0.043058276,
-0.030533776,
0.024794556,
-0.011909585,
0.0061739013,
0.000050083432,
0.040372435,
0.013782606,
0.005781627,
-0.057759725,
0.0169208,
0.038110673,
-0.05388646,
-0.0032000386,
0.021076787,
0.030986127,
-0.006311727,
-0.034096047,
-0.030929584,
-0.049306393,
-0.020624435,
-0.016030231,
0.03847821,
-0.006456621,
-0.05351892,
-0.040061444,
-0.04775143,
-0.016270544,
-0.02085061,
0.0007686454,
-0.033049986,
0.033332705,
0.04481114,
0.028823318,
0.036951523,
-0.03802586,
-0.0031010865,
0.049193304,
0.04478287,
-0.014856943,
0.043991253,
0.054508444,
0.021218147,
-0.04082479,
0.001165337,
-0.016878393,
-0.034039505,
-0.0014392223,
-0.015153799,
0.0066827973,
-0.04068343,
-0.03211701,
0.0070892074,
0.007845484,
-0.019535962,
-0.013174758,
-0.0137472665,
-0.013457479,
-0.051709514,
0.011796498,
-0.054734617,
0.022956876,
0.009039977,
0.0047390964,
0.022928603,
-0.044556692,
0.23635404,
0.065873794,
0.013655383,
0.027268358,
0.01936633,
0.10777292,
0.002298868,
-0.038845748,
-0.033671968,
-0.027777253,
0.02421498,
-0.05023937,
-0.031523295,
0.0013579401,
-0.018094089,
0.05261422,
-0.050013192,
0.006516699,
-0.010778706,
-0.03791277,
-0.043567173,
0.0059547927,
0.034435313,
0.03816722,
0.01677944,
0.06666541,
0.03302171,
-0.012199374,
0.014659039,
-0.033219617,
-0.013358527,
-0.047383897,
0.0093863085,
0.025572037,
0.009414581,
0.0176276,
0.002053255,
-0.030364143,
0.009831592,
-0.009315629,
0.009018772,
0.014899352,
-0.010368761,
0.011987334,
-0.06021939,
0.027494533,
-0.020511346,
0.049504295,
0.024200844,
-0.06904026,
0.082723916,
-0.049108487,
0.0097609125,
-0.002092129,
-0.046281286,
-0.04715772,
-0.019620778,
-0.029007087,
0.019479418,
0.025996117,
0.03915674,
-0.016327089,
0.018291993,
0.037545234,
-0.00070414983,
0.006371805,
0.009570077,
-0.025897164,
-0.009464056,
0.0068029533,
0.02085061,
-0.01925324,
-0.02028517,
-0.014701447,
0.030533776,
0.03497248,
-0.017867913,
0.054904252,
-0.016510855,
-0.029091902,
-0.016397769,
-0.0052373908,
0.022872059,
-0.042747285,
0.019818682,
0.07220672,
-0.05756182,
0.018602986,
-0.0123831425,
-0.026137477,
0.024723876,
0.040202804,
-0.033756785,
-0.036753617,
-0.022872059
] | Sample = Data Parallelism (sample-wise parallel)
Operator = Parallelize a single operation into several sub-operations
Attribute = Data Parallelism (length-wise parallel)
Parameter = Model Parallelism (regardless of dimension - horizontal or vertical)
Examples:
* Sample
Let's take 10 batches of sequence length 512. If we parallelize them by sample dimension into 2 devices, we get 10 x 512 which becomes be 5 x 2 x 512.
Operator |
[
0.02988425,
-0.00563709,
-0.010667727,
0.020619402,
-0.016951457,
-0.008994502,
-0.010156261,
0.0067769294,
-0.035013527,
0.06324647,
-0.0059805033,
-0.015665485,
0.030746436,
-0.03925139,
-0.0024166787,
0.03150633,
0.0026943318,
-0.02162772,
-0.05360168,
0.014299138,
0.011025754,
-0.022562975,
-0.07055313,
-0.008037329,
-0.027341532,
0.043518484,
0.018047458,
-0.0073943427,
0.07686609,
0.025734065,
-0.018865803,
-0.012121753,
0.021218548,
-0.024316574,
-0.0019801056,
0.006627143,
-0.015241698,
0.020210229,
-0.036504086,
-0.027224625,
0.02627476,
-0.044833682,
0.040215872,
-0.033698328,
-0.049685307,
-0.008811835,
0.057430368,
-0.01893887,
-0.028364465,
-0.05418621,
-0.010214714,
0.011880633,
0.000665363,
-0.0017764324,
-0.019450337,
-0.019698763,
-0.011741807,
0.039397527,
-0.019713376,
0.010105114,
0.021203935,
0.015154018,
0.00027399985,
-0.064532444,
0.03387369,
0.04346003,
-0.015636258,
0.010097807,
-0.014927512,
-0.031155609,
-0.056933515,
-0.008819141,
-0.004742024,
-0.019888736,
0.0004676264,
0.045330536,
0.005005064,
0.009944368,
-0.026888518,
-0.010872314,
0.041647978,
0.041414164,
-0.029825797,
-0.007014396,
-0.040888082,
-0.031623237,
0.018295882,
-0.034312088,
0.0070107426,
-0.023892786,
-0.0055421037,
0.026669318,
0.04346003,
0.035831872,
0.009739781,
0.019991029,
-0.026727771,
0.054390796,
0.039982058,
-0.005260797,
-0.0017709524,
0.05234493,
-0.021861535,
-0.0052644503,
-0.03837459,
-0.0075697023,
0.031272516,
0.026640091,
0.012297113,
-0.011946393,
0.03255849,
0.007650076,
-0.023469001,
0.020794762,
0.009060262,
-0.01775519,
-0.00582341,
-0.020867828,
-0.021817695,
-0.0044716774,
0.018471243,
-0.012910873,
0.008914128,
0.05026984,
-0.0010822994,
-0.06932562,
0.01801823,
0.03726398,
-0.012077914,
-0.02355668,
0.02060479,
-0.0037245713,
-0.014598712,
0.058161035,
0.030337263,
-0.011442234,
0.007891196,
0.0319155,
0.015197858,
-0.009549808,
-0.014474499,
-0.041472618,
0.03524734,
0.10375461,
-0.013568472,
0.009009115,
-0.011266874,
-0.03282153,
-0.009476742,
0.03165246,
0.0031345582,
0.025865586,
-0.019757215,
0.0045447443,
0.013794979,
0.002982945,
-0.025324892,
0.02465268,
-0.005107357,
0.031214062,
0.02583636,
-0.024155827,
-0.005227917,
0.058862474,
-0.031798597,
0.049013093,
-0.05287101,
-0.012443246,
0.00031213148,
-0.01692223,
0.052900236,
-0.001983759,
-0.041238803,
-0.0053959703,
0.045885842,
0.021700788,
0.049802214,
0.0007991662,
0.006839036,
0.03001577,
-0.00030893483,
-0.012888953,
0.017112203,
0.024185054,
-0.008008102,
-0.0001914574,
-0.025865586,
0.0018120523,
0.012048687,
-0.026990812,
0.003136385,
0.0135830855,
-0.027312305,
0.008943355,
-0.054946102,
-0.027107717,
-0.03866686,
0.0015946791,
0.004979491,
-0.04556435,
-0.007927729,
0.0438692,
-0.025865586,
0.038783766,
-0.04196947,
0.012253273,
-0.017039137,
0.06003154,
-0.023352094,
0.015460898,
0.046967227,
-0.012888953,
-0.0030030382,
-0.01793055,
0.026040945,
0.017959777,
-0.0152855385,
-0.021203935,
0.012750126,
0.0130935395,
0.033493742,
-0.007861969,
0.040362004,
-0.029109744,
0.0040625045,
-0.00609741,
0.017272951,
-0.0007987096,
0.038783766,
-0.0075916224,
0.01302778,
0.05760573,
-0.0019819322,
0.060966793,
0.027838385,
0.002676065,
0.008512262,
0.03273385,
-0.047697894,
0.023279026,
-0.0067330897,
-0.007986182,
0.0050196773,
-0.026099399,
0.02970889,
0.01863199,
-0.008271142,
-0.040975764,
-0.044278376,
0.04249555,
-0.02395124,
0.014109165,
-0.024988785,
-0.05360168,
-0.051701944,
0.009403675,
-0.014883672,
0.0049429573,
-0.033639874,
-0.02307444,
0.024857266,
0.0504452,
-0.006904796,
-0.036357954,
0.0362995,
0.014671778,
-0.010083195,
0.019435722,
0.016951457,
0.027283078,
-0.013488099,
-0.03565651,
-0.033727556,
-0.0131300725,
-0.02513492,
-0.015183245,
0.029635824,
-0.020794762,
0.018339723,
-0.016556898,
-0.0030340916,
-0.02574868,
0.048545465,
0.016103884,
0.041911017,
-0.01287434,
-0.0236882,
0.014554872,
-0.018442016,
0.024521159,
-0.02953353,
-0.01155914,
-0.0036515046,
-0.01582623,
0.00606453,
-0.0013937459,
0.02469652,
-0.037497792,
-0.03951443,
-0.008607249,
0.010623887,
-0.013948419,
0.028802864,
-0.020721694,
-0.011135354,
0.023936627,
-0.011573753,
-0.030132677,
0.030658755,
0.028861318,
-0.007796209,
0.013809592,
-0.0005671797,
0.072599,
-0.01081386,
0.058570206,
0.03787774,
-0.0038469578,
-0.029036677,
-0.04059582,
-0.004588584,
-0.007708529,
0.0024075452,
-0.074177235,
-0.020926282,
0.008833755,
0.042963177,
-0.052900236,
0.040215872,
-0.032324675,
-0.014247992,
0.036854807,
-0.037643924,
0.021101642,
0.0041647977,
-0.0020294255,
-0.027341532,
-0.014408738,
-0.039602112,
-0.002944585,
0.0016248191,
-0.020122549,
-0.0065285033,
0.038520724,
-0.015124791,
-0.014043406,
0.029475076,
-0.029460464,
-0.01190986,
-0.050649785,
-0.015592418,
0.025368733,
-0.00095717283,
0.0012366526,
0.046704188,
0.01617695,
-0.025587933,
-0.009863994,
-0.019406496,
0.014021485,
0.0075843157,
0.014306446,
0.04553512,
0.009783621,
-0.063831,
-0.0009937062,
-0.000025530506,
0.026683932,
0.068682626,
-0.03019113,
0.044190694,
0.020648628,
-0.038900673,
0.010806554,
-0.0041940245,
-0.029416624,
0.058248714,
0.00651389,
0.008358822,
-0.011741807,
-0.03951443,
-0.015840845,
0.018295882,
0.014927512,
0.02425812,
0.046324242,
-0.04091731,
0.01223866,
-0.015139405,
0.0046251174,
-0.0044387975,
-0.014664472,
-0.021730015,
0.002173732,
0.0034615314,
-0.019011935,
0.032470807,
0.040215872,
-0.0025664652,
-0.025281053,
0.0508836,
-0.025792519,
0.009038341,
0.052900236,
0.01648383,
-0.01709759,
-0.0500068,
0.02931433,
0.00033587814,
0.020955509,
0.008629168,
-0.039339073,
-0.01828127,
-0.018383563,
-0.021656947,
-0.013385806,
-0.04188179,
-0.030308036,
0.0029098783,
0.058424074,
0.007620849,
-0.003978478,
-0.05322173,
0.0349843,
0.034516674,
-0.03621182,
-0.006692903,
-0.04319699,
0.0045922375,
0.035627287,
-0.07429414,
-0.023834333,
-0.03802387,
-0.008439195,
-0.024418866,
0.033815235,
0.03325993,
-0.016454604,
-0.015460898,
-0.07242364,
-0.016513057,
0.031097157,
0.0021097988,
-0.01635231,
0.013970339,
0.032850754,
0.01313738,
0.005246184,
-0.0075843157,
-0.001767299,
-0.00008705204,
-0.0071130362,
-0.0069851694,
-0.02931433,
-0.026932359,
-0.0319155,
-0.017915936,
-0.019260362,
0.04877928,
0.023805106,
-0.014291832,
-0.00006410455,
0.043839976,
-0.055004556,
-0.05687506,
0.032879982,
-0.00597685,
0.00599877,
0.07008551,
0.026377052,
-0.030483397,
0.05959314,
0.050240614,
-0.00073249295,
0.060966793,
0.008548795,
0.00041533812,
0.0067988494,
0.0013005859,
-0.0039638644,
-0.016293857,
0.0610837,
0.024813427,
-0.0041428776,
-0.009221008,
-0.05298792,
-0.029460464,
0.021510815,
-0.024243506,
0.0117710335,
-0.010580047,
-0.048136294,
0.04799016,
-0.017609056,
-0.007869275,
0.009958982,
0.013407726,
0.024754973,
0.036328726,
0.0495684,
0.013268899,
0.022840627,
-0.0071166893,
0.03480894,
-0.083003685,
-0.014978658,
-0.003633238,
-0.021160094,
-0.012947406,
0.014328365,
-0.009082181,
-0.026625479,
0.0077815955,
-0.015402445,
0.020181002,
-0.013575779,
0.011420313,
-0.024243506,
-0.01762367,
0.049597625,
-0.016776098,
-0.062778845,
-0.016366925,
0.010039355,
0.013868046,
-0.0041282643,
-0.019742602,
-0.050942052,
-0.03098025,
-0.06125906,
0.031038703,
-0.03428286,
-0.007832742,
-0.0044095707,
-0.037994646,
-0.011464153,
0.0005457164,
0.037936192,
-0.0314771,
-0.00584533,
-0.059359327,
0.020356363,
-0.08013947,
-0.007361463,
-0.02918281,
-0.0086730085,
-0.01626463,
0.03419518,
-0.023352094,
-0.03437054,
-0.011880633,
0.02246068,
0.0040953844,
0.055092238,
-0.0032094514,
-0.039572883,
-0.016556898,
0.014635245,
0.011968314,
-0.003518158,
-0.06681212,
0.015270925,
-0.0078035155,
0.035568833,
-0.0038834913,
-0.008782608,
-0.008906822,
-0.058161035,
0.032266222,
-0.044687547,
-0.0009489528,
0.009856688,
0.0011023927,
0.023673587,
0.014408738,
-0.034078274,
0.040975764,
-0.058774795,
-0.03361065,
0.0011864194,
-0.033639874,
0.0011270527,
-0.0045703175,
-0.007149569,
0.0016659191,
-0.019742602,
0.06342183,
0.05181885,
0.041501842,
0.02460884,
-0.02821833,
-0.02804297,
0.027005425,
0.027619185,
0.017799031,
-0.043752294,
-0.003627758,
-0.028729798,
-0.0752294,
-0.050942052,
-0.015373218,
0.0022723721,
0.015709324,
-0.04363539,
0.019654922,
-0.009484048,
-0.053338636,
-0.04538899,
0.030834116,
-0.04188179,
-0.002228532,
0.02360052,
0.00594397,
-0.037731607,
0.016498445,
0.014445272,
-0.028495984,
-0.03229545,
0.030687982,
-0.027224625,
-0.0384915,
0.013941112,
-0.01177834,
-0.017433697,
-0.055589087,
-0.010200101,
0.013824206,
0.016410764,
-0.03907603,
0.017784417,
-0.010872314,
-0.022957534,
0.006407943,
0.0473764,
0.03089257,
-0.012209433,
0.018778123,
0.0070874626,
-0.029445851,
0.0019234789,
0.05927165,
-0.011376474,
-0.032032408,
-0.019216523,
-0.004851624,
-0.034575127,
-0.01889503,
0.029694276,
-0.032879982,
0.026464732,
-0.003561998,
0.020794762,
0.05076669,
-0.02329364,
-0.014898285,
0.022168415,
-0.038316138,
-0.034428995,
-0.029080518,
0.029679663,
0.034399766,
0.0072518624,
0.0036094913,
0.011149967,
0.029475076,
-0.025178758,
-0.021393908,
-0.08078246,
-0.0063787163,
-0.055092238,
-0.00047630307,
0.0019746255,
-0.05444925,
0.0069303694,
-0.007211676,
-0.020137163,
-0.02918281,
-0.012618606,
-0.009009115,
-0.023878174,
0.0041757575,
0.0007288396,
-0.0225922,
-0.0699686,
0.0100320475,
-0.004420531,
-0.048808508,
0.003967518,
0.0041647977,
-0.022972148,
0.019727988,
0.052841783,
-0.04451219,
-0.013648846,
0.016089272,
-0.036153365,
0.009286768,
-0.070786946,
0.016980683,
0.0025153186,
0.06342183,
0.00047036642,
-0.038725313,
-0.011961007,
-0.026026333,
-0.020707082,
-0.025924038,
0.012618606,
0.06032381,
-0.007935036,
-0.018047458,
0.001907039,
0.025105692,
-0.020005642,
-0.021028575,
-0.012406713,
-0.03314302,
-0.021174708,
0.015797004,
-0.00046602808,
0.040946536,
0.0121729,
0.04711336,
0.035305794,
0.020619402,
-0.0125017,
0.009798234,
0.011982927,
-0.011544527,
0.01771135,
-0.040098965,
0.028203718,
0.04284627,
-0.0042049843,
0.025266439,
0.036094915,
-0.0009809195,
-0.016629964,
-0.008417276,
0.016147725,
0.086744696,
0.02364436,
-0.012406713,
-0.016469218,
0.0060937568,
-0.035568833,
-0.012560153,
-0.055559862,
-0.009593648,
-0.014503725,
-0.04135571,
0.038725313,
0.033201475,
0.014803299,
0.011040367,
0.019801056,
0.049480718,
0.014781378,
-0.015665485,
0.032879982,
0.031097157,
-0.07002705,
-0.057108875,
0.0006754096,
0.004873544,
-0.0663445,
-0.047142588,
0.006199703,
0.03510121,
-0.036270272,
-0.0069194096,
-0.05062056,
-0.027443824,
0.054244664,
0.05520914,
-0.05295869,
0.0043036244,
-0.038579177,
0.042904723,
-0.014240686,
-0.04816552,
0.046499602,
0.010119728,
0.050971277,
0.013078926,
-0.027663024,
0.014540259,
0.040420458,
-0.021832308,
0.04538899,
-0.017565217,
0.049013093,
0.005114664,
-0.0080300225,
0.01771135,
0.058891702,
0.020107936,
0.07932113,
0.03098025,
0.029153584,
0.028978223,
-0.0047895173,
0.04284627,
-0.0113180205,
0.032500036,
-0.04556435,
0.013341966,
0.002157292,
0.04746408,
0.022387614,
0.031447876,
0.007708529,
0.001808399,
-0.0015024325,
0.0012366526,
-0.0005274497,
-0.009294075,
-0.036094915,
-0.04319699,
-0.019172683,
-0.002093359,
0.03472126,
0.0010576394,
0.01836895,
0.010331621,
0.044366054,
0.019713376,
0.006550423,
0.01714143,
0.0005438897,
0.05316328,
-0.024944946,
0.058862474,
0.03194473,
-0.011288794,
0.0042269044,
-0.024798812,
0.009096795,
0.040186644,
-0.041589525,
-0.04056659,
-0.014532952,
-0.037030168,
-0.046499602,
-0.036241047,
0.03229545,
-0.05357245,
0.005399624,
-0.005545757,
-0.01190986,
-0.030746436,
0.023235187,
0.020560948,
0.0095790345,
0.104339145,
0.02285524,
-0.039602112,
0.10387152,
0.03752702,
0.041297257,
0.039192937,
0.018602762,
-0.049860667,
0.05149736,
0.02605556,
0.004654344,
-0.017989004,
0.009323302,
-0.027999131,
0.029738117,
0.031243289,
0.030863343,
-0.027429212,
-0.010382768,
0.020970121,
-0.028627504,
-0.0012951059,
0.07096231,
0.037556246,
-0.0027655717,
-0.021393908,
-0.016030818,
-0.04451219,
-0.005359437,
0.0042817043,
0.041121896,
0.0219346,
-0.045301307,
0.0104119945,
-0.058307167,
-0.038900673,
-0.02909513,
-0.01933343,
-0.03928062,
0.054741517,
0.025675612,
0.034078274,
0.050211385,
0.017565217,
-0.040625043,
0.039835926,
0.051964983,
-0.024681907,
0.03273385,
0.05672893,
0.053806264,
-0.014437965,
0.034165956,
0.0046689576,
-0.007335889,
0.004767597,
-0.020560948,
-0.0032240648,
-0.018266657,
-0.042290963,
-0.020575562,
0.027268466,
0.0122605795,
-0.0098786075,
-0.033727556,
-0.03054185,
-0.05374781,
-0.042992402,
-0.021160094,
-0.015270925,
0.00607549,
-0.02016639,
0.0020202922,
-0.020487882,
0.25462258,
0.06727975,
-0.020502495,
-0.00594397,
0.022416841,
0.06675367,
0.012355566,
-0.004895464,
0.021247774,
-0.039572883,
-0.01793055,
-0.024068147,
-0.0011014794,
-0.019143457,
-0.03752702,
0.013787672,
-0.016439991,
-0.013846125,
-0.028028358,
-0.03714707,
-0.016279245,
0.0028422917,
-0.008570715,
0.0041757575,
0.022256095,
0.01977183,
-0.026552413,
-0.012333646,
-0.007854662,
0.010039355,
-0.007964262,
-0.011208421,
0.028773637,
-0.025880199,
-0.015943138,
0.026830066,
0.022387614,
-0.033376835,
0.004975837,
-0.0043072775,
0.0034651847,
0.01153722,
-0.006959596,
-0.04118035,
-0.011924474,
0.06681212,
0.0048260507,
0.033669103,
0.002195652,
-0.07634001,
0.041063443,
-0.038433045,
0.011361861,
0.022212254,
-0.054215435,
-0.017638283,
-0.03594878,
-0.01582623,
0.02430196,
0.016629964,
0.064883165,
-0.01639615,
-0.014934818,
0.026523186,
-0.004632424,
0.027589958,
-0.03212009,
0.013919192,
-0.010923461,
-0.023746654,
0.009666715,
-0.012589379,
0.0033701982,
-0.025587933,
0.03691326,
0.039046805,
0.026289372,
0.030132677,
-0.00033108314,
0.0032660782,
-0.004639731,
-0.004895464,
-0.008534182,
-0.048107065,
0.032500036,
0.014174925,
-0.044249147,
-0.022373,
0.0052352236,
0.0020823989,
-0.008183463,
0.061142154,
-0.016162338,
-0.027838385,
-0.006418903
] |
This diagram is from a blog post 3D parallelism: Scaling to trillion-parameter models, which is a good read as well.
Since each dimension requires at least 2 GPUs, here you'd need at least 8 GPUs.
Implementations:
- DeepSpeed - DeepSpeed also includes an even more efficient DP, which they call ZeRO-DP.
- Megatron-LM
- Varuna
- SageMaker
- OSLO
🤗 Transformers status: not yet implemented, since we have no PP and TP.
ZeRO Data Parallelism + Pipeline Parallelism + Tensor Parallelism
One of the main features of DeepSpeed is ZeRO, which is a super-scalable extension of DP. It has already been
discussed in ZeRO Data Parallelism. Normally it's a standalone feature that doesn't require PP or TP.
But it can be combined with PP and TP.
When ZeRO-DP is combined with PP (and optionally TP) it typically enables only ZeRO stage 1 (optimizer sharding).
While it's theoretically possible to use ZeRO stage 2 (gradient sharding) with Pipeline Parallelism, it will have negative
performance impacts. There would need to be an additional reduce-scatter collective for every micro-batch to aggregate
the gradients before sharding, which adds a potentially significant communication overhead. By nature of Pipeline Parallelism,
small micro-batches are used and instead the focus is on trying to balance arithmetic intensity (micro-batch size) with
minimizing the Pipeline bubble (number of micro-batches). Therefore those communication costs are going to impact the performance.
In addition, there are already fewer layers than normal due to PP and so the memory savings won't be huge. PP already
reduces gradient size by 1/PP, and so gradient sharding savings on top of that are less significant than pure DP.
ZeRO stage 3 is not a good choice either for the same reason - more inter-node communications required.
And since we have ZeRO, the other benefit is ZeRO-Offload. Since this is stage 1 optimizer states can be offloaded to CPU.
Implementations:
- Megatron-DeepSpeed and Megatron-Deepspeed from BigScience, which is the fork of the former repo.
- OSLO
Important papers: |
[
-0.01056088,
0.0033062715,
-0.00079105125,
0.0070553473,
0.020206632,
-0.02320294,
-0.0036033192,
-0.033180796,
-0.061815467,
0.0547306,
-0.0016134678,
0.020826558,
0.012988923,
-0.041977838,
-0.031173417,
-0.014996302,
-0.018110693,
-0.011623611,
-0.02208117,
0.020191872,
0.020693718,
0.020487076,
-0.082420625,
0.0023579325,
-0.012487079,
0.0038228764,
0.017033203,
-0.0059446464,
0.048177097,
0.046966765,
-0.030612532,
-0.011166046,
0.004819186,
-0.023867147,
-0.004328411,
-0.008863464,
0.021269362,
-0.0014446487,
0.010856084,
-0.019232463,
0.05045016,
0.040708467,
0.015321026,
-0.028619912,
-0.04941695,
0.03146862,
0.01059778,
-0.004852396,
-0.012686341,
-0.03923245,
0.004642064,
0.0021715856,
-0.033239838,
-0.014103314,
-0.032236148,
-0.021505525,
0.004815496,
0.023498144,
0.0011660511,
-0.021387443,
0.018686337,
-0.010280438,
-0.05476012,
-0.065475985,
0.05759407,
0.02828043,
-0.04732101,
-0.008509221,
-0.021166041,
-0.01791881,
-0.05349075,
0.02413283,
-0.008885604,
-0.021726927,
-0.0124723185,
0.024900356,
0.00043196473,
-0.004649444,
-0.039143894,
0.00067712145,
-0.00009363464,
0.0063653104,
-0.007682653,
0.007498151,
-0.053047944,
-0.008051656,
0.004095939,
-0.034125444,
0.024324711,
-0.045904037,
-0.017638369,
0.030966775,
0.029062716,
0.0019649437,
0.022819176,
0.040354222,
0.015114384,
0.05679702,
0.046022117,
-0.059335764,
0.05148337,
0.0772841,
0.012575639,
0.043453854,
-0.048619904,
0.02720294,
0.014811801,
0.045490753,
0.0008325642,
-0.017269364,
0.04200736,
0.025638364,
0.0061623584,
0.020797038,
-0.006088558,
0.03471585,
0.024398511,
0.027704783,
-0.025151279,
0.011756452,
0.032177106,
-0.0065461225,
0.05898152,
-0.00010718399,
-0.027143897,
-0.05564573,
-0.03244279,
0.042715847,
-0.022671577,
-0.046819165,
-0.002839482,
-0.00020687259,
-0.04011806,
0.013734311,
0.010789663,
0.026701095,
-0.01997047,
0.011232466,
-0.0010599626,
0.0052213995,
0.015557188,
-0.036191866,
0.009247228,
0.085726894,
-0.013793351,
-0.0057675247,
0.03884869,
-0.0023782277,
-0.0015784125,
-0.0028468622,
-0.038612526,
0.049741674,
0.0052952003,
-0.012826562,
-0.0070036864,
-0.013594089,
0.0063800705,
-0.0037509208,
-0.0075940923,
0.013232466,
0.018701097,
-0.020782277,
0.02214021,
0.036664188,
0.011254607,
0.06264204,
-0.013298887,
0.004011068,
-0.012110695,
0.004966787,
0.049682632,
-0.022671577,
-0.030095926,
0.0022546113,
0.046642043,
0.034154966,
0.0420664,
-0.046789646,
0.0071844985,
0.027571943,
-0.009586711,
-0.009387449,
0.017785968,
0.028944636,
-0.00421402,
0.005036898,
-0.02630257,
-0.013343167,
0.008044276,
-0.015911432,
0.020929879,
0.02733578,
-0.034538727,
0.029594082,
-0.0152915055,
-0.0048929867,
-0.0108929835,
-0.008597782,
-0.008546121,
-0.047704775,
-0.033121753,
0.04611068,
-0.024797035,
0.041416954,
-0.045549795,
-0.004963097,
0.0019649437,
0.042833928,
-0.03380072,
0.007369,
0.042420644,
-0.01570479,
0.0044686324,
-0.0029686333,
0.030287808,
0.041830238,
0.021845007,
0.028162347,
-0.036221385,
0.020752758,
0.021653125,
0.014361616,
0.018848699,
0.011741691,
0.019099621,
-0.055261966,
0.019867148,
0.010952024,
0.07722505,
0.050863445,
0.02952028,
0.028560871,
-0.027483381,
-0.00208487,
0.00836162,
0.0052213995,
0.037667878,
0.02419187,
-0.060516577,
0.011239847,
0.032413267,
0.031055335,
0.0028597773,
-0.033269357,
0.00629151,
0.0043690014,
0.029594082,
-0.016870841,
-0.010708482,
0.04956455,
-0.030760132,
-0.010036895,
-0.033387437,
-0.036339466,
-0.048088536,
-0.05664942,
-0.004416972,
0.002204796,
-0.030583011,
-0.03781548,
0.01056088,
0.016073793,
0.03687083,
-0.037372675,
-0.001990774,
0.04935791,
0.0070737973,
0.011357928,
-0.003241696,
-0.027483381,
-0.026863456,
-0.051985215,
-0.016073793,
-0.05145385,
-0.03763836,
-0.0098523935,
0.009387449,
-0.0125387395,
0.008959405,
-0.0022638366,
0.00940959,
-0.0016706634,
-0.0053948313,
0.043837618,
0.027424341,
-0.044014737,
-0.00945387,
0.019261984,
-0.016988922,
0.044605143,
-0.012671581,
-0.03681179,
0.016929882,
-0.015321026,
-0.015003683,
-0.034066405,
0.010671581,
-0.04307009,
-0.014398517,
-0.05039112,
-0.03259039,
-0.039202932,
-0.0114981495,
0.024044268,
-0.022346852,
-0.00052213995,
0.03675275,
-0.026952017,
0.046907727,
0.026715854,
-0.022863457,
-0.007542432,
0.011977854,
0.006918816,
-0.024073789,
0.083719514,
0.043837618,
-0.0232177,
-0.05059776,
-0.028900355,
-0.03480441,
-0.023335783,
-0.0034188174,
-0.06990402,
-0.05375643,
0.055173405,
-0.037284113,
-0.03055349,
0.03335792,
-0.038346846,
-0.03456825,
0.029682642,
-0.027837625,
0.03459777,
0.018317334,
0.003250921,
-0.019911429,
0.025771204,
0.012140215,
-0.02208117,
0.013874532,
-0.041653115,
-0.023557184,
-0.0020830247,
0.023453863,
-0.0231439,
0.047143888,
-0.034538727,
0.017136524,
0.0038819169,
-0.009697412,
0.015077484,
-0.0061475984,
0.00084916933,
0.024856076,
-0.00947601,
-0.071320996,
-0.003164205,
-0.040501826,
0.01566051,
0.046907727,
-0.0050774883,
-0.013985233,
0.0006794277,
-0.026169728,
0.00023731538,
0.008590402,
0.010332098,
0.062701076,
-0.026996296,
0.026420651,
-0.014177115,
0.019011062,
0.023586703,
-0.03232471,
0.0047859754,
0.03152766,
0.0032472308,
0.057210304,
-0.05242802,
-0.018302575,
-0.006498152,
-0.00526937,
-0.0053062704,
0.02835423,
0.037490755,
0.003985238,
0.034243524,
-0.010206637,
0.0143173365,
0.014398517,
0.005457562,
-0.013077484,
0.009881914,
-0.005553503,
-0.048915107,
0.03167526,
0.057653107,
0.007487081,
0.00419926,
0.013261986,
-0.014693719,
0.03908485,
0.07061251,
0.0084797,
-0.031350538,
-0.026656814,
0.0462878,
-0.0029169729,
-0.0020295193,
-0.0339188,
-0.020413274,
0.011003684,
-0.0042619905,
0.012819182,
0.014479698,
-0.079409555,
-0.006110698,
0.012457559,
0.06340957,
0.008332099,
-0.0273653,
-0.061815467,
0.026715854,
0.03999998,
-0.066774875,
-0.020664196,
-0.019690027,
0.04318817,
0.009749073,
-0.049771193,
-0.031232458,
-0.028250908,
-0.020826558,
-0.030937254,
0.042597767,
0.020221392,
0.021298883,
0.010354239,
-0.041535035,
-0.0056125433,
0.0111291455,
-0.045579314,
0.021608846,
0.0074354205,
0.033210315,
0.03049445,
-0.012730621,
-0.0071734283,
0.00947601,
0.04180072,
-0.03267895,
0.041475996,
-0.016206633,
0.02112176,
0.022184491,
0.024413273,
0.0003334869,
0.056472298,
0.011726932,
-0.032501828,
-0.006841325,
0.024619915,
-0.01881918,
-0.0441033,
0.044014737,
0.03468633,
0.008974166,
0.024634674,
0.015188185,
-0.015808111,
0.001737084,
0.052044254,
-0.025328401,
0.01887822,
-0.017564567,
-0.024531353,
-0.019306263,
0.024487073,
-0.049830236,
-0.011977854,
0.027247218,
0.00014852392,
-0.028206628,
-0.010885604,
-0.06890033,
-0.038435407,
-0.003778596,
-0.015926192,
0.0010119921,
-0.02937268,
-0.017121762,
-0.0051291487,
-0.0063579306,
-0.012184496,
-0.009690032,
-0.06411805,
0.019527666,
0.03043541,
0.0035295186,
0.04504795,
-0.017756449,
-0.016590398,
0.025431722,
-0.042568244,
-0.017298885,
-0.015129144,
-0.030671572,
0.0040332084,
-0.04094463,
-0.030671572,
-0.0063874507,
-0.0068856054,
0.01566051,
0.01471586,
0.0042361603,
0.0025535042,
0.013992613,
-0.05124721,
0.03678227,
0.00016974162,
-0.0822435,
-0.00632103,
0.049092226,
0.0020737997,
-0.0044538723,
-0.001631918,
-0.033476,
-0.048708465,
-0.04835422,
0.058568235,
-0.04295201,
-0.042597767,
-0.061166022,
-0.010140217,
0.012693721,
0.025594084,
-0.0020442794,
-0.051896654,
-0.012273056,
-0.07852395,
0.008959405,
-0.019306263,
-0.030125447,
0.00056042406,
-0.016191874,
-0.03908485,
0.019335784,
-0.0252546,
-0.039321013,
0.048767503,
0.042538725,
0.024339471,
0.045608833,
0.020191872,
-0.027468622,
-0.012103315,
0.024354232,
-0.016103312,
-0.012398518,
-0.026022127,
0.02094464,
-0.061638348,
0.044870827,
-0.024250912,
-0.03675275,
-0.019498145,
-0.0022859767,
0.001006457,
-0.051808093,
0.004627304,
0.005819185,
-0.011077485,
0.039704777,
0.014428037,
-0.052221376,
-0.026036888,
-0.032059025,
-0.024723236,
0.04079703,
-0.030642051,
-0.004505533,
-0.015099623,
0.0051771193,
0.020103311,
-0.015808111,
0.022937259,
0.04200736,
0.036929872,
-0.0070811776,
0.034066405,
0.015749069,
-0.004627304,
0.0010313648,
0.01160885,
-0.04608116,
-0.030671572,
-0.045372672,
-0.064531334,
-0.07716601,
0.00029197402,
0.042479683,
0.033151276,
-0.036428027,
0.027837625,
-0.011033205,
-0.0032324707,
-0.027129138,
0.019217703,
-0.07592616,
0.024073789,
0.051217686,
0.032206625,
0.010228777,
0.057416946,
-0.027586702,
-0.025092239,
-0.022760136,
0.039321013,
-0.013527669,
-0.06464942,
0.06494462,
-0.039055333,
-0.02211069,
-0.04413282,
0.0108265625,
-0.027675264,
-0.013151285,
0.0097859735,
0.000012770981,
0.015409587,
-0.03052397,
-0.01583763,
0.023822866,
0.051129125,
0.023424342,
0.027970467,
0.005782285,
-0.013055344,
0.028870834,
0.05275274,
0.011402208,
0.02422139,
-0.021889288,
-0.009269368,
-0.011099625,
-0.002841327,
0.040708467,
0.0112619875,
-0.0099188145,
0.019542426,
0.008214018,
0.02528412,
-0.02934316,
0.016575638,
0.0021734308,
-0.016885601,
-0.05440588,
-0.021623606,
0.002306272,
-0.0054317317,
0.05387451,
0.015011063,
0.030671572,
0.02311438,
0.022804417,
-0.02619925,
-0.0505092,
0.03447969,
-0.06187451,
-0.021889288,
-0.035896663,
-0.03436161,
0.013372688,
-0.0026937255,
-0.0022250912,
-0.053136505,
-0.02219925,
-0.022760136,
-0.0009538741,
0.012295197,
-0.030966775,
0.0050036875,
-0.046760123,
-0.016339475,
0.003590404,
-0.03279703,
0.01678228,
0.016191874,
0.0021808108,
-0.029889284,
0.021904048,
-0.010413279,
-0.025549803,
0.014575639,
-0.028575633,
-0.043837618,
-0.018966781,
-0.006841325,
-0.016885601,
0.037225075,
0.048915107,
-0.0028487071,
0.004966787,
0.025003677,
0.002839482,
-0.01468634,
0.0094169695,
0.0209594,
-0.013505529,
-0.029726923,
-0.01667896,
0.02007379,
-0.010236157,
-0.0004317341,
-0.022494454,
-0.011970473,
-0.037579317,
0.008937265,
-0.006501842,
0.022760136,
0.019749068,
0.04634684,
-0.016974162,
-0.004140219,
-0.008464941,
0.028811794,
0.006383761,
0.008560881,
0.017328406,
-0.0033948324,
0.017416965,
0.030848693,
-0.009291508,
0.0070258267,
0.027247218,
-0.086730585,
0.0024870837,
0.010782283,
0.003776751,
0.06836897,
0.026007367,
0.017003682,
0.014774901,
-0.012420658,
-0.058420636,
-0.019911429,
-0.06518078,
-0.032088544,
0.010686342,
-0.034154966,
0.019247223,
0.020782277,
-0.044988908,
-0.035276737,
0.03911437,
0.053697392,
0.0068671554,
0.01893726,
0.0059852367,
0.028487071,
-0.03167526,
-0.014479698,
0.0035332085,
0.012354238,
-0.05287082,
-0.07025827,
-0.018789658,
-0.016118074,
-0.026583012,
-0.014952023,
-0.034450166,
0.018051652,
0.0145534985,
0.029092237,
0.00031088546,
0.006601473,
-0.0484723,
0.028678954,
-0.038494445,
-0.014826561,
0.007778594,
0.03368264,
-0.00006809268,
-0.008022136,
-0.025859766,
0.058095913,
0.023896668,
-0.030789653,
0.0019077482,
0.04106271,
0.019261984,
0.029387439,
0.00079428003,
-0.021992609,
0.013911433,
0.006003687,
0.043867137,
0.002302582,
0.010346859,
0.026479691,
0.005066418,
0.01685608,
0.011350548,
0.044723224,
0.015999991,
0.0014603314,
0.012959403,
0.0026992606,
0.0068523954,
0.024797035,
0.027852384,
-0.035188176,
0.016250914,
0.0018837629,
-0.008560881,
0.002215866,
-0.031852383,
-0.03468633,
-0.0018588551,
0.012730621,
0.0045571933,
0.035011053,
-0.04088559,
-0.00059824693,
0.053844992,
0.016738,
0.0232177,
0.01471586,
0.02419187,
0.017830249,
-0.020280434,
0.012457559,
0.034420647,
0.03787452,
-0.0016891136,
-0.023483383,
0.00938007,
0.04956455,
-0.028811794,
-0.0081402175,
0.0044391123,
-0.00047739828,
-0.018081171,
-0.08702579,
0.023512904,
-0.049003664,
0.02209593,
0.040295184,
-0.010354239,
-0.03371216,
0.021859769,
-0.018258294,
0.01998523,
0.01893726,
-0.009586711,
0.012265677,
0.111232415,
0.03247231,
-0.0008468631,
0.015380066,
0.016546117,
-0.005007378,
0.008066417,
-0.053195547,
0.022922497,
-0.017416965,
0.008752763,
0.015077484,
0.021933569,
0.018745378,
0.03256087,
-0.01889298,
0.018435415,
0.03592618,
-0.0209594,
-0.012184496,
0.055232447,
0.016162354,
-0.013380067,
-0.013151285,
-0.018007372,
-0.05163097,
0.004081179,
-0.032236148,
0.052103296,
0.0045571933,
-0.015867151,
-0.024398511,
-0.03899629,
-0.032413267,
-0.009977855,
0.0005668816,
-0.038937252,
0.03383024,
0.047911417,
0.030701092,
0.09251656,
-0.016560877,
-0.008369,
0.031881902,
0.057062704,
-0.04859038,
0.03468633,
0.072088525,
0.049151268,
-0.032088544,
0.030110687,
-0.01158671,
-0.029815484,
0.003782286,
-0.015690029,
-0.005328411,
-0.0028800725,
-0.018007372,
-0.0069261957,
0.029623602,
-0.020162351,
-0.005571953,
-0.011712171,
-0.015985232,
-0.040413264,
0.004852396,
-0.054110676,
0.0018164198,
-0.025653124,
0.0018154973,
0.033387437,
-0.026656814,
0.25930613,
0.058479678,
0.03471585,
0.015867151,
0.033387437,
0.0781697,
-0.046376362,
-0.03908485,
-0.008981545,
-0.043483373,
0.014191875,
-0.048177097,
-0.03873061,
-0.0074095903,
0.0043763816,
0.034420647,
-0.015557188,
-0.010804423,
-0.017623607,
-0.030907733,
-0.04227304,
-0.010952024,
0.0443985,
0.0025867147,
-0.0009395752,
0.05366787,
-0.003160515,
-0.000044395736,
-0.007667893,
-0.063468605,
-0.0042214002,
-0.02001475,
-0.02413283,
0.03244279,
0.03548338,
0.056236137,
-0.023630984,
-0.013291506,
-0.005878226,
0.003261991,
-0.0051143887,
0.004623614,
-0.00262915,
-0.033210315,
-0.022745376,
0.04531363,
-0.0053210305,
0.00020664197,
0.022966778,
-0.042095922,
0.09895198,
-0.049298868,
0.010177117,
-0.0009667892,
-0.048649423,
0.0003208024,
-0.0032324707,
-0.043335773,
0.021830248,
0.023291502,
0.033741683,
0.00952767,
0.026701095,
0.024929877,
0.023498144,
-0.012664201,
-0.006745384,
0.0029169729,
-0.014509218,
0.01880442,
0.007653133,
-0.018169733,
0.0091808075,
-0.00842804,
0.041416954,
0.04755717,
0.002512914,
0.06252395,
-0.029889284,
-0.015911432,
-0.0314391,
-0.012885602,
0.021490764,
-0.06258299,
0.0031734302,
0.033092234,
-0.033210315,
0.0189963,
0.01785977,
-0.022774898,
0.023690026,
0.055409566,
-0.027586702,
-0.043985218,
-0.026848696
] | Operator
If we perform layer normalization, we compute std first and mean second, and then we can normalize data.
Operator parallelism allows computing std and mean in parallel. So if we parallelize them by operator dimension into 2
devices (cuda:0, cuda:1), first we copy input data into both devices, and cuda:0 computes std, cuda:1 computes mean at the same time.
Attribute
We have 10 batches of 512 length. If we parallelize them by attribute dimension into 2 devices, 10 x 512 will be 10 x 2 x 256. |
[
0.031710077,
0.038998745,
-0.031071227,
0.02491506,
-0.030577572,
0.0029945984,
0.017466675,
-0.02706391,
-0.0022268924,
0.05575398,
0.028748145,
0.008000115,
0.041786447,
-0.044777416,
0.0193687,
0.021038415,
0.0061706877,
-0.034672007,
-0.053256664,
-0.0022631905,
0.015463018,
-0.033684697,
-0.057844754,
-0.020660914,
-0.038476054,
0.010649881,
-0.010664401,
-0.011702528,
0.090600215,
0.023056593,
-0.03618201,
-0.020994857,
0.007644393,
0.0027985885,
-0.059528988,
-0.004849435,
0.013139935,
-0.011992913,
-0.057205904,
-0.022432264,
-0.011579114,
-0.04326741,
0.0006338567,
-0.0612713,
-0.02726718,
0.0040980624,
0.036036815,
-0.028936896,
-0.00038385307,
-0.06191015,
-0.024798905,
0.028225452,
-0.00033099388,
-0.009539157,
-0.028167374,
-0.022287073,
0.0010018293,
0.04448703,
-0.030548533,
0.00043240187,
0.034904312,
0.005629845,
-0.029793533,
-0.09205214,
0.035456046,
0.02310015,
-0.016377732,
0.0075572776,
-0.031187382,
-0.01027238,
-0.075035565,
0.017640907,
-0.017742543,
-0.02392775,
0.00007373065,
0.026817083,
0.031884305,
0.013473879,
0.006566338,
-0.01283503,
0.0493655,
0.04840723,
-0.04669396,
-0.016581,
-0.06400092,
-0.043761067,
0.018904082,
-0.028080259,
-0.008355837,
-0.055666864,
0.009967475,
0.014729795,
0.022838805,
-0.0016216205,
-0.010657141,
0.03322008,
-0.028283529,
0.04132183,
0.007245113,
-0.022025725,
0.0059601585,
0.07056363,
-0.0355722,
-0.0090382425,
-0.03301681,
0.019049276,
0.019252546,
0.01246479,
-0.012152625,
-0.019238027,
0.0136481095,
-0.0024791646,
-0.017074656,
0.019644566,
0.0005939287,
0.0030708245,
-0.026715448,
0.014860468,
-0.038185667,
-0.021212647,
0.030171033,
0.008791415,
-0.0043775584,
-0.0015544689,
0.030751804,
-0.03830182,
0.026918719,
0.0016488441,
-0.00830502,
0.009139878,
0.029590262,
-0.023593806,
-0.016885905,
0.052704934,
0.013815081,
-0.014403111,
0.007891221,
0.05691552,
-0.025379676,
-0.0062142457,
-0.01939774,
0.0011860424,
0.035020467,
0.08670905,
0.004965589,
-0.006954728,
0.008842233,
-0.060109757,
-0.009677091,
0.03658855,
-0.014410371,
0.0095101185,
-0.009902139,
0.009125358,
-0.028835261,
-0.044574145,
-0.03955048,
0.022708131,
-0.003399323,
0.045619532,
0.027107468,
-0.005814966,
-0.026250832,
0.07009901,
-0.010395794,
0.05258878,
-0.028893339,
0.006439294,
0.022780728,
-0.019412257,
0.028806223,
0.027107468,
0.0042795534,
-0.009023723,
0.04088625,
0.03859221,
0.030141994,
0.0019473964,
-0.010294159,
0.02331794,
0.0011406698,
-0.0050490745,
-0.0038439755,
0.0043158517,
0.041176636,
0.019993028,
-0.005415686,
-0.015942153,
0.031100266,
0.013408542,
-0.014925805,
0.031884305,
-0.037633937,
0.033481427,
-0.015869558,
-0.006232395,
-0.02706391,
0.0012014692,
0.007491941,
-0.038708363,
0.00909632,
0.033249117,
-0.0047695786,
0.006442924,
-0.038243745,
-0.0027731797,
-0.02192409,
0.029488627,
0.0076008355,
-0.00948834,
0.023797076,
0.010911228,
-0.026308909,
-0.012951185,
0.043906257,
0.0013911271,
0.005368498,
-0.025539387,
0.048349153,
0.0046098665,
0.011158056,
-0.025611984,
0.05828033,
-0.00671879,
-0.0005612603,
-0.022316111,
-0.011629932,
0.021328801,
0.033162,
0.0076589123,
0.015433979,
0.042541448,
0.026788045,
0.07979788,
0.0076371334,
-0.0013021966,
0.010795074,
0.03513662,
-0.030780843,
-0.0020072884,
-0.021270724,
0.025858812,
0.04085721,
0.042134907,
0.012268779,
-0.02016726,
-0.029299878,
-0.0045517897,
-0.019586489,
0.0138296,
-0.033887964,
0.037692014,
0.0059129708,
-0.033858925,
-0.028109297,
-0.0058222255,
-0.025815254,
0.00316157,
0.008805934,
-0.023797076,
0.03914394,
0.03261027,
-0.024058422,
-0.03414931,
0.032813538,
0.04013125,
-0.0020635505,
0.019426776,
0.0071108104,
-0.002589874,
-0.024552077,
-0.055492632,
-0.07224786,
-0.048349153,
-0.020573799,
-0.006308621,
0.019630047,
-0.042657603,
0.033307195,
-0.011579114,
-0.0026570256,
0.020225337,
-0.009176176,
0.04204779,
0.04962685,
0.023013035,
-0.027964106,
0.052443586,
-0.044632223,
0.047158573,
-0.0011624487,
-0.037256435,
0.008181606,
-0.034846235,
0.02945959,
0.008515549,
0.022969477,
-0.043441642,
-0.04106048,
0.003281354,
-0.012711617,
-0.02963382,
0.016639078,
-0.020022066,
-0.023448613,
0.016726194,
-0.008159827,
0.0015635433,
0.02447948,
0.037053164,
-0.026526697,
0.015869558,
0.0019383219,
0.048552424,
-0.034062196,
0.021662744,
0.005219676,
-0.0025862441,
-0.029154684,
-0.030374303,
0.028225452,
-0.0150855165,
-0.004453785,
-0.04605511,
-0.02764468,
0.053982627,
0.010199784,
-0.077707104,
0.028820742,
-0.03714028,
-0.02902401,
0.036878932,
-0.03063565,
0.016958501,
-0.008145308,
0.017365042,
-0.048233,
-0.021038415,
-0.013147195,
0.009205214,
0.024755348,
-0.034091234,
0.003317652,
0.03223277,
-0.008609924,
-0.030374303,
0.052211277,
-0.05807706,
0.019978508,
-0.024450442,
-0.0069039105,
-0.00454453,
-0.00062659703,
0.011491998,
0.031332575,
0.0031234568,
-0.033365272,
0.02370996,
-0.015041959,
0.031274498,
0.019644566,
0.041989714,
0.0177861,
0.02726718,
-0.054679554,
-0.0062723225,
-0.0038258263,
-0.008319539,
0.07532595,
-0.03043238,
0.029938726,
-0.048262037,
-0.03046142,
-0.013386763,
0.016943982,
-0.042222023,
0.020022066,
0.021256205,
0.04564857,
-0.047274727,
-0.035310853,
0.0080944905,
0.051717624,
0.044341836,
0.015041959,
0.030548533,
-0.030112956,
0.021619186,
-0.035078544,
0.0031488657,
0.003735081,
0.0013938495,
-0.031506807,
0.012406712,
-0.0059783077,
-0.046810113,
0.03975375,
0.04408049,
-0.0013720705,
0.006798646,
0.056973595,
-0.018700814,
-0.0026298019,
-0.011724306,
-0.009771465,
-0.031361613,
-0.06789208,
0.014192582,
0.024755348,
0.00830502,
-0.002234152,
-0.03322008,
-0.025815254,
-0.01601475,
0.011840461,
-0.025190925,
-0.062316686,
-0.029793533,
0.016087346,
0.048145883,
0.0012196183,
-0.024160057,
-0.05578302,
0.02902401,
0.0387374,
0.0051724883,
-0.013096377,
-0.062781304,
-0.0036007778,
0.041612215,
-0.047797423,
0.0003564026,
-0.013321426,
-0.021314282,
-0.05314051,
0.06580131,
0.030490458,
-0.018337833,
-0.053024355,
-0.047158573,
-0.014860468,
0.03261027,
0.0049292906,
-0.045619532,
0.01601475,
0.0100037735,
-0.02016726,
-0.0067696073,
0.026933238,
0.040044133,
0.04367395,
-0.016174462,
0.05293724,
-0.034788158,
-0.015695326,
-0.03266835,
-0.04187356,
0.012980223,
0.058018982,
0.01344484,
-0.014533784,
-0.020414086,
0.02352121,
-0.085779816,
-0.047710307,
0.011978393,
-0.01146296,
-0.0026951386,
0.022693612,
0.034468736,
-0.011985653,
0.033132963,
0.03223277,
-0.023942268,
0.04274472,
0.014940324,
-0.0028802592,
0.014954844,
-0.015070997,
-0.014069168,
-0.06423323,
0.060806684,
-0.0077387686,
0.016653597,
0.00025771695,
-0.013546474,
-0.020065624,
-0.02015274,
-0.029590262,
0.025205445,
0.020181779,
-0.0068458337,
0.004225106,
-0.0050926325,
0.005793187,
-0.0017522938,
0.015637249,
0.037285473,
0.038011435,
0.051543392,
0.035281815,
-0.03716932,
-0.015869558,
0.04666492,
-0.06707901,
0.00237027,
-0.0137570035,
0.0011923946,
-0.011012862,
0.00848651,
-0.0055681383,
-0.008929349,
0.0037241916,
0.011709788,
0.009822283,
-0.020907743,
0.017074656,
0.003971019,
-0.018918602,
0.05157243,
-0.03295873,
-0.05511513,
-0.068705164,
0.031071227,
-0.0041561397,
0.0019129132,
0.017655427,
-0.040595867,
-0.017089175,
-0.047565114,
0.062316686,
-0.025510348,
0.024552077,
-0.0026388764,
-0.012733395,
0.0069910265,
0.0031942383,
0.013727966,
-0.051485315,
0.013009261,
-0.02964834,
0.03931817,
-0.060400143,
0.0038584948,
-0.038040474,
0.011317767,
-0.0069148,
0.009219733,
0.03168104,
-0.030577572,
-0.008994685,
0.019746201,
0.038011435,
0.062142454,
-0.04085721,
-0.05180474,
-0.0014909471,
-0.010976564,
-0.010323198,
-0.0024610155,
-0.021706302,
0.013960274,
-0.014504746,
0.041554138,
-0.019136392,
-0.039492402,
0.020414086,
-0.042541448,
0.024218135,
-0.021430435,
0.02433429,
0.011985653,
0.013851379,
0.04800069,
-0.00076770614,
-0.01682783,
0.029343436,
-0.020631876,
-0.06644016,
-0.0025608353,
-0.03711124,
-0.0063558086,
-0.04349972,
0.0035100323,
0.035281815,
-0.024595635,
0.0026987684,
0.05825129,
0.021764379,
-0.0037459705,
-0.011201614,
-0.03420739,
0.021096492,
0.010744256,
0.003620742,
-0.05894822,
0.0031161974,
-0.010983824,
-0.03661759,
-0.034439698,
-0.0061235,
0.020791588,
0.007731509,
-0.033336233,
-0.010838632,
-0.005459244,
-0.022461303,
-0.030896997,
0.023013035,
-0.037488744,
0.0070854016,
0.03046142,
0.0154920565,
-0.048552424,
0.04942358,
-0.03141969,
-0.024145538,
-0.031942382,
0.06702093,
0.0021978538,
-0.024072941,
0.013103637,
0.003738711,
-0.0066498234,
-0.055057053,
0.014954844,
0.06946017,
0.014243399,
-0.021430435,
0.008776896,
-0.02292592,
-0.009350407,
0.037430666,
0.05575398,
-0.013089118,
0.010417573,
0.0398699,
-0.0050490745,
-0.047710307,
0.014199842,
0.033510465,
-0.03168104,
-0.026221793,
-0.0045590494,
-0.0026570256,
-0.029488627,
-0.046519727,
0.010490169,
-0.011789643,
-0.0050091464,
0.03777913,
0.011005603,
0.057554368,
0.011325027,
0.013982053,
-0.006751458,
-0.023884192,
-0.044864528,
-0.014969363,
0.031129304,
-0.02038505,
0.015956672,
0.017669946,
0.057641484,
0.026250832,
0.04585184,
-0.0044937124,
-0.0718994,
-0.016101865,
-0.04942358,
0.01796033,
0.028486798,
0.00080627296,
0.0024192727,
0.043935295,
-0.0005716961,
-0.02591689,
0.01894764,
-0.017263407,
0.011020122,
-0.053895514,
-0.021982167,
-0.003793158,
-0.04646165,
-0.03179719,
0.0005417501,
-0.03121642,
-0.026004003,
0.03978279,
-0.02546679,
0.015375902,
0.038824514,
-0.00989488,
-0.03397508,
0.019325143,
-0.03661759,
-0.019993028,
-0.023405056,
0.008341318,
-0.004108952,
0.028675549,
0.015143594,
-0.022591976,
-0.0010635362,
0.0033085775,
0.03536893,
-0.018236198,
0.0052487142,
0.040218364,
0.006000086,
-0.017016578,
-0.02214188,
0.039434325,
-0.032755464,
-0.02054476,
-0.00074139,
-0.030896997,
-0.020965818,
-0.00810901,
0.0006810443,
0.036646627,
0.017553791,
0.023564767,
0.036646627,
0.03499143,
-0.013459359,
-0.0060146055,
0.02038505,
0.018265236,
-0.018642737,
-0.04802973,
0.04994627,
0.024450442,
-0.014453929,
0.017902253,
0.049743004,
0.005118041,
-0.015317825,
-0.01957197,
0.03217469,
0.077416725,
0.051717624,
-0.006344919,
-0.00011842276,
-0.015129074,
-0.03975375,
0.0076806913,
-0.049888197,
-0.0014301477,
0.016958501,
-0.047913574,
-0.024203615,
-0.00094556715,
0.0075354986,
0.013894937,
0.02092226,
0.010366756,
-0.019847836,
-0.002190594,
0.038621247,
0.0090382425,
-0.088857904,
-0.04053779,
0.021270724,
0.023288902,
-0.076371334,
-0.036298163,
0.059993602,
0.013851379,
-0.011615412,
-0.004620756,
-0.03295873,
0.017365042,
0.014882247,
0.049104154,
-0.041467022,
-0.0058730426,
-0.06864709,
0.02548131,
-0.006206986,
-0.02964834,
-0.004108952,
0.04384818,
0.03043238,
0.018744372,
-0.03716932,
0.018207159,
0.054040704,
-0.07538403,
0.0521532,
0.008181606,
0.029967764,
-0.018047446,
0.022098321,
0.026366986,
0.061329376,
0.032842577,
0.052530702,
0.0033848037,
0.05017858,
0.024014864,
0.009807764,
0.0076806913,
0.03394604,
0.010700699,
-0.00890757,
-0.003793158,
0.00830502,
0.028965935,
-0.0462003,
0.005473763,
0.016551962,
-0.0057532587,
-0.0005199712,
0.018483024,
-0.014083687,
0.005154339,
-0.014570083,
-0.032290846,
-0.01205825,
-0.0022668203,
0.02789151,
0.009974735,
0.0015036514,
-0.003303133,
0.04683915,
0.017234368,
0.014112726,
0.009611754,
-0.0023757147,
0.037633937,
-0.02667189,
0.021807937,
0.021982167,
-0.017132733,
0.006482852,
-0.03261027,
-0.026860641,
0.053053394,
-0.013807821,
-0.047332805,
-0.030577572,
-0.024653712,
-0.011216132,
-0.0538084,
0.03789528,
-0.06463977,
0.0068785017,
0.013023781,
-0.0009187973,
-0.03737259,
0.010199784,
-0.020980338,
0.020036586,
0.042802796,
0.029793533,
-0.01855562,
0.12730491,
0.028544875,
0.033742774,
0.031913344,
0.03063565,
-0.053227626,
-0.005016406,
0.017510233,
0.0008829528,
-0.010853151,
-0.026454102,
-0.031942382,
0.032813538,
0.012000172,
-0.021633705,
-0.034846235,
0.0017622758,
0.01916543,
-0.032145653,
-0.016450327,
0.10378371,
0.031652,
0.0023013034,
0.008079971,
-0.014410371,
-0.05235647,
-0.019455815,
-0.0039746487,
0.033713736,
0.018715333,
-0.018076485,
-0.015956672,
-0.05316955,
-0.0061380193,
-0.002647951,
-0.037256435,
-0.016711675,
0.054853786,
0.02211284,
0.04800069,
0.0047550593,
-0.0023884191,
-0.0446903,
0.018061966,
0.0014664457,
-0.00276592,
0.024421405,
0.03513662,
0.024203615,
0.0034265467,
0.019339662,
-0.027847951,
-0.0034428807,
-0.016943982,
0.011775124,
-0.0031724595,
-0.012283298,
0.0014501116,
-0.028298048,
0.017771581,
-0.032319885,
-0.014882247,
-0.015956672,
-0.028675549,
-0.056828406,
-0.0015290601,
-0.043151256,
-0.0067478283,
0.0046352753,
-0.029386993,
0.017161772,
-0.031564884,
0.25135753,
0.01698754,
0.0077024703,
-0.003912942,
0.021575628,
0.070447475,
0.023593806,
-0.023274383,
0.04053779,
-0.036675666,
-0.008697039,
-0.0036298162,
0.00025023046,
-0.005949269,
-0.024058422,
0.044312797,
-0.051427238,
-0.024856983,
-0.019963989,
-0.052966278,
-0.023651883,
0.0422801,
0.011767864,
0.028181894,
0.009103579,
0.028428722,
-0.04643261,
-0.03563028,
-0.01186224,
-0.021052934,
0.02153207,
-0.022388708,
0.017844178,
-0.017858697,
0.0032105725,
0.011448441,
0.031477768,
-0.010940267,
-0.0296193,
0.024595635,
0.041437984,
-0.02055928,
0.0146209,
-0.005292272,
-0.028341606,
0.060748607,
-0.013386763,
0.008283241,
0.041467022,
-0.06289746,
0.02707843,
-0.053837437,
0.003695153,
0.00077904935,
-0.029372474,
0.011194354,
-0.07015709,
-0.033510465,
0.019136392,
-0.008726078,
0.026976794,
-0.02054476,
-0.018279755,
0.05160147,
-0.030809881,
0.016914943,
-0.0150855165,
0.00017684011,
-0.0014101836,
-0.0061307596,
-0.013611811,
-0.021459473,
-0.012573684,
-0.006090832,
0.045329146,
0.03830182,
0.019644566,
0.02250486,
-0.012334116,
-0.00533946,
-0.01443215,
-0.006700641,
0.0047006123,
-0.0359497,
0.013619071,
0.021706302,
-0.065859385,
-0.019208988,
-0.009989254,
0.0060763126,
0.0094230035,
0.055841096,
-0.0025190925,
-0.008355837,
0.027906029
] |
The significance of this framework is that it takes resources like (1) GPU/TPU/CPU vs. (2) RAM/DRAM vs. (3)
fast-intra-connect/slow-inter-connect and it automatically optimizes all these algorithmically deciding which
parallelisation to use where.
One very important aspect is that FlexFlow is designed for optimizing DNN parallelizations for models with static and
fixed workloads, since models with dynamic behavior may prefer different parallelization strategies across iterations.
So the promise is very attractive - it runs a 30min simulation on the cluster of choice and it comes up with the best
strategy to utilise this specific environment. If you add/remove/replace any parts it'll run and re-optimize the plan
for that. And then you can train. A different setup will have its own custom optimization.
🤗 Transformers status: Transformers models are FX-trace-able via transformers.utils.fx,
which is a prerequisite for FlexFlow, however, changes are required on the FlexFlow side to make it work with Transformers models.
GPU selection
When training on multiple GPUs, you can specify the number of GPUs to use and in what order. This can be useful for instance when you have GPUs with different computing power and want to use the faster GPU first. The selection process works for both DistributedDataParallel and DataParallel to use only a subset of the available GPUs, and you don't need Accelerate or the DeepSpeed integration.
Number of GPUs
For example, if you have 4 GPUs and you only want to use the first 2: |
[
0.03474441,
0.006692915,
-0.01776385,
0.022267755,
0.023932243,
-0.019833969,
0.027680835,
-0.03460454,
0.01611335,
0.07301362,
0.0282683,
0.0009651226,
0.015330063,
-0.04000363,
-0.03418492,
0.035136055,
-0.0046822433,
-0.06506884,
-0.017777838,
-0.0024198,
0.0026785647,
0.008105631,
-0.078104995,
-0.007720981,
-0.0210089,
0.005661353,
0.025722615,
0.025988374,
0.07804904,
0.009462398,
-0.048955493,
-0.0147286095,
0.010686285,
-0.019792005,
-0.01879891,
-0.013057129,
0.035723522,
-0.010224705,
-0.026995458,
-0.04386412,
0.06982452,
-0.011735331,
0.023023069,
-0.011987102,
-0.03877275,
0.018547138,
0.017148409,
0.0008492904,
0.015148228,
-0.03538783,
0.007790917,
-0.015511897,
-0.008350409,
-0.008539237,
-0.019176565,
-0.017707901,
-0.006136921,
0.020743141,
-0.0047137146,
-0.006615985,
0.01498038,
-0.009553315,
-0.014574749,
-0.08123814,
0.011539509,
0.021540416,
0.0051857852,
-0.035723522,
-0.00045808355,
-0.046521705,
-0.015050317,
-0.016365122,
-0.005486512,
-0.008056675,
-0.009944959,
0.029065575,
0.015092279,
-0.009329518,
-0.008944868,
0.016812716,
0.0217782,
0.020225612,
0.0071964576,
0.014616711,
-0.05082979,
-0.033961125,
0.036478836,
-0.051529154,
-0.0009948455,
-0.037318073,
0.008329428,
0.03446467,
0.02152643,
0.024211988,
0.030464305,
0.024729518,
-0.005038919,
0.06904123,
0.0435564,
-0.032366574,
0.06076076,
0.061264303,
0.019330425,
0.05354332,
-0.045067027,
0.014406902,
0.019134603,
0.009126702,
-0.013043142,
-0.039220344,
0.0469693,
0.011126884,
0.0067663486,
0.020015802,
0.010497456,
0.0023760898,
0.008588192,
0.0403673,
-0.046102088,
0.009889009,
0.031443413,
0.006927202,
0.039500087,
-0.014078201,
-0.028925702,
-0.06311063,
0.004294096,
0.053123705,
-0.009070753,
-0.020743141,
-0.0001978982,
0.009567302,
-0.021736238,
0.029317347,
0.065124795,
-0.03289809,
-0.011728337,
0.03412897,
0.05189282,
0.006661444,
-0.0056753405,
-0.03944414,
-0.014560762,
0.07553133,
0.015931517,
-0.01029464,
0.023568572,
-0.045374747,
-0.018673023,
-0.011805267,
-0.021302633,
0.026855584,
-0.04232552,
0.015903542,
0.01277039,
-0.01277039,
0.0034391233,
0.018980743,
-0.019540235,
0.02909355,
0.012203905,
-0.0565366,
-0.0128543135,
0.037457947,
-0.014155131,
0.039779834,
-0.027512986,
-0.0099169845,
-0.0006359843,
-0.027568936,
0.0421297,
-0.0014336966,
-0.012168936,
-0.000036853213,
0.03840908,
0.043780196,
0.04831208,
-0.027429063,
0.036338963,
0.04310881,
-0.006266303,
-0.0134627605,
0.030827973,
-0.00408079,
0.0045423703,
0.033541508,
-0.020421434,
-0.017148409,
-0.0037381016,
-0.028212352,
0.022099908,
0.030911896,
-0.014420889,
0.009126702,
-0.042773113,
-0.0282683,
-0.021050861,
-0.007881834,
-0.039360218,
-0.036758583,
-0.01734423,
0.023148954,
-0.026058309,
-0.0032817663,
-0.04447956,
0.015567847,
0.0028254313,
0.060089372,
-0.0055109896,
-0.0067034056,
0.02642198,
0.022827247,
0.031779107,
-0.0024040644,
0.0061264304,
0.030660126,
0.001269346,
0.0117703,
-0.022533514,
0.036954403,
0.019764032,
-0.009728156,
-0.008749046,
-0.0421297,
0.004563351,
-0.030855948,
0.02965304,
-0.004783651,
0.049039416,
0.04875967,
0.0104485005,
0.037961487,
-0.008434332,
0.03852098,
0.046102088,
0.019092642,
0.008196549,
0.003433878,
-0.045290824,
0.023806356,
0.0033149861,
-0.031863034,
0.013413805,
-0.04089882,
0.033485558,
0.022337692,
0.0071405084,
-0.029681016,
-0.050242323,
0.033653405,
-0.02517711,
0.02523306,
-0.023442687,
-0.031163668,
-0.045039054,
-0.054998,
-0.006675431,
0.030911896,
-0.030212533,
-0.022113895,
0.0012177678,
0.026953496,
0.00015287664,
-0.02517711,
0.00415772,
0.049962576,
0.029233422,
0.032310624,
-0.010259673,
0.047165122,
-0.062215436,
-0.06680327,
-0.05138928,
-0.017735876,
-0.05745976,
0.0019075158,
0.039975658,
-0.03320581,
0.03994768,
-0.021400545,
0.0064796093,
-0.006171889,
-0.025568755,
0.037206173,
0.016351135,
-0.0066089914,
-0.041122615,
0.04078692,
0.0017894981,
0.037681744,
0.0008357402,
-0.031191643,
-0.0012641008,
-0.030883923,
-0.013917347,
-0.0008624035,
0.0154139865,
-0.02058928,
-0.009532333,
-0.032870118,
0.014938419,
-0.036394913,
-0.0048151226,
-0.0015910536,
-0.03415695,
0.025275022,
0.05127738,
-0.030520253,
0.045990188,
0.026603814,
-0.0486198,
0.00038792857,
0.015567847,
0.039220344,
-0.03314986,
0.057627607,
0.043080833,
0.00332198,
-0.0049305176,
-0.03754187,
-0.028869754,
0.0004493415,
-0.014099182,
-0.047137145,
-0.016518982,
0.032254677,
-0.022393642,
-0.061935693,
0.028282287,
-0.031387463,
0.0019757038,
-0.019624159,
-0.010994005,
0.033121888,
0.005717302,
-0.0018812896,
-0.019288464,
-0.006108946,
-0.015148228,
-0.0012710944,
0.037989464,
-0.0009852293,
-0.033681378,
0.021498455,
-0.02018365,
-0.04587829,
0.05930608,
-0.05617293,
0.0074272477,
0.008343414,
0.016770754,
0.029457219,
0.0022974114,
0.018323341,
0.008091643,
0.012420708,
-0.05628483,
0.007084559,
-0.03203088,
-0.014308991,
0.02734514,
-0.013127065,
0.023624523,
0.031163668,
-0.031023795,
-0.03412897,
0.034017075,
0.0010761466,
0.054774202,
-0.060425065,
0.015679745,
0.0010149523,
0.017540054,
0.011518528,
-0.017791824,
-0.027429063,
0.027219255,
0.0058641685,
0.06646757,
-0.038996547,
-0.009763124,
0.042773113,
-0.0113087185,
0.036115166,
0.024701543,
0.057012167,
-0.008035694,
0.014616711,
-0.003377929,
0.028841779,
0.0032695276,
-0.0020141688,
-0.04985068,
-0.00036869606,
-0.04056312,
-0.019917892,
0.023498636,
0.049626883,
0.00415772,
-0.029876838,
0.023316802,
-0.031331517,
0.02796058,
0.03759782,
-0.00066002493,
-0.048843596,
-0.06215949,
0.06495695,
0.0023061533,
-0.02296712,
-0.052480288,
-0.02208592,
-0.021890098,
-0.023442687,
-0.025442868,
0.0050494093,
-0.06948882,
0.01246267,
0.013784468,
0.0534594,
0.01926049,
-0.033961125,
-0.0029530653,
0.008224523,
0.019008718,
-0.025456857,
-0.018910807,
-0.05133333,
0.045598544,
0.022393642,
-0.058019254,
-0.06344632,
-0.036059216,
-0.0019774523,
-0.04092679,
0.046269935,
0.038493004,
-0.00898683,
0.006406176,
-0.038632877,
0.015539872,
0.019456312,
-0.0435564,
-0.00733633,
-0.003395413,
0.04638183,
0.0052032694,
0.0138683915,
-0.018295366,
0.0065285647,
0.01760999,
-0.015386012,
-0.0070950496,
-0.027219255,
-0.020365484,
0.018155495,
0.001933742,
0.0089099,
0.078720436,
0.030352406,
0.018225431,
-0.02116276,
0.026352042,
-0.013329881,
-0.016365122,
0.0032695276,
0.046605628,
-0.020351497,
0.02131662,
0.012280835,
-0.0019249999,
0.009930971,
0.040954765,
-0.038241234,
0.032002904,
0.06814604,
0.030632151,
-0.0069202087,
0.031499363,
-0.019372389,
-0.024687557,
0.026645776,
0.011147865,
-0.006052997,
-0.0063642142,
-0.040730968,
-0.04207375,
0.008329428,
-0.029121524,
0.033681378,
0.036394913,
-0.02878583,
0.008070663,
-0.0054340595,
-0.025191098,
-0.012175931,
-0.0024512715,
0.0019984331,
0.041933876,
0.028757855,
0.003591235,
0.020309536,
-0.014190099,
0.022253769,
-0.04948701,
0.013763487,
-0.012497638,
-0.0069866483,
0.0040842867,
-0.02965304,
-0.041905902,
0.00014205834,
-0.025722615,
-0.010924068,
0.00043382435,
-0.015022343,
0.014924431,
-0.0056753405,
-0.041682106,
0.054578383,
0.014183106,
-0.06266303,
-0.0110569475,
0.05066194,
0.02193206,
-0.021498455,
0.014085195,
-0.07004832,
-0.08179764,
-0.055221796,
0.030016711,
-0.02337275,
-0.01776385,
-0.027736783,
-0.032926064,
0.007053088,
0.022323705,
-0.010903087,
-0.013812442,
0.009189646,
-0.06618783,
0.03784959,
-0.025442868,
-0.0243099,
-0.014952406,
0.03815731,
-0.01367257,
0.010343596,
-0.011644414,
-0.03583542,
0.0041682106,
0.018770935,
0.034212895,
0.066355675,
-0.012917256,
-0.029904813,
-0.027918618,
0.0023306313,
-0.009749137,
0.013581652,
-0.016952587,
0.010084831,
-0.023358764,
0.0022904177,
-0.03253442,
-0.009091734,
-0.010077838,
-0.052284468,
0.06932098,
-0.0338772,
-0.005269709,
0.029205449,
-0.0110569475,
0.023106992,
0.033429608,
-0.022701362,
-0.02070118,
-0.010490463,
-0.06333442,
0.04917929,
-0.041234512,
-0.014176112,
-0.039192367,
-0.013777474,
0.03815731,
-0.022897184,
0.044703357,
0.07581108,
0.016602905,
-0.004217166,
0.0355277,
-0.007560127,
-0.007357311,
-0.011315713,
0.0015543369,
-0.054214712,
-0.037010353,
-0.024953313,
-0.044395637,
-0.0776574,
-0.009497366,
0.011091916,
0.025149137,
-0.02492534,
0.03454859,
-0.003829019,
-0.041682106,
-0.040954765,
0.008672115,
-0.03393315,
0.027582923,
0.03810136,
0.012112987,
-0.0027624886,
0.023246866,
-0.06372607,
-0.04299691,
0.009273569,
0.008930881,
-0.0006831914,
-0.03521998,
0.054802176,
-0.0081685735,
-0.0026610808,
-0.039919708,
0.018141506,
-0.0002334128,
-0.039779834,
-0.022561489,
0.002547434,
-0.005175295,
-0.036450863,
-0.02492534,
0.010707266,
-0.0009817325,
0.021022888,
0.016141325,
0.0060425065,
-0.018659037,
0.018421253,
0.045067027,
-0.02049137,
0.015441962,
-0.013847411,
-0.04417184,
-0.031387463,
0.004472434,
0.025372932,
-0.061823793,
-0.005056403,
0.022827247,
0.027205266,
0.07172679,
0.00067882036,
0.038688827,
0.01238574,
0.003084196,
-0.040339325,
-0.041122615,
0.0024075613,
0.007825885,
0.03583542,
-0.0117703,
0.014078201,
0.008133605,
0.025554767,
-0.013644596,
-0.07306957,
-0.00022838611,
-0.05726394,
-0.01096603,
-0.028548045,
-0.021092825,
0.010910082,
0.02456167,
-0.008182561,
-0.068593636,
-0.023778383,
0.036087193,
0.011245776,
0.018687012,
-0.026519889,
-0.011294732,
-0.027317164,
-0.025456857,
-0.025009263,
-0.022155857,
-0.026114259,
0.016435059,
-0.003407652,
0.008217529,
0.018421253,
-0.0008029575,
-0.04587829,
0.01797366,
-0.02615622,
-0.009763124,
-0.037401997,
-1.4683916e-7,
-0.034828335,
-0.0029827883,
0.032450497,
-0.01642107,
0.011966121,
0.038744777,
0.025093187,
-0.006329246,
0.026449954,
0.038912624,
-0.01709246,
-0.019764032,
-0.022183832,
0.046269935,
-0.0044199815,
-0.004941008,
-0.03852098,
-0.043388553,
-0.019302452,
0.028450135,
0.0010577884,
0.05902634,
0.0040073567,
0.028058492,
-0.010441507,
0.018938782,
-0.006147411,
0.010490463,
0.03295404,
0.0082455035,
0.020085739,
-0.048284102,
0.04067502,
-0.015260126,
-0.033905175,
0.0063362396,
0.007126521,
-0.026184196,
-0.006930699,
0.020043777,
0.016085377,
0.071950585,
-0.009847048,
0.0070565846,
-0.043080833,
-0.012658492,
-0.040702995,
-0.04078692,
-0.076874115,
-0.018673023,
0.004954995,
-0.04489918,
0.026869573,
0.032142777,
-0.026240144,
0.010672297,
0.026967483,
-0.0046367845,
-0.009930971,
0.009965939,
0.04232552,
0.041598182,
-0.06204759,
-0.023820344,
0.018826883,
0.041290462,
-0.07239818,
-0.029736966,
-0.011371662,
0.010420526,
0.013896367,
0.00022926032,
-0.043696273,
-0.0007732345,
0.033737328,
-0.004392007,
-0.022869209,
-0.012833333,
-0.036338963,
0.033961125,
-0.019945867,
-0.047165122,
0.0056123976,
-0.002538692,
0.009965939,
0.010392551,
-0.02667375,
0.063893914,
0.04092679,
-0.05597711,
0.014378928,
0.013469754,
0.0355277,
0.00084273383,
0.012889282,
-0.043276656,
0.042157672,
0.020351497,
0.0170505,
-0.0027397592,
0.020729154,
0.018505177,
-0.016602905,
0.021120798,
0.03994768,
0.043696273,
-0.03412897,
0.0007697377,
-0.026198182,
-0.005192779,
0.0001889376,
0.02033751,
0.020099727,
-0.015735693,
-0.016365122,
0.016812716,
-0.017218346,
0.0045004087,
-0.041234512,
-0.04643778,
-0.010560399,
0.0008571582,
-0.024855403,
-0.0028743867,
0.005115849,
-0.05292788,
0.04738892,
0.021582378,
0.026142234,
0.039667938,
0.0028061988,
0.023652496,
-0.008441325,
0.00749019,
0.028562034,
-0.043192733,
-0.0006683299,
-0.05329155,
-0.01498038,
0.04710917,
-0.019750044,
-0.009623251,
0.011203814,
-0.05133333,
-0.028701905,
-0.041486282,
0.03331771,
-0.06422961,
0.027303178,
0.0436683,
-0.012546593,
-0.019708082,
0.024170026,
-0.036059216,
0.023009082,
0.04557057,
0.0090567665,
0.0210089,
0.12163342,
0.042717163,
-0.0064411443,
0.029625067,
0.034940235,
-0.021652315,
-0.016700817,
-0.03681453,
0.00024980414,
0.006129927,
-0.019987829,
-0.017484104,
0.0405911,
0.022729335,
-0.0013637602,
-0.041905902,
0.0034566075,
0.020421434,
-0.027359126,
-0.030855948,
0.06288683,
0.026869573,
-0.011035967,
-0.023190916,
-0.010700272,
-0.016546957,
-0.009965939,
-0.0028778836,
0.04294096,
-0.004371026,
-0.041682106,
-0.028436149,
-0.04680145,
-0.00038858422,
0.00039710774,
-0.007811898,
-0.020057764,
0.0402554,
0.041682106,
0.04526285,
0.039891735,
-0.01488247,
-0.043752223,
0.08509863,
0.049598906,
-0.0012990689,
0.017428156,
0.074020706,
0.051529154,
-0.04000363,
0.030044686,
0.008965849,
-0.006696412,
0.009126702,
-0.008441325,
-0.013546684,
0.0020176657,
-0.041122615,
0.013190009,
0.016854677,
-0.0038954585,
-0.016994549,
-0.012455676,
-0.0421297,
-0.04887157,
0.009777111,
-0.039052498,
0.02832425,
-0.01920454,
-0.007658038,
0.023037056,
-0.058243047,
0.23051043,
0.054186735,
0.029904813,
0.003544028,
0.022281744,
0.083084464,
0.007860853,
-0.02168029,
-0.031163668,
-0.037933514,
-0.0074552223,
-0.021638328,
-0.009553315,
0.0059725703,
-0.030716075,
0.04053515,
-0.022225793,
0.008140599,
0.007595095,
-0.03074405,
-0.02060327,
0.0020963443,
0.024519708,
0.022981107,
0.0006862511,
0.02909355,
0.002215236,
0.015693732,
-0.008609173,
-0.009972934,
0.01611335,
-0.030324431,
0.03443669,
-0.026030336,
0.00852525,
0.037374023,
-0.0022012487,
-0.061264303,
0.026659762,
-0.010483469,
-0.004350045,
-0.030716075,
0.0072384193,
-0.0054970025,
-0.031695183,
0.041626155,
0.038017437,
0.050801814,
0.04238147,
-0.08397965,
0.055417616,
-0.026016347,
0.009049772,
-0.013973297,
-0.030772025,
-0.004468937,
-0.049095366,
-0.010840145,
0.011462579,
-0.0027554948,
0.0282683,
-0.02327484,
0.025582742,
0.04985068,
-0.007189464,
-0.015176203,
0.00321183,
-0.004724205,
0.010714259,
0.006615985,
0.027946593,
0.005024932,
-0.010546412,
0.019736057,
0.031639237,
0.031863034,
0.008280472,
0.04887157,
0.021092825,
-0.011161853,
-0.005892143,
-0.036366936,
0.032982014,
-0.004902543,
-0.02043542,
0.045542594,
-0.06932098,
0.0169386,
-0.015623796,
-0.000035377994,
0.01678474,
0.055753313,
-0.01586158,
-0.019344414,
-0.0021260672
] | Attribute
We have 10 batches of 512 length. If we parallelize them by attribute dimension into 2 devices, 10 x 512 will be 10 x 2 x 256.
Parameter
It is similar with tensor model parallelism or naive layer-wise model parallelism. |
[
0.018727953,
0.03517095,
0.0040492867,
-0.0070898673,
-0.07410195,
-0.007086252,
-0.004555448,
0.016978081,
-0.006912711,
0.06779663,
0.009631518,
0.0057666185,
0.053913362,
0.005979929,
-0.008091343,
0.036559276,
-0.019942738,
-0.07016835,
-0.07710999,
-0.001151516,
0.0027278455,
0.031410895,
-0.07005266,
-0.0012681137,
-0.025597278,
0.004888068,
0.004367445,
-0.036038652,
0.062243324,
0.019523347,
-0.03193152,
-0.029704412,
0.034447864,
-0.005998006,
-0.03835253,
-0.0032321985,
-0.0010475722,
0.0033713928,
-0.06195409,
-0.03800545,
0.025886513,
-0.014895591,
0.007476719,
-0.023413556,
-0.049719457,
-0.028576396,
0.015488522,
-0.0005671713,
0.023095397,
-0.020535668,
0.026291441,
0.044773545,
0.008423963,
0.017845785,
-0.0153439045,
-0.024483724,
-0.012111707,
0.008930123,
-0.0027296531,
-0.015821142,
0.011634469,
0.04081103,
-0.027144684,
-0.03152659,
0.04315383,
0.027477304,
0.0227917,
-0.04616187,
-0.017860247,
0.0028345007,
-0.025004346,
0.016978081,
-0.0066234763,
-0.034390014,
-0.030832427,
0.012617867,
0.028489625,
-0.00798288,
-0.035778344,
-0.014150811,
0.024584956,
0.022603698,
-0.024006486,
0.004801297,
-0.04413723,
-0.046306487,
0.018279638,
-0.05588016,
-0.010296758,
-0.04674034,
-0.008337192,
0.032249678,
0.023471402,
0.008640889,
-0.010658301,
0.019639041,
-0.010412452,
0.013955578,
0.0484179,
-0.019089496,
0.021258757,
0.0550703,
-0.02245908,
0.03149767,
-0.0060739303,
0.013760344,
0.008163651,
0.022386773,
-0.010340143,
-0.012487711,
0.04540986,
0.007527335,
-0.018221792,
0.031005967,
-0.016544228,
0.027766539,
-0.017498704,
0.029039172,
-0.06611907,
0.018265177,
0.0044108303,
-0.000326067,
0.01156216,
-0.021171985,
-0.011764624,
-0.024469262,
-0.049950846,
0.022300001,
-0.037224516,
-0.013427724,
-0.020362128,
-0.016905773,
-0.009378438,
0.037947603,
-0.0045590634,
0.0073321015,
-0.0066524,
0.04413723,
0.015155902,
-0.037137747,
0.02361602,
-0.023601558,
-0.00029262426,
0.10470299,
-0.019349806,
0.017267317,
0.011244002,
0.008091343,
-0.011186155,
0.04083995,
-0.051107787,
-0.00053282466,
0.0044216765,
0.020058433,
-0.014360507,
0.00914705,
0.0085613495,
0.013659112,
-0.04000117,
0.022054153,
0.021258757,
0.004483139,
0.024469262,
0.008221499,
0.041187033,
0.08873723,
-0.058598965,
-0.013601265,
0.008141959,
-0.039943323,
0.045728017,
0.006851249,
0.010361836,
-0.0022813394,
0.022907395,
0.015994683,
0.009016894,
0.021837225,
0.0077731847,
0.019870428,
-0.032538913,
0.0036949744,
0.008749352,
0.025423737,
0.018308561,
0.029849028,
-0.02860532,
-0.003364162,
-0.053710897,
0.022676006,
0.012249093,
0.018366408,
-0.016414074,
0.028692089,
-0.0055858465,
-0.011106616,
-0.014519586,
0.020217512,
0.00289054,
-0.05446291,
-0.012169553,
0.014078503,
-0.025177887,
0.006504167,
0.0020318744,
0.03410078,
-0.030311804,
0.055359535,
-0.006298087,
-0.027578536,
0.020535668,
0.007700876,
-0.01971135,
-0.021345526,
0.048273284,
0.010716149,
-0.017744554,
-0.033117384,
-0.0097905975,
0.011996012,
0.044860315,
0.025669586,
0.03791868,
0.0140134245,
-0.012567251,
-0.034476787,
-0.017599937,
0.0155752925,
0.018829184,
0.07693645,
0.0042879055,
0.044021532,
0.017093776,
0.048388977,
-0.036443584,
-0.0012202092,
0.005339997,
0.04856252,
-0.027520688,
0.025235735,
-0.02645052,
0.011186155,
0.010593223,
0.005748541,
0.016327303,
0.001579945,
0.023182167,
0.0061390083,
-0.01538729,
0.036472507,
-0.016819002,
0.0020318744,
-0.013275877,
-0.0019035264,
-0.033319846,
-0.031237356,
0.026291441,
-0.0027007298,
-0.03635681,
-0.025394814,
0.011359696,
0.012032167,
0.005386998,
-0.05706602,
0.03384047,
0.036443584,
0.013977271,
0.019234113,
0.013124028,
0.029501947,
-0.01937873,
-0.020579055,
-0.031671207,
-0.015690986,
-0.069242805,
0.008597503,
0.04008794,
-0.008264883,
-0.01647192,
-0.03716667,
0.042112585,
0.016602077,
-0.00022562573,
0.044108305,
0.004898914,
0.00057485414,
-0.016674384,
-0.01571991,
-0.060565762,
0.026305903,
-0.05764449,
-0.013521726,
0.021432297,
-0.047694813,
0.029039172,
-0.017599937,
0.00035340874,
-0.012791408,
-0.014497893,
-0.052380417,
-0.03010934,
-0.04425292,
0.006869326,
-0.0060269297,
-0.011099384,
-0.008026265,
0.024570495,
-0.025423737,
0.057528798,
0.040030092,
-0.042372894,
-0.010549839,
0.023558173,
0.034447864,
-0.034794945,
0.034881715,
0.011381389,
-0.010463068,
-0.029617641,
-0.045178473,
-0.016081454,
-0.067912325,
-0.006345088,
-0.05307458,
-0.021750456,
0.028055774,
0.009559209,
-0.06131777,
0.052727498,
-0.023384633,
-0.018496564,
-0.00070772134,
-0.022111999,
0.010961998,
0.0071585607,
0.011460928,
-0.023919716,
-0.0089590475,
-0.05564877,
0.014779897,
0.0021132217,
-0.01913288,
0.026320364,
0.032423217,
0.0050182235,
-0.029154865,
0.05347951,
-0.044310767,
0.011330772,
-0.035575878,
0.026898835,
-0.009739981,
0.036790665,
0.022083076,
0.019523347,
0.000927359,
-0.035286643,
0.036038652,
-0.009559209,
0.012986641,
0.022198768,
0.048678212,
0.018409794,
0.02553943,
0.01430266,
-0.019335344,
0.030977044,
0.013030027,
0.031034892,
-0.034534633,
0.016066993,
0.002360879,
-0.022806162,
0.002194569,
0.013904962,
-0.009653211,
0.017498704,
0.033464465,
0.06889573,
0.005423152,
-0.04083995,
-0.005716002,
0.01680454,
0.006851249,
0.0022397619,
0.05356628,
0.004219212,
0.012762484,
-0.014750973,
-0.005904005,
0.014266505,
-0.05431829,
-0.0076574907,
-0.0038468225,
-0.008915662,
-0.018395333,
0.029993646,
0.022314463,
0.00088532956,
-0.0007718953,
0.05073178,
-0.039133467,
0.0054629217,
-0.0003088937,
0.010940306,
-0.052756425,
-0.019176265,
0.035228796,
0.020680286,
0.020419976,
-0.07155669,
-0.022415696,
-0.029371792,
0.011012614,
0.033204153,
0.021895073,
-0.034563556,
-0.015589754,
-0.01705039,
0.027592998,
0.018554412,
-0.029791182,
-0.026710832,
0.011497082,
0.026956681,
0.0091253575,
-0.022994164,
-0.059235282,
0.00050164154,
0.04633541,
-0.037108824,
-0.02137445,
-0.07577951,
-0.006164316,
-0.0550703,
0.017816862,
0.036067575,
-0.013001103,
0.0012834793,
-0.013022796,
-0.020217512,
-0.018438717,
-0.012191246,
0.0071404837,
-0.011178924,
-0.010998152,
0.013528957,
-0.05388444,
0.009081972,
0.015676524,
0.06912711,
-0.022748316,
0.008995201,
-0.0009996677,
0.01904611,
-0.0069597117,
-0.008026265,
-0.012408172,
0.018279638,
0.0023193015,
-0.016573153,
-0.029501947,
0.013933885,
-0.047608044,
-0.04665357,
0.01263956,
-0.024816344,
-0.0004903433,
0.07577951,
-0.0026537292,
-0.015314981,
0.072482236,
0.031873673,
-0.016847925,
-0.014693127,
-0.0065547833,
0.036443584,
0.024107719,
-0.01139585,
0.016356226,
-0.033059534,
0.09162958,
-0.0019035264,
-0.009819521,
0.004924222,
-0.05946667,
-0.03950947,
-0.0069054803,
-0.054202598,
0.035142027,
-0.044715695,
-0.022603698,
0.033898316,
-0.051686253,
0.036414657,
0.017513165,
-0.04257536,
0.021923997,
0.054115828,
0.033406615,
0.001176824,
-0.018814722,
-0.030427499,
0.056950327,
-0.06577199,
-0.010694456,
-0.026725294,
0.021143062,
-0.0062908563,
0.0011686892,
-0.04864929,
0.0023771483,
-0.0028706552,
0.019277498,
-0.000072873605,
-0.00823596,
0.010549839,
-0.027419457,
-0.03476602,
0.09099326,
-0.022184307,
-0.041707654,
-0.0070211743,
0.02270493,
-0.0023681098,
0.013442187,
-0.0026248056,
-0.05064501,
-0.024715113,
-0.08665474,
0.07676291,
-0.029993646,
0.014642511,
-0.026175747,
-0.045438785,
-0.003716667,
0.008908431,
0.014150811,
-0.06120208,
0.03384047,
-0.037398055,
0.025727434,
-0.045265242,
0.007418872,
-0.012574482,
-0.038410377,
-0.029328406,
0.0027621922,
-0.031786904,
-0.000021466643,
0.04789728,
0.057846956,
0.011967089,
-0.014382199,
-0.04191012,
-0.016081454,
-0.036414657,
0.017874708,
-0.013941117,
0.021822764,
-0.020203048,
0.018453179,
-0.0071260217,
0.017252855,
-0.014280967,
-0.016356226,
0.020738134,
-0.0322786,
0.047347732,
-0.019320883,
0.0066560153,
0.009682134,
0.036443584,
0.075143196,
0.00025285446,
0.037195593,
0.000004568723,
-0.022097537,
-0.078556165,
0.022892933,
-0.01014491,
0.0003805245,
-0.016226072,
0.0015446945,
0.05078963,
-0.03693528,
0.02844624,
0.06704462,
0.04922776,
0.0026699984,
-0.060160834,
-0.035894036,
0.02820039,
0.022762777,
0.010253373,
-0.03392724,
-0.04682711,
0.019508885,
-0.008272114,
-0.05764449,
-0.034708172,
0.015734373,
0.020304281,
-0.018366408,
0.018901493,
-0.054723218,
-0.05356628,
-0.0327703,
-0.00074297184,
-0.029501947,
0.01913288,
0.03569157,
0.0046422184,
-0.011865857,
0.06513567,
-0.044976007,
0.012914333,
0.019986123,
0.047608044,
-0.0027929232,
-0.028851168,
0.02587205,
-0.0016658115,
-0.028749937,
-0.065424904,
0.016992543,
0.0073574097,
0.021085216,
-0.013608497,
-0.0077153374,
-0.0075707203,
-0.031063816,
0.0010014754,
-0.002801962,
0.017440857,
-0.02062244,
0.0052459957,
0.007925033,
-0.06097069,
0.023109859,
0.06253256,
-0.0057846955,
-0.032047212,
-0.04017471,
-0.016891312,
-0.04624864,
-0.036327887,
0.04708742,
0.0071874843,
-0.017975941,
0.033869393,
0.016095916,
0.025900975,
-0.018814722,
0.040232558,
-0.050442547,
-0.01629838,
-0.040897798,
-0.038063295,
0.033204153,
-0.03170013,
-0.011497082,
0.031005967,
-0.014765435,
0.011714009,
0.03334877,
-0.058280807,
-0.06530921,
0.00034527402,
-0.033319846,
-0.02212646,
0.051049937,
0.0018908724,
0.0055786157,
-0.0085613495,
0.0077731847,
-0.019986123,
0.0018583335,
-0.010651071,
-0.02361602,
-0.036790665,
-0.048302207,
-0.0046458337,
-0.058078345,
-0.027650844,
-0.036877435,
0.0091253575,
0.02536589,
0.008973509,
-0.002507304,
0.0049965307,
0.01073061,
0.013449417,
-0.0021511836,
0.000010189594,
-0.044889238,
-0.028243776,
-0.010557069,
-0.011583853,
-0.035199873,
0.029617641,
0.030225035,
0.020983983,
0.020101817,
0.0063848575,
0.00989906,
-0.043616604,
0.025727434,
0.0365882,
-0.0053689205,
-0.027925618,
-0.00010394375,
0.050702855,
-0.023167705,
-0.001925219,
-0.015980221,
-0.051368095,
-0.015850065,
0.044108305,
-0.00034866348,
0.042546436,
0.04532309,
0.027000066,
0.044600002,
-0.00076014514,
0.0052676885,
-0.025351427,
-0.0018339292,
0.029646564,
-0.04341414,
-0.013124028,
0.056285087,
0.031960443,
-0.029820105,
0.021388913,
-0.0014497893,
0.023268938,
-0.005571385,
0.003933593,
-0.03742698,
0.07774631,
0.044976007,
-0.00028403758,
0.008113036,
-0.012914333,
-0.04292244,
0.020593517,
-0.05165733,
-0.026681907,
0.016631,
-0.06519352,
-0.006746401,
-0.044600002,
-0.020029508,
0.013876039,
0.021085216,
0.0019089496,
-0.004804913,
0.037398055,
0.013695267,
0.03615435,
-0.051686253,
-0.014996823,
0.023008626,
-0.0081274975,
-0.022300001,
-0.004233674,
0.026898835,
0.030340727,
0.014476201,
-0.0058497735,
-0.043934762,
-0.032885995,
-0.008380578,
0.0033587387,
-0.010904151,
0.016254995,
-0.030658886,
0.01247325,
-0.02911148,
-0.011627238,
-0.017571013,
0.045352012,
0.020897213,
0.018250715,
0.0061570853,
0.025958821,
0.042777825,
-0.044426464,
0.04217043,
0.010260603,
0.054752145,
-0.017093776,
0.040724255,
0.00093278213,
-0.0042445203,
0.017975941,
0.06293749,
0.020087356,
0.04014579,
0.00050028577,
0.013825422,
0.009038587,
-0.00628001,
0.008084112,
-0.015546369,
0.026074516,
-0.0146786645,
-0.024744036,
-0.018106097,
-0.038063295,
-0.009964138,
-0.013001103,
-0.008915662,
-0.0001368216,
-0.013073412,
0.011034307,
-0.02686991,
-0.020029508,
-0.008705967,
-0.012198477,
0.021027368,
0.0020029508,
0.010846304,
0.011366927,
0.0076574907,
0.05547523,
0.008633658,
0.0517441,
0.0058172345,
0.04879391,
-0.045033854,
0.048851755,
0.0043204445,
-0.0052857655,
-0.046537876,
-0.022227693,
0.009689365,
0.013702498,
-0.009711058,
-0.046190795,
0.0029031942,
-0.022256617,
0.0013205375,
-0.035113104,
0.024440339,
-0.040319327,
-0.013427724,
0.020506745,
0.006995866,
0.017093776,
0.028243776,
0.027028989,
0.033638004,
0.022647083,
0.03916239,
-0.006504167,
0.0484179,
0.058280807,
0.034129705,
-0.004674757,
0.0045482167,
-0.016746694,
-0.0038323607,
0.041563038,
0.032452144,
-0.020333204,
0.015430675,
0.017093776,
0.018149482,
0.02228554,
0.023659404,
-0.026797602,
0.002500073,
-0.04191012,
-0.041187033,
-0.016182685,
0.10759534,
0.025423737,
-0.0011786317,
-0.010108756,
-0.022343386,
-0.030369652,
0.0058063883,
-0.021258757,
0.04083995,
0.011909242,
-0.022083076,
0.0067825555,
-0.062185477,
-0.0061390083,
0.024758497,
-0.021186447,
-0.043732297,
0.038612843,
0.04775266,
0.030167187,
0.0645572,
0.050500393,
-0.029285021,
0.029299483,
0.06559845,
0.001937873,
0.0077153374,
0.026146824,
-0.016602077,
0.011489851,
0.012632329,
-0.0015275212,
-0.0072417157,
0.024758497,
0.02028982,
-0.011670623,
-0.022531388,
-0.02727484,
-0.034245398,
0.050587162,
-0.032625683,
0.04182335,
-0.026320364,
-0.02212646,
-0.048880678,
0.0016866003,
-0.011417543,
-0.023934178,
-0.037860833,
-0.010889689,
0.0075634895,
-0.041187033,
0.24781635,
0.05232257,
0.022603698,
-0.0007624048,
-0.007946726,
0.046277564,
-0.009262743,
-0.009248282,
0.020260897,
-0.07167238,
-0.00940013,
-0.062416866,
-0.0069054803,
0.04057964,
-0.0088939695,
0.036617123,
-0.059350975,
0.014440047,
0.022719393,
-0.024006486,
-0.009031356,
-0.00010061077,
0.012625098,
0.0036606276,
-0.06721816,
0.04633541,
0.0029863492,
-0.06872218,
-0.0078961095,
-0.04283567,
0.02095506,
0.00035634628,
0.021605838,
-0.033262,
0.033811547,
0.013630189,
0.012798639,
-0.014881129,
-0.032336447,
-0.025221273,
0.020998444,
0.004555448,
-0.012697407,
-0.015502984,
-0.023297861,
0.056747865,
-0.026219133,
0.029458562,
0.053016733,
-0.052293647,
0.065424904,
-0.048504673,
0.011244002,
0.02095506,
-0.045554478,
0.028749937,
-0.0018800261,
-0.02412218,
-0.019349806,
0.036559276,
0.056574322,
-0.044947084,
-0.011880319,
-0.0017968711,
0.023066474,
0.029154865,
0.0058353115,
0.00072489463,
0.008380578,
-0.024093257,
0.019277498,
-0.01638515,
-0.020752596,
-0.028634243,
0.048591442,
0.013319261,
0.030890275,
-0.026219133,
0.024078796,
-0.039538395,
0.00059067167,
0.0023500326,
-0.023760637,
-0.030572116,
0.008207037,
-0.012950487,
-0.056285087,
-0.017990403,
-0.0053797667,
-0.016356226,
-0.010209988,
0.05064501,
0.0025796127,
-0.008633658,
0.0077370303
] | accelerate launch --num_processes 2 trainer-program.py
Use --num_gpus to select how many GPUs to use.
deepspeed --num_gpus 2 trainer-program.py
Order of GPUs
Now, to select which GPUs to use and their order, you'll use the CUDA_VISIBLE_DEVICES environment variable. It is easiest to set the environment variable in a ~/bashrc or another startup config file. CUDA_VISIBLE_DEVICES is used to map which GPUs are used. For example, if you have 4 GPUs (0, 1, 2, 3) and you only want to run GPUs 0 and 2: |
[
0.016539939,
0.010188659,
0.00036872615,
-0.0024543812,
-0.031959474,
-0.0175483,
-0.011736214,
0.014124071,
-0.007905839,
0.045908485,
0.0065823635,
0.0061972253,
0.063862935,
-0.012863619,
-0.030895093,
0.030558974,
-0.02929852,
-0.0071985847,
-0.067112096,
0.021175604,
0.0035170128,
0.030558974,
-0.06537548,
-0.0035415217,
-0.018304573,
0.032183558,
-0.010839893,
-0.011736214,
0.036721185,
0.03467645,
-0.023696508,
-0.042379215,
0.018668704,
0.0026101873,
0.011337071,
-0.023472428,
0.01712815,
0.016371878,
-0.06279855,
-0.03347202,
0.04338758,
-0.020307291,
-0.0071425647,
-0.011715206,
-0.047673117,
-0.01966306,
0.0051678554,
0.0035765343,
0.008823168,
-0.037225366,
0.0043835742,
0.019733086,
0.0022828197,
-0.0064213057,
-0.02434074,
0.0012289413,
-0.017660342,
-0.005906621,
-0.0175483,
-0.036861237,
0.024886936,
0.025293082,
-0.008389012,
-0.045908485,
0.027491871,
0.031679377,
0.03910204,
-0.021791825,
-0.01453722,
0.04778516,
-0.008690121,
0.021077568,
-0.028220134,
-0.054535583,
-0.021497719,
-0.010244679,
0.017002106,
-0.0060816836,
-0.012849614,
0.0015169197,
0.009810523,
0.032267585,
-0.023696508,
-0.0019712078,
-0.045376293,
-0.0040789647,
0.011330068,
-0.078988366,
-0.005721054,
-0.041342843,
-0.0074296677,
0.009733495,
0.027547892,
0.03296784,
0.0016149549,
0.018458627,
-0.0059801475,
0.02445278,
0.030811064,
-0.031707384,
0.0378696,
0.07164973,
-0.013017674,
0.04809327,
-0.013409815,
-0.004726697,
0.015993742,
0.026273433,
-0.015041401,
-0.020335302,
0.050362084,
0.026203409,
-0.020699432,
0.047336996,
0.00041555546,
0.020251272,
-0.027982047,
-0.0066839,
-0.03335998,
0.009516417,
0.0027484868,
-0.026525525,
0.012765584,
-0.039242093,
-0.008907198,
-0.028402198,
-0.01969107,
0.01768835,
-0.01222639,
-0.029970761,
0.009502412,
-0.017716361,
-0.006844958,
0.035964914,
-0.008382009,
-0.030110812,
-0.041398864,
0.049325712,
0.032155547,
-0.028332174,
-0.0005124965,
-0.028794339,
-0.01907485,
0.08621496,
0.00877415,
-0.0044045816,
0.0040789647,
0.017674346,
-0.051762585,
0.028878368,
-0.017170165,
-0.00526239,
-0.012597524,
-0.013605885,
-0.03394819,
0.0070725395,
0.011330068,
0.015783668,
-0.007051532,
0.018430619,
0.022099935,
0.015923718,
0.00012013689,
0.014887346,
0.041258816,
0.09030443,
-0.042267177,
-0.03761751,
-0.011330068,
-0.054507572,
0.039690252,
-0.01882276,
-0.02225399,
0.015825683,
0.03358406,
0.010937927,
0.012282411,
0.017744372,
0.016021753,
0.022800187,
-0.020461347,
-0.007051532,
0.027884012,
0.07338635,
0.03831776,
0.037029296,
-0.0028622777,
-0.01119702,
-0.025587188,
0.023010263,
0.020783463,
0.032575697,
-0.028430209,
0.027827993,
-0.0055705,
-0.03789761,
-0.05893316,
0.020741448,
0.011372084,
-0.080837026,
-0.004709191,
0.0579248,
-0.045712415,
-0.0042820377,
0.0012131856,
0.060837846,
0.0016333365,
0.08470242,
0.008977223,
-0.0015895708,
0.019943161,
-0.009572437,
-0.01991515,
0.003191396,
0.036721185,
0.024074644,
0.01721218,
-0.01077687,
-0.015727647,
0.01929893,
0.03904602,
0.022702152,
0.021357669,
0.006435311,
-0.022730162,
-0.017912433,
-0.021469709,
0.035180632,
0.057028476,
0.048149288,
0.016035758,
0.04302345,
-0.031259224,
0.028276153,
-0.03854184,
-0.008970221,
0.016413894,
0.006806444,
0.000044750443,
-0.0024998977,
-0.013122712,
0.0031371266,
0.024550816,
-0.030418923,
0.049101632,
-0.00073570164,
0.02918648,
0.018332582,
-0.043191507,
0.037785567,
-0.03899,
0.0007173201,
-0.031539325,
-0.002653953,
-0.047336996,
-0.029634641,
-0.009516417,
0.03268774,
-0.04772914,
-0.022800187,
0.008613093,
0.03422829,
-0.005454959,
-0.06924086,
0.06643986,
0.06453517,
0.0023633486,
0.013437825,
0.041931055,
0.02918648,
-0.06352681,
-0.041510906,
-0.04730899,
-0.01988714,
-0.07613134,
-0.0022425551,
0.04347161,
0.00506982,
-0.020839483,
-0.027954038,
0.026329454,
0.02239404,
0.0028255146,
0.046300624,
0.02921449,
0.009698482,
-0.051342435,
0.019621046,
-0.042043097,
0.0023861069,
-0.036777206,
0.0076677534,
0.032015495,
-0.031595346,
0.021105578,
-0.021231623,
0.01735223,
-0.026301444,
-0.03585287,
-0.03420028,
-0.03884995,
-0.00966347,
0.022099935,
-0.010734854,
-0.020727443,
0.028626278,
0.021063562,
-0.03845781,
0.062070288,
0.049801882,
-0.030671014,
-0.011876265,
0.045460325,
0.036805216,
-0.03784159,
0.055655986,
0.023010263,
0.0025139027,
-0.03761751,
-0.01988714,
-0.0011571655,
-0.04002637,
-0.0071775774,
-0.05470364,
-0.027281797,
0.008087904,
-0.025111016,
-0.045432314,
0.055683993,
-0.017380241,
-0.01946699,
0.020727443,
-0.016511928,
0.023794543,
0.013843971,
0.042939417,
-0.0022110438,
-0.016385883,
-0.010209666,
0.015993742,
-0.0050838254,
-0.04397579,
0.0401104,
0.020209257,
0.02408865,
-0.01715616,
0.044844102,
-0.01955102,
0.036413074,
-0.01963505,
0.006750424,
-0.032547686,
0.035068594,
0.0053814324,
0.014292132,
0.01013964,
-0.076523475,
0.032463655,
0.0045376294,
0.006585865,
0.022225982,
0.031959474,
0.026427489,
0.025040992,
0.0030478444,
0.0034960052,
0.036301035,
0.03834577,
0.02473288,
0.012044325,
0.020083211,
-0.040222444,
-0.009551429,
0.014761301,
0.015405532,
0.018906789,
0.011603166,
0.028528243,
0.050194025,
-0.01100095,
-0.049325712,
0.010496769,
0.036160983,
0.020335302,
-0.001102896,
0.04310748,
0.028766328,
0.03448038,
-0.02915847,
-0.0289624,
0.03459242,
-0.060389683,
-0.009033243,
0.0014136326,
-0.014719285,
0.009824527,
0.019256914,
0.022590112,
0.017492281,
0.014040042,
0.05417145,
-0.027589906,
-0.018192532,
0.018024473,
-0.042659316,
-0.07400257,
-0.045964506,
0.051146366,
-0.0005343794,
-0.019495,
-0.07282615,
-0.015839688,
-0.03739343,
-0.0058470997,
0.04282738,
0.02904643,
-0.022674141,
-0.0028867866,
-0.009796518,
0.009089264,
0.015111426,
-0.056608327,
-0.029998772,
0.007912842,
0.034760483,
-0.052070696,
0.0016972345,
-0.037365418,
-0.006669895,
0.01478931,
-0.04809327,
-0.046356644,
-0.052322786,
-0.010496769,
-0.065263435,
0.021315655,
0.03512461,
0.007499693,
-0.02918648,
-0.00735264,
-0.015867697,
0.01356387,
-0.021707794,
-0.005255387,
-0.024634846,
0.027940033,
-0.0070130182,
-0.052911,
-0.032323606,
0.05389135,
0.038009647,
-0.031651367,
0.011519136,
-0.014306137,
0.036104966,
-0.02957862,
-0.008690121,
-0.000857808,
0.033556048,
-0.018136512,
-0.029634641,
-0.00871813,
0.0038303754,
-0.046468686,
-0.024298726,
0.0047021885,
-0.03319192,
-0.012156365,
0.013556868,
0.022183966,
0.007471683,
0.056804396,
0.013829966,
-0.029522602,
-0.027659932,
0.0007160071,
0.02169379,
0.0037148339,
-0.012184375,
0.028906379,
-0.012856617,
0.084590375,
-0.028402198,
0.0048247324,
-0.0010766366,
-0.06716812,
-0.055824045,
0.010496769,
-0.023010263,
0.032463655,
0.005279896,
-0.009257324,
0.062070288,
-0.015769662,
0.028906379,
0.0045096194,
-0.059941523,
-0.018570669,
0.065263435,
0.0013120961,
-0.012065332,
-0.013682913,
-0.051790595,
0.05826092,
-0.06375089,
0.0029848218,
-0.019859131,
0.016161803,
0.023794543,
-0.015013391,
-0.045460325,
0.013745936,
0.015615607,
-0.0007995996,
-0.028332174,
-0.0013864979,
0.011645181,
-0.006057175,
-0.02397661,
0.08487047,
-0.03985831,
-0.024690866,
-0.0169881,
-0.01088891,
0.016315859,
-0.015839688,
0.0106928395,
-0.031735394,
-0.017954446,
-0.034508392,
0.07949255,
-0.057756737,
0.030390913,
-0.030334892,
-0.062462427,
0.017716361,
0.010153646,
0.011351076,
-0.055403896,
0.0481773,
-0.04447997,
0.022197971,
-0.058036838,
0.016357874,
-0.026777616,
-0.037197355,
-0.032015495,
0.053583242,
-0.04235121,
0.02214195,
0.046860825,
0.026413484,
-0.008893194,
0.01311571,
-0.0169881,
-0.013752938,
-0.0082489615,
0.031063154,
-0.021987895,
0.012548506,
-0.027954038,
0.016301854,
-0.0016123289,
0.026609555,
-0.030362902,
-0.015041401,
0.027743962,
0.008424025,
0.042659316,
-0.010811882,
0.031707384,
-0.00096284575,
-0.0067154113,
0.04884954,
0.012289412,
0.031651367,
-0.03859786,
0.0050733215,
-0.084534355,
0.047196947,
-0.016161803,
0.0044185864,
-0.00481773,
-0.008283975,
0.041230805,
-0.0026574542,
0.02211394,
0.057756737,
0.023150312,
0.0030005774,
-0.030783053,
-0.009040246,
0.018570669,
0.047112916,
0.0118412515,
-0.0065158396,
-0.032463655,
-0.01359188,
-0.015391527,
-0.032239575,
-0.01929893,
0.007310625,
-0.01907485,
-0.015559587,
0.01648392,
-0.028556254,
-0.031287234,
-0.025587188,
0.00095234194,
-0.029914742,
0.032575697,
0.017142156,
-0.013290772,
-0.016764019,
0.076075315,
-0.015545582,
0.0037638515,
0.025671218,
0.036020935,
-0.008073899,
-0.042015087,
0.045432314,
-0.0028482727,
-0.036525115,
-0.063862935,
-0.027155751,
-0.007338635,
0.040586572,
-0.0045131207,
0.012485483,
-0.015237471,
-0.04008239,
-0.009698482,
0.009166291,
0.035264663,
-0.013087699,
0.019957166,
-0.015419536,
-0.056720365,
0.013178732,
0.030418923,
-0.025937313,
-0.03957821,
-0.03490053,
-0.01735223,
-0.044900123,
-0.017702356,
0.04414385,
-0.026427489,
0.002253059,
0.046020526,
-0.01932694,
0.016511928,
-0.0064178044,
0.023290362,
-0.029494591,
-0.007702766,
-0.040222444,
-0.02969066,
0.012261403,
-0.041230805,
-0.016581954,
0.018766738,
-0.004572642,
0.016399888,
0.025727239,
-0.05697246,
-0.031287234,
-0.022730162,
-0.009236316,
-0.032463655,
0.04355564,
-0.0122544,
-0.013430823,
-0.005367427,
0.0016114536,
0.006176218,
-0.024102654,
0.0016928578,
-0.011281051,
0.01083289,
-0.03859786,
-0.03459242,
-0.06307865,
-0.009145284,
-0.051958658,
0.000054269487,
0.045908485,
-0.012905634,
-0.00010230236,
0.009866543,
0.010937927,
0.040250454,
-0.0053849337,
0.029998772,
-0.0378696,
-0.027841996,
-0.010874905,
-0.004859745,
-0.024200689,
-0.00609919,
0.037701536,
0.00841002,
0.045684405,
0.0061307014,
-0.0025856784,
0.003116119,
-0.01453722,
0.04313549,
-0.0211616,
-0.029606631,
0.01464926,
0.037421435,
-0.036020935,
-0.0016648478,
-0.01091692,
-0.051762585,
0.0025296584,
0.033416,
-0.013928001,
0.028542249,
0.03904602,
0.025965324,
0.04005438,
0.013073694,
-0.03459242,
0.020265277,
-0.010601806,
0.03319192,
-0.033079877,
0.015839688,
0.055824045,
0.032015495,
-0.04414385,
0.032043505,
0.0076607508,
-0.0041034734,
0.012527498,
0.028458219,
-0.017422255,
0.06464721,
0.02174981,
0.03389217,
-0.014551225,
-0.019242909,
-0.050166015,
0.045292262,
-0.04803725,
0.016427899,
0.009229314,
-0.09293737,
0.004495614,
-0.027169757,
-0.0137109235,
0.014873341,
0.02225399,
0.015531577,
-0.016511928,
0.035264663,
0.019901145,
0.037701536,
-0.0056405254,
0.0026469505,
-0.020293286,
-0.012730571,
-0.012373443,
-0.035656802,
-0.008339995,
0.041734986,
-0.02969066,
-0.016413894,
-0.050950296,
-0.05400339,
-0.016385883,
-0.015951728,
-0.00029541858,
0.0037813578,
-0.044844102,
0.022940237,
-0.031763405,
-0.0042400225,
-0.037197355,
0.045544352,
0.013794953,
0.014138076,
0.0014180092,
0.036188994,
0.0049892915,
-0.036609147,
0.01988714,
0.004397579,
0.055964094,
-0.00060834346,
0.036132973,
0.012184375,
-0.0101746535,
-0.009593445,
0.03792562,
0.011799237,
0.04405982,
0.020979533,
0.01325576,
-0.0046531707,
0.011540144,
0.017618326,
-0.023192327,
0.009145284,
-0.04005438,
-0.015167446,
-0.022590112,
-0.009383369,
-0.00866211,
0.018136512,
-0.0046636746,
-0.0033927183,
-0.011659186,
0.018122507,
-0.043443598,
-0.0053569237,
-0.030614993,
-0.026889656,
0.0075347056,
0.013157724,
-0.036917254,
0.015055406,
0.016890064,
0.0401104,
-0.01915888,
0.036497105,
-0.020909509,
0.054535583,
-0.031147184,
0.019845126,
0.0010862651,
-0.008157929,
-0.03445237,
-0.062854566,
0.008473042,
0.023962604,
-0.0069920104,
-0.028094089,
-0.00334195,
-0.050614174,
0.021021549,
-0.03484451,
0.007926846,
-0.08038887,
-0.032043505,
0.049409743,
0.020405326,
0.0044991155,
0.022954242,
0.0064073005,
0.046916846,
0.008683118,
0.02943857,
0.009117274,
0.06341477,
0.0339762,
0.017772382,
0.0054304497,
-0.0019309433,
-0.018038478,
0.011876265,
0.045796443,
0.05279896,
-0.020923514,
0.028458219,
-0.014719285,
0.012093342,
0.012569513,
0.010853897,
-0.020293286,
-0.01693208,
-0.031819426,
-0.05363926,
-0.0069640004,
0.095794395,
0.0061201975,
0.013122712,
-0.015069411,
-0.014691276,
-0.03434033,
0.010307701,
-0.0015169197,
0.03932612,
0.010706845,
-0.037085317,
-0.005510979,
-0.025727239,
0.003191396,
0.022730162,
-0.012772586,
-0.024858925,
0.017926436,
0.05221075,
0.06733618,
0.061734166,
0.014957371,
-0.037113328,
0.008101909,
0.01687606,
-0.011281051,
0.016259838,
0.07674756,
0.00008534314,
0.017954446,
0.006494832,
0.035628792,
-0.03350003,
0.007884831,
0.0109519325,
-0.03784159,
-0.0154895615,
-0.015293491,
-0.062238347,
0.04526425,
-0.045348283,
0.011470119,
-0.008431028,
-0.035544764,
-0.02445278,
0.004271534,
-0.02910245,
-0.015699638,
0.0075207003,
0.001411882,
-0.00080747745,
-0.05335916,
0.22990656,
0.04361166,
0.03462043,
-0.023472428,
0.0043345564,
0.04369569,
-0.016609965,
-0.01732422,
0.009572437,
-0.06812046,
-0.009460397,
-0.036889248,
-0.017674346,
0.04862546,
-0.015853692,
0.02016724,
-0.049829893,
-0.004667176,
0.025755247,
-0.051174376,
0.005202868,
-0.006046671,
0.02707172,
0.025951318,
-0.040810652,
-0.014019034,
0.0048247324,
-0.050502133,
-0.010958935,
-0.005619518,
-0.006519341,
-0.013998026,
0.01704412,
-0.060277645,
0.025741244,
0.018024473,
0.005048813,
-0.015027395,
-0.03817771,
-0.024550816,
-0.0041629947,
0.01729621,
0.03383615,
0.0077167707,
-0.0040754634,
0.03403222,
0.011729212,
0.013241755,
0.051846616,
-0.084534355,
0.05854102,
-0.057280567,
0.007940851,
0.016105782,
-0.028136102,
0.011918279,
-0.04313549,
-0.01712815,
-0.013682913,
0.039998364,
0.022912227,
0.018094497,
-0.0046636746,
-0.0045761433,
0.01083289,
0.015685633,
-0.014201099,
0.014152082,
-0.013213744,
-0.020293286,
0.01721218,
-0.026945675,
-0.03492854,
-0.013374803,
0.039942343,
0.028416203,
0.045488335,
-0.009222312,
0.009257324,
-0.015559587,
0.009012236,
0.0055354876,
-0.007555713,
0.000845116,
-0.010258684,
-0.006953497,
-0.03448038,
-0.027169757,
0.018248552,
-0.012611529,
-0.0020867493,
0.09377767,
0.015349512,
0.019537015,
0.027841996
] | CUDA_VISIBLE_DEVICES=0,2 torchrun trainer-program.py
Only the 2 physical GPUs (0 and 2) are "visible" to PyTorch and these are mapped to cuda:0 and cuda:1 respectively. You can also reverse the order of the GPUs to use 2 first. Now, the mapping is cuda:1 for GPU 0 and cuda:0 for GPU 2.
CUDA_VISIBLE_DEVICES=2,0 torchrun trainer-program.py
You can also set the CUDA_VISIBLE_DEVICES environment variable to an empty value to create an environment without GPUs. |
[
0.041181363,
0.01278907,
-0.02191417,
0.015603223,
-0.013513505,
0.004569515,
-0.0005650944,
0.005739757,
0.014655884,
0.05923652,
0.033797696,
-0.01313039,
0.055140674,
-0.04095846,
0.017442174,
0.04767342,
-0.0192254,
-0.053050958,
-0.035525195,
-0.025814975,
0.024630802,
-0.011096399,
-0.06363886,
-0.021287253,
-0.020451367,
0.0064607095,
-0.013966277,
-0.0026313025,
0.072945066,
0.029562535,
-0.038673703,
-0.034745034,
0.00509891,
-0.009354968,
-0.05193644,
-0.006976173,
-0.0057989657,
0.0298133,
-0.05828918,
-0.039175235,
0.011347165,
-0.020451367,
0.02249929,
-0.015519634,
-0.034828622,
-0.023627738,
0.0038346313,
-0.006697544,
0.051295593,
-0.019336851,
0.0263583,
0.03900806,
0.009480351,
0.0021315117,
-0.0017179218,
-0.010441621,
0.0105809355,
0.020799654,
-0.01845917,
-0.014258838,
0.020590682,
0.02249929,
-0.03374197,
-0.021022556,
0.038200032,
0.025076607,
-0.0071746963,
0.0015211401,
-0.0015141744,
-0.038339347,
-0.016689876,
0.015519634,
-0.05547503,
-0.038980193,
0.001668291,
0.0202006,
0.056283053,
0.004980493,
-0.050849788,
0.015185279,
0.010176923,
0.049512368,
-0.00056814187,
-0.02231818,
-0.017943706,
-0.04134854,
0.03296181,
-0.031290036,
-0.0056248223,
-0.0663137,
-0.0047192783,
0.006067146,
0.046391726,
-0.0032913047,
0.0024205893,
0.051434908,
-0.04940092,
0.015296731,
0.036305357,
-0.009598768,
0.03761491,
0.056589544,
-0.0075160167,
0.050264668,
-0.022290317,
-0.0039565316,
0.025940359,
0.0039530485,
0.0105600385,
-0.01827806,
0.0007270475,
-0.00039748164,
-0.026664793,
0.031178582,
-0.002439745,
-0.029228179,
-0.03232096,
-0.0062517375,
-0.017581489,
0.04625241,
0.021705197,
-0.037754226,
0.029952615,
-0.04499858,
0.018333787,
-0.032627452,
-0.030788502,
0.042853136,
-0.062635794,
-0.033045396,
-0.01604903,
0.0067567527,
0.018891044,
0.025633866,
0.01953189,
0.0021785302,
-0.0035107252,
0.03797713,
0.019726932,
-0.05238225,
0.013548334,
-0.00865143,
-0.017107818,
0.10158812,
-0.0065338495,
0.025229855,
-0.01884925,
0.0015437787,
-0.027765378,
0.029478945,
-0.04318749,
-0.0089161275,
-0.0071886275,
0.05154636,
-0.021900238,
0.009257448,
-0.0044127866,
0.013046802,
-0.020883242,
0.017247133,
0.03435495,
0.0028646542,
0.015603223,
0.038311485,
-0.011883526,
0.047729142,
-0.045026444,
-0.029757574,
0.0029743644,
-0.018891044,
0.057899103,
0.025271649,
0.0105391415,
0.008595704,
0.03577596,
-0.0024623836,
0.05912507,
0.015352457,
-0.013875723,
0.017483968,
-0.020256327,
0.015394251,
0.0046391725,
0.060239583,
0.0018023812,
0.044664226,
-0.037726365,
0.0024467106,
-0.03708552,
0.017191408,
0.009403728,
0.03435495,
-0.04750624,
0.020353846,
-0.026010014,
0.0035977967,
-0.034076326,
0.006627887,
-0.00927138,
-0.10604619,
0.009786842,
0.016996367,
-0.0054994393,
0.025452757,
0.0021802718,
0.033630516,
0.003667454,
0.05527999,
0.02826691,
-0.03126217,
0.051295593,
0.018709935,
-0.016035097,
-0.021969894,
0.017943706,
0.043438256,
0.0010936187,
-0.0039565316,
0.010567004,
-0.009403728,
0.028503744,
0.0031241274,
0.043438256,
0.013088596,
-0.0021837547,
-0.04185007,
-0.03900806,
0.014725542,
0.0153663885,
0.06246862,
-0.025996083,
0.035023663,
-0.011946217,
0.06742821,
-0.0367233,
-0.022359975,
0.013645854,
0.032460276,
-0.013074664,
0.025689593,
-0.0017518797,
-0.004221229,
0.022178866,
0.038060717,
-0.0062099434,
0.010553072,
0.017860118,
-0.0069831386,
-0.029924752,
0.027835036,
-0.020214532,
0.0012172604,
-0.014049866,
0.0015803487,
-0.07166337,
-0.03126217,
0.006471158,
0.06536636,
-0.008219555,
0.003618694,
0.019016428,
0.008135966,
-0.029395357,
-0.022624673,
-0.0053914706,
0.048732206,
0.0038067685,
0.039258823,
-0.0005607408,
0.042741686,
-0.03884088,
0.005614374,
-0.040735558,
-0.0120367715,
-0.06291442,
0.008602669,
0.03786568,
-0.00990526,
0.012092497,
-0.029228179,
0.030398421,
-0.01375034,
-0.005785034,
0.04123709,
-0.0018615898,
0.02231818,
-0.042184427,
0.022708261,
-0.041989386,
0.043716885,
-0.046865392,
0.01288659,
0.004318749,
-0.0736695,
0.06436329,
0.0004701864,
-0.0036500397,
-0.024561144,
-0.009988849,
-0.016104754,
-0.027918624,
-0.040707693,
0.030927816,
-0.016090823,
-0.014015038,
-0.00008016025,
0.010065472,
-0.015115622,
0.053914707,
0.04193366,
-0.0101003,
0.013631923,
0.021788785,
0.028489813,
-0.04480354,
0.04499858,
0.003566451,
-0.028949551,
-0.033045396,
-0.042574506,
-0.0010239615,
-0.053329587,
-0.026776245,
-0.025118403,
-0.024449693,
0.022750055,
0.01740038,
-0.052270796,
0.05307882,
-0.033379752,
-0.03741987,
0.001444517,
0.000016189868,
0.030370558,
-0.009661459,
0.029451083,
-0.042323742,
0.0029308286,
-0.051016964,
0.009682357,
0.008491218,
-0.025160197,
0.008198658,
0.010385895,
-0.010295341,
-0.045082167,
0.03702979,
-0.05828918,
-0.0137224775,
-0.039203096,
-0.006749787,
0.0003064919,
0.015380319,
0.013241842,
0.023237657,
0.014265804,
-0.021036487,
0.03507939,
0.026595136,
0.044162694,
-0.0061054574,
0.044162694,
0.034745034,
0.012698515,
-0.023906367,
-0.012893556,
0.065310635,
-0.006746304,
0.039426,
-0.027361365,
0.017832255,
0.035051525,
-0.020075217,
-0.011563103,
0.02222066,
-0.019350782,
0.009898295,
0.037837815,
0.039398137,
0.026664793,
-0.04028975,
0.01173028,
0.027556406,
0.032850355,
-0.005179016,
0.030788502,
-0.003486345,
-0.00052634755,
-0.026804108,
-0.051685676,
0.01826413,
-0.030704914,
-0.035553057,
-0.045360796,
-0.022861507,
0.0028263426,
0.027542474,
-0.0016317209,
0.03577596,
0.030454148,
0.061688457,
-0.025494551,
0.0032146818,
-0.0029586914,
0.020172738,
-0.017609352,
-0.049818862,
0.050431844,
-0.007024933,
-0.010462518,
-0.08063523,
0.023976024,
-0.007766783,
0.03836721,
0.024212858,
-0.011152125,
-0.06202281,
0.00495263,
-0.021719128,
0.028489813,
0.017929774,
-0.052660875,
-0.007634434,
0.037169106,
0.045890193,
-0.047032572,
-0.034159914,
-0.061521277,
-0.01953189,
0.043103904,
-0.059069343,
-0.035971,
-0.03296181,
-0.017483968,
-0.08152684,
0.0053705736,
0.020117013,
-0.007453325,
-0.03095568,
-0.022346044,
-0.06224571,
0.0050745304,
-0.003477638,
-0.010838667,
-0.004545135,
0.025717454,
-0.0021106144,
-0.034438543,
0.022917233,
0.03028697,
0.03730842,
-0.03000834,
-0.00052199396,
-0.0045938953,
0.02287544,
-0.008122034,
-0.012851762,
0.02509054,
0.02702701,
0.0069901044,
-0.057286117,
0.0036987998,
0.062134262,
-0.04095846,
-0.046029508,
-0.0014549657,
0.012942316,
-0.010344101,
0.066425145,
0.0050431844,
0.00773892,
0.05968233,
0.02673445,
-0.013276671,
0.015965441,
-0.016494835,
0.050069626,
0.010385895,
-0.013374191,
0.017483968,
-0.042658098,
0.044692088,
-0.002997003,
-0.024338242,
-0.0061054574,
-0.049540233,
-0.03636108,
0.01673167,
-0.015059896,
0.017052094,
0.008762881,
-0.0062029776,
0.04683753,
-0.04608523,
0.009438557,
0.010058506,
-0.042323742,
0.02470046,
0.05335745,
0.03847866,
-0.02106435,
-0.05087765,
-0.053134546,
0.014614089,
-0.04402338,
0.009863466,
-0.004653104,
0.0018128298,
0.00077145395,
0.022359975,
-0.05402616,
0.016620219,
0.00564572,
0.0023944678,
-0.015241005,
-0.006404984,
-0.0056492025,
-0.034159914,
-0.06096402,
0.099581994,
-0.01845917,
-0.058233455,
-0.032516003,
0.04324322,
0.01614655,
0.0022812746,
-0.006021869,
-0.05115628,
-0.030119792,
-0.011883526,
0.044664226,
-0.026804108,
0.0033400648,
-0.0037998026,
-0.054081883,
-0.009424625,
0.0031241274,
0.015087759,
-0.06001668,
0.024240721,
-0.04402338,
0.029478945,
-0.0396489,
0.019476166,
-0.029785438,
-0.030147655,
-0.02422679,
0.004221229,
-0.0022534118,
-0.017344654,
-0.010364998,
0.036193904,
0.0035194322,
0.03828362,
-0.05750902,
-0.008553909,
-0.031958744,
0.008407629,
-0.008581772,
0.015268868,
-0.033881284,
-0.0031084546,
-0.0019173156,
0.031401485,
-0.03346334,
0.0119740805,
-0.010483415,
-0.026818039,
0.0401783,
-0.013158253,
0.033212572,
0.020521024,
-0.002148926,
0.05210362,
0.008825573,
0.005304399,
0.024547214,
-0.0065094694,
-0.118695945,
0.038311485,
-0.0046705185,
-0.017052094,
-0.010295341,
0.033379752,
0.039453864,
-0.039286684,
0.04566729,
0.05990523,
0.043633297,
0.011611863,
-0.071942,
0.0077040913,
0.039453864,
0.01409166,
-0.004726244,
-0.038116444,
-0.043020315,
0.003928669,
0.00495263,
-0.05558648,
-0.055084947,
0.0054471963,
-0.022109209,
-0.036305357,
0.0153663885,
-0.058623537,
-0.061186925,
-0.043967653,
-0.004297852,
-0.0401783,
0.029729713,
0.020855378,
0.02057675,
-0.007327942,
0.03156866,
-0.021677334,
-0.011284473,
0.014008072,
0.028587334,
-0.009619665,
-0.033686243,
-0.0025407479,
0.0011920095,
-0.054249063,
-0.0792978,
0.021858443,
0.010218718,
0.022081347,
-0.026845902,
-0.0086235665,
-0.030816365,
-0.040568378,
-0.019559754,
0.0051964303,
-0.003789354,
-0.02279185,
0.0030858158,
0.004886456,
-0.056700997,
0.026093604,
0.047004707,
0.00026056162,
-0.035358015,
-0.030398421,
-0.0014593193,
-0.042295877,
0.009556974,
0.028044006,
0.022234593,
-0.0046182754,
0.036583986,
0.012705482,
0.047478378,
-0.015059896,
0.019336851,
-0.015603223,
-0.0411535,
-0.0137851685,
-0.026386164,
0.007432428,
-0.013332397,
0.006617438,
0.007989686,
0.010901359,
0.0053775394,
-0.021217596,
-0.030342696,
-0.05578152,
0.012524373,
-0.035998862,
-0.012064635,
0.03488435,
0.001882487,
-0.025034813,
-0.0029012242,
0.0038381142,
0.0033348405,
0.013771237,
-0.016271932,
-0.03123431,
-0.03123431,
-0.034772895,
0.024937293,
-0.049010836,
-0.024031749,
-0.0151992105,
-0.01671774,
-0.008017548,
0.0039112545,
-0.008400664,
0.018584553,
0.035998862,
0.011674554,
-0.03181943,
0.008247417,
-0.050599024,
-0.034549993,
0.0091459965,
0.018988565,
-0.04547225,
0.0073070447,
0.022346044,
0.0030004857,
0.031652253,
0.000093384246,
0.0041237087,
-0.061298374,
-0.0012599254,
0.029256042,
-0.024087476,
-0.035720237,
-0.011625794,
0.0039077713,
-0.03934241,
-0.00017914972,
-0.037949268,
-0.054193337,
-0.009752015,
0.055614345,
0.018208403,
0.0702145,
0.01990804,
0.026943423,
0.016132617,
0.03884088,
0.017665077,
-0.006781133,
0.016703807,
0.052465837,
-0.063861765,
-0.03184729,
0.02605181,
0.010748113,
-0.03134576,
0.022917233,
-0.023014754,
0.029088866,
-0.009062408,
0.014307598,
-0.0021140974,
0.05135132,
0.010302306,
0.008839504,
0.0067915814,
-0.0075160167,
-0.063304506,
0.0044545806,
-0.060351036,
-0.021315116,
-0.010803838,
-0.048955113,
0.005771103,
-0.034717172,
-0.005663134,
0.004569515,
0.0105809355,
0.006244772,
0.0041898834,
0.0075926394,
0.013081631,
0.04048479,
-0.054667003,
0.0072861477,
0.016035097,
0.0032007503,
-0.02596822,
-0.025759248,
0.006544298,
0.051574223,
0.0367233,
0.016620219,
-0.037559185,
-0.024686527,
0.01192532,
0.008539978,
-0.057063214,
0.02539703,
-0.026957354,
0.030816365,
-0.02557814,
0.013687649,
-0.029896889,
0.032209508,
0.02816939,
0.013464745,
-0.021677334,
0.012280572,
0.032488137,
-0.04962382,
0.034856483,
0.037364148,
0.0106854215,
-0.014063798,
0.049010836,
0.031624388,
0.013694614,
0.0058268285,
0.053329587,
0.027848966,
0.0120785665,
0.031011404,
0.021147938,
-0.027737515,
0.015881851,
0.008365835,
-0.015589291,
0.024951225,
-0.021231528,
-0.012670653,
-0.0014828286,
-0.00094820926,
0.0012085532,
-0.020242395,
0.013666751,
0.015700743,
0.0074115307,
0.016522698,
-0.05079406,
-0.009062408,
-0.013715511,
-0.01702423,
0.003162439,
0.0020009044,
0.023321245,
-0.008839504,
0.019002495,
0.056115877,
0.027444955,
0.04795205,
-0.003061436,
0.03549733,
-0.03633322,
0.035246566,
-0.012607961,
-0.003449775,
-0.028782373,
-0.035971,
-0.028782373,
0.02539703,
-0.015589291,
-0.036890477,
0.000795834,
-0.016703807,
0.009403728,
-0.03404846,
-0.00927138,
-0.046419587,
-0.013332397,
0.026943423,
0.02346056,
-0.012879624,
0.02383671,
-0.00980774,
0.051100556,
-0.0067567527,
0.05383112,
-0.009752015,
0.0648091,
0.04856503,
0.020117013,
0.007613537,
-0.011186954,
-0.01604903,
-0.010741147,
0.021510158,
0.030231245,
-0.015422114,
-0.0077180224,
-0.017651146,
0.019921971,
0.04661463,
-0.0028211183,
-0.03663971,
0.027054874,
-0.015547497,
-0.05923652,
0.00014878353,
0.11122869,
0.0071398676,
0.0050397017,
-0.026873766,
-0.028893825,
-0.035525195,
0.0070562786,
-0.0011780781,
0.0404012,
0.0042630234,
-0.017191408,
0.011765108,
-0.057620473,
0.00588952,
-0.0022447046,
-0.04299245,
-0.018904977,
0.019713,
0.040735558,
0.011521308,
0.05912507,
-0.007822509,
-0.060072407,
0.052047893,
0.023989955,
0.0043744748,
0.037949268,
0.043131765,
0.036667574,
0.015394251,
-0.0040052915,
0.015617155,
0.00975898,
0.029228179,
-0.00088551774,
-0.017219272,
-0.024561144,
-0.009382831,
-0.019183606,
0.046113096,
-0.025410963,
0.012266641,
-0.01740038,
-0.018250197,
-0.048732206,
-0.02595429,
-0.010734181,
-0.025647797,
-0.03652826,
-0.011228748,
0.003611728,
-0.039203096,
0.22847576,
0.04123709,
0.044357732,
0.003235579,
0.012907487,
0.06993587,
-0.000067861394,
-0.008588738,
0.0019573686,
-0.037252694,
-0.017386448,
-0.04079128,
0.02422679,
0.042630233,
0.006088043,
0.025410963,
-0.038534388,
0.015658949,
0.01604903,
-0.040902734,
-0.023767052,
-0.0045625493,
0.020827517,
0.03142935,
-0.020911105,
0.026776245,
0.013060734,
-0.04770128,
0.003970463,
-0.021607677,
0.029283905,
-0.00401574,
0.053803254,
-0.010002781,
0.040345475,
0.028643059,
-0.021719128,
-0.01990804,
-0.018152678,
-0.009786842,
0.00085939624,
0.0071398676,
-0.005231259,
-0.016007235,
-0.027918624,
0.052577287,
0.0059765917,
0.017428242,
0.038144305,
-0.07656724,
0.059459426,
-0.05277233,
0.011946217,
0.024547214,
-0.052298658,
-0.013436883,
-0.010023678,
-0.03374197,
-0.017706871,
0.033407614,
0.06436329,
-0.024784047,
-0.014767336,
0.022931164,
0.009201722,
0.037949268,
-0.009919192,
0.015993303,
-0.0011963631,
-0.015979372,
-0.0025181093,
0.0051128417,
0.006317912,
-0.0056213397,
0.012796036,
0.019030359,
0.021078283,
-0.01423794,
0.030175518,
-0.026274713,
0.012426852,
-0.017483968,
-0.009299242,
-0.01547784,
0.0011989754,
0.025410963,
-0.024157133,
-0.034661446,
-0.001567288,
0.020925036,
-0.013005007,
0.06564499,
-0.007989686,
-0.0025633867,
0.007871268
] | Use the --nproc_per_node to select how many GPUs to use.
torchrun --nproc_per_node=2 trainer-program.py
Use --num_processes to select how many GPUs to use.
accelerate launch --num_processes 2 trainer-program.py
Use --num_gpus to select how many GPUs to use.
deepspeed --num_gpus 2 trainer-program.py |
[
-0.008549029,
0.013560289,
0.009195419,
0.023589758,
-0.051822405,
-0.028858185,
0.015985988,
0.007002558,
-0.019655816,
0.040646113,
0.0063909204,
0.0070234095,
0.06260947,
-0.036976285,
-0.03202758,
-0.0038609637,
-0.024535017,
-0.022255277,
-0.085962914,
0.012670633,
0.0031137925,
0.03327866,
-0.058105595,
-0.011579416,
-0.012663683,
0.008020796,
-0.010891324,
0.002244989,
0.030137064,
0.043231674,
-0.01843254,
-0.041368958,
0.0015473395,
0.0018140622,
0.019906031,
-0.037699133,
0.0019999861,
0.020253552,
-0.06255387,
-0.028635772,
0.029136201,
-0.028232647,
0.012093748,
-0.017834803,
-0.03911702,
-0.030832106,
0.0115307635,
0.019099781,
0.023047626,
-0.016403014,
0.015082433,
0.027899025,
0.017751398,
-0.007742779,
-0.024674026,
-0.0099530155,
-0.014053769,
-0.0065577305,
-0.032945037,
-0.022102367,
0.0038435878,
0.044065725,
-0.01745948,
-0.05557564,
0.03667047,
0.019544609,
0.021268316,
-0.022046763,
-0.021101505,
0.05526982,
-0.00025933792,
0.032222193,
-0.024006786,
-0.07567628,
0.0010538589,
-0.022227475,
0.031137927,
0.009529039,
-0.016277907,
0.024965944,
0.011558565,
0.033223055,
-0.013282271,
0.009640247,
-0.046845898,
-0.012211906,
0.013136312,
-0.047096115,
-0.0210181,
-0.02003114,
-0.018168423,
0.0029313439,
0.027092775,
0.014985126,
0.002147683,
0.0054421867,
-0.0034369875,
0.03316745,
0.0011711475,
-0.035113573,
0.050571326,
0.06522284,
-0.032416806,
0.026786957,
0.018877368,
0.00096610974,
0.020420363,
0.011322251,
-0.037560124,
-0.028913788,
0.03250021,
0.025355168,
-0.019210989,
0.0533793,
0.006286664,
0.028663574,
-0.025633186,
-0.0005586408,
-0.04562262,
0.0015238818,
-0.009814007,
-0.037921544,
0.03138814,
-0.041980598,
-0.020184048,
-0.033556677,
-0.03572521,
0.023631461,
-0.0131085105,
-0.01745948,
0.014915623,
-0.028079737,
-0.0037949348,
0.018793963,
-0.035641804,
-0.019030277,
-0.032416806,
0.044371545,
0.025299564,
-0.030665297,
-0.00351518,
-0.044844173,
-0.0041598324,
0.08640774,
0.0038574885,
-0.002771484,
0.01843254,
0.025494177,
-0.04495538,
0.023728767,
-0.040284693,
-0.016069394,
-0.009883511,
-0.0036315997,
-0.012476021,
0.015972087,
0.0028826909,
0.0161528,
0.012517724,
0.033890296,
0.0027940727,
0.03330646,
-0.0014847856,
0.02343685,
0.035252582,
0.093080156,
-0.04478857,
-0.036976285,
-0.013761851,
-0.04300926,
0.028232647,
-0.024173595,
-0.021449028,
0.01504073,
0.030832106,
-0.011850483,
0.020962497,
0.030609693,
0.013136312,
0.043231674,
-0.0013883484,
0.00090008066,
0.013150213,
0.06416637,
0.043954518,
0.047179516,
-0.01324752,
-0.012399567,
-0.06032973,
0.031276934,
0.03781034,
0.02700937,
-0.0323334,
0.0037949348,
-0.0020382137,
-0.03747672,
-0.024535017,
0.01663933,
0.0078956885,
-0.07873447,
-0.0037567073,
0.047624346,
-0.055242017,
-0.013226668,
0.021560233,
0.060552146,
-0.015777476,
0.10103145,
0.007867887,
-0.0033744336,
0.014526399,
-0.01374795,
-0.021866053,
0.011384804,
0.036892883,
0.007193695,
-0.006999083,
-0.00792349,
-0.0050147353,
0.01744558,
0.030331677,
0.022380384,
0.016875643,
0.031332538,
-0.0108704725,
-0.0029956354,
-0.030331677,
0.036781676,
0.034974564,
0.04117435,
0.0015091121,
0.04982068,
-0.036448054,
0.018529845,
-0.039228227,
0.0011876547,
0.0064569493,
0.025772193,
0.007972143,
0.020906894,
-0.03188857,
0.0025751344,
0.026620146,
-0.0116211185,
0.02846896,
-0.00074890885,
0.035169177,
0.016764438,
-0.060885765,
0.042953655,
-0.068837054,
0.016708834,
-0.03667047,
-0.011892186,
-0.041480165,
-0.02698157,
0.009918263,
0.036197837,
-0.045177795,
-0.009410882,
-0.0075898697,
0.02151853,
-0.012955601,
-0.049653873,
0.05882844,
0.058606025,
0.013650645,
0.011537714,
0.029998055,
0.016625429,
-0.045650423,
-0.03803275,
-0.061886627,
-0.0003023437,
-0.051822405,
-0.0064882264,
0.046623483,
-0.016333511,
-0.016194502,
-0.05159999,
0.019183187,
0.0194056,
0.0064326227,
0.035697408,
0.031638358,
0.006637661,
-0.0469015,
0.012045095,
-0.028441159,
-0.009438684,
-0.03464094,
0.0009070311,
0.043120466,
-0.04089633,
0.02200506,
-0.02682866,
0.0018331759,
0.002854889,
-0.03800495,
-0.03800495,
-0.038922407,
0.00024304785,
0.019002475,
-0.013164114,
-0.030581892,
0.013553338,
0.017056355,
-0.023561958,
0.089521535,
0.028260447,
-0.044399347,
-0.0029000668,
0.03844978,
0.032722622,
-0.03964525,
0.042703442,
0.03088771,
-0.015124136,
-0.04075732,
-0.013963413,
-0.023798272,
-0.04281465,
-0.01858545,
-0.050487924,
-0.03703189,
0.017014652,
-0.014721011,
-0.06994913,
0.062498264,
-0.011266647,
0.0022241375,
0.016111096,
-0.010905225,
-0.0012519462,
0.01989213,
0.03895021,
0.00045047473,
-0.014901722,
-0.019767022,
0.01551336,
-0.008917402,
-0.03995107,
0.04025689,
0.008027746,
0.02845506,
-0.0063770195,
0.036948487,
-0.012628932,
0.018877368,
-0.032083184,
0.004834024,
-0.023895578,
0.05221163,
0.004138981,
0.013734049,
0.01908588,
-0.06705775,
0.042286415,
-0.0013805291,
-0.002519531,
-0.0065612057,
0.0307209,
0.04089633,
0.028024133,
0.012705386,
-0.017403876,
0.002877478,
0.0291084,
0.009619395,
-0.011635019,
0.01793211,
-0.039839864,
-0.027607108,
0.006244961,
-0.0021563708,
0.028051935,
0.025619285,
0.047791157,
0.056520894,
-0.0024587146,
-0.049070034,
-0.0006967806,
0.024562819,
0.02649504,
-0.018237928,
0.037115294,
0.033612277,
0.024229199,
-0.017626291,
-0.024938142,
0.024076289,
-0.0533793,
0.012920849,
-0.011544664,
-0.022199674,
-0.000232405,
0.027037172,
0.017153662,
0.028746977,
0.027106676,
0.03942284,
-0.053712923,
-0.0042119604,
0.01244822,
-0.022700105,
-0.060718957,
-0.034418527,
0.026856462,
0.010794017,
-0.012323112,
-0.075787485,
-0.0046950155,
-0.020184048,
0.0078956885,
0.040507104,
0.0371987,
0.00021231391,
-0.0040521007,
-0.009438684,
-0.0087366905,
0.015249243,
-0.05677111,
-0.028663574,
0.011016431,
-0.00086576294,
-0.047290724,
-0.011030332,
-0.03786594,
0.026175318,
0.0019687093,
-0.02538297,
-0.041507967,
-0.053573914,
0.005219773,
-0.07562068,
0.030053658,
0.038116157,
0.008347467,
-0.014901722,
-0.005994746,
-0.011732326,
-0.006901777,
-0.0011016432,
-0.0097584035,
-0.015443855,
0.030192668,
0.0017393451,
-0.045289002,
-0.025021547,
0.024562819,
0.046984907,
-0.03313965,
-0.0068531237,
-0.007520365,
0.03205538,
-0.04250883,
-0.017098058,
-0.008827046,
0.016931247,
-0.0019895607,
-0.045733828,
0.0045212545,
-0.006794045,
-0.043537494,
-0.016180601,
0.011072035,
-0.047457535,
-0.011489061,
0.040201288,
0.0323334,
-0.013184966,
0.06294309,
0.0077219275,
-0.036587063,
-0.024034586,
-0.024173595,
0.0033396815,
0.017848704,
-0.01697295,
0.021782648,
-0.039506245,
0.073285334,
-0.0063596433,
0.008986906,
0.001761934,
-0.07133921,
-0.050849345,
0.02022575,
-0.022574997,
0.030804306,
-0.013317023,
-0.016903445,
0.061052576,
-0.0010208444,
0.011732326,
-0.000055250486,
-0.043064862,
-0.03847758,
0.07206206,
0.022269178,
-0.0101337265,
-0.0290806,
-0.051321976,
0.05966249,
-0.044176932,
-0.0063075153,
-0.028204845,
0.027551504,
0.04122995,
-0.025035448,
-0.03831077,
0.008027746,
-0.0029330815,
0.009195419,
-0.014102423,
0.010071173,
-0.0048618256,
-0.023631461,
-0.0008522965,
0.07067197,
-0.023200534,
-0.030109262,
-0.012649782,
-0.0063665938,
0.012489922,
0.0027871225,
0.004559482,
-0.02813534,
0.008542079,
-0.014623704,
0.07890128,
-0.056326285,
0.030303875,
-0.029497625,
-0.060496543,
-0.011377853,
0.0031276934,
0.019767022,
-0.061386198,
0.03800495,
-0.023978984,
0.0018227502,
-0.0678918,
0.031415943,
0.0018053742,
-0.040673915,
-0.045205597,
0.052072622,
-0.05349051,
0.035308182,
0.03831077,
0.021490728,
-0.020100644,
0.0072214967,
-0.018098919,
-0.013310073,
-0.026647948,
0.0061407047,
-0.005529067,
0.020892993,
-0.036726072,
0.019739222,
-0.007742779,
0.008875699,
-0.041313354,
0.0129277995,
0.03102672,
0.019377798,
0.036781676,
0.010648059,
0.02778782,
-0.013608942,
0.010877423,
0.039200425,
0.005629848,
0.033195253,
-0.020184048,
-0.012427369,
-0.08551809,
0.038922407,
-0.009716701,
0.016458618,
0.010682811,
0.004392672,
0.033250857,
-0.02702327,
0.019975536,
0.06861465,
0.016806139,
-0.0002576003,
-0.036614865,
-0.015235342,
0.030359479,
0.044899777,
0.016375212,
-0.0030877285,
-0.029859047,
-0.015124136,
-0.007485613,
-0.023256138,
-0.037393313,
0.00760377,
-0.0031363815,
-0.044260338,
0.04317607,
-0.028997194,
-0.04576163,
-0.027607108,
0.0119060865,
-0.01602769,
0.041368958,
0.008854847,
-0.013059858,
-0.00033362064,
0.060996972,
-0.015916485,
0.016722735,
0.019099781,
0.037448917,
-0.02521616,
-0.028177043,
0.054964,
0.020920794,
-0.042564433,
-0.05107176,
-0.025466375,
0.004013873,
0.03219439,
-0.019933833,
0.0055325422,
-0.016625429,
-0.027273487,
-0.0013874796,
0.008430871,
0.038755596,
-0.0005825329,
0.013310073,
0.004618561,
-0.06928188,
0.020795686,
0.027676612,
-0.031721763,
-0.03911702,
-0.04431594,
-0.029692236,
-0.03911702,
-0.0062936144,
0.054964,
-0.019989436,
-0.006484751,
0.03477995,
-0.018696656,
0.006547305,
0.0005330111,
0.016555924,
-0.017389975,
-0.030637495,
-0.035308182,
-0.012955601,
0.010891324,
-0.03669827,
-0.0030077985,
-0.00023870383,
-0.008173706,
0.008437822,
0.04103534,
-0.03942284,
-0.0210042,
-0.03088771,
-0.0071033393,
-0.0388112,
0.022644501,
-0.012149352,
-0.01907198,
-0.0029956354,
0.004840974,
0.0005152006,
-0.026995469,
0.010926076,
-0.0039374186,
0.00071068143,
-0.04720732,
-0.034724347,
-0.05401874,
0.001637695,
-0.06639051,
-0.006578582,
0.035002366,
0.0053970087,
-0.011544664,
0.016264006,
0.0070199342,
0.04234202,
-0.017209264,
0.022866914,
-0.031304736,
-0.017807001,
-0.014005116,
0.022602798,
-0.022269178,
-0.004236287,
0.040840726,
0.011259696,
0.03261142,
-0.030832106,
0.0039652204,
-0.015707972,
-0.024117991,
0.029692236,
-0.03202758,
-0.03847758,
0.019794824,
0.018196225,
-0.038755596,
-0.010766216,
-0.010842671,
-0.040034477,
0.026967669,
0.029636633,
-0.015874783,
0.03088771,
0.01793211,
0.015624566,
0.046484474,
0.029386418,
-0.01907198,
0.029497625,
-0.000783661,
0.023839975,
-0.035169177,
0.0008271012,
0.05966249,
0.025827797,
-0.028232647,
0.0258695,
-0.009640247,
0.016764438,
-0.0074717123,
0.0026220498,
-0.030303875,
0.050960552,
0.026369931,
0.026759155,
0.006689789,
-0.002293642,
-0.039534044,
0.045149993,
-0.057938784,
0.020670578,
0.0043752957,
-0.08118102,
-0.0017315259,
-0.05157219,
-0.013622843,
0.004107704,
-0.00760377,
0.027746117,
-0.021796549,
0.023951182,
0.0054387115,
0.0339737,
-0.0028340379,
0.0036107483,
-0.007714977,
-0.017556787,
-0.013532487,
-0.037615728,
-0.010939977,
0.06889266,
0.0014543774,
-0.031610556,
-0.048374992,
-0.05093275,
-0.010529901,
0.0103283385,
-0.008674136,
-0.012740138,
-0.033918098,
0.022992022,
-0.030693099,
0.022853013,
-0.03297284,
0.060218524,
0.01923879,
0.0161528,
0.013928661,
0.021949457,
0.012107649,
-0.021198811,
0.011343102,
0.0026324752,
0.058884043,
-0.002456977,
0.045567017,
0.014074621,
-0.0063492176,
0.002762796,
0.05396314,
0.012587229,
0.048263784,
0.035808615,
-0.014818316,
-0.0042710393,
0.019850427,
0.026856462,
-0.04320387,
-0.013052908,
-0.05159999,
-0.013942562,
-0.013275322,
0.0041598324,
-0.0015820916,
-0.0076107206,
-0.008750591,
-0.011294449,
-0.012983403,
0.0011902611,
-0.023422949,
-0.00019602384,
-0.011363953,
-0.010085074,
0.026481139,
0.02730129,
-0.035780814,
0.009946065,
0.011565516,
0.0420918,
-0.028830383,
0.033223055,
-0.015068532,
0.043148268,
-0.04559482,
0.028885987,
0.0047610444,
-0.0035169176,
-0.043787707,
-0.04467736,
-0.00954294,
0.019169286,
0.0007432616,
-0.018307433,
0.008006895,
-0.05026551,
0.028163143,
-0.02554978,
-0.013317023,
-0.078623265,
-0.038533185,
0.055909257,
0.045010984,
0.002797548,
0.014185827,
0.0061372295,
0.030331677,
0.020906894,
0.012788791,
0.0031363815,
0.060996972,
0.026369931,
0.01389391,
-0.0015351762,
0.0041181296,
-0.0094873365,
-0.0034804277,
0.036948487,
0.04467736,
-0.032528013,
-0.0023318692,
-0.0035117047,
0.016236205,
0.018224027,
0.013275322,
0.018696656,
-0.022435987,
-0.02491034,
-0.029692236,
-0.008667186,
0.09463705,
0.005782758,
0.021601936,
-0.019836526,
-0.019822625,
-0.03149935,
0.010905225,
0.0029574079,
0.046984907,
-0.0022675777,
-0.049542665,
0.0061233286,
-0.009105063,
-0.004264089,
0.02311713,
-0.008667186,
-0.028107539,
0.040395897,
0.06761378,
0.07178404,
0.04478857,
0.023589758,
-0.03667047,
0.015568963,
0.02927521,
-0.003443938,
0.0058731134,
0.0500987,
-0.020350859,
0.0098487595,
0.014470795,
0.021699242,
-0.025466375,
0.0031103173,
0.02182435,
-0.02539687,
-0.009466485,
-0.005108566,
-0.046262063,
0.03425172,
-0.034196116,
0.00023588022,
-0.0067314915,
-0.029664434,
-0.051627792,
0.008284912,
-0.042258613,
-0.0026203122,
0.01310156,
-0.028635772,
-0.023464652,
-0.056298483,
0.22574997,
0.043398485,
0.04464956,
-0.0075759687,
0.026411634,
0.04375991,
-0.03166616,
-0.03705969,
0.0038192612,
-0.051739,
0.007958243,
-0.030776504,
-0.023353444,
0.07378577,
-0.015165838,
0.048291586,
-0.057493955,
0.009000807,
0.030943314,
-0.018085018,
-0.0032336875,
0.0085559795,
0.039673053,
0.030776504,
-0.035252582,
-0.016083295,
-0.0066307103,
-0.051989216,
0.0003957401,
0.0071068145,
0.0037393314,
-0.011593317,
0.0063596433,
-0.06594568,
0.019794824,
0.039589647,
0.013935612,
-0.008375268,
-0.027426396,
-0.024117991,
0.013963413,
0.009966916,
0.02215797,
0.015012928,
-0.011593317,
0.041980598,
0.015721872,
0.018682756,
0.07634352,
-0.07311852,
0.045177795,
-0.039061416,
0.010912175,
0.027912926,
-0.04184159,
0.016778339,
-0.03858879,
-0.008973005,
-0.012496873,
0.046456672,
0.02698157,
0.0031311687,
-0.0023249188,
0.017376075,
0.007631572,
0.0161667,
-0.024548918,
0.046984907,
-0.039339434,
-0.0307209,
0.00054604316,
-0.031304736,
-0.024604522,
-0.04723512,
0.045956243,
0.03911702,
0.059050854,
-0.010071173,
-0.0015221442,
-0.024465512,
0.020684479,
-0.0066307103,
-0.01148211,
0.019669717,
-0.008257111,
0.0015482083,
-0.048124775,
0.00029647927,
0.029469823,
0.0038887656,
-0.008111152,
0.085573696,
0.0075273155,
0.014818316,
0.01732047
] | CUDA_VISIBLE_DEVICES=2,0 torchrun trainer-program.py
You can also set the CUDA_VISIBLE_DEVICES environment variable to an empty value to create an environment without GPUs.
CUDA_VISIBLE_DEVICES= python trainer-program.py |
[
0.01395105,
0.022535747,
0.0005040119,
-0.007932232,
-0.0635165,
-0.043839872,
0.010666725,
0.013540509,
-0.014596186,
0.034544062,
0.0016998948,
0.022286491,
0.05756366,
-0.045833927,
-0.019456694,
-0.000013982035,
-0.0080202045,
-0.025512166,
-0.09272353,
0.016289666,
0.008753313,
0.046948254,
-0.06463082,
0.021963924,
-0.026421221,
-0.0142223,
0.0047908626,
0.0020105494,
0.047388118,
0.02187595,
-0.015967097,
-0.0127634145,
0.012455509,
-0.01056409,
0.030966492,
-0.017242705,
0.016949464,
-0.006161775,
-0.06468947,
-0.01719872,
0.0316996,
-0.026787776,
0.03413352,
-0.033810955,
-0.049000956,
-0.0123895295,
0.0027473231,
0.01936872,
0.034983926,
-0.025585478,
0.038561493,
0.0427842,
0.021260139,
0.027374262,
-0.030233385,
0.004035761,
-0.045188792,
0.0039257947,
-0.026934396,
-0.026993046,
-0.016348314,
0.020277774,
-0.03243271,
-0.06480677,
0.048091903,
0.015190003,
0.024617774,
-0.04762271,
-0.024339193,
0.035189196,
-0.023283519,
0.035335816,
0.0035940632,
-0.06087731,
-0.011913009,
-0.020820275,
0.018313045,
0.006781251,
-0.018107774,
0.00928115,
0.0054873154,
0.027256966,
-0.01699345,
-0.030174736,
-0.061229203,
-0.00003571039,
0.022022571,
-0.055100415,
0.0046735653,
-0.0020655326,
-0.008789968,
0.021787977,
0.0042483625,
-0.002835296,
-0.00859936,
0.027198317,
0.014522875,
0.033165816,
-0.007741623,
-0.043986496,
0.039177306,
0.07037839,
-0.013496523,
0.048561092,
0.02831264,
0.008987907,
0.018005138,
0.0091785155,
-0.051640145,
-0.028253993,
0.069088124,
0.023268856,
-0.00514642,
0.013349901,
-0.014361591,
0.028723182,
-0.00069232914,
0.02281433,
-0.072431095,
-0.01469882,
-0.0031102118,
-0.028488588,
0.02004318,
-0.05410339,
0.011876354,
-0.028664533,
-0.045833927,
0.0037571797,
0.02309291,
-0.025365546,
-0.0054396633,
-0.025072303,
-0.018195746,
0.042901494,
-0.04991001,
0.013525847,
-0.02655318,
0.049675416,
-0.0008797299,
-0.027594194,
0.01592311,
-0.0028664533,
0.02167068,
0.0812284,
0.013393888,
0.016304327,
0.036450144,
0.005578954,
-0.039118655,
0.043898523,
-0.047417443,
-0.022653045,
0.017785206,
0.0031248739,
-0.018503653,
0.034045547,
-0.010432131,
0.019354058,
-0.00089759944,
0.03161163,
-0.013225273,
0.0361569,
-0.0041090716,
-0.0057109133,
0.04474893,
0.09958543,
-0.04137663,
-0.014456895,
-0.014178313,
-0.045951225,
0.04545271,
-0.004211707,
-0.0017090586,
0.0041347304,
0.05729974,
0.03949987,
0.014970071,
0.043898523,
0.02058568,
0.04427974,
-0.022125207,
0.0006662121,
0.022916963,
0.035306495,
0.043194737,
0.010534765,
0.01807845,
0.00832811,
-0.039060008,
0.020219125,
0.0049008285,
0.0235621,
-0.0040870784,
0.01510203,
-0.01626034,
-0.021494733,
-0.004732214,
0.016011083,
0.00928115,
-0.058971226,
-0.0185623,
0.04246163,
-0.039323926,
-0.005890525,
0.01137784,
0.019779261,
-0.029236358,
0.06820839,
0.0016183364,
0.011062603,
0.014273617,
-0.027711492,
-0.015571219,
-0.016978787,
0.035306495,
-0.014339598,
-0.019471355,
-0.002868286,
-0.00081237557,
0.02579075,
0.042021766,
0.0041823825,
0.021641355,
0.02586406,
-0.010285509,
-0.0033338098,
0.00015842011,
0.031875547,
0.016113719,
0.017638585,
0.013731117,
0.030995818,
0.008899935,
0.035805006,
-0.026186626,
0.004713886,
0.031523656,
0.037359197,
-0.001633915,
-0.0097943265,
-0.026494533,
0.021348113,
-0.0028169684,
-0.0185623,
-0.00088477,
-0.013393888,
-0.0050437846,
0.00920784,
-0.0273596,
0.011289868,
-0.048561092,
0.013936388,
-0.0022744683,
-0.019178111,
-0.040555548,
-0.021524059,
0.026098654,
-0.0023312843,
-0.04624447,
-0.014280949,
-0.01178105,
0.028943114,
-0.016817503,
0.010138887,
0.057739604,
0.04334136,
-0.02363541,
-0.0014845442,
0.032198116,
-0.004120068,
-0.024881694,
-0.026289262,
-0.05823812,
-0.015395273,
-0.041230008,
-0.0006006906,
0.03108379,
-0.019720612,
-0.025042977,
-0.03243271,
0.037359197,
0.016157705,
0.0021608365,
0.03331244,
0.032608654,
-0.0009502916,
-0.021656018,
-0.008144833,
-0.04598055,
0.009376454,
-0.008826624,
-0.03351771,
0.026245276,
-0.02174399,
0.031552978,
-0.02024845,
0.01753595,
0.014647503,
-0.047505416,
-0.010549428,
-0.056977175,
-0.012250239,
0.015512571,
-0.009970272,
-0.0047212173,
0.014530205,
0.016832165,
-0.04360528,
0.06902947,
0.039910413,
-0.051874742,
0.011392502,
0.04334136,
0.038561493,
-0.05659596,
0.027403587,
0.039382577,
-0.03231541,
-0.021831963,
-0.023327505,
-0.03243271,
-0.018313045,
0.010637401,
-0.031787574,
-0.028767169,
0.041024737,
-0.012037638,
-0.0677392,
0.022858316,
-0.026802437,
0.017521286,
-0.012213583,
-0.030849196,
0.0040394263,
-0.0048971632,
0.035101224,
-0.022183856,
-0.0067445957,
-0.013489191,
0.01104061,
-0.00017972608,
-0.04064352,
0.0513469,
-0.01266811,
0.0137897665,
-0.012624124,
0.032579333,
-0.035365142,
0.039998386,
-0.038385548,
0.02722764,
-0.021978585,
0.039235953,
0.03677271,
0.032813925,
0.01779987,
-0.047534738,
0.037711088,
-0.015014057,
-0.006777586,
-0.006290069,
0.044778254,
0.0118103735,
0.018708922,
-0.012829394,
-0.029001763,
-0.011385171,
-0.004757873,
0.036479466,
-0.021494733,
0.019427368,
-0.027476897,
-0.0318169,
0.0026410224,
-0.017110746,
0.018914193,
0.038238928,
0.023591423,
0.042402983,
-0.039206628,
-0.023386152,
0.012477502,
0.010314833,
0.010520103,
-0.020761626,
0.031523656,
0.028400613,
0.041816495,
0.017272031,
-0.0065906434,
0.027946087,
-0.065393254,
0.006312062,
-0.024896357,
-0.019324733,
-0.023606086,
0.05900055,
0.016465612,
-0.0006854562,
-0.024133924,
0.03134771,
-0.031582303,
0.009574394,
0.0013012672,
-0.0015441093,
-0.05498312,
-0.02687575,
0.01787318,
0.0090099005,
0.019720612,
-0.0702611,
-0.012506827,
-0.01888487,
0.029251019,
0.036186222,
0.03562906,
0.014280949,
0.012206253,
0.005985829,
-0.007829596,
0.0058685318,
-0.028664533,
-0.05735839,
0.027711492,
0.029089736,
-0.021919936,
-0.033635005,
-0.034778655,
0.011671083,
0.008108177,
0.009325137,
-0.022227842,
-0.060232174,
0.023254193,
-0.079117045,
-0.005971167,
0.022403788,
-0.003944122,
-0.00032394222,
-0.0058795284,
-0.009376454,
-0.02106953,
-0.013401219,
0.016788179,
-0.020878922,
0.0077856095,
0.024060613,
-0.036039602,
-0.005446994,
0.0022268163,
0.07718164,
-0.039323926,
-0.021524059,
-0.0023056255,
0.038238928,
-0.011832368,
-0.010754698,
-0.037740413,
0.019955207,
0.0037186916,
-0.02492568,
0.008716657,
0.03087852,
-0.06721137,
-0.018723585,
-0.0038231595,
-0.029089736,
-0.026758451,
0.03791636,
0.018914193,
-0.020233788,
0.04029163,
0.0349546,
-0.021201491,
-0.027007708,
-0.056918524,
0.018254396,
0.028473925,
-0.009757671,
0.019178111,
-0.04562866,
0.057241093,
0.0017283027,
0.0018226904,
0.0014561362,
-0.07196191,
-0.034720007,
0.013445205,
-0.029368317,
0.05120028,
-0.040995415,
-0.03859082,
0.036186222,
-0.022286491,
0.03040933,
0.01598176,
-0.034778655,
-0.037945684,
0.051434875,
-0.0024174245,
0.010688718,
-0.025204262,
-0.020365747,
0.06369244,
-0.05683055,
-0.0026905073,
-0.022242505,
0.01592311,
0.075128935,
-0.014178313,
-0.04562866,
0.012484834,
-0.018503653,
0.022931626,
-0.0035445783,
-0.020189801,
0.01998453,
-0.021831963,
0.008628684,
0.060232174,
-0.014302942,
-0.056390688,
-0.005249055,
0.0016861489,
0.021142842,
0.033605684,
0.014273617,
-0.041728523,
-0.0070341737,
-0.051288255,
0.05879528,
-0.026362574,
0.028429938,
-0.031787574,
-0.02174399,
-0.013870408,
0.018386355,
0.04774001,
-0.024735073,
0.012140273,
-0.0090465555,
0.034309465,
-0.043429334,
0.008562705,
0.012946691,
-0.05295974,
-0.049792714,
0.03378163,
-0.04442636,
-0.010490779,
0.049939334,
0.0632819,
-0.014324935,
-0.008797299,
-0.02200791,
-0.035805006,
-0.038238928,
0.028884465,
-0.024045952,
0.020057842,
-0.036244873,
0.026230613,
-0.03730055,
0.02180264,
-0.03081987,
-0.0049191564,
0.031992845,
0.010468786,
0.020468382,
0.0142003065,
0.029089736,
-0.05090704,
0.025072303,
0.0339869,
0.0052930415,
0.03559974,
-0.00021111227,
-0.042021766,
-0.06140515,
0.034280144,
-0.028561898,
-0.0013480028,
-0.0027839786,
0.008291454,
0.06480677,
-0.036802035,
0.03894271,
0.06457218,
0.03718325,
-0.02038041,
-0.044514332,
-0.010336827,
0.005520305,
0.01841568,
0.002509063,
0.013056658,
-0.020937571,
-0.016421625,
-0.0109526375,
-0.027139667,
-0.012719428,
0.0009218836,
0.012954023,
-0.04976339,
0.034368116,
-0.033400413,
-0.037828386,
-0.025512166,
0.011517131,
-0.007573008,
0.021304125,
0.026626492,
0.0019317402,
-0.0017686237,
0.04759339,
-0.034837306,
0.018313045,
0.018049125,
0.025746763,
0.010454124,
-0.038209602,
0.044455685,
0.0007065331,
-0.019588653,
-0.0677392,
-0.025834735,
-0.002093024,
0.02004318,
0.0019885562,
0.0073567415,
-0.022946289,
-0.017917166,
-0.0012921033,
-0.0068838866,
0.029089736,
0.0058538695,
0.011978989,
-0.043048117,
-0.04618582,
-0.001709975,
0.033547033,
-0.032139465,
-0.026714465,
-0.03732987,
-0.011847029,
-0.034866627,
-0.026597168,
0.050291225,
0.0065796464,
-0.0056999167,
0.029426966,
-0.016905477,
0.008980576,
0.008518718,
0.029412303,
-0.034074873,
-0.02655318,
-0.06856029,
0.0098309815,
0.0041493927,
-0.033283114,
-0.0068985485,
0.023811355,
-0.014090341,
0.0056119435,
0.033752304,
-0.05114163,
-0.059850957,
-0.018166423,
-0.027066357,
-0.014280949,
0.042432304,
-0.015043382,
-0.0056302715,
-0.0041530584,
-0.0040064366,
-0.020761626,
-0.013437875,
0.038209602,
0.0058831936,
-0.018928856,
-0.07096488,
-0.025277572,
-0.05911785,
-0.011949665,
-0.040115684,
-0.011883684,
0.023327505,
-0.0014643838,
0.0024155916,
-0.01854764,
-0.008034866,
0.047446765,
0.005743903,
0.0030863858,
-0.023356829,
-0.020629667,
0.008819292,
-0.0014671329,
-0.03401622,
0.009904292,
0.033283114,
0.037359197,
0.05172812,
0.022535747,
-0.0060921297,
-0.01631899,
-0.021626694,
0.011759057,
-0.013973043,
-0.029822843,
0.021098856,
0.05078974,
-0.020952234,
-0.0009058469,
0.00081604114,
-0.020336423,
0.016084395,
0.001286605,
-0.018342368,
0.03730055,
0.03196352,
0.033810955,
0.020702977,
0.023811355,
0.0349546,
0.00127011,
-0.010043583,
0.022462437,
-0.03149433,
-0.014970071,
0.054836497,
0.044250414,
-0.04348798,
0.041875143,
-0.0052600517,
0.020746963,
-0.008863279,
0.007646319,
-0.038356222,
0.05140555,
0.056302715,
0.021963924,
-0.011341184,
-0.017902503,
-0.010190205,
0.0513469,
-0.06222623,
-0.014940746,
0.005743903,
-0.07800272,
-0.008320779,
-0.025526829,
-0.057329066,
0.0017557943,
-0.015292638,
0.00080092077,
-0.025233585,
-0.0025145614,
0.023268856,
0.034192167,
-0.013481861,
-0.019178111,
0.019148787,
-0.033429738,
-0.01895818,
-0.018049125,
-0.022183856,
0.058032848,
0.023136897,
-0.023957977,
-0.05043785,
-0.005296707,
-0.022667708,
-0.00006260057,
0.007888244,
0.0084674,
-0.038884062,
0.006216758,
-0.02174399,
-0.00044788333,
-0.040526222,
0.033547033,
0.0021131847,
-0.005681589,
0.018694261,
0.009493751,
0.00480919,
-0.016172368,
0.0067629237,
0.0060921297,
0.04794528,
-0.010175543,
0.03589298,
-0.003084553,
-0.046772305,
0.011597772,
0.07354542,
0.03284325,
0.04999798,
0.04897163,
-0.03128906,
-0.015219327,
-0.014522875,
0.025746763,
-0.043429334,
0.013599158,
-0.030350681,
-0.015717842,
-0.014757469,
-0.02640656,
-0.0012618626,
-0.017374666,
-0.015893787,
-0.019412706,
-0.01916345,
0.023723383,
-0.004952146,
0.002739992,
-0.0024412505,
-0.032550007,
0.042490955,
0.017623922,
0.0056779236,
0.009501083,
0.016788179,
0.05125893,
-0.0071954574,
0.020702977,
-0.0048201866,
0.02979352,
-0.06398569,
0.018445004,
0.019867234,
0.015629867,
-0.048678387,
-0.02911906,
-0.015453922,
0.0072577717,
-0.0011381506,
-0.011084597,
0.018914193,
-0.015351287,
0.023078248,
-0.051904064,
0.012374868,
-0.07624326,
-0.02275568,
0.046830956,
0.013701794,
-0.009823651,
0.030292032,
0.0124261845,
0.031787574,
0.03175825,
0.036127575,
0.014801456,
0.05093636,
0.05240258,
0.0063817073,
-0.017257368,
0.0047908626,
-0.011539124,
0.011473144,
0.033283114,
0.033722978,
-0.008775306,
-0.017110746,
-0.0007120314,
0.02864987,
0.0021480073,
0.030731898,
0.009603718,
-0.004321673,
-0.03961717,
-0.027388925,
-0.045687307,
0.088794075,
0.034221493,
0.018738247,
0.016890815,
-0.027579533,
-0.017858516,
-0.00008190194,
-0.018928856,
0.039441224,
0.026846424,
-0.028488588,
0.0037425177,
-0.03542379,
0.01414899,
0.019530004,
-0.030438654,
-0.013327908,
0.046009876,
0.038620144,
0.08662407,
0.018650275,
0.018679598,
-0.023195544,
0.015805814,
0.04152325,
-0.0017191388,
0.016817503,
0.011627097,
-0.03791636,
-0.0039294604,
-0.006561319,
0.013672469,
-0.018430341,
-0.017257368,
0.017931828,
-0.004068751,
-0.0013681633,
-0.021978585,
-0.0339869,
0.047769334,
-0.034837306,
0.022711694,
-0.028635208,
-0.045892578,
-0.042490955,
0.027256966,
-0.02620129,
-0.0073384135,
0.002325786,
-0.038414873,
-0.0020746964,
-0.05295974,
0.2545352,
0.020351086,
0.012543482,
-0.022990275,
0.025116289,
0.033136494,
-0.007254106,
-0.0316996,
0.007638988,
-0.057592984,
-0.023195544,
-0.04999798,
-0.03087852,
0.053487577,
-0.014676827,
0.031552978,
-0.0656865,
-0.018664936,
-0.0031926865,
0.010241522,
-0.010087569,
0.025658788,
0.03425082,
0.039060008,
-0.05234393,
-0.014838111,
-0.041816495,
-0.06463082,
-0.00429968,
-0.031728927,
0.044543657,
-0.015717842,
0.010593414,
-0.054132715,
0.014911422,
0.027168991,
0.014596186,
0.0013681633,
-0.03914798,
-0.019104801,
0.011172569,
-0.00010332245,
0.0013452537,
0.023650073,
0.0029507608,
0.025204262,
-0.03020406,
0.03548244,
0.07084758,
-0.053340957,
0.06650758,
-0.039294604,
0.013738449,
0.017037436,
-0.022667708,
0.044602305,
-0.052989066,
-0.04659636,
-0.017623922,
0.061346497,
0.026098654,
-0.019955207,
-0.0014433069,
0.059645686,
0.029749533,
0.02756487,
-0.025570815,
0.015820475,
-0.008833954,
-0.028356627,
0.0058025518,
-0.013100645,
-0.022770341,
-0.066800825,
0.04210974,
0.03304852,
0.045218118,
0.0032146797,
0.029485613,
-0.0141636515,
-0.010542097,
-0.0029635902,
-0.025512166,
-0.008775306,
-0.010248854,
-0.022711694,
-0.05627339,
0.019119464,
0.031259734,
-0.018503653,
0.004083413,
0.07313488,
-0.013987705,
0.021098856,
0.01929541
] | CUDA_VISIBLE_DEVICES= python trainer-program.py
As with any environment variable, they can be exported instead of being added to the command line. However, this is not recommended because it can be confusing if you forget how the environment variable was setup and you end up using the wrong GPUs. Instead, it is common practice to set the environment variable for a specific training run on the same command line. |
[
-0.011468309,
0.0040760064,
-0.013780468,
0.0055789095,
-0.021945693,
-0.023782209,
0.024786346,
-0.0020115785,
0.008270923,
0.077688545,
0.011686313,
0.00570773,
0.01746671,
-0.05950837,
-0.029172841,
0.017374225,
0.012716875,
-0.027534513,
-0.062996425,
0.009631794,
0.015973717,
0.025103442,
-0.07652586,
0.010232955,
-0.009704462,
0.020280939,
0.00645753,
-0.0107019935,
0.062573634,
0.03752304,
-0.026953168,
-0.046745252,
0.011085152,
-0.010893572,
-0.015392373,
-0.01898613,
0.0078018853,
0.015630195,
-0.021800358,
-0.045873236,
0.034669176,
-0.012049652,
0.03628108,
-0.021258652,
-0.02638504,
-0.049414143,
0.003395571,
-0.020756582,
0.028406527,
-0.068069965,
-0.003917458,
0.021007618,
0.03831578,
0.00977713,
-0.0073592723,
-0.018193388,
0.013291611,
-0.0032799628,
0.012664026,
0.0028373494,
0.01796878,
0.017730957,
-0.011514552,
-0.05702445,
0.053589243,
0.03498627,
-0.005519454,
-0.051395994,
-0.040482603,
0.036148958,
-0.024482463,
0.029754184,
0.0107878735,
-0.03086402,
-0.032132406,
-0.010292411,
0.006606169,
0.004888565,
0.005945552,
-0.0022279304,
0.033876434,
0.021324713,
-0.01331143,
0.0002939745,
-0.058557082,
-0.022460975,
0.0163833,
-0.010213137,
0.036386777,
-0.0062031928,
-0.02181357,
0.028010156,
0.04307222,
0.0015268507,
-0.016436148,
0.019659959,
0.0047597447,
0.05295505,
0.047115196,
-0.008132194,
0.02362366,
0.07023679,
-0.032290954,
0.011825042,
-0.042015236,
0.013542647,
0.0029793822,
-0.0019868053,
-0.014824243,
-0.01888043,
0.062996425,
0.016687183,
-0.034114257,
0.005433574,
-0.010959635,
0.06014256,
-0.015101702,
0.04774939,
-0.055914614,
0.010999272,
0.043547865,
-0.027851608,
0.011831649,
-0.008257711,
-0.029093567,
-0.026147217,
-0.007953827,
0.01158722,
-0.022844132,
0.0016292464,
-0.008046314,
-0.006804354,
-0.0011866331,
0.010193318,
0.0023039014,
0.0047498355,
-0.040852547,
0.0233462,
0.010992665,
-0.0052618133,
0.009109907,
-0.015379162,
-0.0049744453,
0.09216927,
-0.013080214,
0.033559337,
0.04064115,
0.0038348811,
-0.022064604,
0.041169643,
-0.03324224,
-0.0031346271,
0.003228765,
0.018351937,
-0.0056218496,
0.039319918,
0.0011626857,
0.0031808703,
0.008383228,
0.04560899,
0.032026708,
0.01593408,
0.020109178,
0.008839054,
0.0010685478,
0.08059526,
-0.010543445,
-0.020056328,
-0.022963043,
-0.028961444,
0.058821328,
-0.0047135013,
0.0045681656,
0.014877092,
0.022949832,
0.045371167,
-0.005869581,
0.037655164,
0.0407997,
0.033374365,
-0.038791426,
0.022038179,
-0.001818348,
0.019977055,
0.006761414,
0.043257196,
-0.009638401,
-0.026596436,
-0.02560551,
0.013086821,
-0.008264317,
0.01644936,
0.010596295,
0.054012038,
-0.011877892,
-0.0075442446,
-0.0006779581,
0.022672372,
0.014110777,
-0.061305247,
-0.032423075,
0.03593756,
-0.020386636,
0.015696257,
-0.037390918,
-0.00022481619,
-0.03881785,
0.0509732,
-0.037443765,
-0.0033542824,
0.04386496,
-0.008092557,
-0.041116796,
-0.043310042,
0.07467613,
0.0010024861,
-0.010299018,
0.0042180386,
-0.025077017,
0.0061206156,
0.051448844,
0.0067845355,
0.037549462,
0.04386496,
-0.045926087,
-0.023332989,
0.045635413,
0.051131748,
-0.00028963923,
0.02565836,
0.03091687,
0.06622024,
0.013344461,
0.03374431,
0.015907655,
0.011270124,
0.018457636,
0.0042180386,
-0.058292836,
0.019818507,
-0.0036168774,
0.015022428,
-0.01184486,
-0.006777929,
0.017374225,
-0.011223881,
0.036386777,
0.017427074,
-0.016436148,
0.0345899,
0.010695388,
0.0061140093,
-0.02351796,
0.004756442,
-0.017281737,
-0.05522757,
-0.024363551,
0.017823443,
-0.041381042,
-0.05126387,
-0.0056780023,
0.0028885473,
-0.018246239,
-0.048013635,
0.04555614,
0.060512505,
-0.023610448,
-0.00570773,
0.016436148,
0.012908454,
-0.040958248,
-0.03395571,
-0.047115196,
-0.0020792917,
-0.06579744,
-0.0066458057,
0.04539759,
-0.020954767,
-0.020650884,
-0.028036581,
0.024812771,
0.0028489104,
0.007161087,
0.058081437,
0.045476865,
-0.017757382,
-0.0264511,
0.018774731,
-0.052849352,
0.03385001,
-0.04024478,
-0.012611177,
0.032475926,
-0.03633393,
0.021747507,
-0.039584164,
-0.0006630942,
-0.013397311,
-0.032185256,
-0.05469908,
-0.102844834,
-0.013859742,
-0.025010955,
-0.01305379,
0.009374154,
0.016475786,
0.035276942,
-0.021721084,
0.053589243,
0.02317444,
-0.051343143,
0.030256253,
0.032423075,
0.024773134,
-0.020862281,
0.038527176,
0.0050603254,
-0.026596436,
-0.03723237,
0.00044096177,
-0.010530233,
-0.030150555,
0.014044715,
-0.06437051,
-0.02719099,
0.04457843,
0.0018513788,
-0.03628108,
0.041566014,
-0.00036230707,
-0.026345402,
0.028776472,
-0.04973124,
0.018153751,
-0.005321269,
0.027032442,
-0.009209,
-0.016475786,
-0.027323114,
0.0056780023,
0.007392303,
-0.023676509,
0.039478466,
0.001915789,
-0.012446023,
-0.023557598,
0.06991969,
-0.06801712,
0.04040333,
-0.035514764,
-0.039187793,
-0.01610584,
0.013265187,
0.016422937,
0.022236364,
0.0305205,
-0.054910477,
0.017585622,
-0.03910852,
0.012505477,
0.040086232,
0.042675853,
-0.008515351,
0.020888707,
0.043362893,
-0.02922569,
0.0063650436,
0.01662112,
0.042147357,
-0.003593756,
0.009281667,
-0.022328852,
-0.021602172,
0.0024574948,
-0.008581413,
0.0025450266,
0.017955568,
0.0023600538,
0.061358098,
-0.03385001,
-0.0405883,
0.013714407,
0.04143389,
-0.0060446444,
-0.0048324126,
0.03905567,
-0.00875978,
0.04510692,
-0.04217378,
-0.019091828,
0.04769654,
-0.047088772,
-0.007980252,
-0.0011924135,
-0.029622061,
-0.023332989,
0.035514764,
0.011329579,
0.025803696,
0.01610584,
0.063947715,
-0.024641009,
0.0049579297,
0.031973857,
0.009658219,
-0.06030111,
-0.021483261,
0.03200028,
0.03910852,
0.0060941908,
-0.06109385,
-0.03091687,
-0.06352492,
0.040694002,
-0.0016143825,
0.037892986,
-0.017836656,
0.029939158,
0.014216475,
0.023148015,
0.006450924,
-0.006923265,
-0.04238518,
0.011778799,
0.029463513,
-0.041856688,
-0.0041255523,
-0.047881514,
0.021034041,
0.067805715,
-0.02390112,
-0.043997087,
-0.037628736,
-0.0002369963,
-0.053959187,
0.034246378,
0.031947434,
0.0024129031,
-0.008264317,
0.00881263,
-0.01548486,
-0.028644348,
-0.0007378265,
0.018206602,
-0.015128126,
-0.0063121943,
0.020373425,
-0.026041517,
0.027058868,
0.0055656973,
0.048859224,
-0.05062968,
-0.00041598218,
-0.018034842,
0.036836,
0.008640869,
-0.0037423947,
-0.017308163,
0.009268455,
-0.03358576,
-0.0037721223,
-0.031154692,
-0.0013410522,
-0.034404926,
-0.014005078,
0.050735377,
-0.0062659513,
-0.012267656,
0.06341922,
0.028829321,
-0.030890446,
0.04973124,
0.038976397,
-0.013687982,
-0.011805224,
-0.025790483,
0.038025107,
0.0005326224,
-0.025856545,
-0.0014335386,
-0.018325513,
0.0811766,
0.005724245,
0.0018067872,
0.015141339,
-0.040905397,
-0.01141546,
0.026120791,
-0.06373632,
0.042992946,
-0.04978409,
-0.05012761,
0.00038233201,
-0.035409067,
0.02029415,
0.003597059,
-0.068069965,
0.01150134,
0.017981991,
0.030441226,
0.0072073303,
0.002147005,
-0.014665695,
0.09090088,
-0.047273744,
-0.019871356,
-0.027138142,
0.008019889,
0.018497273,
-0.041777413,
-0.055016175,
-0.009929072,
0.019448562,
-0.00805292,
0.004142068,
-0.026028305,
0.012697057,
-0.01893328,
-0.037628736,
0.061569493,
-0.015775532,
-0.06606169,
-0.022196727,
-0.00057597534,
-0.0050272946,
0.03007128,
-0.018153751,
-0.025539448,
-0.008554989,
-0.06954975,
0.05028616,
-0.031603914,
0.022659158,
-0.013754044,
-0.062467933,
-0.00839644,
-0.0025235566,
0.019474985,
-0.053483542,
0.004726714,
-0.04109037,
0.01848406,
-0.03821008,
-0.008548383,
-0.018801156,
-0.024852408,
-0.01915789,
0.049546268,
-0.017849868,
0.008099163,
0.039531313,
0.03921422,
0.013040577,
-0.0034153892,
-0.026200065,
-0.025010955,
-0.024799557,
0.020730158,
-0.023332989,
-0.0051825396,
-0.056654505,
0.039980534,
-0.04521262,
0.0073460597,
-0.033717886,
0.021655021,
-0.015801957,
-0.021958906,
0.027481662,
0.0063188006,
0.015405586,
0.003960398,
0.008905116,
0.06109385,
-0.017123189,
0.04362714,
-0.0057275486,
-0.031603914,
-0.042543728,
0.045873236,
-0.038500752,
0.004726714,
-0.008356804,
-0.024006817,
0.048172183,
-0.009909254,
0.041909534,
0.04827788,
0.022315638,
0.0036532113,
-0.040852547,
-0.010147075,
0.021522898,
-0.014929942,
-0.005469908,
-0.00641459,
-0.045371167,
-0.029119993,
-0.016687183,
-0.028591499,
-0.007867947,
0.029542787,
0.027560936,
-0.022645947,
0.00153676,
-0.061305247,
-0.034510627,
0.0008030624,
0.0065103793,
-0.030546924,
0.0244164,
0.054091312,
-0.023610448,
-0.017876294,
0.066431634,
-0.039478466,
0.0018051356,
-0.021047253,
0.047828663,
0.00791419,
-0.03136609,
0.04005981,
-0.020994404,
-0.010715206,
-0.048119333,
-0.035673313,
0.012611177,
-0.022579886,
0.00800007,
0.033004418,
-0.0031048993,
-0.00044715506,
0.01610584,
0.0071478747,
0.016713608,
-0.0015425404,
-0.002006624,
-0.0079868585,
-0.036201805,
0.035911135,
0.04740587,
0.012274262,
-0.020598035,
-0.029833458,
-0.008350197,
-0.0029595636,
0.0068968404,
0.06685443,
-0.017889505,
0.0026457706,
0.008290742,
0.027587362,
0.011679706,
-0.015326312,
0.020545185,
-0.036043257,
-0.02458816,
-0.044789825,
-0.03374431,
0.04600536,
-0.023544386,
-0.025050592,
0.015167763,
0.0043732836,
0.037443765,
0.055703215,
-0.059719767,
-0.030890446,
-0.0056879115,
-0.048700675,
-0.031973857,
0.0121025015,
-0.051105324,
-0.003719273,
-0.028221553,
0.006962902,
-0.03736449,
0.009704462,
-0.015128126,
0.0019240467,
-0.062256537,
-0.015854806,
-0.03126039,
-0.059138425,
-0.037998684,
-0.017493134,
0.0032188557,
0.025222354,
-0.004013248,
-0.0073790904,
-0.003557422,
-0.0041585835,
0.033770736,
0.009526095,
-0.021007618,
-0.029912733,
-0.05612601,
-0.009737493,
-0.0076697622,
-0.03995411,
0.040429752,
0.027825184,
0.008911721,
0.052637953,
0.027798759,
0.0067448984,
-0.01486388,
-0.01751956,
0.029754184,
-0.01203644,
-0.055597518,
-0.021047253,
0.030679049,
-0.037126668,
0.03583186,
0.0020462607,
-0.033929285,
-0.023702934,
-0.0047465325,
-0.018774731,
0.028855745,
0.03559404,
0.041803837,
0.031683184,
0.04130177,
0.019316439,
-0.019171102,
-0.0055392724,
0.039742712,
-0.03464275,
-0.013793681,
0.01825945,
0.04957269,
-0.025856545,
0.0031610518,
-0.020505548,
-0.01791593,
-0.04397066,
-0.011322973,
-0.018048054,
0.07076528,
0.029463513,
0.038500752,
0.0013460069,
-0.018114114,
-0.045001224,
0.033083692,
-0.035858285,
0.0051561147,
0.023465112,
-0.03215883,
-0.022302426,
-0.041248918,
-0.043706413,
0.0025483295,
0.01319252,
0.030309103,
-0.011930741,
0.052637953,
0.050391857,
0.0568659,
-0.03723237,
0.011626857,
0.022276001,
0.031921007,
-0.027798759,
-0.0062659513,
-0.00053509965,
0.028168704,
-0.004538438,
-0.010398109,
-0.04957269,
-0.0053509967,
-0.0013088472,
0.013780468,
-0.024812771,
0.0025863152,
-0.009129725,
0.059032723,
-0.052690804,
-0.010285805,
-0.048198607,
0.047300167,
0.03453705,
-0.005014082,
-0.004389799,
0.036836,
0.044446304,
-0.05226801,
0.07023679,
0.015986929,
0.03271375,
-0.0012427855,
0.036941696,
-0.005288238,
-0.00055987283,
0.008739961,
0.031233966,
0.0001863146,
0.056654505,
0.04436703,
-0.018695459,
0.009512884,
-0.027375964,
-0.0025912698,
-0.020954767,
-0.010180106,
-0.0038546994,
0.000016837988,
-0.031101843,
-0.00946664,
-0.023861483,
-0.028247979,
-0.03984841,
-0.0013592192,
-0.019858144,
0.008667294,
-0.032977995,
0.0154716475,
-0.014599633,
0.0060842815,
0.018999342,
-0.009420397,
-0.024165366,
-0.0050636283,
-0.0017258616,
0.046031784,
0.024350338,
0.03847433,
0.0111842435,
0.062573634,
-0.027719485,
0.010543445,
0.017162826,
-0.001212232,
-0.034457777,
-0.0029265329,
-0.016977854,
0.0365189,
-0.0042841006,
-0.04640173,
0.022064604,
-0.03012413,
0.00063088915,
-0.0407997,
-0.013899379,
-0.05797574,
-0.010886966,
0.044816248,
0.0055690003,
-0.0038117594,
0.013146276,
0.005635062,
0.033559337,
0.026583223,
0.013952228,
-0.019527836,
0.071240924,
0.037153095,
0.028591499,
0.0027679848,
0.047855087,
-0.03493342,
-0.004029763,
0.034034982,
0.0038216687,
-0.019369287,
0.019620322,
0.025592297,
0.012353536,
-0.0052287825,
-0.026966382,
-0.014031502,
-0.013780468,
-0.02526199,
-0.041275345,
-0.00969125,
0.07081813,
0.012201594,
0.014903517,
-0.009393972,
-0.034457777,
-0.0047960784,
-0.0073328475,
-0.04383854,
0.01195056,
0.0193825,
0.008726749,
-0.03797226,
-0.039821986,
-0.032079555,
0.00081421033,
-0.018404787,
-0.028010156,
0.040112656,
0.04957269,
0.03968986,
0.026345402,
0.037496615,
-0.01198359,
0.01181183,
0.05528042,
0.016198326,
0.008680506,
0.050603252,
0.0011981939,
-0.03260805,
0.01960711,
-0.015960503,
-0.01345016,
0.04153959,
0.0019884568,
-0.025552662,
-0.0035739373,
-0.035699736,
-0.022870557,
0.061305247,
-0.012287474,
0.0079868585,
-0.024323914,
-0.015062065,
-0.044446304,
-0.0021486564,
-0.05398561,
-0.019461773,
0.008317167,
0.0068241726,
-0.010583082,
-0.026913531,
0.19818507,
0.03400856,
0.0233462,
0.0076433374,
0.005833247,
0.05062968,
-0.015022428,
-0.016198326,
0.01367477,
-0.08503461,
0.015114915,
-0.033876434,
-0.04119607,
0.046243183,
-0.02764021,
0.051898062,
-0.06389487,
0.0052651167,
0.028010156,
-0.01526025,
-0.021219015,
-0.023491537,
0.013152882,
-0.00033423086,
-0.051607393,
0.040535454,
-0.01237996,
-0.053377844,
-0.007537639,
-0.049097046,
0.029304964,
-0.03702097,
0.035541188,
-0.037602313,
-0.00023658342,
0.040561877,
0.027851608,
-0.014031502,
-0.004660652,
-0.006332013,
0.003600362,
0.0036102713,
-0.00063832104,
0.010391504,
-0.013417129,
0.018906856,
-0.027666636,
0.03136609,
0.0447634,
-0.04193596,
0.09079518,
-0.038342204,
0.012439416,
0.02972776,
-0.06320783,
0.059825465,
-0.03324224,
-0.016568271,
-0.0026474223,
0.027508087,
0.035012696,
-0.015326312,
-0.0007444327,
-0.017585622,
0.04148674,
0.013569071,
0.0042147357,
-0.011792012,
0.0063353158,
-0.014877092,
0.023148015,
-0.016938217,
-0.030837595,
-0.023359412,
0.033004418,
0.046771675,
0.0012634298,
-0.031286817,
0.010345261,
0.0047168047,
-0.027560936,
-0.0008744916,
-0.016991066,
-0.010391504,
0.0023171138,
0.014388236,
-0.06754147,
-0.012241231,
0.024680646,
-0.014414661,
-0.015775532,
0.03770801,
-0.03747019,
0.008270923,
0.0033988738
] | CUDA_DEVICE_ORDER is an alternative environment variable you can use to control how the GPUs are ordered. You can either order them by:
PCIe bus ID's that matches the order of nvidia-smi and rocm-smi for NVIDIA and AMD GPUs respectively
export CUDA_DEVICE_ORDER=PCI_BUS_ID
GPU compute ability |
[
-0.010005094,
0.019250995,
-0.010838852,
0.02627354,
-0.03080159,
-0.04842574,
0.02178616,
-0.01881717,
0.01579395,
0.071852304,
0.01437046,
0.023277434,
0.04894091,
-0.047503863,
-0.031072732,
0.018057974,
0.0048669768,
-0.025582131,
-0.08627699,
0.0043145274,
0.017068312,
0.022965623,
-0.062362377,
-0.0009862746,
-0.017502137,
0.03763434,
-0.00984241,
-0.019142538,
0.060627073,
0.04443997,
-0.027900385,
-0.02151502,
0.018234216,
-0.00055795687,
-0.010791402,
-0.013699387,
0.01519744,
0.012533482,
-0.043870576,
-0.0520048,
0.018749384,
-0.00810033,
0.04118628,
-0.0033672294,
-0.044819567,
-0.037797023,
-0.0060023787,
-0.017990189,
0.014329789,
-0.08047458,
-0.0017005609,
0.023046965,
0.007212344,
0.034950044,
-0.009225564,
0.0023775655,
-0.0042772456,
-0.0048737554,
0.0028080016,
0.0098288525,
0.040806685,
0.014804286,
-0.016986968,
-0.07364183,
0.04595836,
0.023290992,
-0.0030740583,
-0.036007494,
-0.039613664,
0.019061195,
-0.032835145,
0.020349113,
0.020335557,
-0.027629243,
-0.043545205,
-0.009069659,
0.011957307,
0.012743616,
-0.0047619096,
-0.011008315,
0.05075755,
0.011476032,
-0.019806832,
-0.019739047,
-0.056126136,
-0.024863608,
-0.0009710229,
-0.04476534,
0.011164221,
-0.03579058,
-0.015007641,
0.034868702,
0.012397911,
0.028090183,
-0.025880385,
0.015116097,
0.0012641938,
0.024511125,
0.046663325,
-0.025568575,
0.039478093,
0.08427055,
-0.036956485,
0.015766835,
-0.041484535,
-0.0044738227,
-0.0047619096,
-0.021311663,
0.008296907,
-0.014478916,
0.05479755,
0.022721596,
-0.015915962,
0.0025063574,
-0.009618718,
0.03180481,
-0.019698376,
0.028605351,
-0.047124263,
0.032292865,
0.027493672,
-0.029961053,
0.0048737554,
-0.026720922,
-0.0056126136,
-0.014912742,
0.006507378,
0.026666693,
-0.009035766,
0.0026402331,
0.001361635,
-0.016417572,
-0.021867502,
0.034678902,
-0.011116771,
0.028957833,
-0.032347094,
0.034678902,
0.015360124,
-0.010967644,
0.015007641,
0.010940529,
0.008500263,
0.09180826,
-0.0056634527,
0.016566701,
-0.012099656,
0.00049610285,
-0.024511125,
0.04056266,
-0.038854472,
0.019847503,
-0.00018693885,
0.02261314,
-0.035627898,
-0.0037688566,
-0.029310316,
0.018844282,
-0.009218786,
0.05108292,
0.024226427,
0.039667893,
0.001913237,
0.012065764,
0.023589246,
0.10894436,
-0.020471128,
-0.022586025,
-0.013557038,
-0.051245604,
0.017651264,
-0.00016014252,
0.018871397,
0.0091984505,
0.00017136944,
0.06382654,
0.0119166365,
0.0333232,
0.025229648,
0.03733608,
-0.018505357,
-0.0030316927,
0.046609096,
0.013468917,
-0.0006867487,
0.01620066,
0.0019115424,
-0.010052544,
-0.0025673641,
0.048263054,
-0.029445887,
0.01926455,
0.00398238,
0.062633514,
-0.021975959,
-0.040155947,
-0.03359434,
0.009740732,
0.0296628,
-0.075810954,
-0.017881732,
0.05474332,
0.008527377,
0.02142012,
-0.020755826,
-0.033241857,
-0.032943603,
0.031560786,
-0.024755152,
-0.0050364397,
0.017285224,
-0.014546702,
-0.02142012,
-0.020972738,
0.06469419,
0.014844957,
0.009306907,
-0.0051516746,
-0.00028596877,
0.018830726,
0.06306734,
0.01277073,
0.04820883,
0.018790055,
-0.04297581,
-0.011462476,
0.0050872783,
0.049781445,
0.0038705345,
0.03386548,
0.04170145,
0.045578763,
0.012933414,
0.030340651,
0.0047449633,
-0.012058985,
0.009354357,
0.002192851,
-0.043518092,
0.00048635874,
-0.010330463,
0.010581268,
0.023684146,
-0.0067988546,
0.018098645,
0.0047381846,
0.016119318,
0.032292865,
-0.013150327,
0.015875291,
0.029418772,
0.0049584867,
-0.009517041,
0.008866303,
-0.020294886,
-0.026585352,
0.011218449,
0.008818854,
-0.039695006,
-0.05121849,
-0.02448401,
0.032238636,
-0.032374207,
-0.047612317,
0.06811056,
0.06252506,
-0.01423489,
-0.009408585,
0.032347094,
-0.0061040563,
-0.0168514,
-0.033973936,
-0.05102869,
-0.032699578,
-0.04720561,
-0.0042230175,
0.019549249,
-0.010032209,
-0.042867355,
-0.026300654,
0.011638717,
0.00553805,
0.0015319453,
0.08920531,
0.037769906,
-0.0093950275,
-0.036088835,
0.0019928846,
-0.06941204,
0.01963059,
-0.03438065,
-0.007910532,
0.01583462,
-0.028496893,
0.01716321,
-0.02265381,
0.036820915,
-0.0035485546,
-0.02827998,
-0.027019177,
-0.05693956,
-0.027981726,
-0.0013904438,
-0.023914615,
0.0013633296,
0.009937309,
0.032564007,
-0.025717702,
0.057102244,
0.051733658,
-0.04357232,
0.020430457,
0.034868702,
0.016105762,
-0.036034606,
0.05254708,
-0.0025690587,
-0.041538764,
-0.015590594,
-0.022219986,
-0.020335557,
-0.020823611,
0.0005151674,
-0.07657015,
-0.001345536,
0.04701581,
-0.014451803,
-0.048046142,
0.036007494,
-0.020620255,
-0.042758897,
0.038095277,
-0.03541098,
0.022965623,
-0.003985769,
0.050594866,
-0.03345877,
-0.032347094,
-0.03478736,
-0.00037557233,
-0.0038298632,
-0.03663112,
0.037010714,
0.016241333,
-0.014899185,
-0.029147632,
0.06794787,
-0.03945098,
0.026558237,
-0.01775972,
0.0029215417,
0.005731238,
0.03085582,
0.023995958,
0.012797844,
0.016458245,
-0.06073553,
0.024145085,
0.0010362661,
0.015007641,
0.039478093,
0.030693134,
-0.01373328,
0.03240132,
-0.0029961055,
0.0031638737,
0.00786986,
0.03936964,
0.026734479,
-0.024592467,
0.031154074,
-0.009510262,
-0.029228974,
0.0013057123,
-0.006988653,
0.004782245,
0.028822264,
-0.009164558,
0.053197816,
-0.025487231,
-0.035682123,
0.014682272,
0.030584678,
-0.024104415,
-0.004063722,
0.012784287,
0.007442814,
0.03977635,
-0.022314884,
-0.00956449,
0.048371512,
-0.056885332,
0.0032553838,
0.010920194,
-0.019901732,
-0.017149653,
0.02887649,
0.021067638,
0.0011955613,
-0.008757846,
0.048507083,
-0.027602129,
-0.009686504,
0.02503985,
-0.019481463,
-0.058132578,
-0.029608572,
0.03438065,
0.034950044,
0.020728711,
-0.04010172,
-0.024063742,
-0.05360453,
0.014275561,
0.032211524,
0.024524681,
-0.03386548,
0.01780039,
0.0277377,
0.021487905,
0.0074902633,
-0.00860194,
-0.039478093,
0.028903605,
0.03619729,
-0.030964276,
-0.01386885,
-0.04243353,
0.0029130685,
0.052248824,
-0.018708713,
-0.040020376,
-0.031560786,
0.011448919,
-0.042948697,
0.02640911,
0.016905626,
0.017597035,
0.0033570617,
0.0011633633,
-0.013238448,
-0.020444013,
-0.03470602,
0.003446877,
-0.017339451,
0.004023051,
0.00034316254,
-0.03955944,
0.02352146,
0.0062633515,
0.058078352,
-0.02640911,
0.0120115355,
-0.02160992,
0.055855,
-0.0116726095,
0.0031028672,
-0.006615835,
0.012940193,
-0.0030960885,
-0.019074753,
-0.043626547,
0.0041687894,
-0.037281856,
-0.03831219,
0.029635685,
-0.008405363,
-0.024185756,
0.04335541,
0.018342672,
-0.038664673,
0.052248824,
0.060843986,
-0.002475854,
-0.0005244879,
-0.00014573816,
0.036739573,
-0.003826474,
-0.0137603935,
0.021474348,
-0.0313981,
0.079064645,
0.00021066367,
-0.01693274,
-0.007652948,
-0.036115948,
-0.024023071,
0.026585352,
-0.037146285,
0.04343675,
-0.03240132,
-0.037363198,
-0.0034841588,
-0.03264535,
0.018613813,
-0.009944088,
-0.07467216,
0.016037976,
0.029228974,
0.0041416753,
-0.013123213,
-0.020728711,
-0.0025436392,
0.08172183,
-0.06366385,
-0.0043687555,
-0.013055428,
-0.0027791928,
0.020769382,
-0.0296628,
-0.057210702,
0.0009252679,
0.026558237,
-0.0019962739,
0.01931878,
-0.017434351,
0.02444334,
-0.01162516,
-0.038827356,
0.065887205,
-0.03560078,
-0.052113254,
-0.019373007,
0.009259457,
-0.005710902,
0.04170145,
-0.011787845,
-0.030286424,
-0.014533144,
-0.079715386,
0.07168962,
-0.016485358,
0.027954612,
-0.030421993,
-0.043762118,
-0.0059481505,
0.015319453,
0.029635685,
-0.04888668,
0.023968844,
-0.035004273,
0.024863608,
-0.05002547,
-0.0004314951,
-0.01437046,
-0.04031863,
-0.031750582,
0.03470602,
-0.009212008,
0.016010862,
0.03199461,
0.050323725,
0.024090856,
0.0015217775,
-0.03532964,
-0.0337028,
0.0033757025,
0.046554867,
-0.014614487,
-0.011109993,
-0.0535503,
0.047070038,
-0.037797023,
0.04715138,
-0.039098497,
-0.0028707029,
-0.012180999,
-0.0077614044,
0.02640911,
0.00055965147,
0.0148314,
-0.020105088,
0.026924277,
0.05281822,
-0.011062543,
0.014099319,
-0.00029232365,
-0.017569922,
-0.03923407,
0.043680776,
-0.02320965,
0.014682272,
-0.007246237,
-0.015671937,
0.0537401,
-0.0036773465,
0.040128835,
0.04357232,
0.0049279835,
-0.007469928,
-0.038556214,
-0.010716839,
0.029500116,
0.007375029,
-0.0030689745,
-0.010737174,
-0.025392333,
-0.032943603,
-0.04856131,
-0.07478062,
0.016268445,
0.02833421,
0.012919857,
-0.009347578,
0.0043314737,
-0.06729714,
-0.019345893,
-0.016363345,
0.013489253,
-0.040210176,
0.0057414058,
0.051733658,
-0.017407237,
-0.019210324,
0.06729714,
-0.04807326,
0.010811738,
0.010588047,
0.059922107,
0.016119318,
-0.040399972,
0.0443044,
-0.005344862,
-0.008405363,
-0.07364183,
-0.041809905,
0.0028046123,
0.0034943265,
0.005344862,
-0.0022708038,
0.0087646255,
-0.028686693,
0.004463655,
0.0063684187,
0.009530597,
-0.019034082,
0.00379936,
-0.022992736,
-0.042216618,
0.001913237,
0.02165059,
-0.000534232,
-0.019847503,
-0.010445698,
0.010533819,
-0.02251824,
0.010377913,
0.053306274,
0.01313677,
-0.012797844,
-0.002416542,
0.0058566406,
0.022680925,
-0.0040298295,
0.0028232532,
-0.03039488,
-0.035302527,
-0.04788346,
-0.019061195,
0.050459296,
-0.03955944,
-0.015970191,
0.0059617073,
-0.004361977,
0.046392184,
0.027127633,
-0.04682601,
-0.038854472,
-0.016770056,
-0.030421993,
-0.010106772,
0.0315879,
-0.014790729,
-0.0068327473,
-0.0022775824,
0.027195418,
-0.028415551,
0.023060521,
0.0040535545,
0.0037925814,
-0.07206921,
-0.018586699,
-0.029581457,
-0.06615835,
-0.047124263,
-0.023290992,
-0.00024296754,
0.037173398,
0.01835623,
-0.005094057,
-0.0128859645,
0.037688565,
0.008818854,
0.0039213733,
-0.023792602,
-0.049862787,
-0.03367568,
-0.021135421,
-0.005822748,
-0.021352336,
0.046744667,
0.01423489,
-0.011062543,
0.04511782,
0.04105071,
-0.009089994,
-0.021162536,
-0.017542807,
0.040969368,
0.0058973115,
-0.05780721,
0.01185563,
0.025934614,
-0.047612317,
0.01881717,
-0.004077279,
-0.04696158,
-0.020498242,
0.009855967,
-0.0296628,
0.015848178,
0.032808032,
0.03213018,
0.00846637,
0.017651264,
0.017881732,
-0.036278635,
0.009137443,
0.04617527,
-0.026287097,
-0.0075580487,
0.030557564,
0.039966147,
-0.03020508,
0.025053406,
-0.005693956,
-0.014221333,
-0.024836494,
-0.009761067,
0.0032757192,
0.069737405,
0.033513,
0.008751068,
-0.015238111,
-0.029093403,
-0.032075953,
0.027330989,
-0.05634305,
-0.0109947575,
-0.0029791591,
-0.038013935,
-0.041213397,
-0.021881059,
-0.041403193,
0.00047534364,
0.003199461,
-0.0044467086,
-0.018112203,
0.034163736,
0.03478736,
0.029879712,
-0.00457889,
0.0029367933,
0.011875966,
0.02567703,
-0.011198114,
-0.0220573,
0.018749384,
0.03066602,
-0.013740058,
-0.0095848255,
-0.05693956,
-0.010174557,
0.027358104,
0.01102865,
0.0020810054,
0.012994421,
-0.016864955,
0.032075953,
-0.030991388,
-0.021840388,
-0.021379448,
0.011015094,
0.012153884,
0.012391133,
-0.0074224784,
0.026924277,
0.045632992,
-0.057210702,
0.066266805,
-0.0028232532,
0.03766145,
-0.02311475,
0.034028165,
0.011381133,
-0.0071987873,
-0.0028113907,
0.041077826,
-0.00965939,
0.06393499,
0.034950044,
-0.017068312,
0.00072699616,
-0.0031435383,
-0.012228448,
-0.028957833,
0.024619581,
0.023602804,
-0.0070022102,
-0.028524008,
-0.014221333,
-0.0037586887,
-0.0032808033,
-0.029635685,
0.019901732,
-0.043789234,
0.013190998,
-0.025392333,
0.018898511,
-0.011157442,
-0.016864955,
0.021799717,
-0.015007641,
-0.016986968,
0.024999179,
0.012831736,
0.055041574,
0.023046965,
0.032374207,
0.01862737,
0.04303004,
-0.03570924,
0.005195735,
0.023873944,
-0.007069995,
-0.054363724,
-0.02874092,
-0.014655158,
0.03646843,
-0.0029994948,
-0.03245555,
0.0064700963,
-0.0057007344,
0.0050805,
-0.06518224,
-0.020755826,
-0.061060898,
-0.012228448,
0.054336607,
0.01569905,
0.0020149148,
0.016512472,
0.016688714,
0.023413004,
0.021433678,
0.028063068,
-0.02508052,
0.05363164,
0.023955286,
0.021406563,
-0.008784961,
0.01670227,
-0.029473001,
-0.017502137,
0.043789234,
-0.00096593896,
-0.010567711,
0.042921584,
0.008737511,
-0.00067531,
-0.007605498,
0.009788182,
-0.02411797,
-0.0028571459,
-0.02567703,
-0.03652266,
-0.036143064,
0.09468235,
0.02696495,
0.037959706,
-0.02169126,
-0.039857693,
-0.028198639,
-0.0029961055,
-0.029093403,
0.022396227,
0.022274213,
0.012838515,
-0.032509778,
-0.06865284,
-0.043084268,
0.009808517,
-0.018898511,
-0.05447218,
0.037227627,
0.04118628,
0.047558088,
0.017569922,
0.03465179,
-0.021026965,
0.024090856,
0.06545338,
0.0093950275,
0.018396901,
0.055394057,
0.0052296272,
-0.01569905,
0.037010714,
-0.0023538407,
-0.021162536,
0.032943603,
-0.0027639412,
-0.022464013,
-0.037742794,
-0.040996484,
-0.042731784,
0.056180365,
-0.052465737,
0.00965939,
-0.010771067,
-0.024226427,
-0.047720775,
0.009747511,
-0.04677178,
-0.008900195,
-0.005982043,
0.024619581,
-0.00046771782,
-0.035139844,
0.21224898,
0.037607223,
0.03936964,
-0.021826832,
-0.0057244594,
0.053360503,
0.007442814,
-0.021772603,
0.038230848,
-0.08416209,
0.020023745,
-0.03665823,
-0.04143031,
0.015590594,
-0.015143212,
0.026246427,
-0.0425691,
0.0062125125,
0.016051533,
-0.029527228,
-0.02827998,
0.024660252,
-0.022667367,
0.0038366418,
-0.05075755,
0.011320127,
0.0025300821,
-0.07841391,
-0.011645496,
-0.03625152,
0.04869688,
-0.021867502,
0.023738373,
-0.05327916,
0.027154747,
0.04151165,
0.032509778,
-0.006283687,
-0.027073406,
-0.02920186,
0.022219986,
-0.007795297,
0.0076597263,
-0.009849188,
-0.01822066,
-0.0052126814,
-0.04709715,
0.031018503,
0.046446413,
-0.058512177,
0.071743846,
-0.025419446,
0.020918509,
0.028252868,
-0.04856131,
0.036088835,
-0.037227627,
-0.018464686,
-0.017922405,
0.05308936,
0.030774476,
-0.008805296,
0.0009905112,
-0.014750058,
0.02078294,
0.01822066,
-0.0046195607,
-0.0071716732,
0.012689387,
-0.0032858872,
0.053197816,
-0.027791928,
-0.029961053,
-0.027385216,
0.05089312,
0.027303874,
0.023548575,
-0.0014107793,
-0.0026487063,
-0.022179315,
-0.038990043,
0.02338589,
-0.008405363,
-0.009517041,
0.0062599625,
0.013990863,
-0.03663112,
-0.01885784,
0.0028859545,
-0.000025750429,
0.007808854,
0.057427615,
0.002147096,
0.01102865,
0.019196765
] | GPU compute ability
export CUDA_DEVICE_ORDER=FASTEST_FIRST
The CUDA_DEVICE_ORDER is especially useful if your training setup consists of an older and newer GPU, where the older GPU appears first, but you cannot physically swap the cards to make the newer GPU appear first. In this case, set CUDA_DEVICE_ORDER=FASTEST_FIRST to always use the newer and faster GPU first (nvidia-smi or rocm-smi still reports the GPUs in their PCIe order). Or you could also set export CUDA_VISIBLE_DEVICES=1,0. |
[
0.010207984,
-0.013020755,
-0.02769608,
0.013812071,
-0.002154539,
-0.029552078,
-0.0065391525,
0.01986924,
0.002125764,
0.034012225,
-0.009064171,
-0.008654126,
0.035537306,
-0.026314873,
-0.026415586,
0.016747136,
-0.029523302,
-0.023178382,
-0.04103336,
-0.013366057,
-0.006420455,
0.0036130794,
-0.09196537,
-0.022746755,
-0.052831173,
0.030559208,
0.006283773,
-0.005866533,
0.064513884,
0.0218835,
-0.028026994,
0.020358417,
-0.024689076,
-0.033810798,
-0.008977846,
-0.036918513,
0.021610137,
-0.0154234795,
-0.027350778,
-0.016862236,
0.03570996,
0.0007634406,
0.032285716,
-0.040831935,
-0.08114592,
0.012445251,
-0.008941878,
-0.026760887,
-0.029983705,
-0.055967662,
0.0041328305,
0.020603007,
0.023034506,
0.024746627,
-0.049435705,
-0.043795776,
-0.044515155,
-0.020243317,
-0.030242682,
0.024516426,
-0.008740451,
0.06531958,
-0.05996741,
-0.061003312,
0.0060967347,
0.021379935,
-0.01821467,
0.025250193,
-0.016703973,
-0.032947544,
-0.059564557,
0.032746118,
-0.033206522,
-0.045292083,
-0.023969699,
0.015207666,
-0.0011456106,
-0.016790299,
0.0077549024,
0.057636622,
-0.01962465,
0.046241663,
0.013092692,
0.017653553,
-0.04186784,
-0.040227655,
0.016804686,
0.014545837,
-0.012661065,
-0.03458773,
-0.029638402,
0.019322513,
-0.0124740265,
-0.012761778,
0.040659286,
0.05662949,
-0.005348581,
0.040975813,
-0.046759617,
-0.0135171255,
0.04796817,
0.05029896,
-0.026012734,
0.016229184,
0.004895372,
0.0068844543,
0.011100014,
-0.015322766,
-0.025897633,
0.000018616734,
-0.025940796,
-0.009409473,
0.028947799,
-0.013610645,
-0.00987707,
0.03208429,
0.027624141,
-0.0015358735,
-0.052399546,
0.011042463,
-0.0018613924,
-0.03139369,
-0.029019738,
-0.04086071,
0.029451365,
-0.023566846,
0.02503438,
0.05058671,
-0.009884263,
-0.005611154,
0.025178256,
0.0044421633,
0.05288872,
0.057780497,
-0.01035186,
0.0098411,
0.003578909,
0.0004496117,
0.018128343,
-0.02585447,
0.014919914,
0.004632799,
0.009977783,
0.09029642,
0.032055516,
-0.022818692,
0.0077189333,
-0.016401835,
-0.011934493,
0.020272091,
-0.036918513,
0.01052451,
-0.014560225,
-0.0051903175,
-0.030098805,
-0.02123606,
0.008503056,
-0.0030249874,
-0.0059384713,
-0.017639166,
-0.017164376,
-0.012013624,
-0.066930994,
0.05973721,
-0.022976955,
0.028875861,
-0.040141333,
-0.027422717,
0.027149353,
-0.034415077,
-0.000716681,
0.0038378853,
0.00084796763,
0.016646422,
0.03617036,
-0.0024926472,
0.022588491,
-0.00078547164,
0.011430928,
0.0069779735,
0.003143685,
-0.02621416,
-0.032487143,
0.01962465,
0.001087161,
-0.015811944,
0.009502993,
-0.01914986,
0.0073412596,
0.00020457331,
0.045579836,
0.043191496,
-0.023681946,
0.018157119,
-0.008006685,
0.014315636,
-0.036486886,
0.036918513,
0.011718679,
-0.029149225,
-0.014085435,
0.049723458,
-0.037810545,
0.022962568,
-0.008438312,
-0.03265979,
0.0012670057,
0.044256177,
-0.03950828,
0.01832977,
0.03208429,
0.039450727,
-0.05113344,
-0.004672365,
0.03398345,
-0.03432875,
-0.03314897,
0.032487143,
0.006057169,
0.0073448564,
0.012589128,
0.036601987,
0.07659944,
0.019538326,
-0.017236313,
0.010423797,
0.0093159545,
0.04969468,
-0.0116395475,
0.028775148,
0.047191244,
0.0060931374,
0.025466006,
0.047421444,
0.003426041,
0.028789535,
0.0392493,
0.023610009,
0.028832698,
-0.041551314,
-0.016070921,
0.037810545,
0.043018848,
0.033436723,
-0.015351541,
-0.006283773,
-0.018300993,
-0.0071398336,
-0.039767254,
0.007359244,
-0.027595367,
0.054356255,
0.030703083,
-0.01299198,
-0.052514646,
-0.036343012,
-0.009409473,
0.037033617,
-0.00987707,
-0.0030411736,
0.051334865,
0.00676216,
-0.005808983,
-0.0062981606,
0.037925646,
0.012812135,
-0.0067369817,
0.0027444297,
-0.011013688,
-0.08638299,
-0.002064617,
-0.05265852,
-0.04980978,
0.005255061,
-0.036976065,
-0.03688974,
0.0018254234,
-0.053751975,
0.0005341387,
-0.013358862,
0.00068655703,
-0.016545711,
-0.033235297,
0.01808518,
0.046961043,
-0.0016293927,
-0.050500385,
0.0042479313,
-0.016315509,
0.03688974,
-0.013747327,
0.016718362,
0.009028203,
-0.04186784,
-0.009740388,
0.011797811,
0.010862619,
-0.0192218,
-0.038875226,
0.024228675,
-0.022818692,
0.028156482,
0.0038918387,
0.022861855,
-0.03510568,
-0.0033702892,
0.030472882,
-0.008762033,
0.05231322,
0.06583754,
-0.0030213906,
0.029523302,
0.008057041,
0.039047875,
-0.037752993,
0.028257195,
0.051910367,
0.037321366,
-0.017538453,
-0.03185409,
-0.058989055,
0.02017138,
-0.050126307,
-0.010373441,
-0.0050392477,
0.029782278,
-0.011466896,
-0.049205504,
-0.0009846496,
-0.047795523,
-0.053406674,
-0.038616247,
-0.038386047,
0.03476038,
0.019049149,
-0.011740261,
-0.035853833,
-0.005808983,
0.012833716,
-0.011632354,
0.0048594032,
-0.0029782278,
0.02556672,
0.017365802,
-0.025609883,
0.02657385,
0.027839955,
-0.052716073,
0.03113471,
0.0025573913,
-0.008898715,
0.008459894,
-0.0016239975,
-0.020415967,
-0.028401071,
0.04126356,
-0.038155846,
0.0063017574,
0.042299468,
0.009006621,
0.029235551,
0.014437931,
-0.0019890822,
-0.020977084,
-0.034616504,
-0.026617013,
-0.016315509,
0.051651392,
0.06232697,
-0.010639611,
0.002568182,
0.021638911,
-0.03688974,
0.0007868205,
-0.047363892,
-0.07130482,
0.030559208,
0.020430354,
0.029393815,
-0.020660557,
-0.029811053,
0.020056278,
0.028343521,
0.041436214,
0.061118416,
0.02034403,
-0.007459957,
0.008222499,
-0.016862236,
0.0012804942,
0.035566084,
0.020415967,
-0.0020178573,
0.0050860075,
-0.023351032,
-0.029523302,
0.008639738,
0.020732494,
0.039824806,
0.023710722,
0.041493762,
0.0113877645,
0.023509296,
0.009423861,
-0.021092184,
0.005226286,
-0.029580852,
0.03493303,
0.029365038,
0.023106445,
-0.012553158,
-0.0025717788,
-0.01094175,
0.006323339,
0.0018344157,
0.017308252,
-0.046989817,
0.0017265088,
-0.003744366,
0.03950828,
-0.05639929,
-0.06221187,
-0.021725237,
0.021307997,
0.042788647,
-0.013661002,
0.026257323,
-0.020315254,
0.019581487,
0.03481793,
-0.01046696,
-0.006722594,
-0.01035186,
-0.011078432,
-0.021811562,
0.05780927,
0.03588261,
-0.027768018,
0.0012040602,
-0.04655819,
0.013214987,
0.020790044,
0.0064420365,
-0.015308379,
0.014524256,
-0.021423098,
-0.028559335,
0.028904635,
-0.001207657,
-0.04537841,
0.034242425,
-0.016603261,
-0.0269767,
-0.029983705,
-0.009661256,
-0.053780753,
-0.0095101865,
0.031911638,
0.04063051,
0.018113956,
-0.0042263498,
0.0017193151,
0.008200917,
-0.04359435,
-0.052370768,
-0.0022678412,
0.032832444,
0.00009807155,
0.0038666606,
0.017682329,
-0.014459512,
0.035537306,
0.017049275,
-0.0011869748,
0.004460148,
-0.008891521,
-0.005434906,
0.0006308052,
-0.012754585,
0.03665954,
-0.029868605,
0.012502802,
0.008877133,
-0.03245837,
-0.0027318406,
-0.06054291,
0.018185893,
-0.0011815795,
0.008208111,
0.0139487535,
0.010682774,
-0.005704673,
-0.016358672,
-0.025293356,
-0.028789535,
-0.038357273,
-0.035019357,
-0.005816177,
0.025825696,
0.0061003314,
0.06963586,
-0.01272581,
-0.0392493,
0.0134308,
-0.026717724,
0.024933666,
0.0037587536,
-0.027034251,
-0.011711486,
-0.0074455696,
-0.009538962,
0.023624396,
-0.048255924,
-0.020415967,
0.027149353,
0.008085817,
0.01874701,
-0.0120280115,
-0.02473224,
0.036141586,
-0.0068161134,
-0.05461523,
-0.023509296,
0.028847085,
-0.0069024386,
0.003816304,
0.07228317,
-0.010279922,
-0.0048126434,
-0.017193152,
0.030329006,
-0.025235806,
-0.013589064,
-0.035249557,
0.0078124525,
0.024113575,
0.042903747,
0.0043810164,
-0.03723504,
-0.012639483,
-0.028271584,
-0.009351923,
-0.026775276,
-0.018516809,
-0.03611281,
0.0036706298,
-0.052802395,
0.023696335,
0.014401962,
-0.0075606704,
-0.032285716,
-0.05311892,
0.04609779,
0.051737715,
-0.024775403,
0.0034476225,
-0.009229628,
0.0058917115,
-0.0011105408,
0.045176983,
-0.006352114,
0.035479758,
0.00023514692,
0.03185409,
-0.037752993,
-0.022286352,
-0.059449457,
-0.012128725,
0.028142095,
-0.043738224,
-0.04946448,
-0.025394069,
0.032861218,
0.02598396,
0.015509805,
-0.049953658,
0.018229056,
-0.06042781,
-0.04471658,
0.02514948,
-0.006524765,
-0.0053809527,
-0.010395022,
0.021106571,
0.078959,
-0.043220274,
0.01821467,
0.076254144,
0.005550007,
0.029494528,
-0.09190782,
0.046155337,
-0.0021887098,
0.009625287,
-0.044371277,
-0.015826331,
-0.01738019,
-0.0039385986,
-0.0265163,
-0.021682074,
-0.009416667,
0.016991725,
0.046845943,
-0.021811562,
0.03303387,
0.003095127,
-0.04181029,
-0.0538383,
0.035335883,
0.059449457,
0.020861983,
0.023020118,
0.039537054,
0.011200726,
0.018416096,
-0.021595748,
-0.01909231,
-0.024804179,
0.052226894,
-0.0059636496,
-0.034645278,
0.028731985,
0.038817674,
-0.048543677,
-0.053550553,
0.005816177,
0.009956202,
-0.03665954,
-0.012222244,
-0.023998473,
0.02467469,
-0.051565066,
0.0018353149,
0.01506379,
-0.006384486,
-0.045320857,
-0.0015403697,
0.008179336,
-0.041177236,
0.014301249,
0.05438503,
-0.02378266,
0.022329515,
-0.07003871,
-0.009833907,
-0.028214034,
-0.007632608,
0.06221187,
-0.014689713,
0.040601734,
0.018459257,
-0.002382942,
0.09173517,
-0.009467023,
0.0027282438,
0.012848103,
-0.049838558,
-0.050557934,
0.008560606,
0.03012758,
-0.00892749,
0.0017355011,
-0.014265279,
-0.01861752,
0.009272791,
0.049608357,
0.0033918705,
-0.06370818,
0.036141586,
-0.04270232,
-0.009035396,
-0.014891139,
0.0023056087,
-0.006161479,
0.014596194,
0.0072657247,
-0.029019738,
-0.004147218,
-0.002668895,
-0.023681946,
-0.016747136,
-0.039220527,
0.017135601,
-0.038932774,
-0.01548103,
0.0023739496,
-0.015567355,
0.0058701304,
0.0070535084,
-0.033062644,
-0.0018470049,
0.010689967,
0.036860965,
-0.02680405,
0.008387956,
-0.002125764,
-0.020444743,
0.030990835,
-0.0069815703,
-0.004470939,
-0.0015880285,
0.02045913,
-0.04796817,
-0.028257195,
0.0101648215,
-0.0145890005,
-0.013898397,
0.024761016,
0.024775403,
-0.015567355,
0.027134964,
-0.034846704,
0.011517253,
-0.02503438,
-0.033954676,
-0.009244016,
0.025811307,
0.007031927,
0.035422206,
0.013207793,
0.042903747,
0.012143113,
0.0030267858,
-0.00006429447,
0.04416985,
0.0060319905,
-0.018401707,
0.02040158,
-0.020315254,
0.030559208,
0.023192769,
0.036601987,
0.04808327,
-0.035796285,
0.04745022,
0.028386684,
-0.04471658,
-0.03337917,
0.015898269,
0.048054498,
0.04727757,
0.015783168,
-0.056312963,
0.002158136,
0.027034251,
-0.023667559,
0.016459385,
-0.03950828,
-0.013754521,
0.016444998,
-0.03735014,
0.014351605,
-0.047881845,
-0.0022390662,
-0.018818947,
0.012193469,
0.021509424,
-0.02752343,
0.001207657,
0.0059744404,
-0.008236886,
-0.04745022,
-0.01052451,
0.019193023,
0.016171634,
-0.014991852,
-0.017624779,
0.077923104,
0.022775529,
-0.0015673464,
-0.019941177,
-0.04293252,
0.011114401,
0.0068808575,
0.0787288,
-0.038731348,
-0.00607875,
-0.029552078,
0.023034506,
-0.06065801,
0.06543469,
-0.007362841,
0.016214795,
0.019610263,
0.03476038,
0.008200917,
0.033695698,
0.026401198,
-0.012416476,
0.024271838,
0.012020818,
0.015308379,
0.0017139198,
-0.006754966,
-0.020674944,
0.044630256,
0.047076143,
0.014862364,
-0.013035142,
0.0139199775,
-0.0012903855,
-0.031221036,
-0.026070284,
0.018876497,
0.003458413,
-0.00015477883,
0.0018703847,
0.014718488,
-0.013071111,
0.017092438,
0.031163486,
0.021005858,
-0.001626695,
-0.030616758,
-0.029724728,
-0.04080316,
-0.029523302,
0.038702574,
-0.019423226,
0.05265852,
-0.008215304,
0.03421365,
0.01236612,
0.013042336,
-0.049090404,
0.051996693,
-0.0059348745,
0.023955312,
0.0069312137,
-0.008308824,
0.016344285,
0.004999682,
0.01115037,
-0.015150116,
-0.0075534764,
-0.029019738,
-0.020056278,
-0.057751723,
0.067391396,
-0.014128597,
-0.01814273,
0.02615661,
-0.035307106,
-0.007165012,
-0.051392414,
0.017739879,
-0.016819075,
0.0006015804,
0.012452445,
-0.040486634,
-0.040659286,
0.043162722,
-0.010013752,
0.03444385,
-0.011783423,
0.054989308,
0.029350651,
0.08114592,
-0.01880456,
0.0023559653,
0.0037803352,
0.033062644,
-0.03539343,
-0.04370945,
0.0049816975,
-0.025768146,
-0.014409156,
-0.05182404,
-0.05780927,
-0.0075103138,
0.037033617,
-0.029839829,
-0.048946526,
0.014250892,
0.01867507,
-0.003924211,
0.016229184,
0.0688877,
-0.014919914,
-0.023351032,
-0.014948689,
0.034299977,
-0.03303387,
-0.039652154,
-0.04454393,
0.017696716,
-0.025523556,
-0.06756405,
0.012718615,
-0.016401835,
-0.011646741,
0.0065679275,
-0.023523683,
-0.0027714064,
0.035192005,
0.031307362,
0.039220527,
0.015696844,
-0.023984086,
-0.033724472,
0.036400564,
0.04347925,
0.023408582,
0.08569239,
0.04629921,
-0.024300613,
0.02028648,
0.019782914,
0.029034125,
-0.009056978,
0.00052424724,
0.000038245093,
-0.021840338,
-0.029839829,
-0.04756532,
0.012344538,
0.03927808,
0.017121213,
-0.018934047,
-0.034242425,
-0.024746627,
-0.07199542,
-0.02828597,
-0.040285207,
0.033810798,
0.010380635,
-0.015466643,
0.05510441,
-0.0487451,
0.24677567,
0.054931756,
0.012970398,
0.042299468,
-0.0026149417,
0.042500895,
0.049176726,
-0.042788647,
0.0072549344,
0.0040680864,
0.0068340977,
-0.022761142,
0.027307615,
0.038587473,
-0.061751466,
0.04934938,
-0.042903747,
0.0094957985,
-0.023523683,
-0.0094957985,
-0.053090148,
0.028947799,
0.008481475,
0.07280113,
0.05208302,
-0.0028451427,
-0.014704101,
0.0063665016,
-0.017337026,
-0.015682455,
0.0103590535,
-0.011956074,
0.042846195,
0.0097044185,
-0.025552332,
0.011495671,
0.00017231368,
-0.07003871,
-0.0103446655,
0.02076127,
-0.0010457968,
-0.026674563,
0.017596003,
-0.012452445,
-0.04416985,
-0.007423988,
-0.013963141,
0.032832444,
0.04370945,
-0.036515664,
0.007334066,
-0.034789152,
0.036976065,
-0.051075887,
0.01850242,
0.0025789726,
-0.008546219,
-0.012013624,
-0.019437613,
0.016114082,
-0.0009279985,
0.014466706,
0.018790172,
0.020502293,
-0.041234788,
0.02104902,
-0.0021707253,
0.06014006,
-0.03622791,
-0.009409473,
-0.0067046094,
0.01073313,
-0.0014567418,
-0.04713369,
0.04091826,
0.03432875,
-0.0139343655,
0.037580345,
0.018574359,
-0.03314897,
0.027206903,
0.003981761,
-0.024602752,
-0.07078686,
0.013150243,
0.042184368,
-0.03124981,
0.038932774,
-0.0028001815,
0.061636366,
-0.010711549,
0.029178001,
-0.001799346,
-0.0048809843,
-0.023940923
] |
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
chat = [
{"role": "user", "content": "Hello, how are you?"},
{"role": "assistant", "content": "I'm doing great. How can I help you today?"},
{"role": "user", "content": "I'd like to show off how chat templating works!"},
]
tokenizer.apply_chat_template(chat, tokenize=False)
" Hello, how are you? I'm doing great. How can I help you today? I'd like to show off how chat templating works!" |
[
0.0046287556,
-0.024736429,
-0.017590018,
0.051143836,
-0.00051052455,
-0.037089724,
0.0031703806,
0.012800878,
-0.0041774428,
0.041476037,
0.013047049,
0.04084942,
0.011935551,
-0.027421927,
-0.041088134,
-0.011510347,
-0.015560974,
-0.030420735,
-0.050308347,
0.009690175,
0.005870799,
-0.00084714434,
-0.09375375,
-0.0061430787,
-0.057499517,
0.0344639,
-0.0029335346,
0.0067808847,
0.07024071,
0.029033227,
-0.029883634,
0.01724687,
0.009220213,
-0.0038156463,
-0.03210663,
-0.06481004,
0.005520192,
-0.011532726,
-0.02499006,
-0.024512637,
0.029092904,
0.0049234144,
0.04839866,
-0.054545466,
-0.08002787,
0.013434954,
0.014382338,
-0.036552623,
0.0036086391,
-0.04911479,
-0.0090188,
0.003879054,
0.017604938,
0.0034948785,
-0.030405816,
-0.011122441,
-0.051084157,
-0.00505396,
-0.048488174,
-0.013129106,
-0.043773632,
0.034135677,
-0.008869606,
-0.050875284,
0.022304561,
0.017664615,
-0.033359863,
-0.013919836,
-0.01961906,
-0.053232558,
-0.035239715,
0.007377662,
-0.07203105,
-0.042192172,
-0.055321276,
-0.005288941,
0.023960618,
-0.010577882,
0.011018005,
0.04117765,
0.00424831,
0.03667198,
0.030316299,
-0.014516613,
-0.04463896,
-0.0536503,
0.019768257,
-0.01459867,
0.010577882,
0.002071937,
-0.019768257,
0.03000299,
0.0054866234,
-0.053441428,
-0.0020849914,
0.05239707,
0.014359959,
0.025139254,
-0.030674364,
-0.006967378,
0.016873885,
0.016903725,
-0.010980707,
-0.0031274874,
-0.002845883,
0.0132335415,
0.017306548,
-0.009488763,
-0.04278895,
-0.008959123,
-0.02123036,
-0.02576587,
0.015165609,
-0.026735634,
-0.022259802,
0.042371206,
0.031121949,
-0.013785562,
-0.05308336,
-0.011458129,
0.009339568,
-0.03610504,
-0.0071576005,
-0.03720908,
0.016590416,
-0.008332507,
0.03846231,
0.054306757,
-0.02840661,
-0.023065452,
0.020857375,
0.0019246076,
0.029704602,
0.02181222,
0.026243292,
0.018559782,
-0.01672469,
0.022244882,
0.033389702,
-0.04007361,
0.050099473,
-0.0020346383,
0.028376771,
0.05949872,
0.033837285,
0.0019022285,
0.018723896,
-0.019499706,
-0.025542079,
0.0010424957,
-0.02736225,
0.018529942,
0.012390594,
0.0009278026,
-0.03159937,
-0.019260995,
-0.0110702235,
-0.034702614,
0.0050353105,
-0.008556298,
-0.0014425232,
0.05290433,
-0.04490751,
0.056544673,
-0.014337581,
0.037059885,
-0.03532923,
-0.002366596,
0.01751542,
-0.037925214,
0.022752143,
0.003908893,
0.0010835242,
0.028734839,
0.03297196,
0.03509052,
0.015560974,
-0.008160933,
0.04007361,
0.03801473,
0.006721207,
0.011547646,
-0.0068629417,
0.026989264,
0.026661037,
-0.023199726,
-0.0035116628,
0.015031334,
-0.0069449986,
-0.0109135695,
0.027586041,
0.028719919,
-0.0064526573,
0.04753333,
0.013188783,
-0.014546452,
0.00090449094,
0.022408996,
0.038880058,
-0.04839866,
-0.043057498,
0.06272132,
-0.038193762,
0.055888217,
-0.018902928,
-0.040282484,
-0.00030421666,
0.057350323,
0.019365432,
0.033150993,
0.025049737,
0.01809728,
-0.068211675,
-0.0061468086,
0.02898847,
-0.073403634,
-0.014747865,
0.017306548,
0.0004697292,
0.0032561675,
-0.025915064,
0.08492144,
0.028033625,
0.00051378814,
-0.04084942,
-0.005766363,
0.022468675,
0.05439627,
0.0024896814,
0.016605334,
0.005941666,
0.025019899,
0.012360754,
0.05839468,
0.014442016,
0.026526762,
0.07758108,
0.06078179,
-0.0005944464,
-0.00983191,
-0.013166404,
0.044161536,
0.027779995,
0.028272336,
0.00983191,
-0.016590416,
0.012972452,
-0.0076163732,
-0.014844841,
0.0026370108,
-0.039715543,
0.04998012,
0.052516423,
-0.0052441824,
-0.034195352,
-0.028615482,
0.022468675,
0.002737717,
-0.017440824,
-0.021856977,
0.037149403,
0.018231554,
-0.0070121363,
-0.0073366337,
0.0021912926,
0.009414165,
0.0047145425,
-0.0062064864,
-0.012286157,
-0.053829335,
-0.005602249,
-0.02892879,
-0.058812425,
-0.00665034,
-0.0060945908,
-0.0025176553,
0.022170285,
-0.03529939,
0.020051725,
-0.0010163868,
0.0024486529,
0.012360754,
-0.0488164,
0.051889807,
0.0012979911,
-0.0064563868,
-0.069524586,
0.007892383,
0.0010648749,
0.04117765,
-0.011846034,
-0.0072471173,
0.008601056,
-0.016187591,
0.010689777,
0.008668194,
0.01963398,
0.018902928,
-0.048637368,
0.008698032,
-0.007459719,
0.0015059308,
-0.0075529655,
0.025661435,
-0.04329621,
0.017888406,
0.017858569,
-0.035150196,
0.049234148,
0.058901943,
0.014479315,
0.021364637,
-0.011987769,
0.06397455,
-0.019753337,
0.0039200825,
0.05359062,
0.024855785,
-0.009332108,
-0.021901736,
-0.041834105,
-0.0027750155,
-0.0031983545,
-0.015560974,
-0.009526062,
0.0058857184,
0.00743734,
-0.040551033,
0.013867618,
-0.047682524,
-0.032822765,
-0.041565556,
-0.042341366,
0.04437041,
-0.006157998,
-0.0023964348,
-0.025094496,
-0.017410984,
-0.011443209,
-0.0028645322,
0.00037834764,
0.00797444,
0.00425204,
0.03133082,
0.0006653137,
0.026362648,
-0.018231554,
-0.043863147,
-0.012107125,
0.014255524,
-0.002573603,
0.014725486,
0.021991253,
0.017560178,
0.010398849,
0.023274325,
-0.057469677,
-0.007034515,
0.029257018,
-0.0052665616,
0.03852199,
0.020752938,
0.012062366,
-0.03583649,
-0.03109211,
0.016426302,
0.016351704,
0.051472064,
0.07238912,
0.030152185,
-0.0042371205,
0.01861946,
-0.038641345,
0.004971903,
-0.071434274,
-0.035896167,
0.05639548,
-0.010264574,
0.019977128,
-0.04565348,
-0.0044236137,
0.034404226,
0.0058782585,
0.020305356,
0.056664027,
0.01967874,
-0.046309937,
-0.009996024,
0.026273131,
-0.0018742544,
0.031927597,
-0.0035265821,
-0.0059006377,
-0.002338622,
-0.049741406,
-0.03003283,
0.0007977237,
0.03380745,
0.066779405,
0.036701817,
0.03774618,
0.008660734,
0.04678736,
0.02921226,
-0.030763881,
0.011674461,
-0.04726478,
0.03935748,
0.00015280768,
0.027317492,
-0.0017959274,
-0.040222805,
-0.007068084,
-0.01647106,
0.011279095,
0.014770244,
-0.06642134,
0.02842153,
0.03535907,
0.03685101,
-0.012927693,
-0.06391487,
0.0004643675,
0.03374777,
0.04249056,
-0.039954256,
0.00478168,
-0.047712363,
0.026347728,
0.04813011,
-0.0117043,
-0.008951663,
-0.022961015,
-0.029152583,
-0.049771246,
0.057051934,
0.042341366,
-0.047145426,
0.001899431,
-0.037030045,
0.023721907,
0.03529939,
-0.042132493,
0.005389647,
0.0022770793,
-0.019827934,
0.018649299,
0.023781585,
0.0054903533,
-0.053859174,
0.03240502,
-0.005080069,
-0.004460912,
-0.058305167,
-0.024587234,
-0.016277106,
-0.03962603,
0.013778102,
0.02760096,
0.015337182,
0.0019087556,
0.019141639,
0.014479315,
-0.02660136,
0.0062773535,
0.013778102,
0.012905315,
-0.020618664,
0.0062587042,
0.025303368,
-0.018171877,
0.029809037,
0.015352102,
0.0344639,
0.0086756535,
0.009787152,
0.033330027,
-0.028779596,
-0.030122345,
0.013606528,
-0.020156162,
0.027571123,
0.016530737,
-0.027213056,
-0.025154173,
-0.032315504,
0.0040543573,
-0.0077730273,
-0.0000075179983,
0.028063463,
-0.004964443,
-0.0023442167,
0.029898554,
-0.056992255,
-0.021304958,
-0.02895863,
-0.008399644,
-0.0014630374,
0.047473654,
0.020767858,
0.057768065,
-0.0059715053,
-0.01301721,
0.031032432,
-0.029391294,
-0.015270045,
-0.005001742,
-0.022722304,
0.008817388,
0.017097676,
-0.0025568188,
0.01168192,
-0.025825547,
-0.011368612,
0.028063463,
-0.002413219,
0.032524377,
-0.050069634,
0.00425577,
0.054515626,
0.008392184,
-0.06594392,
0.014464395,
-0.0065459036,
0.00020712377,
-0.011920631,
0.037149403,
-0.0040506274,
-0.01489706,
-0.038134083,
0.032345343,
0.018007763,
-0.017052919,
-0.01912672,
-0.0024505178,
0.0066316905,
0.03774618,
0.0069934865,
-0.030883238,
-0.0027451767,
-0.032494538,
0.0035079329,
-0.058215648,
-0.0344639,
-0.00040165926,
0.005758903,
-0.02361747,
0.045384932,
0.010063161,
0.0125920065,
-0.0077208094,
-0.021946494,
0.015441619,
0.03371793,
-0.021692863,
0.033926804,
-0.008780089,
-0.033389702,
-0.0012923963,
0.0100333225,
-0.034225192,
0.02898847,
-0.02500498,
0.024288846,
0.009787152,
-0.012584547,
-0.03846231,
-0.019111801,
0.021692863,
-0.066779405,
-0.03843247,
-0.025631595,
0.028108222,
-0.016247269,
0.0014714296,
-0.05606725,
0.008638355,
-0.065108426,
-0.028212657,
0.012301077,
-0.012278697,
-0.004349016,
-0.027198136,
0.009802071,
0.055739023,
-0.052576102,
0.0036739118,
0.064989075,
-0.025512239,
0.02840661,
-0.07895367,
0.074537516,
-0.014516613,
-0.0044795615,
-0.0344639,
0.0138750775,
-0.06582456,
-0.03700021,
-0.03765666,
-0.01963398,
-0.017052919,
0.013613988,
0.046996232,
-0.0281679,
0.042938143,
0.014382338,
-0.06755522,
-0.049741406,
0.029868716,
0.028734839,
0.014419638,
0.01565049,
0.03640343,
0.017470662,
0.020633584,
-0.01938035,
0.012457731,
-0.017560178,
0.056544673,
0.020603744,
-0.00824299,
0.026407406,
-0.008190772,
-0.042401046,
-0.050129313,
-0.010682318,
-0.0058148513,
-0.04941318,
-0.0027955298,
0.007116572,
-0.0004956051,
-0.03846231,
0.0042930683,
0.015217828,
-0.0024225437,
-0.016321866,
-0.007034515,
0.019052124,
-0.021051327,
-0.015255126,
0.07555204,
-0.050964803,
0.021752542,
-0.07585043,
-0.028093303,
-0.029421132,
-0.008645815,
0.051442225,
-0.0057439837,
0.022125527,
0.005147206,
-0.01591904,
0.06528746,
-0.027421927,
0.009660336,
0.030913077,
-0.056902736,
-0.030734044,
-0.01485976,
0.0135468505,
-0.009958725,
0.017843649,
0.02260295,
0.009332108,
-0.026511842,
0.017575098,
0.00036133014,
-0.041834105,
0.023900941,
-0.012420433,
0.022916257,
-0.05290433,
-0.030390896,
-0.0035526913,
0.027511444,
0.0051658554,
-0.06451165,
-0.016665014,
0.0014994035,
0.015904121,
-0.011987769,
0.012696442,
0.00956336,
-0.061468087,
-0.034225192,
-0.006430278,
-0.031271145,
-0.0010023997,
-0.016411383,
0.0070009464,
0.0072694966,
-0.03321067,
0.024333604,
0.01063756,
0.022304561,
-0.0121891815,
-0.005919287,
0.0028589375,
-0.009705095,
-0.016933562,
0.020096483,
0.018201714,
-0.023990456,
-0.008138553,
0.013375277,
-0.042729273,
-0.018529942,
-0.016754529,
0.030734044,
-0.015217828,
0.008802469,
-0.048219625,
-0.017649695,
-0.033180833,
-0.021842059,
-0.017396064,
0.01724687,
0.020320276,
0.02285658,
0.024811026,
0.032345343,
0.024751348,
0.04998012,
-0.03506068,
0.029391294,
0.02127512,
-0.0011357423,
0.02525861,
0.004942064,
0.017455744,
-0.009578279,
0.04064055,
0.036582462,
-0.01566541,
0.017440824,
0.012054906,
-0.04622042,
-0.027675558,
0.0036272884,
0.05946888,
0.0024654372,
0.011182119,
-0.02445296,
-0.025467481,
0.014359959,
-0.014262984,
0.044251055,
-0.050576895,
-0.0071016527,
0.020230759,
-0.027914269,
0.021140844,
-0.04174459,
-0.036552623,
-0.008712952,
-0.0070904633,
0.016784368,
0.0071576005,
0.04320669,
0.013785562,
0.016038395,
-0.03130098,
0.014300282,
-0.010749456,
0.0035359068,
-0.038372796,
-0.04565348,
0.037358273,
0.03637359,
-0.014248064,
-0.0075529655,
-0.078177854,
0.026750553,
0.013517011,
0.03189776,
-0.0452059,
-0.009660336,
-0.04165507,
0.025721112,
-0.02257311,
0.03109211,
-0.022259802,
-0.0054157563,
0.04917447,
0.0027433117,
-0.00070634217,
0.016411383,
0.0039126226,
-0.02736225,
0.03213647,
0.02630297,
0.018708976,
-0.017500501,
-0.012606925,
-0.0058894483,
0.0037335895,
0.08044561,
0.01884325,
0.0063034627,
0.020275516,
-0.002096181,
-0.0055015427,
-0.03294212,
0.026422326,
0.022692466,
-0.009921427,
0.018723896,
0.011331313,
0.0028589375,
0.032792926,
0.044221215,
-0.013606528,
0.021021489,
-0.007060624,
-0.017082756,
-0.03586633,
-0.041476037,
0.0055947895,
-0.0075343163,
0.007523127,
-0.008407104,
-0.008063956,
0.042938143,
-0.005714145,
-0.02123036,
0.047413975,
0.012077285,
0.035180036,
0.0073254444,
-0.01941019,
0.026168695,
0.012442811,
0.03905909,
-0.008944203,
-0.028630402,
-0.029928394,
-0.00057253346,
-0.05284465,
0.03717924,
-0.032494538,
-0.01832107,
-0.0054306756,
-0.03401632,
-0.011114982,
-0.03207679,
-0.0067659654,
-0.019783175,
-0.013651286,
0.018440425,
-0.0071576005,
-0.013047049,
0.045832515,
0.010995626,
0.017828729,
-0.00093013374,
0.036343753,
-0.012666604,
0.087785974,
0.02684007,
-0.012577087,
-0.02231948,
0.017336387,
-0.022125527,
-0.016978322,
0.010048241,
-0.009749853,
0.016098075,
-0.0027022832,
-0.034314707,
-0.035746973,
0.04962205,
-0.002948454,
-0.056484994,
0.011286555,
0.012964992,
-0.03858167,
0.003905163,
0.07059878,
-0.016232349,
-0.0021931576,
-0.02576587,
-0.020275516,
-0.052725296,
-0.016083155,
-0.050636575,
0.010809133,
-0.031211466,
-0.09375375,
-0.018977527,
-0.027078781,
-0.0056731165,
-0.009444005,
-0.008377264,
-0.022677546,
0.048667207,
0.030480413,
0.04084942,
0.028227577,
-0.016978322,
-0.039715543,
0.026646117,
0.038104247,
0.016157752,
0.07400042,
0.04329621,
-0.02497514,
0.020275516,
0.037417952,
0.06785361,
0.030972755,
-0.0030696744,
-0.018723896,
-0.028496128,
-0.04353492,
-0.012054906,
0.030167105,
0.02097673,
0.0069375387,
-0.016754529,
-0.028018706,
-0.015270045,
-0.027108619,
-0.013658746,
-0.015784767,
0.01593396,
0.014531533,
-0.019037204,
0.03932764,
-0.05842452,
0.26711762,
0.049830925,
0.030883238,
0.043773632,
0.01010792,
0.057499517,
0.034404226,
-0.04756317,
0.018186795,
-0.013166404,
0.020797698,
-0.01594888,
0.016620254,
0.020857375,
-0.02421425,
0.017142436,
-0.028003786,
0.009570819,
0.017127516,
-0.0196489,
-0.022259802,
0.037626825,
0.0027862052,
0.08229562,
0.03559778,
-0.011935551,
-0.0032244637,
-0.018694056,
-0.02921226,
-0.07089717,
0.028570725,
-0.051352706,
0.022080768,
-0.009981104,
-0.04729462,
0.014986576,
0.008780089,
-0.066361666,
0.011637162,
0.0023591362,
-0.0023516766,
-0.046996232,
0.022975935,
-0.020156162,
-0.038342956,
-0.019350512,
0.011831115,
0.054306757,
0.051889807,
-0.059349526,
0.023811424,
-0.011271636,
0.05926001,
-0.036582462,
0.010465986,
-0.016381543,
0.016127912,
-0.024766268,
0.0068368325,
0.009160535,
-0.032584053,
-0.0130768875,
-0.034075998,
0.0414462,
-0.04278895,
0.017933166,
-0.018261392,
0.032017116,
-0.036224395,
0.014158547,
-0.022125527,
-0.017172273,
0.0003144738,
-0.066779405,
0.0007744121,
-0.0003359205,
-0.025318287,
0.033538897,
0.043445405,
-0.013091807,
0.0045355093,
-0.038671184,
-0.023259405,
-0.05708177,
0.024527557,
0.044668797,
-0.037805855,
0.023915859,
-0.01993237,
0.037358273,
0.010279493,
0.014382338,
0.016426302,
-0.007668591,
-0.004886116
] | Notice how the entire chat is condensed into a single string. If we use tokenize=True, which is the default setting,
that string will also be tokenized for us. To see a more complex template in action, though, let's use the
mistralai/Mistral-7B-Instruct-v0.1 model.
thon |
[
0.015424889,
-0.011886934,
-0.035646,
0.0054586637,
0.0018522448,
-0.019347725,
-0.02387749,
0.00076143735,
-0.0074755936,
0.025017334,
-0.0017393709,
0.013552289,
0.01693481,
-0.026394026,
-0.01013276,
0.015942998,
-0.03443214,
-0.01777859,
-0.05998239,
-0.015306463,
-0.023788672,
0.009903312,
-0.07573295,
-0.020428356,
-0.05216632,
0.020709615,
-0.010665674,
0.0026923239,
0.04677797,
0.023847884,
-0.02560946,
0.024336388,
-0.0064097666,
-0.017467724,
-0.033277493,
-0.06667341,
0.0059175617,
-0.028910564,
-0.03638616,
-0.030050406,
0.024173554,
0.024514027,
0.023433397,
-0.04272191,
-0.07756854,
0.009000319,
-0.0064800815,
-0.03771844,
-0.023566624,
-0.044527892,
-0.008600634,
0.0097404765,
0.017467724,
0.016905203,
-0.04630427,
-0.03021324,
-0.027548673,
-0.012153391,
-0.045800965,
0.000042472337,
-0.02513576,
0.058413252,
-0.060071208,
-0.06489704,
0.013137801,
0.017926622,
-0.012841738,
0.023092924,
-0.0147735495,
-0.03674143,
-0.05266963,
0.024440011,
-0.02902899,
-0.044261437,
-0.05708097,
0.02026552,
0.01444788,
-0.014062998,
0.039050724,
0.052284747,
-0.00080815976,
0.043402854,
-0.012049769,
0.00011148627,
-0.03677104,
-0.03194521,
0.0066207116,
-0.00022944891,
-0.029902374,
-0.020739222,
-0.03250773,
0.027371036,
-0.014033392,
-0.0021964184,
0.040827103,
0.05867971,
-0.006243231,
0.037688836,
-0.047547735,
-0.029532297,
0.038902692,
0.052847266,
-0.029236233,
0.0019503158,
0.020680008,
0.006857562,
0.0045186635,
-0.0135152815,
-0.040827103,
-0.0026331113,
-0.0127899265,
-0.010636068,
0.033040643,
-0.010636068,
0.0040967735,
0.039613247,
0.019480953,
0.0023092923,
-0.0577027,
0.0075644124,
-0.002209371,
-0.036889464,
-0.039790884,
-0.032122847,
0.025165364,
-0.026068358,
0.018785205,
0.054268368,
-0.016431503,
-0.007260948,
0.034284107,
-0.0059878766,
0.05782113,
0.060248844,
0.00019498532,
0.01777859,
0.005858349,
0.0021131504,
0.021331348,
-0.019170087,
0.01486977,
-0.0005236616,
0.023892293,
0.08645043,
0.053735457,
-0.020147095,
0.0020465362,
-0.024736073,
-0.04583057,
0.0013665163,
-0.024040325,
-0.010946934,
-0.011354021,
-0.011220792,
-0.035586786,
-0.03274458,
-0.00999213,
-0.005573388,
0.0063912626,
-0.008141736,
-0.015232448,
-0.00068510853,
-0.053172935,
0.053646635,
-0.011198588,
0.016283471,
-0.042248208,
-0.027977964,
0.0127529185,
-0.04076789,
0.006017483,
-0.0032067336,
0.0145441005,
0.009932918,
0.029103005,
-0.008385988,
0.04091592,
0.009214965,
0.008859688,
0.005173703,
-0.007579216,
-0.016105834,
-0.043047577,
0.019540166,
0.009540634,
-0.005295829,
-0.00029028064,
-0.015188038,
0.018503945,
0.0033991747,
0.05027152,
0.042899545,
0.00085627,
0.02973954,
-0.0058657504,
0.0065281917,
-0.015794968,
0.019495755,
0.016594337,
-0.022397175,
-0.03082017,
0.060811363,
-0.035823636,
0.024972923,
0.008881894,
-0.04535687,
0.0006481007,
0.037067104,
-0.02617198,
0.020206308,
0.035497967,
0.041063953,
-0.060752153,
-0.0022574812,
0.03307025,
-0.035675604,
-0.031175446,
0.027652295,
0.015321266,
0.020680008,
-0.0041522854,
0.050093878,
0.06768003,
0.012168194,
-0.027593082,
-0.0024961822,
-0.005281026,
0.06294302,
-0.0024166151,
0.028436862,
0.047547735,
0.014521896,
0.046452302,
0.0562816,
0.010887722,
0.030849777,
0.05000506,
0.015839377,
0.02950269,
-0.034254503,
-0.0032677967,
0.042751513,
0.03635655,
0.039672457,
-0.018030243,
0.0057251207,
-0.0062802387,
-0.007368271,
-0.04334364,
0.03508348,
-0.019525362,
0.06223247,
0.041063953,
-0.023803474,
-0.041863326,
-0.019525362,
-0.0050589787,
0.030968202,
-0.003789608,
-0.022056703,
0.052107107,
-0.0070389006,
0.011502052,
0.001158347,
0.030376077,
0.0140704,
0.0022759852,
0.003119765,
-0.017230874,
-0.10279311,
-0.010539847,
-0.048347108,
-0.053084116,
0.015765361,
-0.03490584,
-0.03579403,
0.0108063035,
-0.0417449,
0.0054993723,
-0.005562286,
0.02364064,
0.0043706317,
-0.042810727,
0.037925687,
0.044498287,
-0.0029791351,
-0.055807896,
0.0032381904,
-0.030464895,
0.013752132,
-0.011938745,
0.019954653,
-0.0052477187,
-0.035349935,
-0.0043558287,
0.023092924,
0.019436544,
-0.011753705,
-0.035675604,
0.0389323,
-0.021005679,
0.023907097,
-0.0014988196,
0.04574175,
-0.016845992,
0.014440479,
0.026867729,
-0.006276538,
0.057495456,
0.05998239,
-0.014803156,
0.01862237,
0.005262522,
0.031678755,
-0.038162537,
0.03218206,
0.05563026,
0.031649146,
-0.017793393,
-0.031826787,
-0.066495776,
0.011176383,
-0.029517492,
-0.03348474,
0.0011416934,
0.03851781,
-0.003963545,
-0.042011358,
0.008667247,
-0.032122847,
-0.045534506,
-0.05900538,
-0.019732608,
0.039317183,
0.012708509,
0.006631814,
-0.047429312,
-0.00450386,
-0.0050108684,
-0.00661331,
-0.010828508,
-0.01013276,
0.025298594,
0.011361422,
-0.017734181,
0.04023498,
0.0072683496,
-0.034402534,
0.017275283,
0.004437246,
-0.0192293,
0.020946465,
0.014477487,
-0.017556543,
-0.018207882,
0.027637493,
-0.02608316,
-0.01200536,
0.040323798,
-0.006383861,
0.027667098,
0.017082842,
-0.013818746,
-0.01758615,
-0.023537017,
-0.014558904,
-0.030760959,
0.07413421,
0.059301443,
-0.0043558287,
0.0040264586,
0.026808515,
-0.034787416,
-0.0040930724,
-0.051159706,
-0.057110574,
0.057436246,
0.034491353,
0.018119063,
-0.023566624,
-0.027178595,
0.016446305,
0.0056029945,
0.021464575,
0.05027152,
0.017526936,
-0.0039376393,
0.0020520876,
-0.015424889,
-0.008334177,
0.02632001,
0.017852606,
0.006246932,
0.0010871068,
-0.026364421,
-0.02589072,
0.006383861,
0.03292222,
0.04272191,
0.01764536,
0.039139543,
0.013692919,
0.017689772,
0.0034176786,
-0.029473083,
0.0016773826,
-0.037540805,
0.032714974,
0.02232316,
0.017763788,
-0.0069463807,
-0.013848352,
-0.017971031,
-0.008082523,
0.0038155133,
0.022648828,
-0.0595679,
0.029162217,
-0.0017791543,
0.025727885,
-0.040975135,
-0.051396556,
-0.026556863,
0.027267413,
0.03147151,
-0.025579853,
0.028688516,
-0.022722844,
0.007079609,
0.0455049,
0.000007647333,
-0.008415594,
-0.006783546,
-0.003743348,
-0.019303314,
0.053498607,
0.037363164,
-0.029413871,
-0.007383074,
-0.046600334,
0.021775443,
0.020694813,
-0.00045866653,
-0.005806538,
0.020724418,
-0.022204734,
-0.021523789,
0.027445052,
0.013863156,
-0.04295876,
0.046274666,
-0.03221167,
-0.0071314205,
-0.028673712,
-0.0037266945,
-0.057613883,
-0.017364101,
0.03395844,
0.027282216,
0.018681582,
-0.017526936,
0.006868664,
0.023418592,
-0.04583057,
-0.041241594,
0.01121339,
0.014514495,
-0.0064985855,
0.001064902,
0.0077790585,
-0.018370716,
0.0412712,
0.0095110275,
0.02706017,
-0.021050088,
-0.0061803176,
-0.0039931512,
-0.0022408278,
-0.029606313,
0.033514343,
-0.030524107,
0.012553076,
0.012316226,
-0.030760959,
-0.00086043344,
-0.039613247,
0.0143146515,
-0.0008169492,
-0.0004322984,
0.017719377,
0.013589297,
-0.0132488245,
-0.016727567,
-0.038902692,
-0.022530403,
-0.054978922,
-0.014033392,
-0.016446305,
0.046985216,
0.0016514771,
0.05708097,
-0.015077014,
-0.018355913,
0.006383861,
-0.040146157,
0.01022898,
0.010584257,
-0.034461748,
-0.010325201,
0.01740851,
-0.014921581,
0.018222684,
-0.0422186,
-0.0044520493,
0.020887254,
0.01224221,
0.007816066,
-0.0272082,
-0.01083591,
0.05240317,
-0.008075122,
-0.06732475,
-0.015232448,
0.02669009,
0.0032529936,
0.007101814,
0.056192778,
-0.004429844,
0.005258821,
-0.026586467,
0.028348044,
0.0048184274,
-0.01552851,
-0.047577344,
0.009540634,
0.028821744,
0.044675924,
0.004722207,
-0.06347593,
-0.0023796074,
-0.035527576,
0.007242444,
-0.04615624,
-0.02022111,
-0.02415875,
-0.009555437,
-0.04091592,
0.030168831,
0.02242678,
0.0022722844,
-0.024839696,
-0.041715294,
0.040146157,
0.03289261,
-0.031826787,
0.021405363,
-0.0053920494,
-0.009400004,
-0.00024378947,
0.054061126,
-0.0038821276,
0.026838122,
-0.013182211,
0.030435288,
-0.035231512,
-0.016446305,
-0.07472633,
0.016579535,
0.009955122,
-0.040649466,
-0.05980475,
-0.024129145,
0.041389626,
0.02147938,
0.010517642,
-0.04047183,
0.016431503,
-0.05338018,
-0.039406,
0.028792137,
-0.014965991,
-0.011857328,
-0.013048982,
0.019525362,
0.08502933,
-0.03996852,
0.009955122,
0.07354208,
0.01139843,
0.023611033,
-0.07916728,
0.061107427,
-0.0057399236,
0.0028514578,
-0.033247888,
0.0007716145,
-0.030642532,
-0.015262053,
-0.029828358,
-0.03493545,
-0.013552289,
0.015306463,
0.064127274,
-0.010665674,
0.011242997,
0.013419061,
-0.055186164,
-0.041123167,
0.037600014,
0.068923496,
0.01819308,
0.023625838,
0.045208838,
0.006158113,
0.011561264,
-0.028022375,
-0.010909926,
-0.025875917,
0.043314032,
0.010451028,
-0.024913711,
0.02805198,
0.022604419,
-0.049176082,
-0.050093878,
0.006476381,
0.019584576,
-0.03724474,
-0.00013854829,
-0.014129613,
0.040175766,
-0.033899225,
0.010813706,
0.009251973,
0.0010797052,
-0.035113085,
-0.000120159995,
-0.0044779545,
-0.052047897,
0.019051662,
0.05820601,
-0.047429312,
0.008119531,
-0.07496318,
-0.019214496,
-0.027548673,
-0.010547249,
0.05850207,
0.004052364,
0.031027414,
0.014366463,
0.006876066,
0.07413421,
-0.027030563,
-0.009133548,
0.023670247,
-0.0487912,
-0.04070868,
0.014514495,
0.027948359,
-0.010191972,
-0.002288938,
-0.010902524,
-0.0014433077,
0.022411978,
0.03683025,
0.005543782,
-0.05900538,
0.017911818,
-0.034284107,
-0.006676223,
-0.017275283,
-0.010391816,
-0.0047074035,
0.0039154347,
0.012493864,
-0.028673712,
-0.000016942675,
0.013048982,
-0.022944892,
-0.0225156,
-0.014625518,
0.027193397,
-0.043639705,
-0.03902112,
-0.0028440563,
-0.026778908,
0.0036082692,
0.010813706,
-0.025861112,
-0.008948508,
-0.0044520493,
0.023744263,
-0.01412221,
0.028525682,
-0.014714337,
-0.017911818,
0.018326307,
-0.011931344,
0.0043965373,
-0.0053587426,
0.025150562,
-0.057051364,
-0.01073969,
0.02824442,
-0.008408193,
-0.000010003695,
0.013988982,
0.028407255,
-0.026112767,
0.028362846,
-0.06092979,
0.0072313417,
-0.0267345,
-0.026497649,
0.0015793117,
0.04976821,
0.016549928,
0.026260799,
0.015306463,
0.042573877,
0.024188356,
0.004966459,
0.007545909,
0.047340494,
0.023966309,
-0.028200012,
0.002444371,
-0.019362528,
0.03185639,
0.0115316585,
0.05000506,
0.048880022,
-0.023773868,
0.045386475,
0.01214599,
-0.04005734,
-0.026497649,
0.012982368,
0.048406318,
0.040975135,
0.014366463,
-0.061758768,
-0.0065355934,
0.004230002,
-0.033011038,
0.02045796,
-0.039909307,
-0.014625518,
0.0026423633,
-0.05805798,
0.010680477,
-0.06294302,
-0.01041402,
-0.022130718,
-0.0072905542,
0.023995915,
-0.023374183,
0.02757828,
0.007379373,
-0.017156858,
-0.037037496,
-0.011435438,
0.015558117,
0.015276857,
-0.027992768,
-0.014847565,
0.047725376,
0.037688836,
0.012575281,
-0.00403386,
-0.045623325,
0.0048665376,
0.015143628,
0.086035945,
-0.043521278,
-0.019199694,
-0.022900483,
0.024025522,
-0.058087584,
0.061107427,
0.004489057,
0.010969139,
0.01866678,
0.03419529,
0.017334495,
0.022204734,
0.014803156,
-0.005991577,
0.013093391,
0.030701745,
0.03274458,
-0.011302209,
-0.018962843,
-0.006328349,
0.03851781,
0.0501827,
0.023226151,
-0.017734181,
0.03250773,
0.012634493,
-0.027311822,
-0.02885135,
0.025491035,
0.0072461446,
-0.0067280345,
0.0053291363,
0.007579216,
-0.017823,
0.038725056,
0.022382371,
0.022870876,
-0.0006610534,
-0.017275283,
-0.012360635,
-0.02617198,
-0.03021324,
0.03795529,
-0.012826934,
0.045179233,
-0.031737965,
0.046215452,
0.015158432,
0.019007253,
-0.051100492,
0.043491673,
-0.0011592722,
0.0112578,
0.0037637025,
-0.0053957505,
0.011620478,
0.00722394,
0.016771976,
-0.01914048,
-0.010858115,
-0.03626773,
-0.025727885,
-0.07064066,
0.064127274,
-0.011146776,
-0.026245994,
0.019303314,
-0.03241891,
-0.0030050406,
-0.060989004,
0.01116158,
-0.023018908,
0.0076680346,
0.013922368,
-0.012915754,
-0.045149624,
0.04648191,
-0.0020927961,
0.021272136,
-0.0017180913,
0.06839058,
0.008082523,
0.0670879,
-0.019066464,
0.00017555618,
-0.0016292724,
0.018119063,
-0.032063637,
-0.057258606,
-0.00075681135,
-0.020605993,
-0.014610715,
-0.044587106,
-0.043017972,
-0.020250717,
0.035468362,
-0.03082017,
-0.039524425,
0.013796541,
0.01745292,
-0.010828508,
0.024217963,
0.051663015,
-0.015646936,
-0.0072165383,
-0.025949933,
0.028066784,
-0.047074035,
-0.030376077,
-0.053409785,
0.02734143,
-0.034224898,
-0.05409073,
-0.0044261436,
-0.015069612,
0.0067428374,
0.01862237,
-0.014699534,
0.008837484,
0.032359697,
0.021420166,
0.04272191,
0.021805048,
-0.03339592,
-0.03185639,
0.045149624,
0.035586786,
0.027223004,
0.074844755,
0.04070868,
-0.02045796,
0.008682051,
0.021982687,
0.026364421,
-0.023122529,
-0.0003337649,
0.014832762,
-0.016061423,
-0.03437293,
-0.049886636,
0.012627092,
0.023714656,
0.0063061444,
-0.007098113,
-0.032122847,
-0.009133548,
-0.062291678,
-0.037067104,
-0.040412616,
0.01332284,
0.0052847266,
-0.010747091,
0.04870238,
-0.047251675,
0.26148295,
0.054031517,
0.023063317,
0.05145577,
-0.010169768,
0.053498607,
0.041715294,
-0.057229,
0.029843163,
0.005799136,
0.0013803943,
-0.040175766,
0.021760639,
0.023181742,
-0.049738605,
0.030316863,
-0.036652613,
0.025180168,
-0.015735755,
-0.0038118127,
-0.055215772,
0.036711827,
0.013729927,
0.048613563,
0.049708996,
-0.011428037,
-0.0068131527,
-0.0045704744,
-0.014640321,
-0.035024267,
-0.014899377,
-0.019480953,
0.05613357,
0.0005491046,
-0.033928834,
0.02608316,
-0.0022759852,
-0.055363804,
-0.012967564,
0.028703319,
0.009999531,
-0.049886636,
0.03780726,
-0.006172916,
-0.02476568,
-0.013271029,
-0.005680711,
0.02195308,
0.05634081,
-0.019895442,
0.013293234,
-0.034965053,
0.039672457,
-0.053646635,
0.008230555,
0.012464257,
-0.001608918,
-0.023004103,
-0.02922143,
0.010865516,
-0.012308824,
-0.0070759086,
0.021331348,
0.015913393,
-0.03795529,
0.030050406,
0.0058768527,
0.056725692,
-0.027726311,
0.004085671,
0.0044631516,
-0.0059175617,
-0.0041115764,
-0.049886636,
0.028022375,
0.028348044,
-0.0025091348,
0.027963161,
0.011664887,
-0.03363277,
0.03194521,
0.0012046068,
-0.02612757,
-0.069397196,
0.006154412,
0.03481702,
-0.025209775,
0.020605993,
-0.013493077,
0.04417262,
-0.0060248845,
0.018355913,
0.005425357,
-0.007853074,
-0.013426462
] |
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
chat = [
{"role": "user", "content": "Hello, how are you?"},
{"role": "assistant", "content": "I'm doing great. How can I help you today?"},
{"role": "user", "content": "I'd like to show off how chat templating works!"},
]
tokenizer.apply_chat_template(chat, tokenize=False)
"[INST] Hello, how are you? [/INST]I'm doing great. How can I help you today? [INST] I'd like to show off how chat templating works! [/INST]" |
[
0.025022525,
0.008861202,
-0.008989406,
0.0065233526,
-0.006749596,
-0.024042137,
-0.011809908,
0.022805339,
-0.0033125812,
0.0131522855,
-0.026379986,
0.019094948,
0.0076621114,
-0.026983302,
-0.02754137,
-0.006930591,
0.0230165,
-0.022051195,
-0.058974124,
-0.048838418,
0.017330248,
0.000027352478,
-0.0737252,
-0.06509778,
-0.041176308,
0.011168885,
0.0028374698,
-0.03254889,
0.05821998,
0.034117512,
-0.021628873,
0.015263891,
0.0051621213,
-0.02770728,
-0.027677115,
-0.025444847,
-0.0072209365,
-0.029758554,
-0.031312093,
-0.015746543,
0.03870271,
0.005953973,
0.028928995,
-0.042352773,
-0.06757138,
-0.025852084,
-0.0028676356,
-0.03212657,
-0.00609349,
-0.042805262,
0.0020625861,
0.024494624,
0.022910919,
0.008423798,
-0.058823295,
-0.0425941,
-0.013868723,
-0.018898869,
-0.023559485,
-0.02628949,
-0.011221675,
0.057465836,
-0.053574447,
-0.057164177,
0.012073859,
0.03354436,
-0.008129681,
0.017088922,
-0.023680147,
-0.042624265,
-0.06576143,
0.0048944,
-0.006176446,
-0.012352892,
-0.042986255,
-0.014856653,
0.034268342,
-0.0072247074,
0.016048202,
0.035324145,
-0.0065761427,
0.025082856,
-0.025037607,
-0.02639507,
-0.019275941,
-0.037043594,
0.048868585,
0.009690761,
0.017330248,
-0.022503681,
-0.03233773,
0.01947202,
-0.013129662,
0.0069758394,
0.025007442,
0.05478108,
0.0083333,
0.04446438,
-0.023725396,
-0.028084353,
0.020331744,
0.046063166,
-0.043287914,
0.009389103,
-0.0064554797,
0.003806546,
0.015897373,
-0.00044730215,
-0.026048163,
0.00468701,
-0.030271374,
-0.021055723,
0.026168825,
0.022805339,
0.007993935,
0.058340643,
0.03260922,
-0.008348383,
-0.07306155,
0.006191529,
0.0005783348,
-0.030542865,
-0.01656102,
-0.03628945,
0.030165793,
-0.019200528,
0.04437388,
0.031131098,
-0.034117512,
-0.0002743202,
0.016319694,
-0.0012396255,
0.05484141,
0.046636317,
-0.01634986,
0.012322727,
0.008431339,
0.016425274,
0.026123576,
-0.03420801,
0.010475071,
0.012797838,
-0.00016944691,
0.09484125,
0.04796361,
-0.025324183,
0.0005599525,
-0.03806923,
-0.013770685,
0.016048202,
-0.037827905,
0.017058756,
-0.022111526,
0.013966762,
-0.022654511,
-0.025414681,
0.0056070667,
-0.02348407,
-0.011576123,
-0.014977316,
-0.014615326,
0.02057307,
-0.03197574,
0.036168784,
0.0040082796,
0.020195998,
-0.043348245,
-0.0018976169,
0.014818946,
-0.05831048,
0.04120647,
0.023257826,
0.028868664,
0.01811456,
0.025656007,
0.009343854,
0.015331764,
0.015565549,
0.012579136,
0.025444847,
-0.037586577,
-0.021116056,
-0.021281967,
0.034660496,
0.0064554797,
-0.001551653,
0.01911003,
0.0013810277,
0.011440377,
0.027420705,
0.045761507,
0.029668057,
-0.0131522855,
0.03806923,
-0.016229197,
0.017782735,
-0.0045701177,
0.031945575,
0.024464458,
-0.02078423,
-0.027662031,
0.076319456,
-0.027058717,
0.022262355,
-0.0046115955,
-0.041327138,
-0.010392115,
0.027360374,
-0.035957623,
0.024916945,
0.050316542,
0.053966604,
-0.052458312,
-0.0006141567,
0.03885354,
-0.039668016,
-0.04748096,
0.018039145,
-0.003076911,
0.032367896,
0.0012104025,
0.035112984,
0.024162801,
0.0040082796,
-0.024404127,
-0.0077601504,
-0.025821919,
0.012639468,
-0.023182413,
0.048657425,
0.040844485,
0.0056221494,
0.037134092,
0.07499216,
0.0031617521,
0.031251762,
0.072940886,
0.03834072,
0.010482613,
-0.027526285,
-0.023996888,
0.039969675,
0.037224587,
0.048385933,
-0.013272949,
0.01249618,
-0.0013904545,
0.0066892644,
-0.0056108376,
0.010806895,
-0.030950103,
0.06461513,
0.023031583,
-0.016621351,
-0.049713228,
-0.021809869,
0.008453963,
0.0253091,
0.006002993,
-0.028446343,
0.06606308,
0.01577671,
-0.0050527705,
0.0052677016,
0.027737446,
0.0448867,
-0.029275902,
0.0074170143,
-0.012669633,
-0.04660615,
0.009306147,
-0.027888276,
-0.07523349,
0.022714842,
-0.04066349,
-0.039879177,
0.0037122779,
-0.022503681,
0.009125153,
-0.039999843,
-0.01853688,
-0.0074170143,
-0.061960537,
0.046213996,
0.041900285,
0.01171941,
-0.0609349,
-0.014962234,
-0.027103964,
0.019562516,
-0.028355846,
0.020995392,
0.0067420546,
-0.034931988,
0.0030278915,
-0.0064177723,
0.011010515,
0.00442683,
-0.02484153,
0.026153743,
-0.008416256,
0.043348245,
0.0043137083,
0.021553459,
-0.013929055,
-0.01150825,
0.016440358,
-0.018039145,
0.048506595,
0.04775245,
-0.01828047,
0.03233773,
-0.00032145422,
0.039125033,
-0.016757097,
0.022564013,
0.04129697,
0.03300138,
0.0008404001,
-0.00008495913,
-0.06346883,
0.021100972,
-0.023981806,
0.016998425,
-0.042895757,
0.042865593,
0.0011566696,
-0.06533911,
-0.005086707,
-0.037737407,
-0.047571454,
-0.01660627,
-0.040452328,
0.060995232,
0.024042137,
-0.0017156794,
-0.025942583,
-0.011274465,
-0.016108533,
0.007865731,
-0.005358199,
-0.007986394,
0.025595676,
0.041990783,
-0.038159728,
0.019502185,
0.031734414,
-0.04482637,
0.006108573,
-0.0018203171,
-0.018054226,
0.0026470483,
0.01917036,
-0.020663569,
0.0038253996,
0.053725276,
-0.024615288,
-0.020844562,
0.036379945,
0.019849092,
0.013876265,
0.010022584,
-0.02463037,
-0.011033139,
-0.020557988,
-0.00012066317,
-0.012330268,
0.068959005,
0.059094787,
0.00027196348,
0.024404127,
0.027586618,
-0.034660496,
-0.024011971,
-0.050014883,
-0.06419281,
0.056530695,
0.012277477,
0.023091914,
-0.011410211,
-0.030482534,
-0.015625881,
-0.008257885,
0.007963769,
0.031493086,
0.013785767,
0.007910979,
0.008408715,
0.020919977,
0.018974284,
0.002202103,
-0.0036161244,
-0.009177943,
-0.019502185,
-0.035746466,
-0.03622912,
0.042533766,
0.03354436,
0.044766035,
0.02202103,
0.04322758,
0.0033785687,
0.023061749,
0.019200528,
-0.02639507,
0.025158271,
-0.03858205,
0.020648485,
0.022383017,
0.0083333,
-0.023755562,
-0.024509707,
-0.022895837,
0.0218702,
0.04416272,
-0.008054267,
-0.036530774,
0.021176387,
-0.021643957,
0.02484153,
-0.059758436,
-0.053966604,
-0.0015450543,
0.035535306,
0.05490174,
-0.009728468,
0.027918441,
-0.026108494,
-0.010573111,
0.037134092,
-0.012450931,
-0.0061161146,
-0.012556511,
-0.031523254,
-0.020407159,
0.025158271,
0.031372424,
-0.043137085,
-0.0026545897,
-0.02458512,
0.011576123,
0.010776729,
0.007895896,
-0.0012122878,
0.029909384,
-0.0033578298,
-0.010045209,
0.020105502,
-0.015196018,
-0.06907967,
0.04202095,
-0.022564013,
0.0033710273,
-0.030889772,
0.045490015,
-0.039185364,
-0.027224628,
0.0066741817,
0.023167329,
-0.0028393553,
-0.024720868,
-0.0015610798,
0.03957752,
-0.0195776,
-0.042986255,
0.015837042,
0.034600165,
0.0022039881,
0.025837002,
0.010844602,
-0.030542865,
0.04425322,
0.012624384,
0.014238254,
-0.03384602,
-0.0015714492,
-0.0021907906,
-0.0026093412,
-0.032639388,
0.057737328,
-0.045007363,
0.012428307,
0.00341062,
-0.027224628,
0.0148415705,
-0.020060252,
0.03336337,
-0.01651577,
0.0039969673,
0.015821958,
0.028612254,
-0.008883826,
-0.018672626,
-0.054238096,
-0.030241208,
-0.03936636,
-0.042533766,
0.02067865,
0.03888371,
0.028461425,
0.043318078,
-0.023785727,
-0.014984857,
0.037315086,
-0.04920041,
-0.010173414,
-0.011221675,
-0.032005906,
-0.0042571477,
0.0037933486,
-0.06708872,
0.020633403,
-0.0437404,
-0.02161379,
0.0075414483,
0.010550486,
0.011176426,
-0.032579057,
0.0047247172,
0.040391997,
-0.0027469725,
-0.062503524,
0.0013310657,
0.037978735,
0.010060292,
0.017149253,
0.036591105,
-0.0024396584,
-0.0077375257,
-0.029230652,
0.042684596,
-0.005712647,
-0.0017948647,
-0.03843122,
-0.04687764,
0.021221636,
0.026998384,
0.00205693,
-0.0540571,
-0.012880794,
-0.013265408,
0.01796373,
-0.031945575,
-0.0044230595,
-0.047149133,
0.014502205,
-0.03040712,
-0.002869521,
0.02129705,
0.0085670855,
-0.023981806,
-0.02488678,
0.030452369,
0.041900285,
-0.022096444,
0.014185464,
0.0021568541,
0.0041063186,
0.015897373,
0.044554874,
0.015580632,
0.035112984,
-0.011742035,
0.011930571,
-0.05019588,
-0.060271256,
-0.080602996,
0.018838538,
0.030241208,
-0.039879177,
-0.03484149,
-0.022639427,
0.018401133,
0.011855156,
0.010120624,
-0.032518726,
0.022473516,
-0.063649826,
-0.033725355,
-0.0076206336,
-0.002151198,
-0.023710312,
-0.014253337,
0.008235262,
0.04889875,
-0.049652897,
0.011568582,
0.052971132,
-0.014826487,
0.024404127,
-0.08102532,
0.052156657,
-0.013597231,
0.011855156,
-0.019818926,
0.019291025,
-0.028823415,
-0.008348383,
-0.04618383,
-0.033966683,
-0.004306167,
0.032941047,
0.04051266,
-0.03285055,
0.021402631,
-0.029170321,
-0.050527703,
-0.028024022,
0.012933584,
0.025429763,
0.015301598,
0.021553459,
0.049652897,
0.032156736,
-0.012073859,
-0.029094907,
-0.017843066,
-0.030950103,
0.039336193,
0.035384476,
-0.022745008,
0.0142835025,
0.0148415705,
-0.03707376,
-0.04874792,
0.011945654,
0.019713346,
-0.040060174,
0.0055278814,
-0.004932107,
0.00034855632,
-0.03879321,
-0.0004303339,
0.0068363226,
-0.013634939,
-0.042413104,
-0.0057578958,
0.0135896895,
-0.06509778,
0.025550427,
0.074690506,
-0.016636435,
0.021447878,
-0.07529382,
-0.020708816,
-0.016621351,
0.029743472,
0.029969715,
0.017481077,
0.013793309,
0.027149213,
0.00078336796,
0.082352616,
-0.007575385,
-0.029637892,
0.043348245,
-0.045007363,
-0.03260922,
-0.015716378,
0.019411687,
-0.02900441,
0.017948646,
0.0019796302,
-0.013770685,
0.001530914,
0.027903358,
-0.02176462,
-0.056651358,
0.009275981,
-0.039668016,
0.000196549,
-0.006274485,
-0.020271413,
0.0049773557,
0.006534665,
0.010957724,
-0.03318237,
0.00880087,
0.0013904545,
-0.00828051,
-0.05013555,
-0.012164356,
0.007858189,
-0.034931988,
-0.02723971,
0.0050489996,
-0.015927538,
0.00067071756,
-0.010128165,
0.015196018,
-0.013725435,
-0.0064856457,
0.045278855,
-0.00067731633,
-0.022895837,
0.01114626,
-0.010316702,
0.008634958,
-0.03155342,
-0.00885366,
0.020844562,
0.010241287,
-0.027662031,
0.026651477,
0.0062141535,
-0.020648485,
-0.029547393,
-0.014570078,
0.051312014,
-0.008619876,
0.037797738,
-0.0095097665,
0.009924546,
-0.034268342,
-0.006391377,
0.0060859486,
0.018084392,
-0.015143228,
0.04202095,
0.030497616,
0.022111526,
0.02739054,
0.02639507,
-0.0063498993,
0.04165896,
-0.001947579,
-0.017058756,
-0.019502185,
-0.0033804541,
0.018944118,
-0.031432755,
0.029939549,
0.05831048,
-0.05275997,
0.024298547,
-0.0120814005,
-0.016742015,
-0.027360374,
0.016681684,
0.03707376,
0.034962155,
0.015339306,
-0.03957752,
0.0015903029,
0.017481077,
-0.02384606,
0.022428267,
-0.067209385,
-0.03405718,
-0.005686252,
-0.033514194,
0.0008785787,
-0.039758515,
0.003925324,
-0.022111526,
0.008514295,
0.02624424,
-0.030874688,
0.03015071,
-0.009260898,
0.0024076074,
-0.037345253,
0.010143247,
-0.0033861103,
0.0022624345,
-0.040391997,
-0.06576143,
0.07101028,
0.04159863,
0.0015507103,
-0.0144041665,
-0.030482534,
0.010535403,
-0.015384554,
0.06274485,
-0.057616666,
0.0072247074,
-0.049140077,
0.0056334618,
-0.031794745,
0.030980268,
0.008642499,
-0.005113102,
0.02197578,
0.03873288,
0.007910979,
0.020769149,
0.046787146,
-0.03888371,
0.044645373,
0.048325602,
0.02337849,
-0.009200566,
-0.025686173,
-0.013265408,
0.04482637,
0.039396524,
0.011289548,
0.010799354,
0.024554955,
0.0010576881,
-0.031131098,
-0.043710236,
0.032729886,
0.021176387,
-0.028732918,
0.011410211,
0.014012011,
0.009607805,
0.011749577,
0.031855077,
-0.00082767394,
0.00057409273,
-0.008702831,
-0.016033119,
-0.03312204,
-0.015791792,
0.06877801,
-0.01171941,
0.009094986,
-0.028099436,
0.052096326,
0.014585161,
0.008348383,
-0.025821919,
0.044343714,
0.009758634,
0.022684677,
0.002009796,
-0.036953095,
0.031704247,
0.01702859,
0.022141691,
-0.023891307,
-0.0022926002,
-0.048235103,
-0.009441894,
-0.03312204,
0.08440389,
-0.034117512,
-0.034087345,
-0.0051734336,
0.007307663,
-0.014411707,
-0.042775095,
0.011968278,
-0.01254897,
0.014668116,
0.0143438345,
-0.000700412,
-0.036108453,
0.04754129,
-0.001973974,
0.02713413,
0.02352932,
0.06443413,
-0.008265427,
0.06763171,
-0.00047746793,
-0.029637892,
0.011380046,
0.02864242,
-0.031221597,
-0.037465915,
0.010067834,
-0.013657562,
-0.020331744,
-0.037194423,
-0.028491592,
-0.004441913,
0.021689204,
-0.02380081,
-0.04238294,
-0.0052149114,
-0.000037589405,
-0.009924546,
0.0067571374,
0.039999843,
-0.0025508949,
-0.001471525,
-0.040030006,
0.019894341,
-0.052669473,
-0.023966722,
-0.036168784,
0.01932119,
-0.018838538,
-0.070889615,
-0.020693734,
-0.007775233,
0.00010145605,
0.013996928,
-0.015806876,
0.0026225387,
0.021990864,
0.012556511,
0.047842946,
0.026651477,
-0.007628175,
-0.041990783,
0.04015067,
0.015316681,
0.019607766,
0.063649826,
0.06123656,
-0.009087445,
0.007051254,
0.007865731,
0.034268342,
0.0012933584,
0.006108573,
-0.0029600183,
-0.028340762,
-0.039487023,
-0.049954552,
-0.010286535,
0.01317491,
0.0070060054,
-0.0064328555,
-0.014419249,
-0.006463021,
-0.048506595,
-0.03864238,
-0.025942583,
0.013039164,
0.029456897,
-0.032096405,
0.041327138,
-0.035173316,
0.2722161,
0.061538216,
0.00973601,
0.033815853,
0.010158331,
0.07004497,
0.058461305,
-0.05013555,
0.027375458,
-0.026726892,
-0.023212578,
-0.043408576,
0.019999921,
0.007598009,
-0.031432755,
0.04917024,
-0.022760091,
0.0051885163,
-0.0047586537,
-0.0077601504,
-0.048928916,
0.044072222,
0.012466013,
0.07867239,
0.048355766,
0.0103242425,
-0.005331804,
-0.020376993,
-0.03463033,
-0.06138739,
0.011372504,
-0.040542826,
0.007315205,
-0.0034822638,
-0.05098019,
0.03134226,
-0.005901183,
-0.047420625,
-0.030693695,
0.02369523,
0.024720868,
-0.035082817,
0.0067835324,
-0.0050753946,
-0.016229197,
0.0048453803,
0.03321254,
0.04322758,
0.05170417,
-0.051161185,
0.015595715,
-0.021387547,
0.039547354,
-0.023514235,
-0.0133408215,
0.007624404,
0.011643996,
-0.031583585,
-0.014366459,
0.034027014,
-0.01624428,
-0.0058936416,
0.012156814,
0.022699758,
-0.0391552,
0.030135628,
0.012941125,
0.029094907,
-0.04072382,
-0.0072963513,
0.010920017,
-0.015316681,
-0.011583664,
-0.06576143,
0.053453784,
0.036530774,
0.0033408615,
0.008303135,
0.018250305,
-0.039245695,
0.0048868586,
-0.010648525,
-0.024615288,
-0.06159855,
0.0045399517,
0.036953095,
-0.028823415,
0.034901824,
-0.0032145423,
0.049954552,
-0.020482574,
-0.000013646781,
-0.010233745,
-0.016078368,
-0.01921561
] |
Note that this time, the tokenizer has added the control tokens [INST] and [/INST] to indicate the start and end of
user messages (but not assistant messages!). Mistral-instruct was trained with these tokens, but BlenderBot was not.
How do I use chat templates?
As you can see in the example above, chat templates are easy to use. Simply build a list of messages, with role
and content keys, and then pass it to the [~PreTrainedTokenizer.apply_chat_template] method. Once you do that,
you'll get output that's ready to go! When using chat templates as input for model generation, it's also a good idea
to use add_generation_prompt=True to add a generation prompt.
Here's an example of preparing input for model.generate(), using the Zephyr assistant model:
thon
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "HuggingFaceH4/zephyr-7b-beta"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint) # You may want to use bfloat16 and/or move to GPU here
messages = [
{
"role": "system",
"content": "You are a friendly chatbot who always responds in the style of a pirate",
},
{"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
]
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
print(tokenizer.decode(tokenized_chat[0]))
This will yield a string in the input format that Zephyr expects.text
<|system|>
You are a friendly chatbot who always responds in the style of a pirate
<|user|>
How many helicopters can a human eat in one sitting?
<|assistant|> |
[
0.021525333,
-0.03138136,
-0.017781796,
0.0006096041,
-0.008452202,
-0.011245231,
-0.012276166,
0.01389934,
-0.016114753,
0.04229026,
0.012619811,
0.027944911,
0.015018014,
-0.034656957,
-0.06340614,
0.016465709,
-0.03509565,
-0.014476956,
-0.06603832,
-0.014352659,
0.008751978,
0.018688435,
-0.10908898,
-0.027784057,
-0.06773461,
0.05243875,
0.0094246445,
0.0084375795,
0.074929215,
0.024376854,
-0.024552332,
0.0035260161,
-0.0009770117,
-0.043372374,
-0.03316539,
-0.0043686773,
-0.008985949,
-0.027433101,
-0.030299244,
-0.030942665,
0.07995959,
-0.013255919,
0.034101274,
-0.047320634,
-0.09914521,
-0.0059297024,
0.022636695,
-0.025561333,
-0.009300347,
-0.047232896,
0.015661433,
-0.0040067537,
0.016626565,
0.0013435053,
-0.03995055,
-0.039073158,
-0.037289128,
0.00028766552,
-0.016027015,
-0.022344232,
0.00042955615,
0.072297044,
-0.048051797,
-0.047934808,
0.01912713,
0.01843984,
-0.018132754,
0.013921275,
0.00594067,
-0.046092287,
-0.028953912,
0.02554671,
-0.058755968,
-0.041208144,
-0.019682812,
-0.014096753,
0.013526449,
-0.017898781,
-0.026862796,
0.034335244,
0.019361101,
0.046121534,
-0.0016944619,
-0.032024782,
-0.056123793,
-0.031293623,
0.031118143,
0.009709797,
0.005600681,
-0.047408376,
-0.059838083,
0.052555736,
-0.00049673143,
0.0042187897,
0.02009226,
0.05872672,
-0.0016944619,
0.035475854,
-0.018425217,
-0.031352114,
0.032317244,
0.056503996,
-0.013504514,
0.009746355,
-0.021847043,
-0.01826436,
0.026029274,
0.021847043,
-0.030708695,
-0.007691797,
-0.027286869,
-0.018776173,
0.019463463,
-0.016012391,
-0.032814432,
0.05729365,
0.046823446,
-0.0047232895,
-0.07095171,
0.024289114,
0.000048325066,
-0.013789666,
-0.047730085,
-0.02738923,
0.016334102,
0.013921275,
0.0027473315,
0.0621193,
0.0027564708,
-0.020106884,
0.043957304,
-0.0005547672,
0.039628837,
0.036119275,
-0.02958271,
0.020516332,
-0.017971897,
0.026687318,
0.019565824,
-0.023645695,
0.040330753,
0.026043897,
0.012181115,
0.06609681,
0.020472463,
-0.01509113,
-0.018820042,
-0.0021953061,
-0.04041849,
0.0013974283,
0.000683634,
0.038839187,
-0.004302873,
-0.0010291068,
-0.040301505,
-0.033106897,
0.0223881,
-0.014520826,
0.01985829,
-0.018001145,
-0.030620955,
-0.0007636046,
-0.02779868,
0.04775933,
-0.028719941,
0.039073158,
-0.016158622,
0.026760433,
0.015120376,
-0.042319506,
0.01536897,
0.011552318,
0.011493825,
0.033399362,
0.026848173,
0.028354362,
-0.0014202772,
-0.0067047314,
0.016816666,
0.0020563859,
0.005783471,
-0.0070300973,
-0.007435891,
0.020253114,
0.0028771122,
-0.013606876,
-0.0031092553,
-0.016319478,
0.0061819525,
0.008101246,
0.018498333,
0.04778858,
-0.010448268,
0.02509339,
0.010711485,
-0.008956702,
-0.010813847,
0.045419622,
-0.011749731,
-0.029407231,
-0.015997767,
0.03863446,
-0.021993274,
0.027243,
-0.03518339,
-0.02779868,
0.0056811087,
0.05799556,
-0.03354559,
0.051122665,
0.0520293,
0.02174468,
-0.057235155,
-0.034101274,
0.03097191,
-0.038868435,
-0.021320608,
0.013614188,
-0.041295882,
0.028149636,
0.020838043,
0.046911187,
0.028427478,
0.038020287,
-0.033194635,
-0.029012404,
0.028251998,
0.026584955,
-0.029758187,
0.032288,
0.036148522,
-0.014944898,
0.045244142,
0.039570346,
0.00024014016,
0.030240752,
0.06094945,
0.053316142,
0.005216822,
-0.022695187,
0.023631072,
0.037698578,
-0.005491007,
0.046267767,
0.010177739,
-0.013972456,
-0.018132754,
-0.0015509719,
-0.008934768,
0.008883586,
-0.035856057,
0.04366484,
0.05156136,
-0.012919586,
-0.021496085,
-0.020721057,
0.0051729525,
0.012210362,
-0.010068065,
-0.018966274,
0.04670646,
0.0052789706,
-0.0049280142,
-0.01940497,
0.0021349855,
0.032404985,
0.012056818,
0.008020818,
-0.0011561458,
-0.06410806,
-0.01743084,
-0.03082568,
-0.050713215,
-0.012583253,
-0.021686187,
-0.026380232,
-0.008737355,
-0.029304868,
0.0035168766,
-0.05477846,
-0.027052898,
-0.021817796,
-0.050625477,
0.029319491,
0.010601811,
-0.01908326,
-0.062470257,
0.0003274223,
0.01454276,
0.03205403,
0.0010062581,
0.022490462,
0.0024914257,
-0.022373477,
0.008847029,
-0.0031110833,
0.026614202,
0.012839159,
-0.03170307,
-0.016626565,
-0.012356593,
0.0065987133,
0.022958405,
0.033691823,
-0.042582724,
0.032931417,
0.017401593,
-0.027637824,
0.038020287,
0.07165362,
-0.014557383,
0.008561877,
-0.0011625434,
0.050947186,
-0.026584955,
0.028427478,
0.038429737,
0.031907797,
-0.019536579,
-0.014308789,
-0.052760463,
0.020662565,
-0.01903939,
0.009973014,
-0.043518607,
0.05170759,
-0.01610013,
-0.06674023,
0.020794174,
-0.060890954,
-0.02706752,
-0.025605202,
-0.027696317,
0.042085536,
0.023704188,
0.018629942,
-0.006353775,
-0.015924651,
-0.000468399,
0.026804304,
0.015910028,
-0.01133297,
0.029655825,
0.024683941,
-0.029670447,
0.015266608,
0.0264241,
-0.051853824,
0.036440983,
-0.0026376576,
0.019156376,
0.0035552625,
0.025532085,
-0.014060195,
0.010309347,
0.015164246,
-0.027272245,
-0.012407775,
0.016524203,
0.012656369,
0.02009226,
0.020838043,
-0.017781796,
-0.031001158,
-0.033925794,
0.0038056846,
-0.025020273,
0.044688463,
0.06633078,
-0.023704188,
0.01569068,
0.0008120439,
-0.039014664,
0.014323412,
-0.06761762,
-0.064751476,
0.06767611,
0.018790796,
0.016407216,
-0.037259884,
-0.027857173,
0.047993302,
-0.028105767,
0.019872911,
0.06504394,
0.018322853,
-0.014557383,
-0.025970781,
0.0039665396,
0.013387528,
0.026394853,
-0.004719634,
-0.02032623,
-0.018834665,
-0.042348754,
-0.022826796,
-0.0036539692,
0.03913165,
0.03971658,
0.037493855,
0.035797562,
0.04462997,
0.032317244,
0.024991028,
-0.046443243,
0.020750303,
-0.040564723,
0.018556826,
-0.023236245,
0.03652872,
-0.021656942,
-0.008883586,
0.0010976531,
0.028032651,
0.022592826,
0.015047261,
-0.040038288,
-0.011822848,
0.015442086,
0.02990442,
-0.04986507,
-0.05559736,
-0.0043833004,
0.03711365,
0.046267767,
-0.0044893185,
0.009475825,
-0.026775056,
0.02458158,
0.027213752,
-0.02311926,
-0.010652992,
-0.018995522,
-0.04161759,
-0.01022892,
0.030913418,
0.017781796,
-0.024830174,
-0.021305984,
-0.047174405,
0.011749731,
0.026131637,
-0.014060195,
0.010857717,
0.017226115,
-0.008401021,
0.012729485,
0.010440956,
-0.01541284,
-0.02564907,
0.030123767,
-0.013314413,
-0.007509007,
-0.06328916,
0.043986548,
-0.019916782,
-0.024391478,
0.011749731,
0.029509593,
-0.00025887613,
-0.01702139,
0.0018754238,
0.009446579,
-0.034276754,
-0.012071442,
0.021890912,
0.015485955,
-0.019565824,
0.013190116,
0.03532962,
-0.02178855,
0.03155684,
0.04422052,
-0.010082688,
-0.012839159,
-0.021978652,
0.010952768,
-0.014608565,
-0.009183362,
-0.00033679028,
-0.03366258,
0.010265478,
0.025941536,
0.0075163185,
-0.01788416,
-0.035651334,
-0.023601824,
-0.016582696,
0.014864471,
-0.009556253,
0.011691239,
-0.008064688,
0.028412854,
-0.0415591,
-0.029845927,
-0.032960664,
-0.02215413,
0.0056445505,
0.023835797,
-0.0022428315,
0.027915666,
0.004909735,
-0.0015198976,
0.012327347,
-0.03170307,
-0.00019752728,
0.011486514,
-0.005820029,
0.0028734563,
0.016334102,
-0.03357484,
0.0010967391,
-0.033136144,
-0.002283045,
0.04638475,
-0.024830174,
0.000049895916,
-0.04501017,
-0.03535887,
0.035241883,
-0.0036302065,
-0.04752536,
-0.0016304854,
0.021686187,
-0.013504514,
0.018498333,
0.029553462,
0.017269984,
-0.018205868,
-0.052555736,
0.041266635,
-0.02032623,
0.018615318,
-0.029977536,
-0.0126051875,
0.035154145,
0.028968535,
-0.0070300973,
-0.0508302,
-0.069079936,
-0.03082568,
0.04091568,
-0.037142895,
-0.034335244,
-0.014871782,
-0.009490449,
-0.031439852,
0.021086637,
0.022578202,
0.012992702,
-0.016275609,
-0.03436449,
0.03535887,
0.023587203,
-0.0087812245,
-0.004237069,
0.01050676,
0.025853796,
0.015061883,
0.023645695,
-0.023689564,
0.055889823,
-0.035212636,
0.0043650214,
-0.005491007,
-0.040038288,
-0.04220252,
-0.0054288586,
0.010828471,
-0.043752577,
-0.052584983,
-0.04495168,
0.03492017,
0.0019704746,
-0.004441793,
-0.061534375,
0.019273361,
-0.044279013,
-0.012334659,
0.016758174,
-0.005545844,
-0.005333808,
-0.03041623,
0.0024347608,
0.07545565,
-0.05916542,
0.03720139,
0.060306028,
-0.023996651,
0.026482593,
-0.056679476,
0.058375765,
-0.02601465,
0.014484268,
-0.034656957,
0.024347607,
-0.04480545,
-0.001205499,
-0.0407402,
-0.029655825,
-0.019463463,
0.01697752,
0.060656983,
-0.035973042,
0.030357737,
0.008613057,
-0.028237376,
-0.049660347,
0.019024767,
0.004694043,
-0.0011799085,
-0.0053191846,
0.023982028,
-0.0011223296,
-0.0016085507,
-0.0070849345,
-0.03857597,
-0.027506215,
0.05229252,
0.010345905,
-0.00889821,
0.056942694,
0.032697447,
-0.032726694,
-0.050683968,
0.0065073185,
-0.009344217,
-0.009797536,
0.019214869,
-0.026321737,
0.02266594,
-0.06299669,
0.0085253185,
0.0067449454,
0.010075376,
-0.027506215,
0.023865042,
0.0026998061,
-0.02041397,
0.02230036,
0.05995507,
-0.019989898,
0.031205883,
-0.03737687,
-0.0044893185,
-0.0022519708,
0.011303724,
0.06323066,
-0.04325539,
0.019097883,
0.012700238,
-0.007991572,
0.09411484,
-0.00688021,
-0.010908898,
0.04533188,
-0.034510724,
-0.026848173,
0.011362217,
0.02852984,
0.0018827354,
0.021759303,
-0.0057505686,
0.014001702,
0.019024767,
0.05156136,
-0.00561896,
-0.041412868,
-0.0019759582,
-0.04430826,
0.03576832,
-0.01839597,
-0.017036013,
0.043840315,
0.025575956,
0.016582696,
-0.031264376,
0.005615304,
0.011625434,
-0.025064144,
-0.005582402,
-0.020984275,
0.038342,
-0.037991043,
0.005684764,
0.012502826,
-0.0037014943,
-0.008956702,
-0.03278519,
-0.037406113,
-0.010258166,
0.0064890394,
0.04664797,
-0.014557383,
0.018995522,
0.01256863,
0.0027784058,
-0.0146231875,
-0.014199115,
-0.022256492,
0.00023785529,
0.020194622,
-0.02481555,
-0.021934781,
0.00087647734,
-0.05027452,
-0.008847029,
0.0012073269,
0.05220478,
-0.042231765,
0.028646825,
-0.019361101,
0.009760978,
-0.039248638,
-0.04971884,
-0.005450793,
0.0125174485,
0.006609681,
0.046033796,
0.030211506,
0.039833564,
0.036207013,
0.022958405,
-0.019551203,
0.046121534,
0.013957833,
-0.007896521,
0.034832433,
0.0006155448,
-0.017533202,
-0.001223778,
0.007925767,
0.039190143,
-0.052789707,
0.015573695,
0.0038422425,
-0.04065246,
-0.018322853,
0.020764926,
0.054369014,
0.04293368,
0.023923535,
-0.027550086,
0.023192376,
0.017928028,
-0.008422956,
-0.001260336,
-0.066798724,
-0.021583825,
0.0132924775,
-0.032083273,
0.013416775,
-0.025371231,
0.0054069236,
0.0014422119,
0.0024859419,
0.050069794,
-0.0065292534,
0.0077649127,
-0.022534333,
0.0032682824,
-0.035973042,
-0.002789373,
-0.00921992,
-0.013555695,
-0.044162028,
-0.034539968,
0.0693724,
0.048958432,
-0.020560201,
-0.009980326,
-0.038195767,
-0.005885833,
-0.0008892726,
0.047700837,
-0.03889768,
0.01912713,
-0.04065246,
-0.00940271,
-0.01972668,
-0.015325101,
-0.021481464,
0.0037874056,
0.045478113,
0.016187869,
-0.007991572,
0.042670462,
0.020984275,
-0.029802056,
0.03073794,
0.051356636,
0.033633333,
-0.01536897,
-0.0044966303,
-0.04246574,
-0.0014696304,
0.05995507,
-0.005275315,
0.0055348766,
0.010470202,
0.013679992,
-0.025151882,
-0.031205883,
0.041354377,
0.01985829,
-0.041442115,
-0.011903275,
0.00306173,
-0.010704174,
0.05937014,
0.04544887,
0.03138136,
0.002950228,
-0.0067741917,
-0.033428606,
-0.040067535,
-0.02178855,
0.014601253,
-0.041588347,
-0.01573455,
-0.012093376,
-0.015515203,
0.027301492,
0.018337477,
-0.028734565,
0.046589475,
0.01119405,
0.05077171,
-0.009556253,
-0.024976404,
0.018469086,
0.024800926,
0.022373477,
-0.034569215,
0.0050779018,
-0.042261012,
-0.006913112,
-0.022329608,
0.056737967,
-0.05980884,
0.008313282,
0.0051071486,
-0.007998884,
-0.008284036,
-0.03445223,
0.002465835,
-0.043343127,
0.012619811,
0.0334871,
-0.0223881,
-0.049338635,
0.054369014,
0.0024292772,
0.0068582753,
-0.00024356747,
0.032551218,
0.0014906512,
0.0552464,
0.0012713034,
-0.02114513,
0.0010482997,
0.021569202,
-0.013716551,
-0.03486168,
0.03395504,
-0.0047379127,
-0.0047817826,
-0.014250296,
-0.031498346,
-0.040447738,
0.05574359,
-0.019916782,
-0.043109156,
0.011581564,
0.037406113,
-0.012093376,
-0.021496085,
0.01944884,
-0.03679194,
0.010989326,
-0.032083273,
-0.003059902,
-0.021408347,
-0.04688194,
-0.025151882,
0.025283491,
-0.0036576248,
-0.044571478,
-0.01610013,
-0.009139492,
-0.030153014,
0.020955028,
-0.009015195,
-0.016246362,
0.018381348,
0.029831303,
0.055392634,
0.018161999,
-0.028251998,
-0.05220478,
0.040126026,
0.041910056,
0.0017374175,
0.08481449,
0.06516092,
-0.002575509,
-0.0039299815,
0.013387528,
0.05132739,
-0.0012978079,
0.009870652,
-0.024991028,
-0.019463463,
-0.011457267,
-0.045770578,
0.011632746,
0.06352313,
0.03155684,
-0.018337477,
-0.029012404,
-0.018366724,
-0.037640084,
0.0031019438,
-0.039160896,
0.040623214,
0.025809927,
-0.0062952824,
0.043050665,
-0.044337504,
0.25526237,
0.05858049,
0.027374608,
0.03509565,
0.0036448296,
0.058521997,
0.023192376,
-0.01895165,
0.020574825,
-0.046823446,
-0.0020362788,
-0.026526462,
-0.0019924094,
0.0427582,
-0.038195767,
0.043343127,
-0.048373505,
0.018278984,
-0.00981947,
-0.0065621557,
-0.053140663,
0.022271115,
-0.0015217254,
0.07288197,
0.023338608,
-0.0040067537,
-0.004803717,
0.01050676,
-0.0077649127,
-0.046443243,
0.002771094,
-0.043547854,
-0.001385547,
0.032960664,
-0.053228404,
0.006021098,
-0.024464592,
-0.06638927,
-0.0276232,
0.02018,
-0.0059150793,
-0.031586085,
0.010294724,
-0.0033066683,
-0.018015767,
0.010514072,
0.0069460142,
0.04778858,
0.05849275,
-0.0508302,
0.024142884,
-0.012583253,
0.029977536,
-0.05156136,
-0.020530956,
-0.0034492444,
0.023280116,
-0.056036055,
-0.016260985,
0.031235129,
-0.013007325,
-0.0010492137,
-0.0031933386,
0.055714346,
-0.024376854,
0.03179081,
-0.0090371305,
0.023133883,
-0.01490834,
-0.015193492,
0.017737927,
0.0020417627,
0.0070520323,
-0.06732516,
0.018820042,
0.0025608859,
-0.011720485,
0.018366724,
0.029027028,
-0.01422105,
0.0036466573,
-0.004248036,
-0.042085536,
-0.033282377,
-0.0064195795,
0.039160896,
-0.052000057,
0.009760978,
0.008905522,
0.037961796,
-0.013402152,
0.019580448,
-0.011215985,
-0.02279755,
-0.034598462
] |
Templates for Chat Models
Introduction
An increasingly common use case for LLMs is chat. In a chat context, rather than continuing a single string
of text (as is the case with a standard language model), the model instead continues a conversation that consists
of one or more messages, each of which includes a role, like "user" or "assistant", as well as message text.
Much like tokenization, different models expect very different input formats for chat. This is the reason we added
chat templates as a feature. Chat templates are part of the tokenizer. They specify how to convert conversations,
represented as lists of messages, into a single tokenizable string in the format that the model expects.
Let's make this concrete with a quick example using the BlenderBot model. BlenderBot has an extremely simple default
template, which mostly just adds whitespace between rounds of dialogue:
thon |
[
0.007976006,
-0.019710489,
-0.033309866,
0.026051126,
0.019409237,
-0.031186758,
-0.0056915116,
0.009553993,
-0.008076423,
0.042232666,
0.0014829489,
0.02678274,
0.0030286587,
-0.023598075,
0.000020873582,
0.0071870126,
0.019882634,
-0.04369589,
-0.07700576,
-0.010421885,
-0.019208403,
0.0043251184,
-0.097720414,
0.0024889156,
-0.06254566,
0.022091815,
-0.01565076,
-0.0061541484,
0.0608816,
0.01651148,
-0.015191709,
0.008169668,
-0.017415237,
-0.042203974,
-0.03262129,
-0.049347952,
-0.024673976,
-0.02444445,
-0.048200324,
0.014919148,
0.04294993,
-0.004981417,
0.02210616,
-0.042347427,
-0.07293168,
0.014295125,
-0.018835424,
-0.016611896,
-0.0062222886,
-0.028059473,
0.04246219,
0.016554516,
0.004031039,
0.01718571,
-0.05491394,
-0.049807,
-0.04891759,
0.017573034,
-0.03861764,
-0.007861244,
-0.017859941,
0.058988016,
-0.02447314,
-0.04375327,
0.023497658,
-0.009209705,
-0.020858116,
0.012566513,
-0.017874287,
-0.03861764,
-0.05500001,
0.013032736,
-0.02745697,
-0.013864766,
-0.033137724,
0.015794214,
0.006462573,
-0.009632892,
0.0069825915,
0.023712838,
0.01255934,
0.049233187,
-0.0035379182,
0.0054655722,
-0.034170587,
-0.047856037,
0.032850817,
-0.011791865,
0.012272433,
-0.029580079,
-0.04599114,
0.03606417,
0.019165367,
0.013986701,
0.01697053,
0.031014614,
0.0098767625,
0.03003913,
-0.03944967,
-0.008973007,
0.021862289,
0.07574336,
-0.021073297,
0.0038517222,
0.008800862,
-0.003783582,
0.012243743,
-0.0046514748,
-0.06690664,
-0.004009521,
-0.01887846,
0.0051786657,
0.012709966,
-0.009360331,
0.01073031,
0.0424335,
0.029866986,
-0.010995699,
-0.065070435,
-0.0085283015,
-0.0065916814,
-0.009991526,
-0.043294217,
-0.01654017,
0.032764744,
0.009381848,
0.0113184685,
0.035289522,
0.00524322,
-0.049405333,
0.005411777,
-0.025792912,
0.03170319,
0.038416807,
-0.0023598075,
-0.0015475029,
-0.02210616,
0.014947838,
0.017573034,
-0.031875335,
0.036265004,
0.019653108,
0.01425209,
0.041343253,
0.038043827,
-0.029580079,
0.01446727,
-0.046191975,
-0.021116333,
0.024774393,
-0.023454621,
0.013082945,
-0.008922798,
0.015320817,
-0.037900373,
-0.021991398,
0.009941317,
-0.020958534,
0.00071950816,
-0.0140225645,
-0.028045129,
-0.009245568,
-0.053909767,
0.06914451,
-0.011232397,
0.026151545,
-0.01137585,
-0.0011063839,
0.007710617,
-0.07000523,
0.021302821,
-0.008757827,
0.014259262,
0.024143199,
0.009475093,
0.032104857,
0.027643459,
-0.030096512,
0.019853942,
0.017989049,
0.009568338,
-0.03176057,
-0.00943923,
-0.00094768865,
0.0074667465,
-0.0075743366,
-0.017171366,
-0.02656756,
0.020442102,
0.014431407,
0.03735525,
0.06002088,
-0.023899328,
0.0381299,
-0.025878983,
-0.01801774,
-0.022235269,
0.034572255,
0.04840116,
-0.033969752,
-0.03230569,
0.06449662,
-0.004608439,
0.015980702,
0.0062187025,
-0.025204754,
-0.020226922,
0.027428279,
-0.014632241,
0.021618418,
0.039420977,
0.0052754967,
-0.060594693,
-0.030727707,
0.051413678,
-0.024530523,
-0.03850288,
-0.0028636875,
-0.019767871,
0.017788215,
0.025721185,
0.046622336,
0.038474187,
0.036609292,
-0.033711538,
0.007947315,
0.012136153,
0.04556078,
0.0008392021,
0.061857082,
0.03692489,
0.015593379,
0.030125203,
0.03769954,
0.019825252,
0.027313517,
0.06380805,
0.056319784,
0.025577731,
-0.0069287964,
0.011526477,
-0.00946792,
0.01912233,
0.037584778,
0.009668755,
-0.0053615686,
-0.024430104,
0.01543558,
-0.0455034,
0.0020585556,
-0.044327084,
0.027758222,
0.011741656,
-0.013147499,
-0.027184408,
-0.042663023,
-0.027442625,
0.027069647,
-0.02465963,
-0.01134716,
0.067709975,
0.004859482,
-0.011404541,
-0.024171889,
0.011799037,
0.032649983,
-0.0014910182,
0.0025283652,
0.010264087,
-0.054340128,
0.029809605,
-0.055918112,
-0.07034952,
0.014904803,
-0.012910801,
-0.035777263,
-0.003385499,
-0.041658852,
-0.0024458796,
-0.023067297,
0.022923844,
0.025276478,
-0.05784039,
0.032793436,
0.023311168,
-0.004346636,
-0.06811165,
-0.0010149324,
-0.0033711535,
0.018993223,
-0.0063011884,
0.023354204,
0.02686881,
-0.011526477,
0.0069503146,
-0.026395416,
0.013556341,
0.014567687,
-0.032104857,
0.0044757444,
-0.01758738,
0.039621815,
0.01893584,
0.01887846,
-0.035059996,
0.009747655,
0.025850292,
-0.03899062,
0.04900366,
0.05270476,
-0.022579556,
0.021876635,
0.020901153,
0.04217528,
-0.008678927,
0.020958534,
0.036609292,
0.03391237,
-0.021589728,
-0.020485137,
-0.06937404,
0.0049168635,
-0.006340638,
0.0010274845,
-0.034600947,
0.06288995,
-0.015952012,
-0.060422547,
-0.014151673,
-0.06461138,
-0.029207101,
-0.021417584,
-0.031186758,
0.055114776,
0.013326815,
0.0024799497,
-0.010723137,
0.008327466,
0.010142151,
0.010615547,
0.008958661,
0.003686751,
0.02487481,
0.027657805,
-0.026008092,
0.00717984,
-0.0032097686,
-0.061512794,
0.00621153,
0.010866591,
0.006258152,
0.0064231236,
0.047425676,
-0.03262129,
0.008994524,
0.033166412,
-0.014366852,
0.0000560925,
0.0029174823,
0.010213878,
0.04025301,
0.026481487,
-0.00079840753,
-0.024587903,
-0.04338029,
-0.0057381336,
0.00029497594,
0.06650497,
0.06288995,
-0.012595204,
0.022608247,
0.009726137,
-0.010400368,
-0.011117634,
-0.0688576,
-0.04599114,
0.049032353,
0.023382895,
0.030641634,
-0.04633543,
-0.012336988,
0.041859686,
0.020327339,
0.016597552,
0.04504435,
0.033625465,
-0.016855769,
-0.006849897,
0.02681143,
0.0030465904,
0.034227967,
0.019165367,
-0.0063262926,
-0.006986178,
-0.034113206,
-0.045101732,
0.014660932,
0.054254055,
0.03600679,
0.02054252,
0.053909767,
0.015292127,
0.026180236,
0.015593379,
-0.022766046,
0.0054476405,
-0.043064695,
0.014646586,
0.011139153,
0.043581124,
-0.034629636,
0.0025427106,
-0.006699271,
0.0205999,
-0.007710617,
0.03858895,
-0.03950705,
0.012803211,
-0.018218575,
0.018648935,
-0.04421232,
-0.048716757,
-0.012588031,
0.00621153,
0.031932715,
0.0038445496,
-0.0076102,
-0.02321075,
0.01349896,
0.049175806,
0.019323165,
-0.034400113,
-0.015105637,
-0.02460225,
-0.04326553,
0.064955674,
0.009597029,
-0.031071994,
-0.013183363,
-0.04504435,
0.01500522,
0.013979528,
-0.02062859,
0.00035549531,
0.025491659,
-0.012308297,
-0.005343637,
0.020499483,
0.0046586473,
-0.06776736,
0.020442102,
0.0031111443,
-0.016583206,
-0.039334908,
0.026495833,
0.0015869526,
-0.02229265,
0.0080405595,
0.013212053,
0.002352635,
-0.00002170012,
0.009317295,
0.013807384,
-0.035547737,
-0.015449925,
-0.009389021,
0.008650237,
-0.0060788356,
0.0067351344,
0.02471701,
-0.016683623,
0.029953059,
0.02899192,
-0.0093961945,
0.004902518,
-0.014689622,
0.005867242,
-0.02859025,
-0.017989049,
0.030727707,
-0.02960877,
0.036580604,
-0.003826618,
-0.0038947584,
-0.006157735,
-0.05144237,
-0.006451814,
0.0011180395,
0.0021105574,
0.036695365,
-0.0020280716,
-0.011834901,
-0.0123800235,
-0.023425931,
-0.0378143,
-0.009826554,
-0.0138289025,
0.03201879,
0.045589473,
0.023196407,
0.013405715,
0.0060895947,
-0.016038084,
0.032391764,
-0.041888375,
0.0053364644,
0.02103026,
-0.012724312,
-0.021575384,
-0.023569385,
-0.019896979,
0.0046407157,
-0.022852117,
-0.022235269,
0.05620502,
-0.028030783,
0.014775694,
-0.016640589,
-0.012982528,
0.042749096,
-0.009848072,
-0.060250405,
-0.00423546,
0.01059403,
-0.01761607,
0.022005742,
0.04974962,
0.005630544,
-0.028360726,
-0.030326037,
0.04174492,
-0.005576749,
-0.017989049,
-0.011870764,
-0.0059497273,
-0.0007854071,
0.034945235,
0.005121284,
-0.04320815,
-0.03213355,
-0.03907669,
0.03001044,
-0.06352114,
-0.014323817,
-0.008506783,
0.006849897,
-0.06690664,
0.019581381,
0.025219098,
0.0083346395,
0.005257565,
-0.04326553,
0.036236316,
0.04845854,
-0.011311296,
0.00096831005,
0.018835424,
0.018318992,
-0.013269435,
0.0150769465,
-0.008377675,
0.0694888,
-0.007760826,
0.0338263,
-0.005817033,
-0.020083468,
-0.050897248,
-0.0021464208,
0.027973402,
-0.048315085,
-0.054598343,
-0.045216493,
0.037412632,
0.0055444716,
-0.017085293,
-0.08435056,
0.019581381,
-0.031444974,
-0.0424335,
0.026553214,
-0.019724835,
0.013032736,
-0.013613722,
-0.00005973487,
0.053881075,
-0.0501226,
0.013412887,
0.061570175,
-0.030182583,
0.018978877,
-0.076948375,
0.06989047,
-0.016210228,
0.011834901,
-0.023698492,
0.010228223,
-0.044872206,
-0.006168494,
-0.03858895,
-0.019194057,
-0.0026180234,
0.019667454,
0.041859686,
-0.027227445,
0.07327597,
-0.0041673197,
-0.025104335,
-0.031588428,
0.026309343,
0.034027133,
0.008621546,
0.02511868,
0.04461399,
0.011139153,
0.006588095,
-0.034457494,
-0.0014605344,
-0.012910801,
0.04415494,
0.027600423,
0.009984353,
0.016396718,
0.026467143,
-0.028489834,
-0.031875335,
0.007459574,
0.011533649,
-0.024243616,
0.02874805,
0.00058546895,
0.012867765,
-0.046220668,
0.03726918,
0.020528173,
-0.02460225,
-0.0338263,
0.0051822523,
0.007739308,
-0.036724057,
0.033539392,
0.05161451,
-0.04326553,
0.041285872,
-0.037441324,
-0.007882761,
-0.032047477,
-0.022235269,
0.038273353,
-0.027700841,
-0.002601885,
0.02616589,
-0.024516176,
0.09215443,
-0.014976529,
-0.020642936,
-0.00048191356,
-0.05829944,
-0.044413157,
-0.0019617244,
0.015665105,
-0.02831769,
0.027959056,
0.017544344,
0.01586594,
-0.012810384,
0.028289,
0.00030282105,
-0.06220137,
0.017314818,
-0.0117057925,
0.006254566,
-0.01973918,
0.010048906,
-0.0060250405,
0.010213878,
0.020499483,
-0.06288995,
-0.017228747,
0.002515813,
-0.010665756,
-0.00527191,
-0.022636937,
0.015636414,
-0.06902975,
-0.014639414,
0.011576685,
-0.019079294,
0.015119983,
0.018720662,
-0.010063252,
-0.0068965196,
-0.021847945,
0.028762396,
-0.019538345,
0.008556992,
-0.025434278,
0.010414713,
0.011182188,
-0.026825774,
-0.034945235,
0.012143326,
0.022134852,
-0.028633287,
-0.02896323,
0.0010364504,
-0.01712833,
-0.019853942,
-0.010572512,
0.037183106,
-0.01933751,
0.011634066,
-0.007875589,
0.03514607,
-0.04556078,
-0.03256391,
0.0044111903,
0.04381065,
-0.0056126122,
0.02105895,
0.035346903,
0.025606422,
0.039134074,
0.013671104,
0.003740546,
0.023110334,
0.0000662351,
0.0017115778,
0.019524,
-0.010658584,
0.017974705,
0.021474965,
0.025922019,
0.027916022,
-0.04937664,
0.018275956,
-0.0019706902,
-0.023325514,
-0.030612944,
0.0038839993,
0.028059473,
0.0069790054,
-0.00019153263,
-0.033711538,
-0.006075249,
0.009324468,
-0.0103573315,
0.031215448,
-0.07138238,
-0.016382372,
0.032047477,
-0.039679196,
0.0038732402,
-0.028245963,
-0.044269703,
-0.009747655,
-0.0038875856,
0.031473663,
-0.012358505,
0.009833727,
-0.0131546715,
-0.018749353,
-0.01669797,
-0.0053579826,
-0.010493612,
-0.007911452,
-0.034342732,
-0.021503657,
0.051327605,
0.009475093,
-0.0076819267,
-0.020614246,
-0.050352123,
-0.011662757,
-0.012989701,
0.059045397,
-0.056836214,
0.0121863615,
-0.040109556,
-0.012516304,
-0.0127673475,
0.026294999,
-0.019667454,
0.009360331,
0.05281952,
0.01761607,
0.04117111,
-0.002365187,
0.024071472,
-0.00039270354,
0.03993741,
0.03170319,
0.049089734,
-0.003514607,
-0.008478093,
-0.027069647,
0.021202404,
0.045704234,
0.014273608,
0.008313121,
0.02859025,
-0.012487614,
-0.02441576,
-0.04670841,
0.021360204,
0.013534823,
0.0018899979,
-0.004515194,
0.019624418,
-0.027485661,
0.04283517,
0.046622336,
0.016281955,
-0.002257597,
0.013140326,
-0.056118947,
-0.042576954,
-0.049347952,
0.038215972,
-0.008291603,
0.03049818,
-0.025391242,
0.010249741,
0.014330989,
0.001026588,
-0.0077249627,
0.0004536712,
-0.003548677,
0.032363076,
0.010307123,
-0.037470013,
0.010464922,
0.0075384732,
0.050552957,
-0.03560512,
0.0019814493,
-0.060537312,
-0.013599377,
-0.03686751,
0.052245706,
-0.04418363,
-0.022393066,
0.010794864,
-0.022020089,
-0.037154417,
-0.045704234,
-0.010629892,
-0.049807,
0.037211798,
0.03224831,
-0.014668104,
-0.03643715,
0.059332304,
-0.0035540566,
0.021116333,
-0.009023216,
0.047110077,
0.0070328,
0.08107983,
0.018548517,
-0.021259785,
-0.0004139974,
0.019423584,
-0.024300996,
-0.025176061,
0.033367246,
-0.00028713082,
0.011813383,
-0.03127283,
-0.061168507,
-0.012494787,
0.03830204,
-0.015923321,
-0.060307786,
0.0131546715,
-0.0029228618,
-0.0024405,
-0.017529998,
0.065299965,
-0.019882634,
0.008456575,
-0.010213878,
0.0030017612,
-0.019653108,
-0.057237886,
-0.051298916,
-0.001321564,
-0.009826554,
-0.05967659,
-0.022809083,
-0.025922019,
-0.013706967,
0.047798656,
-0.016827077,
-0.045847688,
0.037613466,
0.03732656,
0.06564425,
0.011175016,
0.0019079294,
-0.043552436,
0.033596773,
0.037211798,
0.03471571,
0.08463747,
0.071095474,
-0.017013567,
0.00018391167,
0.006394433,
0.04802818,
0.0061111124,
-0.0003344256,
-0.0051679066,
-0.056061566,
-0.0059999363,
-0.05155713,
0.001065141,
0.054655723,
0.0142090535,
-0.027284825,
-0.021776218,
-0.026682323,
-0.040396463,
-0.013470269,
-0.03471571,
0.027844295,
-0.0023813255,
-0.03052687,
0.01438837,
-0.041458018,
0.24513307,
0.04969224,
0.022335686,
0.032047477,
0.033596773,
0.0528769,
0.055459064,
-0.033568084,
-0.00027704428,
-0.03858895,
-0.003643715,
-0.021288477,
-0.013355507,
0.019710489,
-0.032793436,
0.03511738,
-0.030182583,
0.014804385,
0.017687798,
0.0017447514,
-0.030785087,
0.06082422,
0.015980702,
0.09640065,
0.057237886,
-0.026065473,
-0.016841423,
-0.02087246,
-0.007115286,
-0.037785612,
0.008054906,
-0.037584778,
-0.0005527437,
0.0015170191,
-0.041544087,
-0.00068095507,
-0.018060775,
-0.06047993,
-0.0028403762,
0.02038472,
-0.011433232,
-0.047798656,
0.024760047,
0.011756002,
-0.028877158,
0.0046407157,
-0.0037584775,
0.0704069,
0.050409507,
-0.036695365,
0.0038158589,
-0.024315342,
0.062430896,
-0.062029228,
-0.009166669,
-0.013133153,
0.00849961,
-0.04774127,
-0.008284431,
0.059045397,
-0.03698227,
0.016281955,
-0.032535218,
0.052532613,
-0.0073376386,
0.014675277,
-0.0059497273,
0.042605642,
-0.02468832,
0.0043358775,
0.013656759,
0.0059282095,
-0.018333338,
-0.04547471,
0.009776345,
0.021934016,
-0.0154642705,
0.0025104336,
-0.004149388,
-0.04556078,
0.014653759,
0.0029300347,
0.0018720662,
-0.036666676,
0.0065916814,
0.056836214,
-0.039679196,
0.0007204048,
0.012537822,
0.08429319,
0.0035056411,
0.016611896,
0.023296824,
0.010687274,
-0.0138289025
] | From here, just continue training like you would with a standard language modelling task, using the formatted_chat column.
Advanced: How do chat templates work?
The chat template for a model is stored on the tokenizer.chat_template attribute. If no chat template is set, the
default template for that model class is used instead. Let's take a look at the template for BlenderBot:
thon |
[
0.05402868,
0.0031039205,
-0.02007126,
0.036140397,
-0.009072998,
-0.035473377,
-0.008322599,
0.038020182,
-0.0020958094,
0.022602906,
-0.038626567,
0.0029996983,
0.007720007,
-0.024967799,
-0.041810073,
-0.01384826,
0.010619273,
-0.04047603,
-0.03292657,
-0.035928164,
0.017539613,
-0.010308502,
-0.057666976,
-0.04120369,
-0.021708494,
0.027332691,
0.020162217,
-0.028575774,
0.056999955,
0.047388792,
-0.017463816,
0.025695458,
-0.013764882,
-0.032805294,
0.0034715398,
-0.022420993,
-0.0025543862,
-0.01659972,
-0.052694637,
-0.02633216,
0.020844398,
-0.0173577,
0.033078164,
-0.035534013,
-0.04781326,
-0.007166683,
0.007234901,
-0.039596777,
-0.006825593,
-0.023770195,
-0.0042370977,
0.015485493,
0.03432125,
0.018115677,
-0.059395164,
-0.042052627,
-0.016205572,
-0.0011104379,
-0.038323373,
-0.02145078,
0.0062836385,
0.061244633,
-0.041324966,
-0.05160315,
0.00831502,
0.010111428,
-0.010861826,
0.027453966,
-0.027560085,
-0.019267803,
-0.060850482,
0.038262736,
-0.02045025,
-0.014333366,
-0.032774974,
-0.02043509,
0.026028968,
-0.0009559999,
0.00034251137,
0.04320475,
0.0014932168,
0.057788253,
-0.012074592,
-0.0075229327,
-0.042143583,
-0.008375658,
0.07124994,
0.021632696,
0.015409695,
-0.01797924,
-0.011149858,
0.014818472,
-0.02179945,
0.03283561,
0.01800956,
0.06858186,
-0.00587433,
0.021223387,
-0.043477625,
-0.0056317775,
0.020753441,
0.056484528,
-0.02216328,
0.0145456,
-0.020268334,
0.0009621585,
0.037080288,
0.00062675314,
-0.024391735,
0.027272053,
-0.043083478,
-0.008845605,
-0.001906315,
0.00032522,
-0.0010772764,
0.022602906,
0.02598349,
-0.030273646,
-0.076101005,
-0.020101579,
-0.023982428,
-0.014371265,
0.02146594,
-0.01769121,
0.030243326,
-0.037535075,
0.034442525,
0.019282963,
-0.04229518,
-0.009072998,
0.019570995,
-0.013067543,
0.044508476,
0.03183508,
-0.01864626,
-0.0065981993,
0.018903974,
0.03704997,
0.030046253,
-0.017463816,
0.017206103,
-0.03192604,
0.0072917496,
0.10332758,
0.034078695,
-0.006810433,
-0.0017405072,
-0.015690148,
-0.015303578,
0.009406508,
-0.0366255,
0.010937625,
-0.026347319,
0.017388018,
-0.031653166,
0.0042333077,
0.007792015,
-0.018115677,
-0.010566215,
0.001369098,
-0.016736157,
-0.0047904216,
-0.047237195,
0.04635794,
-0.016129775,
0.036898375,
-0.013181239,
-0.0014932168,
0.0044607013,
-0.04541805,
0.043053158,
0.020253176,
-0.0010403249,
0.029212477,
0.039293587,
0.009186694,
0.03383614,
0.0061813113,
0.007231111,
0.020586686,
-0.03498827,
-0.0038372641,
-0.0075911507,
0.018858496,
-0.0018617838,
0.011157438,
0.023724714,
0.002832943,
-0.025831895,
0.037959542,
0.041840393,
0.006124463,
-0.02014706,
0.024634289,
-0.038050503,
0.023406364,
-0.015295998,
0.01696355,
0.014704775,
-0.020541206,
-0.04017284,
0.061487183,
-0.015000387,
0.01802472,
-0.000874991,
0.0020635955,
-0.02839386,
0.04253773,
-0.041082412,
0.023755034,
0.04848028,
0.040718585,
-0.036473908,
0.002040856,
0.04362922,
-0.016205572,
-0.04569092,
-0.006719476,
-0.005226259,
0.021920728,
0.010907305,
0.026529234,
0.038050503,
-0.0000047521676,
-0.028105829,
-0.0024653238,
-0.031774443,
0.01629653,
0.02008642,
0.013992276,
0.014750254,
0.0009806342,
-0.015045865,
0.06682335,
-0.0063821757,
0.015993338,
0.07804143,
0.035503697,
-0.007651789,
-0.019646794,
-0.045963794,
0.017221263,
0.022799982,
0.029015401,
0.010558635,
0.008807706,
-0.0021564476,
0.0020181166,
-0.011839618,
0.040385075,
-0.04817709,
0.03356327,
0.017888283,
-0.0032384614,
-0.049238257,
-0.05090581,
-0.0043204753,
0.029273115,
-0.010876986,
-0.02046541,
0.056181338,
0.019222325,
0.0015889116,
-0.009990152,
0.0109148845,
0.031046784,
-0.043144114,
0.011513688,
-0.02662019,
-0.019904505,
-0.016023658,
-0.043022837,
-0.080406316,
-0.013067543,
-0.023739874,
-0.024740405,
0.0050670835,
-0.03225955,
0.0037671512,
-0.06955207,
-0.026498916,
0.0032138273,
-0.025437746,
0.024967799,
0.02633216,
0.021572057,
-0.08507546,
-0.0034885942,
-0.006946869,
0.05609038,
-0.013438952,
0.03292657,
-0.0063177478,
-0.051451553,
0.011741081,
-0.029166998,
0.01456076,
0.014325786,
-0.04229518,
0.0039035873,
-0.006435234,
0.016811954,
0.011922996,
-0.023436684,
-0.011498528,
-0.00554082,
0.009035099,
-0.022148121,
0.04632762,
0.020935355,
-0.014795733,
0.03383614,
-0.008724328,
0.028272584,
-0.006946869,
0.023072854,
0.019768069,
0.03562497,
-0.013666346,
-0.013059963,
-0.05157283,
0.026468595,
-0.01696355,
0.017221263,
-0.026407957,
0.040203158,
-0.026271522,
-0.06169942,
0.017221263,
-0.03256274,
-0.04887443,
0.002283409,
-0.035897844,
0.07500952,
0.0228303,
-0.008193743,
-0.02357312,
-0.013590547,
-0.023254769,
0.04223454,
-0.00027026658,
0.0050026556,
-0.0032990996,
0.047995172,
-0.026468595,
0.020207696,
0.037201565,
-0.047904216,
0.000031562682,
-0.016114615,
-0.021011153,
0.023376046,
0.042749967,
-0.015902381,
0.004362164,
0.051542513,
-0.006689157,
0.0016865013,
0.03401806,
0.025180032,
0.0033332088,
0.026786946,
-0.011286294,
-0.0015908065,
-0.018873654,
-0.018236954,
-0.0054650223,
0.03465476,
0.07143186,
-0.017903443,
0.025543863,
0.01282499,
-0.0437505,
-0.00017220316,
-0.034806356,
-0.08452972,
0.056999955,
0.008724328,
0.03225955,
-0.020313814,
-0.024785884,
-0.02079892,
-0.007716217,
0.016736157,
0.014287887,
0.022375515,
0.0025051176,
0.004540289,
0.00082288,
0.0046198764,
0.01628137,
0.002671873,
-0.030046253,
-0.02110211,
-0.04948081,
-0.03911167,
0.032774974,
0.041991986,
0.045842517,
0.013590547,
0.04432656,
-0.030122051,
0.013946798,
0.02392179,
-0.016190413,
0.02563482,
-0.040809542,
0.028469658,
0.035443056,
-0.014295467,
-0.0011521267,
-0.024027906,
0.0014193141,
0.009626322,
0.03817178,
-0.013272197,
-0.024027906,
0.01525052,
0.0051769903,
0.012324724,
-0.038626567,
-0.057272825,
0.00936103,
0.016463285,
0.063548885,
-0.0429622,
0.02806035,
-0.01905557,
0.0002707403,
0.033351038,
-0.004225728,
-0.02113243,
-0.018434027,
-0.03495795,
-0.056332935,
0.020192537,
0.048268046,
-0.054847296,
-0.018267272,
-0.04602443,
0.004813161,
0.048601557,
0.010619273,
-0.00346017,
0.023618598,
-0.00025794943,
0.014386425,
0.03811114,
-0.041779753,
-0.059940908,
0.008557573,
-0.027317531,
-0.017236423,
-0.05048134,
0.01875238,
-0.014295467,
-0.034260612,
-0.009467146,
0.027317531,
0.004574398,
-0.02079892,
0.010437358,
0.032380827,
-0.019434558,
-0.04093082,
0.019601313,
0.024315938,
-0.007587361,
0.038202096,
0.0061851013,
-0.01421967,
0.04684305,
-0.0052452087,
-0.00065044,
-0.00069970853,
-0.00033019422,
0.020935355,
-0.007238691,
-0.013620866,
0.038990393,
-0.028878966,
0.022042004,
0.0059425486,
-0.029303433,
0.023739874,
-0.05781857,
0.021935886,
0.013385894,
0.011013422,
0.039990924,
0.0024520592,
-0.010930045,
-0.007303119,
-0.07822334,
-0.0374138,
-0.03225955,
-0.020268334,
0.0023459422,
0.03532178,
0.03538242,
0.03225955,
-0.021420462,
-0.021966206,
0.028909285,
-0.050814852,
-0.010050789,
-0.021011153,
0.000030185885,
0.03125902,
0.009755178,
-0.037201565,
0.005715155,
-0.009421668,
-0.027590403,
-0.0044228025,
-0.00762147,
-0.0027533555,
-0.010649593,
0.007507773,
0.043022837,
-0.009952253,
-0.06554995,
0.023633758,
0.013969537,
0.017736688,
0.0013605707,
0.035928164,
-0.03744412,
-0.0026453435,
-0.039930288,
0.03983933,
-0.05748506,
-0.016478444,
-0.045599964,
-0.045478687,
-0.02490716,
0.016493604,
-0.005715155,
-0.02834838,
-0.029970454,
-0.02493748,
0.012211028,
-0.03538242,
-0.0077768555,
-0.048935067,
0.03704997,
-0.033775505,
-0.004608507,
0.011528847,
0.017888283,
-0.03438189,
-0.0029523247,
0.022966737,
0.06821803,
-0.018797858,
0.006859702,
-0.02566514,
0.0048889588,
-0.0035814466,
0.03917231,
0.0015453278,
0.04435688,
-0.004479651,
0.009285232,
-0.0575457,
-0.053968042,
-0.054968573,
0.025498385,
0.062821224,
-0.023421524,
-0.027226575,
-0.039263267,
0.017281901,
0.021086952,
0.016872592,
-0.042446773,
0.017160624,
-0.02427046,
-0.030682955,
0.015076185,
-0.018161155,
-0.019586155,
0.010505577,
0.015220201,
0.029136678,
-0.05642389,
0.0078071747,
0.06385208,
-0.023664076,
0.03283561,
-0.10005311,
0.030394923,
0.017175784,
-0.008201323,
-0.018964613,
0.015038285,
-0.014848791,
0.0040362333,
-0.04608507,
-0.04014252,
-0.0010971733,
0.009474726,
0.04062763,
-0.02078376,
0.024043066,
-0.00050831906,
-0.059637718,
-0.03944518,
0.012991745,
0.020556366,
0.00830744,
0.035261143,
0.031956356,
0.018373389,
0.013431372,
-0.02184493,
-0.025786415,
-0.043962732,
0.041719116,
-0.0089214025,
-0.019207165,
0.021511419,
0.01177898,
-0.03917231,
-0.052361127,
0.004479651,
0.0027211413,
-0.04287124,
-0.009876455,
-0.004407643,
-0.03013721,
-0.019495197,
0.0078071747,
0.020874716,
-0.014636558,
-0.03386646,
-0.009194274,
0.018115677,
-0.07567654,
0.03183508,
0.08556057,
-0.03159253,
0.016569402,
-0.05884942,
-0.0004552606,
-0.033138804,
0.019464878,
0.022314876,
-0.02355796,
0.022026844,
0.041415922,
-0.023118332,
0.08028504,
0.00589328,
-0.015705306,
0.042840924,
-0.048419643,
-0.030303964,
-0.015440014,
-0.0027211413,
-0.017903443,
0.009891614,
0.0068483325,
-0.01831275,
-0.006196471,
0.023830831,
0.0026548184,
-0.032714337,
0.001453423,
-0.03565529,
-0.012673394,
-0.025756096,
-0.026423117,
-0.018873654,
0.025498385,
0.002876527,
-0.038596246,
-0.005787163,
0.027878435,
-0.012476319,
-0.04408401,
-0.04014252,
-0.010770869,
-0.02803003,
0.005362695,
0.0099219335,
-0.00520352,
-0.005851591,
0.014575919,
-0.004752523,
-0.021011153,
-0.0028367331,
0.053513255,
0.013226718,
-0.017827645,
0.013408633,
-0.013325255,
0.023876311,
-0.021359824,
-0.009929514,
0.028090669,
-0.021708494,
-0.02393695,
0.019677112,
0.01110438,
0.002078755,
0.007136364,
-0.0086257905,
0.044508476,
-0.02834838,
0.04120369,
0.003359738,
0.0144849615,
-0.032016996,
-0.01626621,
-0.010467677,
0.016357169,
-0.014166611,
0.042780284,
0.024952639,
0.018555304,
0.034472845,
0.048298366,
-0.004809371,
0.022754503,
-0.008792547,
-0.019934824,
0.0028537875,
-0.020556366,
0.020541206,
-0.044447836,
0.0061396225,
0.08174036,
-0.03018269,
0.026862744,
-0.015599189,
-0.029500509,
-0.06200261,
0.012362623,
0.004949597,
0.028105829,
0.013294936,
-0.042749967,
0.016432965,
0.01834307,
-0.022709025,
0.023012215,
-0.06227548,
-0.01661488,
0.014265148,
-0.005150461,
0.01696355,
-0.030591996,
0.030364603,
-0.013825521,
0.023027375,
0.05957708,
0.0017196628,
0.012104911,
-0.039202627,
-0.0013700455,
-0.04062763,
-0.0104904175,
-0.010892145,
-0.014030175,
-0.030106891,
-0.06488293,
0.05230049,
0.039232947,
-0.0018589413,
-0.030531358,
-0.04684305,
0.00692413,
-0.020723121,
0.040688265,
-0.05891006,
0.01873722,
-0.02143562,
0.024164341,
-0.02252711,
0.00829986,
-0.0060069766,
-0.0026415538,
0.03153189,
0.028590934,
0.015538551,
0.002702192,
0.06018346,
0.0034222712,
0.03383614,
0.013575388,
0.02145078,
0.0066057793,
-0.0075987307,
-0.019646794,
0.03529146,
0.042416457,
0.01940424,
-0.0066285185,
0.061214313,
0.008125525,
-0.018055039,
-0.026999181,
0.029879497,
0.049298897,
-0.03808082,
-0.0011682338,
-0.015068605,
0.011559166,
0.00093705044,
0.008800126,
-0.008087627,
0.018176315,
-0.013022064,
-0.0060031866,
-0.041810073,
-0.010558635,
0.005919809,
-0.014500122,
-0.006973399,
-0.007784435,
0.055605274,
0.021086952,
-0.004752523,
-0.0070075076,
0.04320475,
-0.004915488,
0.06257867,
0.00866369,
-0.009095738,
0.034776036,
-0.02422498,
0.04635794,
-0.022314876,
-0.0063935453,
-0.0366255,
-0.0057682134,
-0.041779753,
0.074221216,
-0.020905036,
-0.015068605,
-0.009148796,
0.010642013,
-0.0010858036,
-0.047570705,
0.013173659,
-0.024528172,
0.002599865,
-0.0012591912,
0.009398929,
-0.04129465,
0.048601557,
0.029515667,
0.044478156,
0.036564864,
0.06888505,
-0.022466471,
0.06949143,
0.013726983,
-0.023254769,
0.03874784,
0.02146594,
-0.022648387,
-0.016796796,
0.031380296,
0.012392942,
0.0043545845,
-0.026923383,
-0.039990924,
0.014780574,
0.038899437,
-0.0014126817,
-0.029348912,
-0.009997731,
-0.015538551,
-0.0014126817,
0.011953315,
0.059940908,
0.015811423,
-0.015333897,
-0.026817266,
0.017297061,
-0.015015546,
0.0016173358,
0.0028007291,
0.008171004,
-0.009656642,
-0.07810207,
0.0012857204,
-0.006999928,
0.01174866,
-0.009019939,
-0.013787622,
-0.025604501,
0.02145078,
0.019949984,
0.057333466,
0.013181239,
-0.005688626,
-0.039687734,
0.038293052,
-0.0023061484,
0.018767538,
0.07773823,
0.05339198,
-0.026256362,
-0.009830976,
-0.040718585,
0.037929226,
0.04077922,
0.0011852883,
-0.012536958,
-0.02355796,
-0.03714093,
-0.072947815,
-0.00726901,
0.015705306,
0.029485349,
-0.020707961,
-0.030773912,
0.008224063,
-0.028272584,
-0.023982428,
-0.0290912,
0.040324435,
0.04220422,
-0.02943987,
0.0024729036,
-0.037201565,
0.27529764,
0.051512193,
0.007064356,
0.0050746636,
0.002143183,
0.06163878,
0.0401122,
-0.01003563,
0.010278183,
-0.025892531,
-0.000059868427,
-0.0366255,
0.01905557,
0.03762603,
-0.013401053,
0.030531358,
-0.020965675,
-0.0027533555,
-0.03319944,
-0.012703713,
-0.029955296,
0.032289866,
0.028302902,
0.06700526,
0.056636125,
-0.012226187,
-0.0043242653,
-0.030682955,
-0.01558403,
-0.039687734,
0.03844465,
-0.04387177,
0.0038277896,
-0.045903154,
-0.049602088,
0.011718342,
0.0059425486,
-0.07761696,
-0.009891614,
0.021753972,
0.006620939,
-0.03225955,
0.0071856324,
-0.016493604,
-0.03780795,
0.03762603,
-0.0090578385,
0.04129465,
0.03080423,
-0.07440313,
0.0007608205,
-0.016478444,
0.022436151,
-0.02004094,
-0.030031092,
-0.00020275914,
-0.0063594365,
-0.026453435,
-0.01422725,
0.046782408,
-0.0037917856,
-0.0014259464,
-0.005741684,
0.05190634,
-0.038990393,
0.055817507,
-0.0058705406,
0.01691807,
-0.04323507,
0.014295467,
0.001487532,
0.0037614664,
-0.030713273,
-0.07567654,
0.037959542,
0.035139866,
0.023451842,
0.014500122,
0.03150157,
-0.03783827,
0.012764351,
0.015796265,
-0.01282499,
-0.07076484,
0.024149183,
0.05032975,
-0.019616473,
0.023148652,
-0.0035530224,
0.054180276,
0.013620866,
0.029000243,
-0.00049126457,
0.0037103028,
-0.035200503
] |
Now that our input is formatted correctly for Zephyr, we can use the model to generate a response to the user's question:
python
outputs = model.generate(tokenized_chat, max_new_tokens=128)
print(tokenizer.decode(outputs[0]))
This will yield:
text
<|system|>
You are a friendly chatbot who always responds in the style of a pirate</s>
<|user|>
How many helicopters can a human eat in one sitting?</s>
<|assistant|>
Matey, I'm afraid I must inform ye that humans cannot eat helicopters. Helicopters are not food, they are flying machines. Food is meant to be eaten, like a hearty plate o' grog, a savory bowl o' stew, or a delicious loaf o' bread. But helicopters, they be for transportin' and movin' around, not for eatin'. So, I'd say none, me hearties. None at all.
Arr, 'twas easy after all!
Is there an automated pipeline for chat?
Yes, there is! Our text generation pipelines support chat inputs, which makes it easy to use chat models. In the past,
we used to use a dedicated "ConversationalPipeline" class, but this has now been deprecated and its functionality
has been merged into the [TextGenerationPipeline]. Let's try the Zephyr example again, but this time using
a pipeline:
thon
from transformers import pipeline
pipe = pipeline("text-generation", "HuggingFaceH4/zephyr-7b-beta")
messages = [
{
"role": "system",
"content": "You are a friendly chatbot who always responds in the style of a pirate",
},
{"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
]
print(pipe(messages, max_new_tokens=128)[0]['generated_text'][-1]) # Print the assistant's response |
[
0.0015370813,
-0.0031469765,
-0.017688423,
0.025644662,
-0.0005500993,
-0.038815077,
-0.003917737,
0.011046384,
0.003418696,
0.03600198,
-0.00081915513,
-0.019123387,
0.049641244,
-0.035206355,
-0.03318888,
0.025175812,
-0.032279596,
-0.030176876,
-0.044725426,
-0.014321229,
0.0043013413,
-0.012246924,
-0.110819034,
-0.018484047,
-0.049271848,
0.038133115,
0.018228311,
-0.0042374074,
0.08706398,
0.038303606,
-0.038957153,
0.022249052,
-0.012474245,
-0.029381253,
0.0021062721,
-0.01653761,
0.027377985,
-0.023357242,
-0.04120195,
-0.014946362,
0.03821836,
0.013078067,
0.009256231,
-0.046401918,
-0.07876676,
0.008474815,
-0.0168928,
-0.021851242,
-0.016367119,
-0.036712356,
-0.0059849382,
0.0063081607,
0.037962623,
0.029750649,
-0.044668596,
-0.042821612,
-0.04270795,
-0.028670873,
-0.03489379,
0.04557788,
-0.01950699,
0.06455919,
-0.04330467,
-0.046032522,
0.014676418,
0.016750723,
-0.00028903523,
0.049186602,
-0.01618242,
-0.033018388,
-0.037536398,
0.043020517,
-0.027747381,
-0.048874035,
-0.018185688,
0.021112448,
0.0028770326,
-0.007288483,
0.0033867292,
0.057938464,
-0.028415138,
0.033444617,
0.02787525,
0.012154575,
-0.043617237,
-0.03080201,
0.023200959,
0.01969169,
-0.01986218,
-0.037394322,
-0.035888318,
0.022092769,
-0.01729061,
-0.006549689,
0.026838098,
0.029239176,
0.013241454,
0.03458122,
-0.032563746,
-0.0084179845,
0.037024923,
0.028599836,
-0.013596644,
0.01700646,
-0.0071002324,
-0.014051286,
0.01811465,
-0.0031380968,
-0.02366981,
0.001317752,
-0.029054478,
-0.01899552,
0.019720105,
-0.013227247,
0.0057789288,
0.03264899,
-0.0011321657,
0.005960075,
-0.06399089,
-0.012644736,
-0.0027758037,
-0.017461102,
-0.008844212,
-0.049470752,
0.011955669,
-0.024408603,
0.031540804,
0.059558127,
-0.015997723,
-0.009952402,
0.034325484,
0.0025733458,
0.057625897,
0.038843494,
-0.011792282,
0.01659444,
0.01841301,
0.006393406,
0.033558276,
-0.027718967,
0.01571357,
0.011081903,
0.0056475084,
0.08558639,
0.008567164,
-0.013248558,
0.0120622255,
-0.011238187,
-0.014534343,
0.021055616,
-0.045037992,
0.024437018,
0.0045002475,
-0.008027276,
-0.022945223,
-0.018555084,
0.00949776,
-0.0038751143,
-0.01096114,
-0.0041308505,
-0.0034666467,
0.0107267145,
-0.07166298,
0.062456474,
-0.040406324,
0.03969595,
-0.025630454,
-0.02074305,
0.018341972,
-0.027903665,
0.011664414,
0.010151308,
-0.0013204159,
0.023556149,
0.043901388,
-0.016026137,
0.0352916,
0.00914257,
0.0050010644,
0.008332739,
-0.0020867367,
-0.0014225328,
-0.008964976,
0.023058884,
-0.0053953244,
-0.0016613975,
-0.01218299,
-0.028429344,
-0.02717908,
0.00079074,
0.031313483,
0.021893863,
-0.012545283,
0.023527734,
-0.01922284,
0.0110961115,
-0.03463805,
0.033018388,
0.007220997,
-0.027264325,
-0.0043048933,
0.057199672,
-0.048703544,
0.038474098,
-0.0064005097,
-0.03463805,
0.017787876,
0.06785535,
-0.040463157,
0.028855572,
0.017787876,
0.03901398,
-0.049556,
-0.003683312,
0.036911264,
-0.035717826,
-0.02980748,
0.035490505,
0.0026745747,
0.0051076207,
-0.0016720532,
0.025559416,
0.0700149,
0.022064354,
-0.0052177296,
0.006652694,
0.014889532,
0.058137372,
-0.014044181,
0.022305883,
0.034922205,
0.009533279,
0.02594302,
0.048930865,
-0.0007641008,
0.01180649,
0.03915606,
0.031881783,
0.013958937,
-0.029182347,
-0.013007029,
0.04407188,
0.039809607,
0.03142714,
-0.025857775,
-0.015315759,
-0.006524826,
0.0025893294,
-0.018242517,
0.010222346,
-0.04645875,
0.04921502,
0.021126654,
-0.009781911,
-0.05745541,
-0.043105762,
-0.0015122182,
0.040036928,
-0.0031984788,
0.01490374,
0.049072944,
0.016509194,
0.0030049009,
-0.012687359,
0.02331462,
0.018341972,
-0.010918517,
0.008290117,
-0.021467635,
-0.06501383,
-0.0050898613,
-0.037081756,
-0.05020955,
0.01437806,
-0.03651345,
-0.036428206,
-0.0032517572,
-0.05310789,
0.009391203,
-0.035717826,
0.0035643238,
-0.017958367,
-0.041344024,
0.021751788,
0.034382317,
0.0086026825,
-0.041969158,
0.0060737357,
-0.015940892,
0.052795324,
-0.026667606,
0.012921784,
0.011721244,
-0.03506428,
-0.011110319,
0.00009107273,
0.0022128287,
-0.025630454,
-0.027420608,
0.017688423,
-0.010151308,
0.03966753,
0.012872057,
0.006418269,
-0.050578944,
-0.012751293,
0.030716764,
-0.018029405,
0.059558127,
0.04586203,
-0.008623994,
0.04381614,
-0.0074660773,
0.040832553,
-0.059558127,
0.010222346,
0.037621643,
0.035462093,
-0.026610777,
-0.036683943,
-0.059160315,
0.030631518,
-0.047254372,
-0.011564961,
-0.0075513227,
0.025218435,
0.019847974,
-0.05552318,
0.0034844063,
-0.047197543,
-0.054557063,
-0.037650056,
-0.049527586,
0.03793421,
0.028415138,
-0.0060985987,
-0.030233705,
-0.00038249439,
-0.001186332,
-0.007174822,
0.0099879205,
-0.006880015,
0.022121184,
0.03401292,
-0.029267592,
0.008730551,
0.024351772,
-0.053136308,
0.016395533,
-0.0061447737,
-0.006855152,
0.008155145,
0.015145268,
-0.0046742903,
-0.020316822,
0.034154996,
-0.027250117,
0.013951832,
0.049044527,
0.008254597,
0.027250117,
0.010492289,
0.005210626,
-0.008893938,
-0.022234846,
-0.03969595,
-0.02331462,
0.039894853,
0.07029905,
-0.010897205,
0.023655603,
0.017560555,
-0.041400854,
-0.0067485953,
-0.04120195,
-0.064331874,
0.03330254,
0.016764931,
0.039127644,
-0.014733248,
0.0026639192,
0.009753495,
0.03617247,
0.02986431,
0.06484334,
0.010158411,
-0.013007029,
0.012637632,
-0.039582286,
-0.028599836,
0.010584638,
0.01206933,
-0.017233782,
0.0093414765,
-0.039894853,
-0.029949555,
0.019009726,
-0.009774807,
0.035660997,
0.026482908,
0.053193137,
0.0045322143,
0.026156135,
-0.0027829076,
-0.006116358,
0.010783545,
-0.036712356,
0.03318888,
0.0029605022,
0.025488378,
-0.0043226527,
-0.008737654,
-0.012012499,
0.008801589,
-0.005434395,
-0.0008693256,
-0.036968093,
0.00055498315,
-0.0026479356,
0.040605232,
-0.056290388,
-0.046828147,
-0.018512461,
0.032308012,
0.047595356,
-0.020288408,
0.0090218065,
-0.02658236,
0.013596644,
0.047083884,
0.0017279956,
-0.0150174005,
0.0010744474,
-0.014463305,
-0.031285066,
0.037422735,
0.046316676,
-0.022632657,
0.00929175,
-0.045123238,
0.029210761,
0.014704834,
-0.0013816861,
-0.031597633,
0.012218509,
-0.013198831,
-0.012552387,
0.024792207,
-0.0025289473,
-0.046686072,
0.03804787,
-0.009114156,
-0.031881783,
-0.044981163,
-0.02547417,
-0.048334148,
-0.0146480035,
0.036200885,
0.03932655,
-0.007863889,
-0.007135751,
0.0009261559,
0.0071606147,
-0.0319102,
-0.05995594,
0.0047169128,
0.018867651,
-0.0024135108,
0.0024952043,
0.019151803,
-0.01253818,
0.030233705,
0.014804287,
-0.0062087076,
0.00029835894,
-0.015472042,
-0.0016072312,
-0.008155145,
-0.025261058,
0.042509045,
-0.030290537,
0.011934358,
0.00042267516,
-0.036683943,
-0.0042267516,
-0.06296794,
0.02776159,
-0.018611915,
0.011309225,
0.01039994,
0.014001559,
-0.0034488873,
-0.0020814089,
-0.027676344,
-0.0047843987,
-0.030830424,
-0.059046656,
0.0024241663,
0.027960496,
0.03219435,
0.077516496,
-0.031824954,
-0.038871907,
0.022803148,
-0.008183559,
0.029523328,
-0.007664983,
-0.02220643,
-0.0077644363,
0.008815796,
-0.01101797,
0.00797755,
-0.040775724,
-0.027264325,
0.010421252,
0.0002404187,
0.0043581715,
-0.01186332,
-0.009923987,
0.04364565,
-0.0028077709,
-0.07086735,
-0.028827157,
0.034524392,
-0.023044676,
-0.01618242,
0.08274488,
-0.0140939085,
-0.012666048,
-0.011572065,
0.019535407,
-0.034524392,
-0.0025058598,
-0.021510258,
-0.009178089,
0.019904803,
0.033956088,
0.0063046087,
-0.050465286,
-0.020842504,
-0.03705334,
-0.029239176,
-0.02483483,
-0.018185688,
-0.029082892,
0.027463231,
-0.03634296,
0.028571421,
0.021055616,
0.0035714277,
-0.04125878,
-0.040889382,
0.035263184,
0.045151655,
-0.029409667,
-0.014804287,
-0.021282937,
-0.0050259274,
-0.0140939085,
0.037877377,
-0.01910918,
0.048248902,
0.005430843,
0.02226326,
-0.044697013,
-0.02079988,
-0.05310789,
-0.007842578,
0.019237049,
-0.027221702,
-0.039582286,
-0.0015726002,
0.034098163,
0.014335437,
0.022447959,
-0.05188604,
0.014356748,
-0.058932994,
-0.048902452,
0.02986431,
-0.009000495,
-0.00474888,
0.0026834544,
0.01174966,
0.06370674,
-0.053562533,
0.036882848,
0.06740071,
0.016381327,
0.02688072,
-0.08928036,
0.06018326,
0.005793136,
0.011905943,
-0.03219435,
-0.0028912402,
-0.010016336,
0.011941462,
-0.01612559,
-0.009973713,
-0.031739708,
0.012907576,
0.032222766,
-0.03262058,
0.056404047,
-0.031768125,
-0.048533056,
-0.055608425,
0.01559991,
0.043901388,
0.038189944,
0.04756694,
0.034922205,
0.029551743,
0.042509045,
-0.0000028512259,
-0.008908145,
-0.043020517,
0.046401918,
0.0032357739,
-0.029324422,
0.027434815,
0.02980748,
-0.053136308,
-0.05339204,
0.016026137,
-0.0018665193,
-0.03406975,
-0.025616247,
-0.01612559,
0.0057505136,
-0.051971287,
-0.009902676,
0.01223982,
-0.010407044,
-0.024877453,
-0.021496052,
0.01888186,
-0.034694884,
-0.0018665193,
0.055778913,
-0.014747457,
0.020984579,
-0.07353838,
-0.008588475,
-0.040690478,
-0.003358314,
0.056659784,
0.002109824,
0.048305735,
0.03441073,
0.012332169,
0.104681365,
-0.0015743762,
0.000051890926,
-0.0012484901,
-0.050351623,
-0.053335212,
-0.000115991475,
0.018896066,
-0.010165515,
0.010627261,
-0.016082969,
-0.02250479,
0.004042053,
0.056063067,
-0.0102649685,
-0.05339204,
0.022462167,
-0.03540526,
-0.0005789584,
-0.013198831,
-0.0029764858,
-0.030432612,
0.034922205,
0.0052283853,
0.009405411,
0.010066062,
0.0032339978,
-0.019649068,
-0.040008515,
-0.033103634,
0.012687359,
-0.03722383,
-0.025985643,
-0.008084106,
-0.021851242,
0.01888186,
0.015457835,
-0.027576892,
0.004667186,
0.011273705,
0.04094621,
-0.020870918,
-0.009057325,
0.016807554,
0.009242023,
0.03406975,
0.000016052887,
-0.005207074,
0.010051855,
0.019705897,
-0.02862825,
-0.031654462,
-0.01334801,
-0.0011028625,
-0.036627114,
0.02693755,
0.018228311,
-0.0125239715,
0.028031534,
-0.02641187,
-0.0000073674014,
-0.022405336,
-0.026909135,
-0.011437093,
0.024422811,
0.0049442337,
0.034240242,
-0.0046742903,
0.03676919,
-0.0007840802,
0.012296651,
-0.006357887,
0.06450236,
-0.004738224,
-0.03872983,
0.016878592,
-0.01571357,
0.02705121,
0.018441424,
0.037138585,
0.04915819,
-0.023712432,
0.031654462,
0.021851242,
-0.033956088,
-0.027917873,
-0.0046920497,
0.050692607,
0.03102933,
0.031768125,
-0.051260907,
0.033984505,
0.027420608,
-0.036428206,
0.013546917,
-0.04779426,
-0.018441424,
0.0066420385,
-0.036854435,
0.014932155,
-0.04645875,
-0.005168003,
-0.020785673,
0.021055616,
0.025388924,
-0.0019819557,
-0.002928535,
0.017660009,
0.005995594,
-0.043901388,
-0.0067699063,
0.013880795,
0.018214103,
-0.019052349,
-0.03850251,
0.067059726,
0.043617237,
0.0026408317,
-0.014122323,
-0.036939677,
0.018981311,
0.007572634,
0.07524329,
-0.033018388,
0.0045890445,
-0.04867513,
0.033160467,
-0.043219425,
0.06700289,
-0.0059352117,
0.020203162,
-0.0015734882,
0.026951758,
-0.0176458,
0.014065493,
0.029267592,
-0.022590034,
0.028202023,
0.015386797,
-0.004326205,
0.009824534,
-0.005427291,
-0.03267741,
0.047311205,
0.050550528,
0.024905868,
-0.01548625,
0.019705897,
-0.010613054,
-0.05043687,
-0.03296156,
0.016779138,
0.011117423,
-0.015628325,
0.020089502,
0.01700646,
-0.0058393106,
0.004287134,
0.031512387,
0.022874186,
-0.0009954178,
0.008467711,
-0.035263184,
-0.03756481,
-0.02016054,
0.032450087,
-0.00061136944,
0.041457687,
-0.01653761,
0.030034801,
0.013049652,
-0.00039359406,
-0.014271502,
0.052340683,
-0.007281379,
0.006553241,
0.0007019427,
-0.012353481,
0.014988985,
0.0006979468,
0.014342541,
-0.02401079,
-0.0056830277,
-0.047481693,
-0.02314413,
-0.07217445,
0.07012856,
-0.017745253,
-0.012104848,
0.011635999,
-0.03406975,
-0.016409742,
-0.036428206,
0.0023371452,
-0.012367688,
0.0014358524,
0.016196629,
-0.037820548,
-0.024934283,
0.039411794,
-0.025531001,
0.042253308,
-0.014122323,
0.04600411,
0.003825388,
0.06416138,
-0.0069084303,
-0.007515804,
0.013198831,
0.0229026,
-0.04307735,
-0.044100292,
-0.0012644737,
-0.03219435,
-0.020757258,
-0.043247838,
-0.051857624,
-0.010442563,
0.023982376,
-0.038871907,
-0.03225118,
0.024849039,
0.016736517,
-0.0073595205,
0.012715774,
0.062229153,
-0.004351068,
-0.023300413,
-0.008844212,
0.03313205,
-0.026212964,
-0.036428206,
-0.04287844,
0.014932155,
-0.012779708,
-0.06495701,
0.013532709,
-0.01706329,
-0.026852304,
-0.001648078,
-0.025090566,
-0.0036975197,
0.022590034,
0.03944021,
0.024920076,
0.03125665,
-0.0060701836,
-0.021723373,
0.034950618,
0.05137457,
0.017219573,
0.075925246,
0.045151655,
-0.035604168,
0.018938689,
0.020515729,
0.043162595,
-0.011934358,
-0.006293953,
-0.014974778,
-0.023925547,
-0.03833202,
-0.02811678,
0.010442563,
0.025502587,
0.038246773,
-0.012772604,
-0.036683943,
-0.016992252,
-0.06882146,
-0.047140714,
-0.03489379,
0.030262122,
0.0108190635,
-0.021084031,
0.0529374,
-0.05680186,
0.24027841,
0.048646715,
0.013660577,
0.03091567,
0.0023957512,
0.046316676,
0.051999703,
-0.046487164,
0.013220143,
0.0036442415,
-0.0114513,
-0.031881783,
0.024621716,
0.04319101,
-0.065752625,
0.0687078,
-0.04657241,
0.0030155564,
0.0054450505,
-0.02010371,
-0.04728279,
0.02705121,
0.003750798,
0.069617085,
0.059387635,
0.014243088,
-0.026852304,
-0.013895002,
-0.0035323568,
-0.009732185,
0.032450087,
-0.02303047,
0.027065419,
-0.0009963057,
-0.018356178,
0.0073879356,
0.007828371,
-0.051516645,
-0.0072103413,
0.0111884605,
0.003978119,
-0.014072597,
0.0024152866,
-0.021964902,
-0.03264899,
-0.003974567,
-0.004873196,
0.019933218,
0.04600411,
-0.04802158,
0.011799386,
-0.030461028,
0.05702918,
-0.036314547,
-0.008702136,
-0.003059955,
-0.007192582,
-0.016381327,
-0.012928887,
0.015656741,
-0.0022838668,
0.01358954,
0.028315684,
0.016992252,
-0.03745115,
0.019293878,
0.01060595,
0.071606144,
-0.051260907,
-0.017461102,
-0.003065283,
-0.00024907643,
-0.009575902,
-0.053477287,
0.025928812,
0.025957229,
-0.0150600225,
0.042054404,
0.011103215,
-0.035916734,
0.032506917,
-0.012552387,
-0.009767704,
-0.055125367,
0.02693755,
0.052084945,
-0.025488378,
0.053221554,
0.0010353766,
0.056148313,
-0.003033316,
0.040093757,
-0.012751293,
-0.009078637,
-0.014932155
] | from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
tokenizer.default_chat_template
"{% for message in messages %}{% if message['role'] == 'user' %}{{ ' ' }}{% endif %}{{ message['content'] }}{% if not loop.last %}{{ ' ' }}{% endif %}{% endfor %}{{ eos_token }}" |
[
0.0052310177,
0.0105717005,
0.0010207978,
0.034478657,
0.0019063422,
-0.0590436,
0.012750377,
0.008773195,
0.00939463,
0.0034708953,
-0.00682847,
0.03980106,
0.012764999,
-0.032051407,
-0.026334208,
0.0046278606,
-0.008122517,
-0.040210478,
-0.07474762,
0.011690282,
0.0101695955,
-0.015089896,
-0.06246515,
-0.019988263,
-0.035999343,
0.021669792,
-0.00077999185,
0.021538194,
0.09580329,
0.027781785,
-0.055914495,
-0.0017847968,
0.004192856,
-0.0098406,
-0.015426202,
-0.025076715,
-0.008853616,
0.0014914431,
-0.057201233,
-0.036379516,
0.03693515,
-0.025851682,
0.04214058,
-0.04486027,
-0.06527257,
0.019418005,
0.0002919829,
-0.022415513,
-0.021523573,
-0.036525734,
0.015279981,
0.007274441,
0.01931565,
0.016288899,
-0.0500657,
0.00042700785,
-0.021976853,
0.015820995,
-0.024755033,
-0.0038346173,
-0.023424432,
0.05337027,
-0.049744017,
-0.026699757,
0.032870237,
0.028922299,
-0.029638777,
-0.005962117,
-0.0044962624,
-0.048778966,
-0.050416626,
0.016040325,
-0.021684414,
-0.025003606,
-0.0076984786,
-0.04866199,
0.034683365,
-0.012867353,
0.027196905,
0.037637006,
-0.009570094,
0.037929446,
-0.025266802,
-0.0233367,
-0.030355254,
-0.036964394,
0.0418189,
-0.008093272,
0.027518589,
-0.021699036,
-0.029127007,
0.026699757,
0.009752869,
-0.0047996687,
0.00429521,
0.057815354,
0.028395908,
0.027577076,
-0.02994584,
0.0012849076,
0.028600616,
0.015791751,
-0.040473673,
0.013152482,
-0.015513933,
0.012107009,
0.04655642,
-0.0024967052,
-0.011507507,
-0.02517907,
-0.010951872,
-0.023833847,
0.006583552,
-0.008246804,
-0.023775358,
0.061704807,
0.017283194,
0.009650514,
-0.09726549,
-0.012275162,
0.034098484,
-0.010089174,
-0.038719036,
-0.023760736,
0.012121631,
0.012165497,
0.022649465,
0.047667693,
-0.010973805,
-0.01042548,
-0.009482361,
-0.015543178,
0.032343846,
0.06012563,
0.013503409,
0.013393745,
-0.0021859878,
0.031232575,
0.027664809,
-0.059745457,
0.014080978,
0.031875942,
0.0035275556,
0.07082893,
0.03781247,
-0.028688349,
0.021026425,
-0.006488509,
-0.021333486,
0.00079689856,
-0.039947283,
0.047667693,
0.008926726,
0.0296534,
-0.01262609,
-0.04412917,
0.010805652,
-0.05263917,
-0.011624483,
-0.015733263,
-0.026626647,
0.028966166,
-0.013313323,
0.06685175,
-0.04345656,
0.018716149,
-0.0034782062,
0.00627649,
0.013130548,
-0.046848863,
0.041584946,
0.01599646,
-0.022634843,
0.026685135,
0.0076619238,
0.01740017,
0.012092387,
0.030881647,
0.017487902,
0.033659827,
-0.015133762,
-0.0069198576,
0.0017217395,
0.034888074,
0.033893775,
-0.0053187497,
0.008568487,
-0.0028659103,
0.0017656055,
-0.018043539,
0.01196079,
0.0345079,
-0.0072122975,
0.03588237,
-0.023541408,
-0.005417448,
0.0044816406,
0.0507968,
0.031525016,
-0.00086955156,
-0.031408038,
0.073987275,
-0.027284637,
0.05375044,
-0.032197624,
-0.06305003,
-0.018701527,
0.042988654,
-0.0345079,
0.033425875,
0.049948722,
0.051118482,
-0.07609285,
-0.025018228,
0.03251931,
-0.05366271,
-0.04369051,
0.013159793,
-0.0028439774,
0.0138177825,
-0.01725395,
0.034829583,
0.041380238,
-0.003966215,
-0.026173366,
-0.0019118254,
-0.0038126844,
0.041292503,
-0.0053991703,
0.005417448,
0.03325041,
0.02136273,
0.023731492,
0.047316767,
-0.01145633,
0.04023972,
0.04918838,
0.039742574,
-0.024915874,
-0.018482197,
0.02452108,
0.022664087,
-0.014219887,
0.040766113,
-0.029858107,
0.015206872,
-0.0051103863,
-0.010154974,
0.0029463314,
-0.006419054,
-0.050533604,
0.06468769,
0.03649649,
0.013481476,
-0.05570979,
-0.03632103,
0.0034928282,
0.024784276,
-0.012962395,
-0.007084355,
0.028907677,
-0.0027123794,
-0.017429415,
-0.02349754,
0.0126041565,
0.02877608,
-0.005388204,
-0.004211134,
-0.01725395,
-0.046497934,
0.023833847,
-0.031583503,
-0.041526455,
0.002081806,
-0.015236115,
-0.02400931,
0.021274999,
-0.0571135,
0.006254557,
-0.029243983,
-0.022503246,
-0.022035342,
-0.085626386,
0.057639893,
-0.0050921086,
0.02313199,
-0.05790309,
0.005373582,
-0.009365385,
0.03465412,
-0.019856665,
0.0066091404,
0.004690004,
-0.025559241,
0.007873942,
0.01307206,
0.012757688,
0.022254672,
-0.05059209,
-0.013861648,
-0.011814569,
0.026334208,
-0.0055198018,
0.029112386,
-0.025529997,
0.0066859056,
-0.003268015,
-0.028147334,
0.065155596,
0.055826765,
-0.011609862,
0.025281424,
-0.010557078,
0.06574047,
-0.040122744,
0.0115001965,
0.019871287,
0.016128058,
-0.012092387,
-0.005417448,
-0.05167412,
0.030296767,
-0.0055673234,
-0.0022554423,
-0.0069125467,
0.03611632,
0.015630908,
-0.06919126,
0.01489981,
-0.027211526,
-0.03260704,
-0.0042074784,
-0.04117553,
0.03538522,
0.018979345,
-0.009255721,
-0.016537473,
-0.015894106,
-0.036876664,
0.026714379,
0.021816012,
-0.01291853,
0.0021585715,
0.016478986,
-0.022371648,
-0.025778571,
0.01732706,
-0.04582532,
0.0144026615,
-0.004339076,
0.0059474953,
0.014263753,
0.028893055,
0.016186545,
0.030676939,
0.027167661,
-0.017809587,
-0.015660154,
0.023161234,
-0.015894106,
0.01725395,
0.00605716,
-0.009555472,
0.012223985,
-0.040064257,
0.012764999,
-0.005000721,
0.033133432,
0.05755216,
-0.01343761,
0.0010637499,
0.023687627,
-0.03368907,
0.007186709,
-0.07773051,
-0.04178965,
0.052434463,
-0.0044158413,
0.022269294,
-0.030179791,
0.00976018,
0.03251931,
-0.011288177,
0.02598328,
0.01953498,
0.015104517,
-0.013386434,
0.020017507,
0.0047704247,
0.012728444,
0.04603003,
-0.02811809,
-0.022444757,
0.014358796,
-0.0821171,
0.0007151068,
0.0064921645,
0.050475117,
0.030764671,
0.02143584,
0.059774704,
0.0029865417,
0.024901252,
0.041146286,
-0.021640548,
-0.00088280276,
-0.04383673,
0.034537144,
0.0052566063,
0.027752541,
-0.027065307,
-0.040415186,
-0.030940134,
-0.010505901,
0.00009807016,
0.03172972,
-0.048106354,
0.020894825,
0.03120333,
0.054861713,
-0.04088309,
-0.033513606,
0.0076180575,
0.024360238,
0.031817455,
-0.008297981,
-0.03053072,
-0.029682644,
-0.000852188,
0.05196656,
-0.035239,
-0.008787817,
-0.008466133,
-0.03830962,
-0.032314602,
0.0076107467,
0.040766113,
-0.012004655,
-0.014914432,
-0.021699036,
0.021421218,
0.03942089,
-0.01703462,
-0.0043719755,
0.036993638,
0.012852731,
-0.0023395186,
0.019988263,
0.0086050425,
-0.06720267,
0.047960132,
0.009350764,
-0.017721854,
-0.031612746,
0.0036427036,
-0.03649649,
0.010286571,
0.004558406,
0.031583503,
0.003966215,
0.00022264267,
-0.011851124,
0.028980788,
-0.030238278,
0.0010418169,
0.004028359,
0.010842207,
-0.002235337,
0.020748606,
0.020690119,
-0.04910065,
0.021932987,
0.0065981736,
0.027474722,
-0.0035860436,
-0.011222378,
0.027386991,
-0.010235394,
-0.03810491,
0.030267524,
-0.03155426,
0.037987936,
0.006188758,
-0.019184053,
-0.032197624,
-0.016186545,
0.0016486295,
0.008297981,
-0.0076473015,
0.02583706,
-0.008341846,
-0.019783555,
0.01623041,
-0.06275759,
0.0043939087,
-0.0386313,
-0.035414465,
0.026407316,
0.033952266,
0.0027617286,
0.063927345,
-0.0010162285,
-0.009577405,
0.019169431,
-0.016128058,
-0.014877876,
-0.010374303,
-0.03398151,
-0.014782834,
-0.0018990312,
-0.030238278,
0.02158206,
-0.015016786,
0.0041563013,
0.01915481,
0.0022664086,
0.052551437,
-0.026626647,
-0.010600944,
0.036730442,
0.0071099433,
-0.08088886,
0.01636201,
0.024842763,
-0.0040210476,
-0.0021000835,
-0.0065981736,
-0.014358796,
-0.017955806,
-0.047813915,
0.016976133,
0.01599646,
-0.01864304,
-0.008034784,
-0.009913711,
0.013635008,
0.039216183,
-0.0077642775,
-0.0541891,
-0.040502917,
-0.036876664,
0.028512884,
-0.03222687,
0.0013205486,
0.0012922186,
0.011829192,
0.008524621,
0.019929774,
0.026246475,
0.008773195,
0.0027854894,
-0.057318207,
0.021991476,
0.037198346,
-0.018087404,
0.02224005,
-0.0029865417,
0.009482361,
-0.005892663,
0.020309947,
-0.01586486,
0.016990755,
-0.03825113,
0.013159793,
0.0035513162,
-0.017941184,
-0.062348172,
-0.0037651628,
0.015572421,
-0.04088309,
-0.018686906,
-0.019169431,
0.026363451,
0.0099941315,
-0.0015481034,
-0.055534326,
0.037022885,
-0.048925184,
-0.025047472,
0.019505737,
-0.008422268,
-0.009555472,
-0.012531047,
-0.0012419554,
0.056206938,
-0.033659827,
0.03465412,
0.077555045,
-0.015236115,
0.034010753,
-0.04977326,
0.06807999,
-0.031027867,
-0.0057537537,
-0.0035878713,
0.0408246,
-0.059950165,
-0.004792358,
-0.039537866,
-0.029755753,
-0.016625205,
0.023146613,
0.03664271,
-0.041497212,
0.056265425,
-0.0067663267,
-0.0571135,
-0.047813915,
0.05834175,
-0.018628418,
0.024360238,
0.023599895,
0.024491835,
-0.017955806,
0.008276047,
-0.0026703412,
0.0069381353,
-0.017151596,
0.050826043,
0.05395515,
-0.0015014958,
0.016391253,
-0.009577405,
-0.047375254,
-0.06474618,
0.02408242,
0.03509278,
-0.041234016,
0.0073183067,
0.0021421218,
0.010615566,
-0.054423053,
0.009855223,
0.02936096,
-0.002694102,
-0.020821717,
0.0011176685,
-0.008356469,
-0.013028195,
0.0318467,
0.062231198,
-0.05439381,
0.015660154,
-0.07983608,
-0.030121302,
-0.030413743,
-0.0039223493,
0.04661491,
0.0019812798,
0.029229362,
0.0039735264,
0.016537473,
0.072349615,
-0.035502195,
-0.003966215,
0.060359582,
-0.08012851,
-0.03845584,
-0.0033594025,
0.015279981,
-0.029346338,
0.01813127,
0.036350273,
0.0029883697,
-0.042023603,
0.0393624,
-0.010622877,
-0.031905185,
0.018116647,
0.014139466,
0.0009252979,
-0.009380008,
-0.024126286,
0.0023651072,
0.0045474395,
0.0119681,
-0.028761458,
-0.0095920265,
0.012801554,
0.0068833027,
-0.042842437,
-0.025456889,
-0.009562783,
-0.035648417,
-0.027401613,
-0.008012852,
-0.03462488,
-0.014132155,
0.007172087,
-0.0040320144,
-0.010820274,
-0.026612025,
0.046819616,
0.0046644155,
-0.0036591534,
-0.02216694,
0.0016924955,
0.022898039,
-0.022590978,
-0.031817455,
0.021932987,
0.03874828,
-0.02297115,
0.023482919,
-0.012158186,
-0.021304242,
-0.009789423,
-0.01953498,
0.045328174,
-0.0028750491,
0.011551374,
-0.009241099,
0.025486132,
-0.020222215,
-0.014483083,
-0.0058305194,
-0.008400334,
0.007654613,
0.029814241,
0.0029061208,
0.01725395,
0.0246673,
0.026904466,
-0.019710446,
0.0386313,
0.018160515,
0.01159524,
0.0057829977,
-0.01064481,
-0.01718084,
-0.024433348,
0.017926563,
0.024784276,
-0.025135204,
0.0023340355,
0.01586486,
-0.031963672,
-0.010154974,
0.009043702,
-0.0012428693,
0.020061372,
0.020880204,
-0.015937971,
0.014643925,
0.016581338,
-0.014351485,
0.03503429,
-0.07141381,
-0.053779684,
0.001979452,
-0.033659827,
0.00392966,
-0.022927282,
-0.046936594,
-0.0410878,
-0.0068394365,
0.031027867,
0.0071757426,
0.042111337,
-0.00444143,
0.010725231,
-0.03611632,
0.031525016,
0.016946888,
-0.004638827,
-0.025997901,
-0.047082815,
0.039157692,
0.039684087,
-0.0041453345,
-0.012033899,
-0.06041807,
0.01703462,
-0.0028951543,
0.04404144,
-0.016581338,
0.008195627,
-0.04836955,
-0.018189758,
-0.02598328,
0.01893548,
-0.012377516,
0.0032405988,
0.062231198,
0.0133645,
0.010001442,
-0.0060315714,
0.047960132,
-0.039830305,
0.04199436,
0.023775358,
0.024828142,
-0.011127336,
-0.016786046,
-0.019885909,
0.0067663267,
0.03289948,
0.011865746,
0.013276769,
0.014446528,
0.022561733,
-0.009109501,
-0.042111337,
0.04222831,
0.013627697,
-0.043193363,
0.019768933,
0.029931217,
-0.004141679,
0.027050685,
0.035239,
-0.006718805,
0.012531047,
0.023248967,
-0.039596353,
-0.05161563,
-0.037987936,
0.03980106,
-0.013291391,
0.005018999,
-0.027752541,
0.01005993,
0.024023933,
0.022210805,
-0.029931217,
0.030998623,
0.014497705,
0.06328398,
-0.0018844092,
-0.006525064,
0.03544371,
0.027065307,
0.0075522587,
-0.010037998,
-0.0028659103,
-0.064629205,
-0.01497292,
-0.028103469,
0.079894565,
-0.049656283,
-0.03172972,
-0.0006959154,
-0.025603108,
-0.02136273,
-0.02921474,
-0.013627697,
-0.038426593,
0.0101695955,
0.026729,
-0.0056440886,
-0.029755753,
0.0466734,
-0.019242542,
0.036145564,
0.045562126,
0.045474395,
-0.029975083,
0.0386313,
0.042988654,
-0.026246475,
-0.020953314,
0.017824208,
-0.032928724,
-0.037315324,
0.0040978133,
-0.00579762,
-0.025939414,
-0.012319028,
-0.036613468,
-0.0070514553,
0.023570651,
-0.019637335,
-0.02811809,
-0.0043427316,
0.009891777,
-0.04339807,
-0.016420497,
0.058049306,
-0.014424595,
0.0020013852,
-0.029784998,
0.00089148455,
-0.030647695,
-0.033279654,
-0.030852403,
0.022079207,
0.008707396,
-0.09439958,
0.0018240935,
-0.0032204937,
-0.01672756,
-0.03532673,
-0.028132712,
-0.033747558,
0.043047145,
0.013137859,
0.056762572,
0.039684087,
0.0029061208,
-0.034390926,
0.022810306,
0.049159136,
0.015733263,
0.039303914,
0.055856008,
-0.01827749,
0.006477542,
0.004558406,
0.055739034,
-0.019359518,
0.0019684855,
-0.0075815027,
-0.025442265,
-0.022664087,
-0.061353877,
-0.014263753,
0.03164199,
0.014351485,
-0.035648417,
-0.027518589,
-0.0030925514,
-0.05989168,
-0.023819225,
-0.017268572,
-0.0021731935,
0.00873664,
-0.015177627,
0.027050685,
-0.060593534,
0.25594336,
0.03494656,
0.028834568,
0.022371648,
0.034332436,
0.07498157,
0.035268243,
-0.062055733,
-0.0063459445,
-0.026612025,
-0.0028604271,
-0.022123074,
-0.0076107467,
0.036145564,
-0.030559963,
0.034771096,
-0.03398151,
0.023614516,
0.012494492,
-0.031583503,
-0.066793256,
0.06404433,
0.017794965,
0.100599304,
0.030735428,
0.0025862649,
-0.01526536,
-0.01672756,
-0.024915874,
-0.055505082,
0.022152318,
-0.04456783,
0.0060644713,
-0.0016522851,
-0.040795356,
0.030121302,
-0.00429521,
-0.05608996,
-0.0061924136,
-0.02364376,
0.019125566,
-0.029638777,
0.0022170595,
-0.019198675,
-0.021567438,
0.009855223,
0.013247524,
0.027986493,
0.04573759,
-0.05375044,
0.017794965,
0.000104467275,
0.093931675,
-0.024945118,
-0.019052455,
-0.0099941315,
0.008568487,
-0.03620405,
-0.007409694,
0.020149104,
-0.007596125,
0.012457937,
-0.019505737,
0.03620405,
-0.019988263,
0.01071792,
-0.00079918327,
0.036145564,
-0.058254015,
0.003545833,
0.010286571,
-0.0030559963,
-0.0008064942,
-0.045357417,
0.024901252,
0.004331765,
0.0033831634,
0.026538916,
0.02958029,
-0.02731388,
0.018906236,
-0.025529997,
-0.032109894,
-0.05521264,
0.018964723,
0.04904216,
-0.036671955,
0.030004326,
0.0008106067,
0.046878107,
-0.01718084,
0.011938856,
0.0024382172,
0.006378844,
-0.012128943
] |
If you're fine-tuning a model for chat, in addition to setting a chat template, you should probably add any new chat
control tokens as special tokens in the tokenizer. Special tokens are never split,
ensuring that your control tokens are always handled as single tokens rather than being tokenized in pieces. You
should also set the tokenizer's eos_token attribute to the token that marks the end of assistant generations in your
template. This will ensure that text generation tools can correctly figure out when to stop generating text. |
[
0.039384395,
-0.032034274,
-0.019095,
0.034759946,
0.0007417114,
-0.021055033,
-0.011078776,
0.03684248,
-0.0028883677,
0.026077615,
-0.030962383,
-0.022080988,
0.026337933,
0.0067108134,
-0.046550762,
-0.005240789,
-0.0032941557,
-0.027425138,
-0.044161975,
-0.01958501,
-0.009777192,
0.008735925,
-0.0703774,
-0.043886345,
-0.03377993,
0.040486913,
-0.016185578,
-0.0051718815,
0.07141867,
0.04030316,
-0.0206569,
0.014103044,
-0.00093024963,
-0.024301337,
0.0020882764,
-0.039384395,
0.002934306,
-0.019095,
-0.0365056,
-0.01791592,
0.031100197,
0.011071119,
0.035984967,
-0.04358009,
-0.06841737,
-0.01708903,
0.008054507,
-0.03757749,
-0.022892563,
-0.033902433,
0.004218663,
0.006890738,
0.029461734,
0.0013379516,
-0.06829487,
-0.016063076,
-0.0076755164,
-0.008406701,
-0.027578264,
-0.014416955,
-0.010512204,
0.052002102,
-0.0365056,
-0.0487558,
0.013521159,
-0.0015800846,
-0.01185207,
0.036321845,
-0.036750603,
-0.030303935,
-0.037975624,
0.040456288,
-0.042814452,
-0.032677412,
-0.033136792,
-0.023474447,
0.019768761,
-0.018069046,
-0.011821444,
0.04434573,
-0.006791205,
0.040333785,
-0.010389701,
-0.019340005,
-0.045907628,
-0.0007034295,
0.04290633,
0.027731393,
0.023780704,
-0.021652231,
-0.032708038,
0.023750078,
-0.028925788,
0.0148150865,
-0.003342008,
0.075828746,
-0.0027830924,
0.03724061,
-0.031421766,
-0.026184805,
0.025066974,
0.049919568,
-0.022157552,
0.019799387,
-0.009225933,
0.0132072475,
0.046734516,
-0.0015666859,
-0.024852594,
0.025220102,
-0.01499884,
-0.009111087,
0.014508831,
-0.021759419,
-0.016553083,
0.033320546,
0.017900607,
-0.008789519,
-0.06890738,
0.008422013,
-0.021238785,
-0.01920219,
-0.013276155,
-0.027731393,
0.01603245,
-0.02348976,
0.028267339,
0.0457545,
-0.034086183,
0.0010546658,
0.013406314,
-0.009509219,
0.054972775,
0.042845078,
-0.015756821,
0.012456923,
-0.011009868,
0.027838582,
0.033473674,
-0.031268638,
0.013704913,
0.0028156321,
0.009677659,
0.094632804,
0.026261369,
-0.01647652,
-0.010902679,
-0.020105643,
-0.024592279,
0.009317809,
-0.022570996,
0.02171348,
-0.022065675,
0.004892424,
-0.041038174,
-0.014769148,
0.012388016,
-0.0029266495,
-0.009815473,
-0.008391388,
-0.019248128,
-0.0022356617,
-0.053012744,
0.04835767,
-0.01427914,
0.027547639,
-0.008919678,
-0.0008072691,
-0.01926344,
-0.052737117,
0.047102023,
0.023106942,
-0.0027601235,
0.024913846,
0.03479057,
0.008123415,
0.03874126,
-0.00175331,
0.028987039,
-0.0017112,
-0.028849224,
-0.0152515005,
0.0023371086,
0.030809255,
-0.0038205315,
0.0085751405,
-0.001874855,
-0.01736466,
-0.009777192,
0.005057036,
0.018099671,
0.008804832,
-0.0030051274,
0.044437602,
0.011071119,
0.03289179,
-0.033626802,
0.0084985765,
0.011025181,
-0.027685454,
-0.028803285,
0.06762111,
-0.013597723,
0.011614722,
-0.0029189931,
-0.021238785,
-0.0022528886,
0.04982769,
-0.06498732,
0.03289179,
0.025801986,
0.04465198,
-0.038098127,
0.010879709,
0.026230743,
-0.028282652,
-0.03555621,
0.0005177624,
0.006875425,
0.021912547,
-0.008054507,
0.035739962,
0.04247757,
-0.0030051274,
-0.013421627,
0.010803146,
-0.031483017,
0.032708038,
0.008192322,
0.029293293,
0.036873106,
0.0060370523,
-0.0007756866,
0.07772753,
0.011645347,
0.022280052,
0.06523232,
0.036536224,
0.011936289,
-0.018130297,
-0.00403491,
0.031038947,
0.03200365,
0.006347135,
0.019018438,
0.0037784213,
0.0010939047,
-0.021866608,
-0.006507919,
0.016323393,
-0.027869208,
0.05638155,
0.035280578,
-0.0040846765,
-0.04253882,
-0.0282214,
-0.0032998978,
0.039108768,
-0.008345449,
-0.026368558,
0.05904597,
0.009049836,
-0.0066189365,
-0.010619393,
0.017318722,
0.03969065,
-0.025694797,
0.022234114,
-0.014753836,
-0.051358968,
-0.019875951,
-0.024975097,
-0.054574646,
0.008506233,
-0.025403854,
-0.012556456,
0.013812101,
-0.036474973,
-0.0016413355,
-0.06951989,
-0.0073807463,
0.01375085,
-0.071541175,
0.03996628,
0.02538854,
-0.0031697394,
-0.07264369,
0.0008718698,
-0.017441224,
0.044774484,
-0.035311203,
0.029737363,
-0.028971726,
-0.04786766,
-0.001975345,
-0.016599022,
0.0032558737,
-0.012587082,
-0.018084358,
-0.0019456764,
0.0136819435,
0.03289179,
0.028803285,
0.006416043,
-0.021667544,
-0.004789063,
0.0058762683,
-0.030931758,
0.038925014,
0.037148733,
-0.018696869,
0.022678185,
-0.009149369,
0.053686507,
-0.022632247,
0.03371868,
0.035035573,
0.041099425,
-0.004233976,
-0.025311979,
-0.046275135,
0.010933304,
-0.009248902,
-0.0020691354,
-0.031636145,
0.021575667,
-0.012120043,
-0.057729073,
0.033044916,
-0.041344427,
-0.056473427,
-0.032463033,
-0.043733217,
0.065354824,
0.041375052,
0.008414357,
-0.016384644,
-0.029859865,
-0.01552713,
0.049613316,
0.00050436374,
0.005076177,
0.014799774,
0.04100755,
-0.034606818,
0.039139394,
0.045999505,
-0.023336632,
0.00031773958,
-0.014072418,
-0.02148379,
0.036199342,
0.04100755,
-0.014585395,
0.004846486,
0.03846563,
-0.028650157,
-0.0000072787907,
0.019079687,
0.013291468,
-0.007970287,
-0.007847785,
-0.014646647,
-0.021866608,
-0.035801213,
-0.0147768045,
-0.014340391,
0.021100972,
0.0668861,
-0.012081761,
0.042048816,
0.02309163,
-0.02788452,
-0.022341304,
-0.062016644,
-0.053349625,
0.06272103,
0.0121123865,
0.03705686,
-0.030196745,
-0.027486388,
-0.014577739,
0.0102212615,
0.026276682,
0.014738523,
0.024561653,
-0.0017638375,
0.020702839,
0.020182205,
0.0019035664,
0.024561653,
-0.009042179,
-0.02338257,
0.0011599408,
-0.049919568,
-0.032922417,
0.02855828,
0.0703774,
0.069703646,
0.029568922,
0.037209984,
-0.011009868,
0.025235415,
0.014294453,
-0.008031538,
0.011407999,
-0.050501455,
0.027471075,
0.0068562846,
0.026062302,
-0.027746705,
0.006094475,
-0.014654303,
0.013260842,
0.030150807,
0.012135356,
-0.021606293,
-0.0022433181,
0.00901921,
0.021805357,
-0.028297964,
-0.040976923,
0.026736064,
0.020365959,
0.047959536,
-0.026812628,
0.029982368,
-0.024071645,
0.023397883,
0.01552713,
-0.037883747,
-0.015756821,
0.0030625502,
-0.028604219,
-0.037485614,
0.01937063,
0.047775783,
-0.03307554,
-0.007939662,
-0.050746456,
0.014501176,
0.026399182,
0.01358241,
-0.006749095,
-0.01121659,
-0.004601482,
0.018099671,
0.028282652,
-0.043671966,
-0.0594441,
0.021805357,
-0.01157644,
-0.010152354,
-0.043763842,
0.00965469,
-0.029752675,
-0.028711408,
0.008230604,
0.022846624,
-0.021759419,
-0.009340778,
0.005202507,
0.025311979,
-0.048970178,
-0.013674287,
0.026935128,
-0.002201208,
-0.0058188452,
0.021330662,
0.01708903,
-0.018895935,
0.05843346,
0.015894637,
0.00705535,
-0.030104868,
0.009065148,
0.035862464,
-0.008843114,
-0.012211919,
0.032585535,
-0.039721277,
0.021973798,
-0.017027779,
-0.034974325,
-0.004567028,
-0.06134288,
0.03139114,
0.00061346707,
0.016124327,
0.042783827,
-0.002161012,
-0.0037420536,
0.003160169,
-0.05420714,
-0.026567623,
-0.049490813,
-0.01085674,
-0.005240789,
0.03166677,
0.007476451,
0.056197796,
-0.018222174,
-0.023030378,
0.0259398,
-0.031084886,
0.0028252027,
-0.021835983,
-0.01675215,
0.007480279,
0.015343376,
-0.042569447,
0.027731393,
-0.033381797,
-0.005991114,
0.024852594,
0.011316123,
0.010734239,
-0.014233203,
0.005099146,
0.039537523,
-0.0031946227,
-0.060760997,
-0.011599409,
0.034147434,
-0.009065148,
-0.0051221154,
0.039292518,
-0.026736064,
-0.013360376,
-0.051358968,
0.040976923,
-0.028481718,
-0.01051986,
-0.036597475,
-0.015151967,
0.0027562953,
0.022249427,
0.0043105395,
-0.05766782,
-0.026582936,
-0.03583184,
0.0154582225,
-0.045570746,
-0.013551785,
-0.026169492,
0.007939662,
-0.025556982,
0.026705438,
0.017686227,
0.0031659114,
-0.026261369,
-0.032738663,
0.030089555,
0.059076592,
-0.014562426,
0.0034779087,
-0.018482491,
0.009746566,
-0.001222149,
0.0550034,
-0.005485793,
0.044498853,
-0.006810346,
0.02171348,
-0.036260594,
-0.055738416,
-0.036811855,
0.022739435,
0.034821197,
-0.03094707,
-0.034361813,
-0.05114459,
0.014202577,
0.034698695,
0.012173637,
-0.04296758,
0.024025707,
-0.04480511,
-0.040731918,
0.02621543,
-0.016874652,
-0.03261616,
-0.01001454,
-0.006967302,
0.045938253,
-0.05304337,
0.0034798228,
0.08746643,
-0.016154952,
0.010382045,
-0.089855224,
0.036015593,
-0.0020901905,
-0.001936106,
-0.020488461,
0.021698168,
-0.032463033,
-0.016093701,
-0.05883159,
-0.039751902,
-0.014975871,
0.020932531,
0.036811855,
-0.01920219,
0.030962383,
-0.01322256,
-0.043488212,
-0.061465383,
0.023811327,
0.019676885,
0.002300741,
0.018329363,
0.05093021,
0.016369332,
0.0105045475,
-0.0132455295,
-0.023229444,
-0.03699561,
0.034331188,
0.0074649663,
-0.036964983,
0.036689352,
0.036199342,
-0.061159126,
-0.07031615,
0.010994555,
-0.01852843,
-0.028787972,
-0.009853755,
-0.020197518,
0.028236713,
-0.0275017,
0.033381797,
0.02097847,
-0.0007991342,
-0.023275381,
-0.0054743085,
-0.0047010146,
-0.0503177,
0.00033377012,
0.082382604,
-0.050133947,
0.002203122,
-0.072031185,
-0.013031151,
-0.016828714,
0.013842727,
0.061986018,
-0.012701927,
0.027991708,
0.025863238,
-0.0007948275,
0.061251003,
-0.016354019,
-0.025970425,
0.05739219,
-0.040456288,
-0.026812628,
-0.0072429315,
0.01332975,
-0.025556982,
0.0056312643,
-0.00006262676,
-0.022387242,
0.010458609,
0.0044904645,
-0.006791205,
-0.02382664,
-0.0042952267,
-0.037546866,
-0.0018423154,
-0.020059705,
-0.026674813,
-0.0063547916,
0.013712569,
0.00490008,
-0.030503001,
-0.0071051167,
0.022892563,
-0.017058404,
-0.03534183,
-0.034637444,
-0.003567871,
-0.047898285,
0.0017131141,
-0.010389701,
-0.021345975,
-0.0043067113,
0.0002135411,
-0.010496891,
-0.014684929,
-0.017395286,
0.056075294,
0.00065366307,
0.008988585,
-0.005114459,
-0.020274082,
0.024837282,
-0.006117444,
-0.0068448,
0.019799387,
0.00842967,
-0.02148379,
0.0004383275,
0.02087128,
-0.019431882,
-0.028604219,
-0.014677272,
0.042814452,
-0.037608117,
0.0136896,
-0.00030123052,
0.010810803,
-0.029538296,
-0.03466807,
-0.0029745018,
0.035709336,
0.009271871,
0.037546866,
0.025082286,
0.034545567,
0.02015158,
0.02304569,
0.0011513275,
0.034086183,
0.007154883,
-0.024730094,
0.009424998,
-0.012311452,
0.022111613,
-0.01791592,
0.014141326,
0.077176265,
-0.01736466,
0.029844552,
-0.0071051167,
-0.03417806,
-0.037914373,
0.018604992,
0.0011532416,
0.031973023,
0.014225546,
-0.042385694,
0.012954587,
0.0012728724,
0.0029209072,
-0.004142099,
-0.048939552,
-0.021759419,
0.012089417,
-0.02855828,
0.021682857,
-0.041987564,
0.015664944,
-0.025005722,
0.016721524,
0.062476024,
-0.018451866,
0.02972205,
-0.03139114,
0.0013427369,
-0.047377653,
-0.0053518065,
0.014187264,
-0.018895935,
-0.0350662,
-0.051726475,
0.06094475,
0.038925014,
-0.020565026,
-0.018130297,
-0.05120584,
0.0011341006,
-0.035280578,
0.039047517,
-0.04618326,
0.022234114,
-0.026399182,
0.015787447,
-0.02064159,
-0.0016547341,
-0.010726582,
0.005891581,
0.05025645,
0.017180907,
0.013031151,
0.017931232,
0.022999752,
-0.010374389,
0.03500495,
0.044927612,
0.024454463,
-0.014401643,
-0.012931619,
-0.005202507,
0.024423838,
0.05711656,
0.0046282792,
-0.00054790935,
0.026169492,
-0.0038435005,
-0.018436553,
-0.041650683,
0.03684248,
0.03016612,
-0.04113005,
0.006094475,
0.0012527745,
-0.02148379,
0.011453938,
0.041926313,
0.018635618,
0.0064964346,
0.005853299,
-0.024975097,
-0.039384395,
-0.0075338734,
0.020610964,
-0.025250727,
-0.0032271624,
-0.011691285,
0.051389594,
0.013138341,
-0.009524532,
-0.0013494362,
0.042263195,
0.026138866,
0.056259047,
0.011905664,
-0.00876655,
0.033688053,
0.011813788,
0.007644891,
-0.0032405609,
-0.007376918,
-0.038649384,
-0.020381272,
-0.033657428,
0.09077399,
-0.0266595,
-0.01288568,
0.0084985765,
-0.006194008,
-0.0018882536,
-0.032034274,
0.014225546,
-0.031789273,
0.014148982,
0.016262142,
-0.0054551675,
-0.040548164,
0.04079317,
0.013988198,
0.04820454,
0.018451866,
0.05904597,
-0.033198044,
0.06339479,
0.0053096963,
-0.0006273443,
0.016292768,
-0.007357777,
-0.023428509,
-0.033259295,
0.031130822,
0.0082918545,
-0.019967828,
-0.03283054,
-0.044621356,
-0.0013953744,
0.049613316,
-0.009945632,
-0.03969065,
0.006224633,
0.009670002,
-0.008797175,
0.021606293,
0.046336386,
0.004919221,
-0.013972886,
-0.022846624,
0.03240178,
-0.015182593,
0.0053288373,
-0.0011092174,
0.024408525,
-0.014141326,
-0.085628904,
-0.016660273,
-0.022157552,
0.013406314,
0.006932848,
-0.032677412,
-0.018344676,
0.024224773,
0.02404102,
0.052032728,
0.0189725,
-0.023183506,
-0.048327044,
0.026200118,
0.03984378,
0.011698942,
0.063578546,
0.032677412,
-0.017869981,
-0.0024213288,
-0.027838582,
0.030181432,
0.011147683,
0.006523232,
-0.019340005,
-0.031360514,
-0.036811855,
-0.063578546,
0.0198147,
0.026475746,
0.016553083,
-0.004769922,
-0.050287075,
-0.008820144,
-0.02042721,
-0.03583184,
-0.05010332,
0.03335117,
0.0198147,
-0.014937589,
0.036321845,
-0.039139394,
0.2817546,
0.045448247,
0.009195307,
0.022356616,
0.0123956725,
0.057422817,
0.05950535,
-0.036321845,
0.020304708,
-0.042324446,
-0.000111077265,
-0.0116376905,
-0.00023244278,
0.03033456,
-0.029002352,
0.028144836,
-0.040088784,
-0.008758893,
-0.01358241,
-0.01603245,
-0.047959536,
0.022846624,
0.022280052,
0.07589,
0.046336386,
0.0024634388,
-0.0044368696,
-0.01358241,
-0.027853895,
-0.025572294,
0.00071060733,
-0.052185856,
0.013674287,
-0.022678185,
-0.0488783,
0.013168966,
0.0042531164,
-0.09071274,
-0.012839742,
0.016905278,
-0.0023198817,
-0.009784848,
0.01970751,
-0.029706737,
-0.033596177,
0.011591753,
0.014830399,
0.060638495,
0.04924581,
-0.07754377,
0.00619018,
-0.00578822,
0.05687156,
-0.03240178,
-0.0052139917,
0.004019597,
0.02716482,
-0.0033113824,
-0.024423838,
0.045325745,
-0.011591753,
-0.005236961,
0.016905278,
0.035862464,
-0.019615633,
0.047438905,
0.0037688508,
0.023229444,
-0.025878549,
-0.005037895,
0.0024098442,
-0.0018863395,
0.0016978013,
-0.07552249,
0.051113963,
0.024561653,
0.038649384,
0.018559054,
0.021606293,
-0.034055557,
-0.0010297825,
-0.0015437168,
-0.04596888,
-0.07791128,
0.00490008,
0.049888942,
-0.033044916,
0.027746705,
-0.014202577,
0.04207944,
0.0018107329,
0.025281353,
-0.009042179,
0.0029132508,
-0.043365713
] |
text
{'role': 'assistant', 'content': "Matey, I'm afraid I must inform ye that humans cannot eat helicopters. Helicopters are not food, they are flying machines. Food is meant to be eaten, like a hearty plate o' grog, a savory bowl o' stew, or a delicious loaf o' bread. But helicopters, they be for transportin' and movin' around, not for eatin'. So, I'd say none, me hearties. None at all."}
The pipeline will take care of all the details of tokenization and calling apply_chat_template for you -
once the model has a chat template, all you need to do is initialize the pipeline and pass it the list of messages!
What are "generation prompts"?
You may have noticed that the apply_chat_template method has an add_generation_prompt argument. This argument tells
the template to add tokens that indicate the start of a bot response. For example, consider the following chat:
python
messages = [
{"role": "user", "content": "Hi there!"},
{"role": "assistant", "content": "Nice to meet you!"},
{"role": "user", "content": "Can I ask a question?"}
]
Here's what this will look like without a generation prompt, using the ChatML template we saw in the Zephyr example:
python
tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=False)
"""<|im_start|>user
Hi there!<|im_end|>
<|im_start|>assistant
Nice to meet you!<|im_end|>
<|im_start|>user
Can I ask a question?<|im_end|>
"""
And here's what it looks like with a generation prompt:
python
tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
"""<|im_start|>user
Hi there!<|im_end|>
<|im_start|>assistant
Nice to meet you!<|im_end|>
<|im_start|>user
Can I ask a question?<|im_end|>
<|im_start|>assistant
"""
Note that this time, we've added the tokens that indicate the start of a bot response. This ensures that when the model
generates text it will write a bot response instead of doing something unexpected, like continuing the user's
message. Remember, chat models are still just language models - they're trained to continue text, and chat is just a
special kind of text to them! You need to guide them with appropriate control tokens, so they know what they're
supposed to be doing.
Not all models require generation prompts. Some models, like BlenderBot and LLaMA, don't have any
special tokens before bot responses. In these cases, the add_generation_prompt argument will have no effect. The exact
effect that add_generation_prompt has will depend on the template being used.
Can I use chat templates in training?
Yes! We recommend that you apply the chat template as a preprocessing step for your dataset. After this, you
can simply continue like any other language model training task. When training, you should usually set
add_generation_prompt=False, because the added tokens to prompt an assistant response will not be helpful during
training. Let's see an example:
thon
from transformers import AutoTokenizer
from datasets import Dataset
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceH4/zephyr-7b-beta")
chat1 = [
{"role": "user", "content": "Which is bigger, the moon or the sun?"},
{"role": "assistant", "content": "The sun."}
]
chat2 = [
{"role": "user", "content": "Which is bigger, a virus or a bacterium?"},
{"role": "assistant", "content": "A bacterium."}
]
dataset = Dataset.from_dict({"chat": [chat1, chat2]})
dataset = dataset.map(lambda x: {"formatted_chat": tokenizer.apply_chat_template(x["chat"], tokenize=False, add_generation_prompt=False)})
print(dataset['formatted_chat'][0])
And we get:text
<|user|>
Which is bigger, the moon or the sun?
<|assistant|>
The sun. |
[
0.024347795,
-0.009052567,
0.013660246,
0.034256782,
-0.006858434,
-0.0169019,
0.017949421,
0.020808872,
0.01956317,
0.060812864,
-0.004597062,
0.03054799,
0.009392303,
-0.0010899885,
-0.03626689,
-0.00338675,
-0.013943359,
-0.04764807,
-0.025565185,
0.028990863,
-0.018105134,
-0.011423646,
-0.09065307,
-0.037597526,
-0.029217353,
0.033237573,
-0.0012103119,
0.014495431,
0.089577235,
0.045354847,
-0.01923759,
0.008005045,
0.01420524,
-0.057358876,
0.0116359815,
-0.006536392,
0.025961544,
-0.047704693,
-0.023031315,
-0.044562127,
0.057811856,
0.012060652,
0.01966226,
-0.048185986,
-0.05625473,
-0.026768418,
-0.0013801802,
0.024078837,
0.017142547,
-0.05973703,
-0.016916055,
0.016788654,
0.006019709,
-0.005665817,
-0.045468092,
0.0036769416,
-0.0074458956,
-0.01834578,
-0.04385434,
0.019379146,
0.009484315,
0.04260864,
0.001042213,
-0.03564404,
0.015939312,
0.03326588,
-0.030378122,
0.021884704,
0.0028541419,
-0.044448882,
0.00041471762,
0.0449868,
-0.060020145,
-0.028396323,
-0.04640237,
-0.0019322523,
0.0057790624,
-0.018827073,
-0.01206773,
0.05784017,
0.014736079,
0.035106122,
-0.009003022,
-0.01663294,
-0.038248688,
-0.061662205,
0.023724945,
0.024149615,
0.032671344,
-0.02351261,
-0.039041407,
0.036351822,
-0.03034981,
0.00044015364,
-0.0083447825,
0.051073745,
0.007799788,
0.035332613,
-0.00054101297,
0.0020048004,
0.008946399,
0.030123318,
-0.011614747,
0.0025303303,
-0.017468126,
0.0039600558,
0.017156702,
-0.018812919,
-0.021516657,
0.0041157682,
-0.013830114,
-0.013370054,
0.025211293,
-0.030916037,
-0.02798581,
0.042014103,
0.026230503,
0.021474188,
-0.060359884,
-0.0107866395,
0.0017553061,
-0.0062780506,
-0.043514606,
-0.020228488,
-0.023229495,
-0.011565203,
0.0181476,
0.08516066,
-0.018487338,
0.006355907,
0.008288159,
-0.01620827,
0.03722948,
0.001262511,
0.0022472166,
0.042042412,
-0.013780569,
0.02873606,
0.053876575,
-0.01923759,
0.017906955,
0.016165804,
0.050592452,
0.0693629,
-0.015358929,
-0.009590483,
0.042891756,
0.014488353,
-0.024489352,
-0.003984828,
-0.008224458,
0.037569214,
0.0047386186,
-0.0043741097,
-0.0044236546,
-0.019633949,
0.0008900393,
-0.0375409,
-0.029443845,
-0.0020101087,
-0.0051632896,
0.024602598,
-0.02324365,
0.016420607,
-0.02883515,
0.009675417,
0.009335681,
-0.02791503,
0.023087937,
-0.026725952,
0.013766414,
0.0077077756,
-0.028467102,
0.026230503,
0.026612706,
0.024800777,
0.020709781,
0.01298785,
0.015061659,
0.01884123,
0.008281081,
0.017779553,
0.011374101,
0.0180202,
0.016363984,
0.00420778,
0.012053574,
-0.041278005,
-0.028283078,
-0.008847309,
0.030916037,
0.031963557,
0.008479261,
0.027886719,
0.019308368,
0.000020639114,
-0.015373085,
0.043542918,
-0.039239585,
-0.04504342,
-0.055377077,
0.042070724,
-0.02324365,
0.048582345,
-0.040400352,
-0.018784607,
0.032727968,
0.04869559,
-0.016519696,
0.030208252,
0.038984783,
0.011558125,
-0.0442507,
0.0013191338,
0.027009066,
-0.043146558,
-0.0415045,
-0.0056375056,
0.026952444,
-0.0018756295,
-0.03714454,
0.05379164,
0.01058846,
0.025239604,
-0.0035353848,
0.008295237,
-0.0032434235,
0.029443845,
-0.014990881,
0.010595538,
0.0045227446,
0.0077360873,
0.040230483,
0.041079827,
0.015896846,
0.028976707,
0.06783409,
0.048808835,
-0.006394835,
-0.01380888,
-0.0037477203,
0.021191075,
0.0042750197,
0.013256808,
0.021134453,
-0.017369037,
-0.00064319937,
0.0011050289,
-0.0074883625,
0.013136485,
-0.07372286,
0.055745125,
0.04685535,
0.016236583,
-0.0051703677,
-0.033973668,
0.0012120814,
0.037597526,
-0.048016116,
-0.0068372004,
0.040485285,
0.017949421,
0.017850332,
-0.0059772423,
0.010843262,
-0.0024453963,
-0.019152654,
-0.015981779,
-0.002640037,
-0.053650085,
-0.025126358,
-0.028820995,
-0.05271581,
0.01841656,
-0.035191055,
-0.0040166783,
0.041249696,
-0.034709763,
0.0045262836,
-0.068173826,
0.0019747193,
-0.002153435,
-0.030491367,
0.039777502,
0.00011186316,
-0.03468145,
-0.035332613,
-0.0090738,
-0.00226845,
0.07915865,
-0.052885674,
0.016151648,
-0.008528806,
-0.049601555,
0.0044342712,
-0.021969639,
0.010977741,
0.01380888,
-0.001551818,
-0.0133346645,
-0.023569232,
0.022380153,
0.021757303,
-0.026216347,
-0.036974676,
0.024517663,
0.049658176,
-0.027745161,
0.051073745,
0.024291173,
0.003600855,
0.012471167,
-0.020922117,
0.052064646,
-0.06126585,
0.010956508,
0.04181592,
0.05277243,
-0.02393728,
-0.056934204,
-0.032501474,
0.0037689537,
0.011466113,
0.0013324048,
0.01670372,
0.04212735,
0.021247698,
-0.080800705,
0.031680446,
-0.03233161,
-0.02413546,
-0.052489318,
-0.053451903,
0.03114253,
0.051668286,
0.022677423,
-0.00743174,
-0.030859414,
-0.052206203,
0.026541928,
0.034143537,
-0.04988467,
0.03301108,
0.03278459,
-0.025310382,
0.014198162,
0.018996943,
-0.048950393,
-0.007523752,
0.041278005,
-0.014990881,
0.016335672,
0.06607878,
-0.004912026,
0.0132214185,
0.03153889,
-0.05625473,
-0.02463091,
0.020766404,
0.021403411,
0.03745597,
0.02741958,
0.03383211,
-0.01643476,
-0.02443273,
-0.031284086,
-0.04419408,
0.02853788,
0.041447874,
-0.0064231465,
-0.009512627,
-0.0028134442,
-0.01660463,
-0.0002678523,
-0.07230729,
-0.048554033,
0.066475146,
0.015981779,
0.049743112,
-0.032274984,
-0.014488353,
0.0014801548,
0.007644075,
0.052234516,
0.022847291,
0.023767412,
-0.018204223,
0.0076653087,
0.012060652,
-0.015712822,
0.00013282023,
-0.01966226,
-0.004030834,
0.008472184,
-0.05580175,
-0.005372086,
0.0016137492,
0.049601555,
0.03567235,
0.0203842,
-0.01344791,
0.02863697,
0.04235384,
0.00049367984,
-0.025862454,
0.019534858,
-0.03233161,
0.04014555,
-0.0069469074,
0.03403029,
0.01752475,
0.00601617,
-0.002528561,
0.02620219,
0.019280056,
0.007049536,
-0.03216174,
0.033067703,
0.02955709,
0.013561156,
-0.06658839,
-0.023880657,
0.0017464588,
0.04767638,
0.02557934,
-0.060642995,
0.01140949,
-0.010340735,
0.013101095,
0.038022198,
-0.0006316979,
-0.013178952,
-0.019690571,
-0.051866464,
-0.02344183,
0.028169833,
0.029585402,
-0.020228488,
0.004731541,
-0.033464063,
0.017411504,
0.029443845,
-0.017807864,
0.012718892,
-0.0015597806,
-0.0134408325,
0.04359954,
0.010404436,
-0.016378138,
-0.05744381,
0.038022198,
-0.046204187,
-0.051215302,
-0.04742158,
-0.018359937,
-0.03745597,
-0.0018384708,
0.0001844664,
0.03320926,
-0.03705961,
-0.008224458,
0.010241645,
-0.0023516149,
-0.019591482,
-0.014948414,
0.030406432,
0.010772483,
-0.032303296,
0.026754264,
0.015670354,
-0.009038411,
0.050790634,
0.032274984,
0.012633958,
-0.023257807,
-0.040825024,
0.02229522,
-0.02058238,
-0.026952444,
0.016264893,
-0.013985827,
0.026825042,
0.028877618,
-0.015047504,
0.0046713795,
-0.043882653,
-0.02199795,
-0.015231527,
-0.022790669,
0.022847291,
-0.0093993815,
0.001147496,
0.023413518,
-0.07717685,
0.025267916,
-0.02896255,
-0.043769408,
-0.024687532,
0.06658839,
0.021983795,
0.05622642,
-0.0014350335,
-0.014191084,
0.035219368,
0.00634529,
-0.012400389,
-0.024206238,
-0.021771459,
-0.0016172881,
0.03895647,
-0.03278459,
0.017836176,
-0.0023710788,
-0.012145586,
0.020794716,
0.028099054,
0.025593497,
-0.04008893,
-0.03564404,
0.07117483,
0.03468145,
-0.09518289,
-0.018558117,
0.04521329,
-0.026952444,
0.012775514,
0.029868515,
0.0018119289,
-0.0150333475,
-0.06398374,
0.0076865423,
-0.005241146,
0.0074458956,
-0.032671344,
-0.0066921045,
0.020398356,
0.035134435,
0.03666325,
-0.10333657,
-0.026711795,
-0.062681414,
0.037569214,
-0.02880684,
-0.012520712,
-0.0031903398,
0.013348821,
-0.009080878,
0.055603568,
0.031057594,
0.0041723913,
0.0013669092,
0.0015774752,
0.009739118,
0.034285095,
-0.024616754,
-0.0011156457,
-0.00210389,
0.007375117,
-0.016194114,
0.0313124,
-0.0038821993,
0.026343748,
0.0027939803,
0.005980781,
-0.031227462,
-0.013469144,
-0.028198143,
-0.023300273,
0.021134453,
-0.036380135,
-0.040230483,
-0.02334274,
0.03895647,
0.0051597506,
-0.02209704,
-0.020341733,
0.006288667,
-0.049403373,
0.00073476904,
0.012287143,
-0.006037404,
-0.035898842,
-0.042665266,
-0.016576318,
0.042240594,
-0.04221228,
0.056736026,
0.089124255,
-0.031057594,
0.0090738,
-0.06732448,
0.027476203,
-0.0082315365,
-0.006486847,
0.012386233,
0.040909957,
-0.049290128,
-0.008967632,
-0.03326588,
-0.026060633,
-0.031284086,
0.0011961563,
0.062398303,
-0.023328586,
0.06364401,
0.009802818,
-0.045722894,
-0.035587415,
0.0047067683,
0.044788618,
0.025593497,
0.03524768,
0.03326588,
0.023654167,
0.0066496376,
-0.026527772,
0.00015681855,
-0.03705961,
0.045751207,
0.008238615,
-0.0055596493,
0.03159551,
0.05257425,
-0.048950393,
-0.079555005,
-0.012294221,
-0.021913016,
-0.013681479,
0.019195123,
0.0051137446,
0.016717875,
-0.023894813,
0.031000972,
0.014120306,
0.044477195,
-0.0017022223,
-0.03872998,
-0.020072775,
-0.020610692,
0.0029780043,
0.06551255,
-0.025225447,
0.0066000926,
-0.07372286,
-0.021276008,
-0.028863462,
0.023031315,
0.052206203,
0.013561156,
0.06234168,
0.030717857,
0.03278459,
0.06579567,
-0.01762384,
-0.010538915,
0.022167819,
-0.044930175,
-0.043316428,
-0.020143554,
0.0226208,
0.010064699,
0.013936281,
-0.009321525,
-0.017255792,
0.015868533,
0.027759317,
-0.01903941,
-0.03264303,
-0.011904939,
-0.02426286,
-0.024107149,
-0.043005,
-0.02739127,
-0.006865512,
0.0030275492,
-0.020030309,
0.0021782075,
-0.048157673,
0.038022198,
-0.032303296,
-0.0027108155,
-0.0076794643,
0.0248574,
-0.05585837,
0.0037972652,
-0.0132214185,
-0.044618748,
-0.0038432712,
-0.0037229478,
0.003991906,
-0.032926146,
-0.038843226,
0.05832146,
0.018628893,
-0.022281064,
-0.00038883925,
-0.03298277,
-0.01400706,
-0.022776512,
-0.009456004,
0.021063674,
0.02565012,
-0.004639529,
-0.00059011555,
0.009519705,
-0.0033955972,
0.00063302496,
-0.031737067,
0.04181592,
-0.007424662,
0.012336688,
0.00450505,
-0.005718901,
-0.025961544,
-0.0013863733,
-0.0009723193,
0.025069736,
0.006437302,
-0.0146653,
-0.030916037,
0.03077448,
-0.01496257,
-0.003080633,
0.007106159,
0.04767638,
0.0407684,
-0.0059630866,
-0.0063806796,
-0.005793218,
-0.0040096007,
0.041278005,
0.030264875,
0.03870167,
-0.039211273,
0.006161266,
-0.016194114,
-0.011175921,
-0.015273995,
0.0037583369,
0.0009156965,
0.025635963,
-0.0017075307,
-0.043344736,
0.022465087,
0.011359945,
-0.01772293,
0.023455987,
-0.06047313,
-0.025664276,
-0.00841556,
-0.05826484,
0.0041900855,
-0.04031542,
-0.0015757058,
-0.001992414,
-0.008387249,
0.0107795615,
-0.010199178,
0.031708755,
-0.012357921,
-0.0010961816,
-0.06766422,
0.022054572,
-0.011678448,
-0.016293205,
-0.015061659,
-0.04008893,
0.029472157,
0.052998923,
-0.004229014,
0.005464098,
-0.021983795,
0.0045121275,
-0.0075449855,
0.042240594,
-0.011034364,
0.012520712,
-0.038588423,
0.0009776277,
-0.0036875585,
-0.00983113,
-0.026980754,
0.016647097,
0.05659447,
0.022479244,
-0.026839197,
0.031227462,
0.034964565,
-0.035927154,
0.04702522,
0.022365998,
0.022649111,
0.0065717814,
-0.03224667,
-0.026853353,
0.02172899,
0.0618887,
0.0074883625,
-0.024970645,
0.016661253,
-0.0057224394,
-0.021445878,
-0.04198579,
0.01933668,
-0.0086562075,
-0.031114217,
0.010227489,
-0.0046643014,
-0.026641017,
0.037597526,
0.00236754,
-0.0060090926,
-0.03233161,
0.006490386,
-0.055886682,
-0.026556084,
0.034738075,
0.013143563,
-0.0350495,
-0.04337305,
-0.037739083,
0.0516966,
0.043656163,
-0.03445496,
0.021346787,
0.04442057,
0.046827037,
0.022946382,
0.03790895,
-0.014495431,
0.0070672305,
0.014460042,
0.030689547,
-0.01496257,
0.017553061,
-0.037257787,
-0.0058321464,
-0.030491367,
0.034879632,
-0.030066695,
-0.004533361,
-0.01440342,
-0.010609693,
-0.029047485,
0.0014102611,
-0.022960536,
-0.045751207,
0.01956317,
0.05200802,
-0.017326571,
-0.039777502,
0.046430677,
0.009448926,
0.009519705,
0.011912017,
0.03468145,
-0.010503526,
0.047364954,
-0.0104610585,
-0.057585366,
0.0017323032,
0.0031885703,
-0.00042621914,
-0.035530794,
-0.01896863,
-0.015373085,
-0.001120954,
-0.007870566,
-0.005701206,
-0.0016066714,
0.025763365,
-0.017652152,
-0.039466076,
0.016491385,
0.03683312,
-0.05945392,
0.0025179442,
0.014382186,
0.0020437285,
-0.014849324,
-0.013002005,
0.0026718874,
0.0026718874,
0.012669347,
-0.045128357,
0.0032009564,
0.0009015408,
-0.049516622,
-0.00769362,
-0.023158716,
-0.015981779,
-0.01772293,
-0.043118246,
-0.032926146,
0.011621825,
0.034143537,
0.051441796,
0.009512627,
-0.03340744,
-0.04337305,
0.028226456,
0.07802619,
0.006023248,
0.029981762,
0.049743112,
-0.027999964,
-0.0068513565,
-0.009024255,
0.06868343,
-0.038022198,
0.016109182,
-0.0115227355,
-0.023880657,
-0.052206203,
-0.038645048,
-0.016363984,
-0.004547517,
0.046430677,
-0.041447874,
-0.028721904,
-0.020440822,
-0.027603604,
-0.031680446,
-0.0347947,
0.034936253,
0.012442856,
-0.007145087,
0.01308694,
-0.041278005,
0.2371362,
0.038786605,
0.012796748,
0.012039418,
0.009540938,
0.0067062606,
0.027263869,
-0.037654147,
0.01538724,
-0.034511585,
-0.00519514,
-0.016095025,
0.0005755175,
0.054867472,
-0.04583614,
0.040683467,
-0.03439834,
-0.009243669,
0.006685027,
-0.011303322,
-0.067947336,
0.04031542,
0.019308368,
0.059397295,
0.034171846,
0.0154580185,
0.005545493,
-0.00598432,
-0.014934258,
-0.023172872,
0.034992877,
-0.016845277,
0.044109143,
-0.009901908,
-0.045921072,
0.033152636,
-0.0237391,
-0.034992877,
0.0010439825,
-0.010560148,
0.013299275,
-0.017666306,
-0.017595528,
-0.056792647,
-0.021615745,
0.04869559,
0.02311625,
0.06471983,
0.0442507,
-0.058944315,
0.003402675,
0.008953477,
0.046940286,
-0.039720878,
-0.043910965,
0.008500495,
0.028084898,
-0.016123336,
-0.0133346645,
0.038418554,
-0.013985827,
0.012874604,
0.005198679,
0.02446104,
-0.0464873,
0.034483273,
0.0077643986,
0.02771685,
-0.040230483,
-0.048101053,
0.011204232,
0.010503526,
-0.025763365,
-0.04037204,
0.022111196,
0.05398982,
-0.004359954,
0.031085907,
0.0115227355,
-0.028254766,
0.013561156,
-0.039834127,
-0.045298222,
-0.012570257,
-0.006401913,
0.03507781,
-0.01683112,
0.00014078281,
-0.014226473,
0.025239604,
0.022465087,
0.001275782,
-0.00013414733,
0.015302306,
0.000940469
] |
That's kind of intimidating. Let's add some newlines and indentation to make it more readable. Note that the first
newline after each block as well as any preceding whitespace before a block are ignored by default, using the
Jinja trim_blocks and lstrip_blocks flags. However, be cautious - although leading whitespace on each
line is stripped, spaces between blocks on the same line are not. We strongly recommend checking that your template
isn't printing extra spaces where it shouldn't be!
{% for message in messages %}
{% if message['role'] == 'user' %}
{{ ' ' }}
{% endif %}
{{ message['content'] }}
{% if not loop.last %}
{{ ' ' }}
{% endif %}
{% endfor %}
{{ eos_token }}
If you've never seen one of these before, this is a Jinja template.
Jinja is a templating language that allows you to write simple code that generates text. In many ways, the code and
syntax resembles Python. In pure Python, this template would look something like this:
python
for idx, message in enumerate(messages):
if message['role'] == 'user':
print(' ')
print(message['content'])
if not idx == len(messages) - 1: # Check for the last message in the conversation
print(' ')
print(eos_token)
Effectively, the template does three things:
1. For each message, if the message is a user message, add a blank space before it, otherwise print nothing.
2. Add the message content
3. If the message is not the last message, add two spaces after it. After the final message, print the EOS token.
This is a pretty simple template - it doesn't add any control tokens, and it doesn't support "system" messages, which
are a common way to give the model directives about how it should behave in the subsequent conversation.
But Jinja gives you a lot of flexibility to do those things! Let's see a Jinja template that can format inputs
similarly to the way LLaMA formats them (note that the real LLaMA template includes handling for default system
messages and slightly different system message handling in general - don't use this one in your actual code!)
{% for message in messages %}
{% if message['role'] == 'user' %}
{{ bos_token + '[INST] ' + message['content'] + ' [/INST]' }}
{% elif message['role'] == 'system' %}
{{ '<<SYS>>\\n' + message['content'] + '\\n<</SYS>>\\n\\n' }}
{% elif message['role'] == 'assistant' %}
{{ ' ' + message['content'] + ' ' + eos_token }}
{% endif %}
{% endfor %}
Hopefully if you stare at this for a little bit you can see what this template is doing - it adds specific tokens based
on the "role" of each message, which represents who sent it. User, assistant and system messages are clearly
distinguishable to the model because of the tokens they're wrapped in.
Advanced: Adding and editing chat templates
How do I create a chat template?
Simple, just write a jinja template and set tokenizer.chat_template. You may find it easier to start with an
existing template from another model and simply edit it for your needs! For example, we could take the LLaMA template
above and add "[ASST]" and "[/ASST]" to assistant messages:
{% for message in messages %}
{% if message['role'] == 'user' %}
{{ bos_token + '[INST] ' + message['content'].strip() + ' [/INST]' }}
{% elif message['role'] == 'system' %}
{{ '<<SYS>>\\n' + message['content'].strip() + '\\n<</SYS>>\\n\\n' }}
{% elif message['role'] == 'assistant' %}
{{ '[ASST] ' + message['content'] + ' [/ASST]' + eos_token }}
{% endif %}
{% endfor %}
Now, simply set the tokenizer.chat_template attribute. Next time you use [~PreTrainedTokenizer.apply_chat_template], it will
use your new template! This attribute will be saved in the tokenizer_config.json file, so you can use
[~utils.PushToHubMixin.push_to_hub] to upload your new template to the Hub and make sure everyone's using the right
template for your model!
python
template = tokenizer.chat_template
template = template.replace("SYS", "SYSTEM") # Change the system token
tokenizer.chat_template = template # Set the new template
tokenizer.push_to_hub("model_name") # Upload your new template to the Hub!
The method [~PreTrainedTokenizer.apply_chat_template] which uses your chat template is called by the [TextGenerationPipeline] class, so
once you set the correct chat template, your model will automatically become compatible with [TextGenerationPipeline]. |
[
-0.004949575,
-0.014791171,
0.0023650767,
0.023323433,
0.016100507,
-0.019136438,
-0.011215679,
-0.024042847,
-0.03248878,
0.037697345,
-0.013560972,
0.0055970484,
0.009143764,
-0.011302009,
-0.013690466,
0.008107807,
-0.02063282,
-0.036575057,
-0.086675115,
0.011539415,
-0.0057337373,
-0.00541,
-0.08523628,
-0.01894939,
-0.032460004,
0.020618433,
0.010985467,
-0.020532103,
0.05315038,
0.039366387,
-0.02824423,
-0.01010778,
-0.0279133,
-0.030042768,
-0.044632502,
-0.024575215,
-0.03545277,
-0.012762421,
-0.05692011,
-0.0032589496,
0.05441655,
0.003674412,
0.038848408,
-0.06607107,
-0.05076192,
0.01716524,
-0.0015323538,
-0.01835947,
-0.017294735,
-0.02943846,
0.020086065,
-0.007553857,
0.01818681,
0.022201145,
-0.05551006,
-0.01987024,
-0.051999312,
0.025323406,
-0.041812398,
-0.020834256,
-0.034618247,
0.05559639,
-0.04399942,
-0.057898514,
0.040287238,
0.0046402263,
-0.019179603,
0.025668725,
-0.015107714,
-0.040891547,
-0.06158192,
0.049179208,
-0.03939516,
-0.022388194,
-0.021021305,
0.025783831,
0.011071796,
-0.0047409446,
0.015107714,
0.027553592,
0.010589788,
0.0630783,
-0.0077696815,
-0.03358229,
-0.037064258,
-0.053927343,
0.022891784,
-0.013035798,
0.013014216,
-0.011690493,
-0.037064258,
0.05556761,
0.003953185,
0.0006704048,
0.024474496,
0.037006706,
0.021870214,
0.0392225,
-0.018676013,
-0.029237023,
0.029927662,
0.06607107,
-0.01928032,
0.0040898737,
-0.009712102,
0.008402767,
0.029337741,
0.011553804,
-0.05136623,
-0.008604202,
-0.05007128,
0.0043164897,
-0.0052589234,
-0.02486298,
-0.013999815,
0.041150536,
0.022028485,
0.0062445216,
-0.063135855,
-0.005776902,
0.017539337,
0.007891982,
-0.037783675,
-0.02207165,
0.036575057,
-0.0014424269,
0.006370419,
0.05067559,
-0.0053020883,
-0.026776625,
0.0057984847,
-0.028575161,
0.02673346,
0.05073314,
-0.0145106,
0.006510705,
-0.0044999407,
0.026157927,
0.0010548421,
-0.04397064,
0.03484846,
0.0029801764,
0.02087742,
0.05245974,
0.014122115,
-0.011359562,
0.01010778,
-0.04138075,
-0.033524737,
0.0049459776,
-0.0035503127,
0.03755346,
-0.0046510175,
0.024042847,
-0.009618578,
-0.028129125,
0.006510705,
-0.021294683,
0.009395559,
-0.025596784,
-0.01775516,
-0.0005098854,
-0.031567927,
0.059510004,
-0.03528011,
0.024244284,
-0.01260415,
-0.011517833,
-0.0022535673,
-0.04702096,
0.03280532,
-0.02359681,
0.018963778,
0.03746713,
0.0069135777,
0.027596757,
0.03680527,
0.00087948475,
0.012078977,
0.01835947,
0.0050862636,
-0.0059351735,
0.0064675403,
0.013963844,
0.015150879,
-0.015870294,
0.0046869884,
-0.024388166,
0.008345214,
0.00896391,
0.01692064,
0.028114736,
-0.00649272,
0.030100321,
-0.024906145,
-0.0057409313,
-0.030474417,
0.045639683,
0.02782697,
-0.023956519,
-0.015568139,
0.07556735,
-0.028186677,
0.007503498,
0.0004570533,
-0.016373884,
0.00091500586,
0.027927687,
-0.037668567,
0.023323433,
0.05660357,
0.0068236506,
-0.0818982,
0.0238558,
0.042157717,
-0.015755188,
-0.021841438,
-0.015352315,
-0.03424415,
0.028373726,
-0.009834402,
0.04120809,
0.06630128,
0.0041186507,
-0.01648899,
-0.022388194,
-0.012489043,
0.017553724,
0.005766111,
0.03366862,
0.033812504,
0.017827103,
0.026431305,
0.033611067,
0.019510534,
0.010647342,
0.06140926,
0.057150323,
-0.0036456352,
-0.0029693851,
0.01310774,
0.016647262,
0.0051186373,
0.009676131,
-0.0035790894,
-0.008172554,
-0.021683166,
-0.012704868,
-0.02673346,
0.0092804525,
-0.008999881,
0.0553374,
0.031021172,
0.005427986,
0.008784057,
-0.0140789505,
-0.013625719,
0.02799963,
-0.02978378,
0.011093378,
0.06745235,
0.02317955,
-0.017611278,
-0.027251437,
-0.0071905525,
0.047337502,
-0.0022139994,
0.0057337373,
-0.014230028,
-0.05015761,
0.016762368,
-0.059279792,
-0.03519378,
0.015740799,
0.0068020686,
-0.03171181,
0.01768322,
-0.034129046,
0.014453046,
-0.03594197,
-0.00023448431,
0.021424178,
-0.029208247,
0.04270447,
0.035481546,
-0.010114974,
-0.07199905,
0.008309242,
-0.026546411,
0.01657532,
-0.009417142,
0.020618433,
0.012208472,
-0.023668751,
0.00094872847,
-0.015640082,
0.009719296,
0.00127876,
-0.032690216,
0.022014098,
-0.0048308712,
0.042503037,
0.01454657,
0.0066402,
-0.03297798,
0.009114987,
0.018920613,
-0.03925128,
0.06256033,
0.032431226,
-0.029870108,
0.026532024,
-0.01971197,
0.05107846,
-0.014489017,
0.009755267,
0.011891929,
0.017237183,
-0.04112176,
-0.005039502,
-0.063308515,
0.0059495615,
-0.017985374,
-0.02054649,
-0.049092878,
0.06486245,
0.02130907,
-0.05608559,
-0.005298491,
-0.038013887,
-0.047826707,
-0.020057289,
-0.0414383,
0.021510506,
0.04017213,
0.017366678,
0.01404298,
0.010719283,
-0.008007089,
0.017409842,
0.009302035,
0.010546623,
0.03349596,
0.035136227,
-0.02257524,
0.007132999,
0.0052157585,
-0.03392761,
0.0039280057,
-0.012143725,
0.02325149,
0.022632794,
0.036085855,
-0.0037913169,
0.011971065,
0.030330535,
-0.008445932,
-0.013776796,
0.030272981,
-0.01269048,
0.01433794,
0.03789878,
-0.013819961,
-0.03536644,
-0.02384141,
0.0010368568,
-0.03815777,
0.08184064,
0.080056496,
-0.0068488303,
0.0395966,
-0.001978391,
-0.016042953,
-0.030589523,
-0.06572575,
-0.015611304,
0.066013515,
0.023798246,
0.024402555,
-0.036172185,
-0.01125165,
0.03620096,
0.0048524537,
0.026661517,
0.053236704,
0.0096473545,
-0.015280373,
0.0021708347,
0.00972649,
0.009388365,
0.02850322,
0.019683193,
0.008100612,
-0.012007035,
-0.05018639,
-0.025898939,
-0.0018830686,
0.0509058,
0.014467435,
0.042992238,
0.05234463,
0.017913433,
0.03913617,
0.012827168,
-0.023884576,
-0.025424125,
-0.038445536,
-0.002958594,
0.0004941481,
0.037783675,
-0.03315064,
-0.011640134,
0.011791211,
0.01412931,
-0.012927887,
0.024488885,
-0.03881963,
0.005294894,
0.01378399,
0.060258195,
-0.018546518,
-0.031193832,
-0.014280386,
0.018402634,
0.026776625,
0.0050287107,
0.0045143287,
-0.03231612,
0.015381091,
0.05159644,
-0.002293135,
-0.015783964,
-0.0073524206,
-0.0454958,
-0.030762183,
0.048603673,
0.03315064,
-0.037927557,
-0.0058056787,
-0.04670442,
-0.013855932,
0.030359311,
-0.005618631,
-0.00057418307,
0.029078752,
-0.02309322,
0.01978391,
0.009855985,
-0.009093405,
-0.0531216,
0.04304979,
-0.004949575,
-0.034531917,
-0.03856064,
-0.0046905857,
0.00039500376,
-0.023064444,
-0.02782697,
0.0131581,
-0.022776676,
0.011064602,
0.013805573,
0.0070394753,
-0.030301757,
-0.018834284,
-0.00012128887,
-0.009618578,
-0.01019411,
0.010165333,
0.037754897,
-0.018460188,
0.03384128,
0.031942025,
-0.0001519764,
0.01700697,
0.016719203,
0.03939516,
-0.022819841,
-0.022460135,
0.02723705,
-0.028546385,
0.028920481,
-0.0038452728,
-0.019064495,
-0.01264012,
-0.05608559,
-0.017381065,
0.00057912903,
0.0085466495,
0.02460399,
-0.014230028,
-0.016762368,
-0.016719203,
-0.04135197,
-0.02198532,
-0.035308886,
0.0012958462,
-0.008812833,
0.04408575,
0.016791144,
0.05107846,
-0.017265959,
-0.018287528,
0.00024977187,
-0.013028605,
0.0032139863,
-0.0012895513,
0.0026600368,
-0.024172341,
-0.010539429,
-0.03533766,
-0.011309203,
0.01028044,
-0.013949456,
0.031683035,
-0.0118631525,
0.0268054,
-0.04270447,
-0.027553592,
0.039021067,
0.00264385,
-0.051826652,
-0.008107807,
0.018618459,
-0.025596784,
0.030675853,
0.0490641,
0.024560826,
-0.04704974,
-0.034129046,
0.03533766,
0.027639922,
-0.011992647,
-0.0023380986,
-0.023136385,
0.00640639,
-0.0012454871,
-0.00702149,
-0.07458894,
-0.036402397,
-0.036431175,
0.027553592,
-0.04929431,
-0.01995657,
-0.01310774,
0.008820027,
-0.053927343,
0.01648899,
0.0441433,
0.0031942024,
0.010963884,
-0.032546334,
0.018791119,
0.031222608,
-0.027611146,
-0.005809276,
0.010395546,
0.013100546,
-0.007877594,
0.02699245,
-0.02420112,
0.06894873,
-0.019093273,
0.035136227,
0.0035593056,
-0.014201251,
-0.043423887,
0.012165307,
0.0075250803,
-0.041726068,
-0.02952479,
-0.03890596,
0.026963672,
-0.009402754,
-0.06831564,
-0.07084798,
0.01707891,
-0.018891837,
-0.015409868,
0.02841689,
-0.03450314,
0.0005669889,
-0.027438486,
0.014122115,
0.06733724,
-0.06658905,
0.01471923,
0.06756745,
-0.034100268,
0.025927715,
-0.092142664,
0.05945245,
-0.004327281,
-0.0027265826,
-0.013273206,
0.02352487,
-0.02181266,
-0.0039855586,
-0.030388087,
-0.011690493,
-0.017150853,
0.0075610513,
0.049092878,
-0.02538096,
0.05058926,
0.010337993,
-0.03576931,
-0.03671894,
0.027726252,
0.008417155,
0.029323353,
0.03104995,
0.04822958,
0.012294802,
0.01928032,
-0.0414383,
0.0013749818,
-0.02697806,
0.053841013,
0.013525001,
-0.022287475,
0.017467394,
0.034963567,
-0.03179814,
-0.054589204,
0.016460214,
0.022791065,
-0.018906225,
0.02122274,
-0.01040274,
0.008294854,
-0.04693463,
0.014704841,
0.035567876,
-0.00024370181,
-0.030819736,
0.011258844,
0.007417168,
-0.02208604,
0.024819816,
0.05438777,
-0.04100665,
0.034388036,
-0.038704526,
-0.014539376,
-0.022042874,
-0.011834376,
0.074301176,
-0.0076761576,
0.02165439,
0.015582528,
-0.0006020604,
0.07061777,
-0.014697648,
-0.012266025,
0.011517833,
-0.06319341,
-0.04169729,
-0.031165056,
-0.00047616276,
-0.01002145,
-0.0018165228,
0.02664713,
0.025078805,
0.015855905,
0.050531708,
-0.0144746285,
-0.04509293,
-0.000593967,
-0.028906092,
-0.0055035246,
-0.01480556,
-0.011697687,
-0.007604216,
0.019237155,
0.013057381,
-0.044776388,
-0.014007009,
0.012906305,
-0.0043488634,
-0.00670135,
-0.03053197,
0.022963725,
-0.06140926,
-0.045812342,
-0.017035745,
-0.021539284,
0.021337848,
-0.013172488,
-0.02799963,
-0.008992687,
-0.026690295,
0.009654549,
-0.014906278,
0.004025127,
-0.032862876,
-0.004190592,
0.0014532182,
-0.023740694,
-0.013819961,
0.03392761,
0.017453007,
-0.026330587,
-0.027639922,
0.0122444425,
-0.03968293,
-0.025424125,
0.0026420513,
0.058934473,
-0.0088991625,
0.012913498,
-0.02156806,
0.033726174,
-0.063135855,
-0.02479104,
0.005298491,
0.050272718,
0.0012346959,
0.013985426,
0.031107502,
0.019323485,
0.0392225,
0.036431175,
0.004913604,
0.039049845,
-0.0051725935,
0.0009541241,
0.0002213325,
-0.02420112,
-0.0028704656,
-0.009150958,
0.04871878,
0.04558213,
-0.03458947,
0.011855958,
-0.029251412,
-0.004942381,
-0.046819523,
-0.0045934645,
0.00541,
0.0441433,
0.011920705,
-0.04719362,
0.019726358,
0.003704987,
0.002359681,
0.02614354,
-0.0711933,
-0.0048776334,
0.024345001,
-0.021611225,
0.011222873,
-0.045898672,
-0.033639845,
-0.007704934,
0.012971052,
0.037611015,
0.006438764,
0.030301757,
-0.010129362,
-0.002553923,
-0.013114935,
-0.0036474338,
0.02276229,
-0.018632848,
-0.039625376,
-0.046474207,
0.063653834,
0.002787733,
-0.003179814,
0.007201344,
-0.030819736,
-0.001609691,
-0.026503246,
0.072114155,
-0.06284809,
0.017352289,
-0.037927557,
-0.021927768,
-0.015913459,
-0.0056114364,
-0.024517661,
0.0074243625,
0.056402132,
0.009402754,
0.03712181,
0.011532222,
0.03392761,
-0.033035535,
0.04592745,
0.03985559,
0.062215004,
-0.015870294,
-0.0072912704,
-0.02716511,
0.01775516,
0.0454958,
0.032287344,
0.01277681,
0.019150825,
0.0045898673,
-0.020229949,
-0.033783726,
0.0070574605,
0.0050862636,
-0.036344845,
0.022042874,
0.027625535,
-0.017467394,
0.046992183,
0.04866123,
-0.0025862968,
0.015467421,
0.022359416,
-0.047423832,
-0.04615766,
-0.05159644,
0.026330587,
-0.021280294,
0.020575268,
-0.04322245,
0.030848512,
0.017021358,
0.01048907,
0.0038272876,
0.017956598,
0.015496198,
0.036316067,
0.010337993,
-0.021668779,
0.02597088,
0.011208485,
0.039193727,
-0.033553515,
-0.011625745,
-0.06175458,
-0.023553645,
-0.015409868,
0.056028035,
-0.05997043,
-0.03079096,
-0.010805612,
-0.007870399,
-0.017913433,
-0.023121996,
-0.0037733314,
-0.045812342,
0.033121865,
0.036977928,
-0.0004712168,
-0.04618644,
0.04998495,
0.00672653,
0.026373751,
0.032776546,
0.022373805,
-0.009625772,
0.04566846,
0.003028737,
-0.0151796555,
0.0041078595,
0.00549633,
-0.04077644,
-0.02563995,
0.029078752,
-0.0118631525,
0.015424256,
0.011035825,
-0.07102064,
-0.03712181,
0.030647077,
-0.025352182,
-0.04408575,
0.019899018,
-0.0016456617,
-0.017021358,
-0.008222912,
0.06388405,
-0.01433794,
0.012769615,
-0.018042928,
-0.020834256,
-0.021611225,
-0.022934949,
-0.060545962,
0.0018075301,
-0.027395321,
-0.059337344,
-0.014287581,
-0.0268054,
-0.019323485,
0.03933761,
0.005535898,
-0.040229686,
0.02376947,
0.026416916,
0.0482008,
0.024129177,
-0.015884683,
-0.07038756,
-0.0012023222,
0.035078675,
0.005039502,
0.06791277,
0.047164842,
0.0064747347,
0.008748086,
0.008438737,
0.031136278,
0.008906357,
0.008071836,
-0.006780486,
-0.03881963,
0.008611397,
-0.036057077,
0.0200429,
0.04929431,
0.014114921,
-0.017150853,
-0.018546518,
-0.013913485,
-0.0536108,
-0.008014282,
-0.046387877,
0.035078675,
0.017237183,
-0.010668924,
0.012273219,
-0.013733631,
0.24586725,
0.029409682,
0.05904958,
0.05081947,
0.06140926,
0.04362532,
0.04578357,
-0.021611225,
0.02215798,
-0.045985002,
0.023697529,
-0.03833043,
0.011683299,
0.03231612,
-0.03899229,
0.024431331,
-0.030733407,
0.02850322,
0.014265998,
0.0034334077,
-0.03663261,
0.05956756,
0.0028362935,
0.08120756,
0.057668302,
0.005766111,
-0.014604123,
-0.04667564,
-0.001302141,
-0.058934473,
0.0055610775,
-0.034560695,
0.0022967323,
-0.012855945,
-0.06543798,
-0.015755188,
-0.04785548,
-0.058761813,
-0.0227479,
0.04920798,
-0.013618525,
-0.027927687,
0.032949205,
-0.004086277,
-0.035308886,
-0.012409908,
-0.004222966,
0.035078675,
0.051999312,
-0.05237341,
-0.008014282,
-0.0373808,
0.06273299,
-0.028575161,
-0.019150825,
-0.015265985,
0.024934921,
-0.05260362,
-0.0114818625,
0.019683193,
-0.032949205,
0.0030611106,
-0.03982681,
0.038618196,
-0.01978391,
0.016258778,
0.023366598,
0.03533766,
-0.018143645,
-0.010035839,
0.031251386,
0.004766124,
-0.015424256,
-0.04126564,
0.004913604,
0.032862876,
0.0053704325,
0.016963804,
0.013114935,
-0.042762026,
0.002713993,
0.010855972,
-0.031222608,
-0.057668302,
0.011575387,
0.016460214,
-0.050128832,
-0.01128762,
0.011050213,
0.050445378,
-0.012935081,
0.023639975,
0.047164842,
0.002640253,
-0.010863165
] |
What are "default" templates?
Before the introduction of chat templates, chat handling was hardcoded at the model class level. For backwards
compatibility, we have retained this class-specific handling as default templates, also set at the class level. If a
model does not have a chat template set, but there is a default template for its model class, the TextGenerationPipeline
class and methods like apply_chat_template will use the class template instead. You can find out what the default
template for your tokenizer is by checking the tokenizer.default_chat_template attribute.
This is something we do purely for backward compatibility reasons, to avoid breaking any existing workflows. Even when
the class template is appropriate for your model, we strongly recommend overriding the default template by
setting the chat_template attribute explicitly to make it clear to users that your model has been correctly configured
for chat, and to future-proof in case the default templates are ever altered or deprecated.
What template should I use?
When setting the template for a model that's already been trained for chat, you should ensure that the template
exactly matches the message formatting that the model saw during training, or else you will probably experience
performance degradation. This is true even if you're training the model further - you will probably get the best
performance if you keep the chat tokens constant. This is very analogous to tokenization - you generally get the
best performance for inference or fine-tuning when you precisely match the tokenization used during training.
If you're training a model from scratch, or fine-tuning a base language model for chat, on the other hand,
you have a lot of freedom to choose an appropriate template! LLMs are smart enough to learn to handle lots of different
input formats. Our default template for models that don't have a class-specific template follows the
ChatML format, and this is a good, flexible choice for many use-cases. It looks like this:
{% for message in messages %}
{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}
{% endfor %}
If you like this one, here it is in one-liner form, ready to copy into your code. The one-liner also includes
handy support for generation prompts, but note that it doesn't add BOS or EOS tokens!
If your model expects those, they won't be added automatically by apply_chat_template - in other words, the
text will be tokenized with add_special_tokens=False. This is to avoid potential conflicts between the template and
the add_special_tokens logic. If your model expects special tokens, make sure to add them to the template!
python
tokenizer.chat_template = "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}"
This template wraps each message in <|im_start|> and <|im_end|> tokens, and simply writes the role as a string, which
allows for flexibility in the roles you train with. The output looks like this:
text
<|im_start|>system
You are a helpful chatbot that will do its best not to say anything so stupid that people tweet about it.<|im_end|>
<|im_start|>user
How are you?<|im_end|>
<|im_start|>assistant
I'm doing great!<|im_end|>
The "user", "system" and "assistant" roles are the standard for chat, and we recommend using them when it makes sense,
particularly if you want your model to operate well with [TextGenerationPipeline]. However, you are not limited
to these roles - templating is extremely flexible, and any string can be a role.
I want to add some chat templates! How should I get started?
If you have any chat models, you should set their tokenizer.chat_template attribute and test it using
[~PreTrainedTokenizer.apply_chat_template], then push the updated tokenizer to the Hub. This applies even if you're
not the model owner - if you're using a model with an empty chat template, or one that's still using the default class
template, please open a pull request to the model repository so that this attribute can be set properly!
Once the attribute is set, that's it, you're done! tokenizer.apply_chat_template will now work correctly for that
model, which means it is also automatically supported in places like TextGenerationPipeline!
By ensuring that models have this attribute, we can make sure that the whole community gets to use the full power of
open-source models. Formatting mismatches have been haunting the field and silently harming performance for too long -
it's time to put an end to them!
Advanced: Template writing tips
If you're unfamiliar with Jinja, we generally find that the easiest way to write a chat template is to first
write a short Python script that formats messages the way you want, and then convert that script into a template.
Remember that the template handler will receive the conversation history as a variable called messages. Each
message is a dictionary with two keys, role and content. You will be able to access messages in your template
just like you can in Python, which means you can loop over it with {% for message in messages %} or access
individual messages with, for example, {{ messages[0] }}.
You can also use the following tips to convert your code to Jinja:
For loops
For loops in Jinja look like this:
{% for message in messages %}
{{ message['content'] }}
{% endfor %}
Note that whatever's inside the {{ expression block }} will be printed to the output. You can use operators like
+ to combine strings inside expression blocks.
If statements
If statements in Jinja look like this:
{% if message['role'] == 'user' %}
{{ message['content'] }}
{% endif %}
Note how where Python uses whitespace to mark the beginnings and ends of for and if blocks, Jinja requires you
to explicitly end them with {% endfor %} and {% endif %}.
Special variables
Inside your template, you will have access to the list of messages, but you can also access several other special
variables. These include special tokens like bos_token and eos_token, as well as the add_generation_prompt
variable that we discussed above. You can also use the loop variable to access information about the current loop
iteration, for example using {% if loop.last %} to check if the current message is the last message in the
conversation. Here's an example that puts these ideas together to add a generation prompt at the end of the
conversation if add_generation_prompt is True:
{% if loop.last and add_generation_prompt %}
{{ bos_token + 'Assistant:\n' }}
{% endif %}
Notes on whitespace
As much as possible, we've tried to get Jinja to ignore whitespace outside of {{ expressions }}. However, be aware
that Jinja is a general-purpose templating engine, and it may treat whitespace between blocks on the same line
as significant and print it to the output. We strongly recommend checking that your template isn't printing extra
spaces where it shouldn't be before you upload it! |
[
0.05124072,
0.011489397,
-0.051325932,
-0.038032886,
0.042691134,
-0.0010527213,
0.03345985,
-0.00054899504,
0.013406663,
0.030761475,
0.011176953,
-0.055302486,
0.044935044,
-0.051155508,
0.018320546,
0.045645144,
0.016360674,
-0.027651243,
-0.041554976,
-0.0108503075,
0.010211219,
0.0051553166,
-0.08026955,
-0.042861555,
-0.02820512,
-0.0071293907,
0.028219322,
-0.051922414,
0.051695183,
0.06226145,
-0.033289425,
0.008222942,
0.014429205,
-0.019627128,
-0.013186532,
-0.040390413,
-0.024569415,
-0.02820512,
-0.06521546,
-0.050701044,
0.033914313,
-0.048371922,
0.03871458,
-0.050985087,
-0.028531766,
0.01935729,
0.030022971,
-0.03130115,
0.02848916,
-0.0503602,
-0.014997284,
0.026330458,
-0.028389744,
0.031159129,
-0.034567602,
0.014308488,
-0.0054287044,
0.014699043,
-0.01136868,
-0.043088786,
0.035448126,
0.025591956,
-0.025407331,
-0.012916695,
-0.0004409269,
0.020763285,
-0.008734214,
-0.016687319,
0.0029486849,
-0.0023042702,
-0.033800695,
-0.008776819,
0.0012542118,
-0.047690228,
0.01778087,
0.005052352,
-0.011354478,
-0.0016669567,
0.017241197,
0.04555993,
0.0020397585,
0.07345261,
-0.018263739,
0.039481487,
0.0051411144,
-0.03416995,
0.06271592,
-0.032778155,
-0.047462996,
-0.042350285,
-0.000080884674,
0.028361341,
-0.0004109696,
0.045275893,
0.049252443,
0.02993776,
-0.007889196,
0.038174905,
-0.005354144,
-0.025719775,
0.017823476,
0.070555404,
-0.033857506,
0.02402974,
-0.017468428,
0.0009595208,
-0.026060622,
-0.01978335,
-0.0014299612,
-0.05578535,
0.009763856,
-0.009948483,
0.0053505935,
0.010786399,
-0.0059186723,
0.008244245,
-0.0021285207,
0.0078039845,
-0.023305438,
-0.037322786,
0.018391555,
-0.0032504767,
-0.025052281,
-0.04203784,
0.030534243,
0.004700853,
0.016687319,
0.053086977,
0.028616976,
0.017084975,
-0.0009115892,
0.019343087,
0.042492304,
0.060614023,
-0.011269266,
-0.049934138,
-0.015480151,
0.0071648955,
0.043458037,
-0.0049422868,
-0.014187772,
-0.007441834,
0.009472717,
0.07884936,
0.0179939,
-0.007044179,
0.012526141,
-0.065726735,
-0.030420627,
-0.013939237,
0.017908689,
0.024569415,
0.0023983582,
0.01770986,
-0.050985087,
0.027949484,
-0.007168446,
0.021757424,
0.03246571,
0.013080018,
-0.013562885,
-0.011020731,
-0.03993595,
0.036811516,
0.0251943,
0.019627128,
0.00424639,
-0.0016536423,
0.038771387,
-0.074077494,
-0.03749321,
-0.0015746438,
-0.0359878,
0.007385026,
0.05822809,
0.0280631,
0.033942718,
0.00019594285,
0.022950388,
-0.0022616643,
-0.0005099396,
0.0056523853,
-0.016133443,
0.04800267,
0.002424987,
0.018348949,
-0.014258781,
0.004480723,
0.024072345,
0.0077187726,
-0.018476767,
0.033289425,
-0.05626822,
0.023617882,
-0.01972654,
0.013250441,
-0.034936856,
0.010445552,
0.022013059,
-0.037095554,
-0.031329554,
0.051297527,
-0.029682124,
0.017823476,
0.02339065,
-0.018334748,
-0.0151109,
0.00048064804,
-0.010559168,
0.0090963645,
0.044366967,
0.017425822,
-0.015806796,
-0.02993776,
0.013129724,
-0.023873517,
-0.024512606,
0.025776582,
-0.03874298,
0.0022332603,
0.010488157,
0.023660488,
0.033658676,
0.04093009,
0.009891675,
0.008755516,
0.002188879,
0.010374541,
0.002151599,
0.0042854454,
0.004374208,
0.027537627,
0.04093009,
0.022794167,
0.013044513,
0.015778393,
0.035504933,
-0.002389482,
0.031840824,
-0.0076903687,
0.017113378,
-0.0011219559,
0.015920412,
0.038089693,
0.009827766,
-0.04058924,
0.0019918268,
0.0009541951,
-0.020976314,
0.011532002,
-0.06226145,
0.0467813,
0.0302218,
0.00008876233,
-0.0446226,
-0.007505743,
-0.006635872,
0.020138398,
-0.019570319,
-0.009536625,
0.0040120576,
0.013761712,
-0.0077755805,
-0.0037102655,
0.05175199,
0.058625747,
-0.029085642,
0.011475194,
-0.030846687,
-0.047690228,
-0.038885005,
-0.015380737,
-0.08952924,
0.0073566223,
-0.03683992,
-0.014656437,
0.014074156,
-0.045673545,
-0.00783949,
-0.007498642,
-0.012831483,
0.030164992,
-0.016942954,
0.0010074525,
0.04144136,
0.03973712,
-0.068907976,
0.047690228,
-0.032863367,
0.0025030978,
0.007477339,
0.009167374,
-0.0042818952,
-0.0057589,
0.04771863,
0.035220895,
-0.02914245,
-0.06635162,
-0.04794586,
0.011794739,
-0.0230356,
0.010268027,
0.011695325,
0.031244341,
0.019044846,
-0.0014024449,
-0.01863299,
-0.0453327,
0.030761475,
0.044196542,
-0.016275462,
0.019172665,
0.010871611,
0.028332938,
-0.020734882,
0.024924463,
0.057802033,
0.028375544,
-0.03050584,
0.008343659,
-0.029852549,
0.0053860983,
-0.013868227,
-0.015664777,
-0.022652147,
0.05959148,
-0.037692036,
-0.039169043,
-0.020962114,
-0.014123863,
-0.03712396,
0.016303865,
-0.022268694,
0.05158157,
0.015906211,
0.03482324,
-0.019570319,
0.010417148,
0.008428872,
0.039169043,
0.015877806,
0.00012437822,
0.06703331,
0.0604436,
-0.0059364247,
-0.030846687,
0.018746605,
-0.052518897,
0.017326407,
0.013491875,
-0.012114284,
-0.012909594,
-0.010900015,
0.0010154411,
-0.006756589,
0.06175018,
-0.052064434,
-0.004402612,
0.009089263,
0.029994568,
0.04669609,
0.031698804,
-0.0040972694,
-0.0010589346,
-0.050076157,
-0.009728352,
0.0031847926,
-0.011780537,
0.036243435,
-0.028020494,
0.039027024,
-0.030136587,
-0.023135016,
0.014798457,
-0.019655531,
-0.036300246,
0.07260049,
0.0503602,
0.012398323,
-0.008379164,
-0.05737597,
0.012909594,
0.019598724,
0.030193396,
0.016034028,
0.020905305,
-0.050274987,
0.01129767,
-0.020067388,
0.01288119,
0.00019805096,
-0.018192729,
-0.021331364,
-0.046894915,
-0.016374875,
-0.033289425,
0.011340275,
0.062488683,
0.066067584,
0.010630177,
0.061068486,
0.0023823811,
-0.020422438,
0.019840157,
-0.01424458,
-0.040106375,
-0.06101168,
0.015707383,
0.034652814,
-0.02691274,
0.0046582473,
0.027878474,
-0.02252433,
0.017397417,
-0.037834056,
-0.003028571,
-0.013981843,
-0.03223848,
-0.049621694,
0.033232618,
-0.07958786,
-0.04252071,
-0.052036032,
0.024228567,
0.04720736,
-0.03402793,
0.0014574776,
-0.026742317,
-0.026728114,
0.0039374973,
-0.010161512,
-0.053598247,
-0.0014947577,
0.009217081,
-0.033232618,
0.031073919,
0.0410153,
-0.020564457,
0.0028350689,
-0.088393085,
0.0032078708,
0.02108993,
0.0038096793,
-0.023021398,
0.01195096,
0.0019474456,
-0.014770052,
0.018320546,
0.0057446985,
0.006238217,
0.023220226,
-0.02576238,
-0.010353238,
-0.016957156,
0.0030108183,
-0.032863367,
0.020337226,
-0.00008016348,
0.037038747,
0.029426489,
-0.0020255565,
0.031613592,
0.060045943,
-0.03942468,
-0.0061139497,
0.016062433,
0.038174905,
-0.0054003005,
0.035675358,
0.021317162,
-0.028673785,
0.035448126,
0.026926942,
-0.0050345995,
0.014507316,
-0.0051127104,
0.0052866847,
0.008549588,
-0.0078536915,
0.034738027,
-0.06254549,
0.073054954,
-0.019343087,
0.03149998,
-0.023802508,
-0.040021162,
-0.024015537,
0.02402974,
-0.006586165,
0.0280631,
0.020109994,
0.016999763,
0.009437212,
0.011496497,
0.022751562,
-0.0051340135,
-0.05024658,
0.039112236,
0.042293478,
0.016531097,
0.018519374,
-0.011865749,
-0.03800448,
-0.014542821,
-0.007441834,
0.032863367,
-0.010381643,
-0.0014077707,
0.010175714,
-0.016076634,
-0.02597541,
-0.0034741578,
-0.025052281,
-0.022708956,
0.02850336,
-0.015778393,
-0.0030214698,
-0.01215689,
-0.029483298,
0.047122147,
-0.027054759,
-0.039055426,
-0.02353267,
0.015906211,
-0.0003537179,
0.01489787,
0.047235765,
-0.03871458,
-0.038799793,
-0.025052281,
0.025733976,
-0.07600896,
0.016275462,
-0.036186628,
-0.031073919,
-0.0038025784,
0.042634323,
0.022155078,
-0.012746272,
0.0072785113,
-0.011929657,
0.020663872,
-0.06936244,
-0.025918601,
-0.0024161108,
-0.00010623742,
-0.02482505,
0.03641386,
0.033516657,
-0.025918601,
-0.025066484,
0.018363152,
0.018661393,
-0.007903398,
-0.020450842,
-0.021530192,
0.062318258,
-0.007069032,
-0.003216747,
0.06317038,
-0.027693849,
0.010339037,
0.009089263,
0.004132774,
-0.027807465,
-0.04791746,
-0.012057476,
-0.01935729,
0.040049564,
-0.02447,
0.021558596,
-0.007498642,
-0.006799195,
-0.021189345,
0.05785884,
-0.017809276,
-0.020550255,
-0.037095554,
-0.0604436,
0.045531526,
-0.02604642,
0.0046795504,
-0.026827527,
-0.0116385175,
0.06822628,
-0.024157558,
-0.0051411144,
0.049053617,
-0.0053754468,
0.0031208836,
-0.021785827,
0.08521184,
0.0153239295,
0.020252014,
-0.028190918,
0.04095849,
-0.034624413,
0.008606396,
-0.013442168,
-0.05172359,
-0.0050843065,
0.048371922,
0.04195263,
-0.02641567,
0.0060109855,
-0.0031510629,
-0.05303017,
-0.032068055,
0.038799793,
0.017226994,
0.02554935,
0.018846018,
0.024200162,
-0.016687319,
0.02647248,
0.008840729,
-0.0141806705,
-0.0056168805,
0.049820524,
-0.0043422533,
-0.022836773,
0.0018462565,
0.031329554,
-0.02965372,
-0.022339704,
-0.031329554,
0.025591956,
-0.041469764,
0.012625555,
0.007598056,
-0.033942718,
-0.019300481,
0.05513206,
0.042577516,
0.017894486,
-0.04021999,
0.0438841,
0.014528619,
-0.030477434,
0.0145357195,
0.030164992,
-0.044537388,
-0.042350285,
-0.0004944062,
0.028290331,
-0.03973712,
-0.050331794,
0.07879255,
-0.050331794,
0.0388566,
0.060614023,
-0.011872849,
0.02402974,
0.0031652648,
-0.023745699,
0.02022361,
-0.034056332,
-0.048315115,
-0.021572798,
0.018590383,
0.008528285,
0.01503989,
-0.059477866,
-0.011830244,
-0.0070051234,
0.04641205,
-0.04683811,
-0.045758758,
0.029071439,
-0.021714818,
-0.02468303,
0.052717727,
0.0073566223,
0.014187772,
0.007931802,
0.0003847847,
-0.08532546,
0.009053758,
0.037578423,
-0.026302055,
0.0069057094,
-0.040049564,
0.0115178,
-0.053853884,
-0.007512844,
-0.01914426,
-0.003784826,
0.018746605,
0.013981843,
-0.017013965,
0.00669268,
-0.002316697,
0.051695183,
-0.0119935665,
0.023930326,
-0.042265072,
0.021530192,
-0.01986856,
0.005080756,
-0.016445884,
0.0012107182,
-0.0068240482,
-0.023632083,
0.04058924,
0.023362247,
-0.009309393,
-0.0061175,
0.00025652314,
0.043514848,
-0.037550017,
-0.008443073,
0.0048180195,
0.019754944,
-0.014770052,
0.01907325,
-0.019811753,
-0.032636136,
-0.053939097,
0.053427823,
0.025875995,
0.012291808,
-0.0047257068,
-0.0050274986,
-0.00741343,
0.0027587335,
-0.012284707,
0.0153239295,
0.044082925,
0.00669268,
-0.0019225922,
-0.049564887,
-0.01424458,
0.050786257,
-0.033545062,
0.033147406,
0.016857743,
-0.017738264,
0.0023362245,
0.03843054,
0.019754944,
0.059250634,
0.0084856795,
0.0092525855,
-0.027537627,
-0.021359768,
-0.044508986,
0.017809276,
-0.0712371,
-0.023348045,
0.041725397,
-0.028588573,
-0.0063127773,
-0.0302218,
0.030022971,
0.04058924,
0.019158462,
-0.008400467,
0.03777725,
-0.02979574,
-0.006138803,
-0.0061139497,
-0.022950388,
-0.055870563,
-0.044054523,
0.029369682,
-0.0022332603,
-0.026018016,
0.044196542,
0.017354812,
-0.009912978,
-0.0230356,
-0.004814469,
-0.009912978,
-0.022467522,
0.0067636897,
-0.028446553,
0.016758328,
-0.04913883,
0.049564887,
-0.009991088,
0.040248394,
-0.034993663,
0.05453558,
-0.021615403,
0.008265548,
0.033346232,
0.057887245,
0.014010247,
-0.005734047,
0.013910833,
0.018604586,
0.03297698,
-0.01619025,
0.011752133,
0.007818187,
0.02525111,
0.0064938525,
0.009202879,
0.027111568,
0.04058924,
0.01597722,
-0.005165968,
0.009621837,
0.01979755,
0.03186923,
0.027594434,
0.0018604585,
-0.0040262593,
0.014521518,
0.04081647,
0.021544393,
0.04771863,
-0.016161846,
0.010438451,
0.017582044,
-0.0039019922,
0.030193396,
-0.010708288,
-0.053001765,
-0.01893123,
0.022197684,
0.025449937,
-0.007093886,
0.045815565,
0.026515085,
0.0035824478,
0.036300246,
-0.022723157,
-0.00957213,
-0.01129767,
0.02850336,
-0.009657342,
-0.0016616309,
-0.021757424,
-0.022424916,
-0.011524902,
-0.017226994,
-0.023433257,
0.049962543,
0.002144498,
-0.02777906,
0.0033711935,
-0.058171283,
-0.034766432,
-0.07112348,
0.030789878,
-0.052547302,
-0.040362008,
-0.003777725,
-0.0023681791,
-0.039055426,
0.0251943,
-0.021359768,
0.031840824,
-0.0021267456,
0.017226994,
0.0073069152,
0.041214127,
0.035732165,
0.0049990946,
0.035277702,
0.007896298,
-0.04635524,
-0.003756422,
-0.00943011,
-0.0077968836,
-0.009920078,
-0.045673545,
-0.05879617,
0.01576419,
0.0062879235,
-0.033403043,
-0.037550017,
-0.01898804,
0.044310156,
-0.0496501,
-0.014599629,
0.04902521,
-0.015806796,
-0.007512844,
0.012831483,
0.018263739,
-0.019257875,
-0.07106668,
-0.025038078,
0.0042854454,
-0.00022922872,
-0.021672212,
-0.0017042368,
-0.024654627,
0.03374389,
0.019570319,
0.0073708245,
0.019698137,
0.0016314517,
0.0032895321,
0.02108993,
0.020791689,
-0.03257933,
-0.0025066484,
0.02353267,
0.039140638,
0.027864272,
0.074815996,
0.050701044,
0.018803412,
-0.019698137,
0.008556689,
0.0076903687,
-0.016658915,
-0.0194283,
-0.019186866,
-0.0007243006,
-0.018292142,
-0.07731555,
-0.009813564,
0.024072345,
-0.0023539772,
-0.031130726,
-0.024640424,
-0.034368776,
-0.033942718,
0.0051198113,
-0.049593292,
-0.02583339,
-0.01114855,
-0.027409809,
0.029625317,
-0.079701476,
0.23791146,
0.018348949,
0.022424916,
0.015721584,
0.022226088,
0.04362846,
0.010090502,
0.04252071,
0.012795978,
-0.05075785,
-0.0027569581,
-0.013001907,
0.022211887,
0.039765526,
-0.041583378,
0.018192729,
-0.05808607,
-0.008911738,
-0.037294384,
-0.046667684,
-0.05044541,
0.0056736884,
0.009841967,
0.044168137,
0.01567898,
-0.021104133,
-0.0049742414,
-0.045957588,
-0.014315589,
-0.028602775,
0.03837373,
-0.014450508,
0.016999763,
-0.021146739,
-0.010346138,
0.015366536,
-0.0138469245,
-0.048400324,
-0.008712911,
0.023845114,
0.002078814,
-0.03345985,
0.074759185,
0.01108464,
0.011595911,
0.022041462,
-0.027310396,
-0.005389649,
-0.035959397,
-0.020138398,
0.026515085,
-0.0870865,
-0.014585427,
-0.04093009,
-0.047747035,
-0.025961207,
-0.014429205,
-0.05737597,
-0.017155984,
-0.011070439,
0.0072004003,
0.0121710915,
-0.05555812,
0.020706477,
-0.026231045,
-0.017028166,
-0.051496357,
0.033516657,
0.0055032647,
-0.0027108018,
-0.020678073,
-0.0006164544,
-0.0052405284,
-0.014130964,
0.005474861,
-0.009955583,
-0.003973002,
0.016701521,
-0.023149217,
-0.029540105,
0.011972263,
0.004857075,
0.017795073,
-0.012859887,
0.034510795,
0.038089693,
-0.04166859,
-0.028233523,
0.038686175,
0.029738933,
0.023745699,
0.024768243,
0.01396054,
-0.020280419,
0.008194539
] | How to add a model to 🤗 Transformers?
The 🤗 Transformers library is often able to offer new models thanks to community contributors. But this can be a challenging project and requires an in-depth knowledge of the 🤗 Transformers library and the model to implement. At Hugging Face, we're trying to empower more of the community to actively add models and we've put together this guide to walk you through the process of adding a PyTorch model (make sure you have PyTorch installed). |
[
0.032695774,
0.007121742,
-0.052661754,
-0.02416002,
0.027024962,
-0.032991126,
0.047197692,
0.0059477068,
0.029048141,
0.027157871,
0.033316016,
-0.015314145,
0.043121796,
-0.041822236,
0.009761475,
0.03668306,
0.015447054,
-0.033404622,
-0.057771392,
-0.012833165,
-0.019286666,
0.012198152,
-0.050239846,
-0.051184982,
-0.019833073,
0.021014491,
0.019567253,
-0.016746616,
0.08423518,
0.061020296,
-0.056176476,
0.0022889995,
0.023318259,
-0.020409014,
-0.032636702,
-0.028811857,
-0.0050616423,
-0.028501734,
-0.055319946,
-0.056058336,
0.017647447,
-0.036299102,
0.065214336,
-0.031041786,
-0.044037394,
0.014110574,
0.0146939,
-0.047493048,
0.020054588,
-0.074783824,
-0.022476498,
0.039104972,
-0.010263578,
0.026020754,
0.0066824015,
0.025695864,
0.0034593428,
0.040611282,
-0.039075434,
0.0005524057,
0.051864296,
0.033079732,
0.009746707,
-0.029624082,
-0.004725676,
0.041881304,
-0.025001781,
0.0074983193,
-0.017130576,
-0.0089714015,
-0.026360413,
0.029402567,
0.022107305,
-0.045130208,
-0.018755028,
-0.0013207896,
-0.0052388553,
-0.015506125,
0.002828022,
0.035767462,
0.015771944,
0.053163856,
0.00095436507,
0.028915232,
-0.003217521,
-0.039075434,
0.067872524,
0.0016179903,
-0.013822603,
-0.032932058,
0.005316386,
0.046459306,
0.0114966845,
0.045543704,
0.034792792,
0.015816247,
-0.022048233,
0.025046084,
0.028191613,
0.006833771,
0.0027523371,
0.05629462,
-0.01684999,
0.015535661,
-0.032075528,
-0.0006986986,
-0.0033375088,
-0.018887937,
0.013763532,
-0.065509684,
0.014871112,
-0.022845691,
0.022314053,
-0.00035442572,
0.0072066565,
0.03499954,
-0.005980934,
0.01887317,
-0.04459857,
-0.011349007,
-0.0083806915,
0.028678948,
-0.013844755,
-0.042944584,
0.040168248,
-0.009030472,
0.035737928,
0.038218908,
-0.009111695,
0.018444905,
0.0025788164,
-0.019183293,
0.040493138,
0.06497805,
0.0016862911,
-0.05688533,
-0.0058000293,
-0.0024163711,
0.048172362,
-0.02011366,
-0.0049951873,
-0.0073100305,
0.025149459,
0.07561082,
0.0144797675,
0.017337324,
0.01208001,
-0.057682786,
-0.0032082913,
0.022343589,
0.011518836,
0.025710633,
-0.0085431365,
0.0029221661,
-0.02102926,
0.0015875319,
-0.037303306,
0.0118806455,
0.0106549235,
0.023465937,
0.037391912,
0.028457431,
-0.029358264,
0.06403291,
-0.009613798,
0.0078785885,
-0.0036974724,
0.008986169,
0.033345554,
-0.049412854,
-0.044126,
-0.0057224985,
-0.035649322,
0.010728762,
0.05360689,
0.039459396,
0.03532443,
-0.0049250405,
0.02383513,
0.018991312,
-0.0042678765,
-0.019020846,
0.009584262,
0.048172362,
-0.019508183,
-0.022033466,
0.02337733,
-0.0091338465,
0.0072325,
-0.010322649,
0.0027246478,
0.06261521,
-0.039075434,
0.011888029,
-0.028590342,
-0.0031344525,
-0.023628382,
-0.01276671,
0.0033965798,
-0.058598384,
-0.040256854,
0.023170581,
-0.023643149,
0.056796722,
0.0009857465,
-0.036269564,
0.0035184138,
0.023347795,
-0.036062818,
-0.007010984,
0.034704186,
0.026832981,
-0.032105062,
-0.026197968,
-0.007723527,
-0.026611464,
-0.03402487,
0.021634737,
0.0033707363,
-0.009347978,
0.0064793453,
-0.0005565591,
0.026345646,
0.024366768,
0.0027541833,
0.020689601,
0.0042272652,
0.020852046,
0.010012527,
-0.039784286,
0.0038174603,
0.048349574,
0.040936172,
0.03251856,
0.04982635,
0.037126094,
0.047433976,
0.038691476,
0.039872892,
0.006833771,
0.029136747,
-0.0010217429,
0.060370516,
0.020852046,
0.0072509595,
-0.03709656,
-0.005656044,
-0.0028926306,
-0.014767738,
0.022210678,
-0.026596697,
0.04896982,
0.033050198,
-0.016598938,
-0.06580504,
-0.00900832,
0.011924949,
0.049147032,
-0.030510148,
-0.043239936,
0.0092519885,
-0.0019345738,
0.016968131,
-0.009347978,
0.03559025,
0.012567345,
-0.036299102,
0.021058794,
-0.039459396,
-0.04114292,
-0.0141991805,
-0.012847932,
-0.088133864,
-0.005482523,
-0.03251856,
0.006102768,
-0.0025714324,
-0.024735961,
-0.0091929175,
-0.032813914,
-0.009746707,
0.003839612,
-0.017440699,
0.025622025,
0.049412854,
0.026951123,
-0.040699888,
0.017854195,
-0.033670444,
0.0018524282,
-0.0095325755,
-0.0092519885,
0.011282552,
-0.017824661,
0.0041977298,
0.029816063,
-0.0261832,
-0.027039729,
-0.07224377,
0.012345829,
-0.026463788,
-0.022698013,
-0.0016069146,
0.009488272,
0.0045078523,
0.024041878,
-0.015506125,
-0.046045806,
0.0074318643,
0.04297412,
-0.011024117,
0.029092444,
-0.016894292,
0.033493232,
-0.015875319,
0.035206288,
0.043742042,
0.035294894,
0.0061839903,
0.0026988043,
-0.01580148,
-0.013763532,
-0.0100346785,
-0.01345341,
0.0052056275,
0.04368297,
0.01051463,
-0.061197508,
-0.009111695,
-0.031130392,
-0.04929471,
0.0014970795,
-0.008188711,
0.044509962,
0.0069297613,
0.019020846,
-0.0119397165,
-0.020128427,
-0.0015727641,
0.0109207425,
0.04433275,
-0.022742316,
0.03017049,
0.044244144,
-0.03284345,
-0.020010285,
0.02370222,
-0.045543704,
-0.007114358,
0.005711423,
-0.020143196,
0.02599122,
0.024248626,
-0.00937013,
0.035649322,
0.056265082,
-0.051746156,
0.0037731573,
0.008063185,
0.009909152,
0.024898406,
0.022712782,
0.027467994,
0.015166467,
-0.04335808,
-0.019537717,
0.0023388406,
-0.0018921165,
0.03715563,
-0.052455008,
0.026109362,
-0.018400602,
-0.021619968,
0.0141548775,
-0.010957662,
-0.05295711,
0.040936172,
0.028693715,
0.025178993,
-0.018695956,
-0.039666146,
-0.006143379,
0.020778207,
0.039991036,
0.0084397625,
0.033788584,
-0.049353782,
-0.014309938,
-0.03990243,
-0.01612637,
0.014649596,
-0.016480796,
0.003894991,
-0.011747736,
-0.046134416,
-0.06627761,
0.0129143875,
0.061079364,
0.062201712,
-0.0053754565,
0.029048141,
0.018459672,
-0.027527064,
0.03650585,
-0.00018448135,
0.008801572,
-0.056324154,
0.035531178,
0.045691382,
-0.015328912,
-0.019212827,
0.006442426,
-0.029638851,
0.021191705,
-0.02612413,
-0.021959627,
-0.027010193,
-0.004784747,
-0.014398545,
0.032666236,
-0.044893924,
-0.02612413,
-0.049914956,
0.025932148,
0.05047613,
-0.038602866,
-0.027143102,
-0.041438274,
0.014856345,
0.027335083,
-0.02141322,
-0.06574597,
0.00017975106,
0.014162261,
-0.038780082,
0.03290252,
0.04380111,
-0.02513469,
0.025370974,
-0.055467624,
0.019774001,
0.024071414,
-0.038012158,
-0.022875227,
0.0076349205,
-0.0053496133,
-0.01822339,
0.03180971,
0.033375088,
-0.024189556,
0.0021616276,
-0.019906912,
0.0036014821,
-0.0091929175,
-0.012523042,
-0.02971269,
0.0113785425,
0.013158055,
0.036003746,
0.031514354,
-0.01038172,
-0.0053200778,
0.03180971,
-0.04956053,
-0.065214336,
0.01299561,
0.053665962,
-0.0068190033,
0.04610488,
0.03257763,
-0.049442388,
0.031248534,
0.0060732323,
-0.0032101371,
0.02194486,
-0.028944768,
0.00038257672,
0.0085136015,
-0.016111603,
-0.0026138898,
-0.02893,
0.039784286,
0.003106763,
0.015255074,
-0.04956053,
-0.038898222,
0.014516687,
-0.00858744,
-0.010942894,
0.02351024,
0.02141322,
0.039282184,
0.008646511,
-0.011312088,
0.041969914,
-0.030657824,
-0.02507562,
0.042915046,
0.0138595225,
0.0027449534,
0.029062908,
-0.010898591,
-0.00395037,
-0.0039872895,
-0.02049762,
0.0036476313,
-0.034526974,
-0.029225355,
0.0057261907,
0.010846904,
-0.010064214,
-0.022698013,
-0.037982624,
-0.021723343,
0.02513469,
0.0119544845,
0.003832228,
0.006837463,
-0.03892776,
0.046193484,
-0.029609315,
-0.056973934,
-0.029210586,
0.024676891,
0.0089123305,
0.039429862,
0.0147751225,
-0.009525191,
-0.030126186,
-0.08157699,
0.032548096,
-0.070826076,
-0.0051170215,
-0.022358356,
-0.023997575,
0.0032452105,
0.021457523,
0.018267693,
-0.042619694,
-0.0057261907,
-0.038218908,
0.040109176,
-0.07230285,
-0.016938595,
-0.022122072,
0.0031935235,
-0.017765589,
0.040581744,
0.025769703,
0.0038617635,
-0.006032621,
0.025607258,
0.02690682,
0.023761291,
-0.009606414,
-0.028693715,
0.022284517,
0.017603144,
-0.018814098,
0.061433792,
-0.022181142,
0.014501919,
0.0042088055,
0.013674926,
-0.041231524,
-0.03603328,
-0.051923368,
-0.019271899,
0.0317211,
-0.036151424,
0.0043786345,
-0.004186654,
0.025695864,
0.03807123,
0.035501644,
-0.02017273,
-0.0064055063,
-0.043978326,
-0.06994001,
0.01834153,
-0.026552394,
-0.003675321,
-0.028826626,
-0.031366676,
0.031071322,
-0.017573608,
-0.016096834,
0.059248164,
-0.026242271,
-0.0021948551,
-0.05942538,
0.031957384,
-0.0007411559,
0.024691658,
-0.01684999,
-0.003891299,
-0.019109454,
-0.011341623,
-0.028619876,
-0.042324338,
-0.028516503,
0.037391912,
0.047906544,
-0.0017859733,
0.021915324,
-0.003887607,
-0.04530742,
-0.017485002,
0.035117682,
0.03440883,
0.0099165365,
0.0082920855,
0.051303122,
-0.031337142,
0.0074097128,
-0.013542016,
0.003042154,
-0.014841577,
0.08588917,
0.028546039,
-0.025385743,
-0.0055046743,
0.034143012,
-0.04923564,
-0.05139173,
-0.030022811,
0.017204415,
-0.057328362,
-0.019951215,
0.0139776645,
0.0020361019,
-0.014280403,
0.072125636,
0.047906544,
-0.000121603094,
-0.028324522,
0.04988542,
-0.023761291,
-0.018164318,
0.038041692,
0.034763254,
-0.0035719466,
-0.047906544,
-0.028885696,
-0.0024569824,
-0.045218814,
-0.013150671,
0.052071046,
-0.028501734,
0.036328636,
0.058273494,
0.015845783,
0.044834852,
0.03148482,
0.0019862608,
0.026714839,
-0.027896257,
-0.033463694,
-0.028368825,
0.0020730214,
0.0047810553,
0.009104311,
-0.03154389,
0.0018884245,
0.0125747295,
0.026463788,
-0.032548096,
-0.036653526,
0.011459765,
-0.04799515,
-0.021295078,
0.023746524,
-0.017337324,
0.035737928,
0.0142730195,
-0.0004534157,
-0.06196543,
-0.0062984405,
0.033286482,
0.0069113015,
-0.028974302,
-0.027733812,
0.008196095,
-0.050387524,
-0.047256764,
0.015624267,
-0.031189464,
-0.00061747606,
0.04380111,
-0.036978416,
-0.011267784,
-0.018444905,
0.032075528,
0.0022668478,
0.017219182,
-0.019301433,
0.0014250868,
-0.0119397165,
0.011459765,
-0.039134506,
0.0097983945,
-0.026330877,
-0.028678948,
0.0123384455,
0.0037602354,
0.0050985618,
-0.0026803445,
0.01456099,
0.05100777,
-0.013150671,
-0.003610712,
0.009968223,
-0.0010088211,
-0.03526536,
0.031662032,
-0.010470326,
-0.036210496,
-0.050446592,
0.03180971,
-0.011430229,
0.034970004,
-0.0030310783,
0.01534368,
0.006556876,
0.018430138,
0.02742369,
0.008284701,
0.0138004515,
-0.00049287325,
0.0053902245,
-0.024470143,
-0.0140958065,
0.031041786,
-0.036653526,
0.01639219,
0.0012543348,
-0.029476406,
-0.018075712,
0.0036217878,
0.0065088808,
0.08110442,
0.028974302,
0.0054677553,
-0.024352001,
-0.04746351,
-0.04282644,
0.0037602354,
-0.049028892,
-0.061551932,
0.032400418,
-0.04297412,
-0.003891299,
0.011127491,
0.017425932,
0.032075528,
0.0002609736,
0.020054588,
0.014967103,
-0.027246477,
0.014228716,
0.014871112,
-0.03969568,
-0.02814731,
-0.034467902,
0.05091916,
-0.0026323493,
-0.029889902,
0.027335083,
-0.017425932,
-0.022225447,
-0.027246477,
0.021295078,
-0.0049065812,
0.034467902,
0.018828867,
-0.0144797675,
0.028885696,
-0.055142734,
0.046134416,
0.014649596,
0.005135481,
-0.02507562,
0.03683074,
0.0053902245,
0.0058997115,
0.016525099,
0.04793608,
0.034881398,
-0.0044303215,
0.031839244,
0.0033282791,
0.062260784,
0.0102414265,
0.0006816234,
0.0006396277,
0.059454914,
0.03322741,
0.0054419115,
0.01874026,
0.03420208,
0.019774001,
0.008417611,
0.0016309121,
0.011009349,
-0.0012875622,
0.0036882428,
-0.01684999,
-0.0089566335,
0.037273772,
-0.011828958,
0.006025237,
0.034143012,
-0.018105248,
-0.015092629,
0.008580056,
-0.023672685,
0.0399615,
-0.03186878,
-0.04982635,
-0.0010245119,
-0.0059034033,
0.055615302,
0.008388075,
0.01925713,
0.017219182,
0.010167588,
0.021132633,
0.0012691026,
0.037894018,
-0.006933453,
0.021191705,
-0.0065088808,
0.015122164,
0.0010761989,
-0.040286392,
0.0024699043,
-0.025223296,
-0.018430138,
0.056767184,
0.008447146,
-0.0135346325,
0.006612255,
-0.0711805,
-0.023746524,
-0.06409199,
0.012264607,
-0.058273494,
-0.009820546,
0.022373123,
-0.0061987583,
-0.057623714,
0.050328452,
-0.011924949,
0.031366676,
0.028590342,
0.03219367,
-0.013601087,
0.052868504,
0.06007516,
-0.02265371,
0.033670444,
0.023953272,
-0.034881398,
0.005309002,
-0.007849053,
-0.043092262,
-0.02246173,
-0.054404348,
-0.052218724,
0.006265213,
0.006446118,
-0.028221147,
-0.049767278,
-0.0074872435,
0.010396488,
-0.066986464,
0.00450416,
0.028693715,
0.007265727,
-0.031455282,
-0.007612769,
0.002145014,
-0.029166283,
-0.036121886,
-0.04002057,
0.022934297,
0.005080102,
-0.0298456,
-0.03494047,
-0.029535476,
0.015904855,
0.0034888783,
0.0018265847,
0.0040279008,
0.024248626,
0.029683154,
-0.0044118618,
0.018828867,
-0.041763164,
0.004803207,
0.054168064,
0.04702048,
0.00812964,
0.061197508,
0.05845071,
0.029417334,
-0.020689601,
0.025267601,
0.003215675,
-0.022963833,
0.009717172,
0.0030107726,
-0.008772037,
-0.01645126,
-0.06562783,
0.018400602,
0.0065716435,
0.008269933,
-0.023525007,
-0.020689601,
-0.042915046,
-0.05856885,
-0.028427897,
-0.039872892,
0.007856437,
-0.0071475855,
-0.0038137685,
-0.00035188752,
-0.053282,
0.26227504,
0.044450894,
-0.00031404517,
0.03343416,
0.03650585,
0.04628209,
0.0044967765,
0.0074097128,
0.019951215,
-0.047168158,
-0.019478647,
-0.0052905423,
0.0148341935,
0.0128553165,
-0.009887001,
0.03591514,
-0.061788216,
0.0070368275,
-0.022742316,
-0.055644836,
-0.06692739,
0.024248626,
-0.007236192,
0.022299284,
0.031957384,
0.008461914,
-0.010809984,
-0.035678856,
-0.05381364,
-0.051096376,
0.045071136,
-0.023465937,
0.0120726265,
-0.014782506,
-0.018105248,
0.0118363425,
-0.004696141,
-0.040434066,
-0.015196003,
0.013785684,
0.014797274,
-0.0073580258,
0.02925489,
-0.019700162,
0.0030864573,
0.072775416,
-0.037391912,
0.026065059,
-0.036151424,
-0.025119923,
0.028516503,
-0.054433882,
0.032223206,
-0.013468177,
-0.047493048,
-0.027763348,
-0.024145253,
-0.060429584,
-0.007959811,
-0.016968131,
0.011504068,
0.02089635,
-0.0454551,
-0.012183384,
-0.061611004,
0.018902704,
-0.028590342,
0.059307236,
0.0052388553,
0.02102926,
-0.027645206,
-0.022343589,
-0.017898498,
-0.022343589,
0.050653342,
0.015771944,
-0.02520853,
0.015447054,
-0.0005833257,
-0.034881398,
0.016864758,
-0.016539866,
0.0091190785,
0.0011537295,
0.03440883,
0.011061036,
-0.049471922,
-0.018489208,
0.015949158,
0.019449111,
0.039843358,
0.042885512,
-0.0006553184,
-0.00711805,
-0.010470326
] |
A Hugging Face team member will be available to help you along the way so you'll never be alone. 🤗 ❤️
To get started, open a New model addition issue for the model you want to see in 🤗 Transformers. If you're not especially picky about contributing a specific model, you can filter by the New model label to see if there are any unclaimed model requests and work on it.
Once you've opened a new model request, the first step is to get familiar with 🤗 Transformers if you aren't already!
General overview of 🤗 Transformers
First, you should get a general overview of 🤗 Transformers. 🤗 Transformers is a very opinionated library, so there is a
chance that you don't agree with some of the library's philosophies or design choices. From our experience, however, we
found that the fundamental design choices and philosophies of the library are crucial to efficiently scale 🤗
Transformers while keeping maintenance costs at a reasonable level.
A good first starting point to better understand the library is to read the documentation of our philosophy. As a result of our way of working, there are some choices that we try to apply to all models: |
[
0.039962914,
0.004503556,
-0.05570077,
-0.0028559994,
-0.021794122,
-0.042548418,
0.018168794,
0.0055117626,
-0.0025767228,
0.0813872,
0.0091125,
-0.0022798814,
0.059522822,
-0.05823007,
0.016342077,
0.06643624,
0.018758964,
-0.04086222,
-0.05645956,
-0.014979067,
0.002546863,
0.0039906707,
-0.06205212,
-0.022440497,
-0.026824614,
0.012260071,
0.019433443,
-0.0466234,
0.08863786,
0.025897205,
-0.046342365,
-0.01932103,
0.009639437,
-0.051400963,
0.0057717185,
-0.024955744,
0.025278931,
-0.042267386,
-0.026979182,
-0.030548304,
-0.0018723834,
-0.016075097,
0.034960523,
-0.076778255,
-0.066773474,
0.020473266,
-0.003730715,
-0.0047881026,
0.0040433644,
-0.038023785,
-0.009435688,
0.055026293,
0.0051112906,
0.01135374,
-0.019054048,
-0.00444735,
-0.03723689,
0.027920643,
-0.016721472,
-0.011880676,
0.056066114,
0.0052237036,
-0.0052342424,
-0.06109661,
0.018660601,
0.049377523,
-0.03875447,
-0.0067588473,
-0.00944974,
-0.0067061535,
-0.05103562,
-0.011030551,
-0.040187743,
-0.037068274,
-0.0024889,
0.026178239,
0.04007533,
-0.03009865,
-0.042183075,
0.043251004,
0.00021077486,
0.050726485,
-0.025503758,
0.020824557,
0.0051464196,
-0.034201734,
0.042098768,
0.010601976,
-0.0061089583,
-0.043419622,
0.01190878,
0.046510987,
0.014726137,
0.04049688,
0.0015509517,
0.033105705,
-0.010630079,
0.01965827,
-0.023789456,
-0.010601976,
0.008950906,
0.08627718,
-0.006407556,
0.019082151,
-0.0155411335,
-0.016159406,
0.022257825,
-0.01670742,
-0.01347554,
-0.056066114,
-0.028482711,
-0.01618751,
-0.00094673043,
0.017958019,
-0.0065094302,
0.022819892,
-0.014627775,
0.016159406,
-0.019194564,
-0.036393795,
-0.004791615,
-0.007995393,
-0.022651272,
-0.027723921,
0.033864494,
-0.030154858,
0.036253277,
0.043503933,
-0.0075316885,
-0.0013068041,
0.0123654585,
-0.005648766,
0.02856702,
0.056431457,
-0.02204705,
-0.043925483,
-0.03296519,
0.0069555705,
-0.000099020275,
-0.0036499181,
-0.00830453,
-0.024674712,
0.023859715,
0.080431685,
0.004419246,
-0.0009959112,
0.0423798,
-0.05823007,
0.010320943,
0.022946358,
-0.017915864,
-0.001486841,
-0.0038290767,
0.015189842,
-0.058623515,
-0.0066604856,
-0.026599787,
0.05230027,
0.006864235,
0.030014342,
0.007868928,
0.016426388,
-0.055391636,
0.05612232,
0.0026346857,
0.0474946,
-0.03805189,
-0.038445335,
0.021850327,
-0.014655879,
-0.014824498,
0.019854993,
0.0052377554,
-0.010819776,
0.0585111,
0.006558611,
0.068178646,
0.019180512,
-0.0024941692,
0.013061016,
0.004521121,
-0.022243774,
-0.0042471136,
0.012491924,
-0.01788776,
-0.0066780504,
-0.012056322,
-0.0008123615,
-0.019138359,
0.03068882,
0.01025771,
0.04077791,
-0.047157362,
-0.009463792,
-0.027948746,
-0.019559907,
-0.053002853,
0.017185178,
0.012997784,
-0.063513495,
-0.04178963,
0.0432229,
-0.038389128,
0.03771465,
-0.0060422127,
0.0049567223,
-0.0065937405,
0.034454666,
-0.039906707,
0.016285872,
0.018632498,
0.018042328,
0.002200841,
-0.026852718,
0.035297763,
0.0032441765,
-0.04367255,
0.0023694609,
-0.014332691,
0.006495379,
0.05179441,
-0.0015799332,
0.051625792,
-0.0068326187,
0.02745694,
-0.016004838,
0.025967464,
0.039372746,
0.0047002793,
-0.021428779,
0.0008878891,
0.05873593,
0.055026293,
0.019897148,
0.045808405,
0.018548189,
0.043953586,
0.05443612,
0.047691327,
0.016173458,
0.0024713352,
0.01923672,
-0.0109954225,
0.042098768,
-0.00043274715,
-0.040974636,
-0.04091843,
-0.018126639,
-0.038810678,
0.010517666,
-0.044880994,
0.037517928,
-0.002051542,
-0.044009794,
-0.0601973,
0.000119768425,
-0.019714477,
0.021203952,
-0.0046124565,
0.013454462,
0.028693484,
0.0121546835,
-0.0019198077,
0.002355409,
0.052525096,
0.0060035707,
-0.004067955,
0.02787849,
-0.005135881,
-0.03805189,
-0.04086222,
-0.035606902,
-0.09903608,
-0.026922977,
-0.02364894,
-0.0053888108,
0.0062565007,
-0.050557863,
-0.008789312,
-0.023677044,
-0.0010626566,
-0.014655879,
0.0019584498,
0.02950848,
0.06390694,
0.023958076,
-0.053199574,
0.022243774,
-0.022876099,
0.00048083017,
0.006526995,
-0.033246223,
-0.018365517,
-0.0043279105,
0.044543754,
0.016046993,
-0.037349306,
-0.02145688,
-0.02518057,
0.0115012815,
-0.009133577,
-0.011768264,
-0.02270748,
0.032627948,
-0.0022465088,
0.0120773995,
0.0015325089,
-0.028777795,
0.052496992,
0.040131535,
-0.028285988,
0.008409917,
0.004268191,
0.033330534,
-0.017662933,
0.05409888,
0.06975243,
-0.018028276,
-0.021962741,
-0.009238965,
-0.03765844,
-0.009730773,
0.016285872,
-0.047325984,
-0.020922918,
0.0601973,
-0.012175761,
-0.049293216,
-0.017691037,
-0.030295374,
-0.028777795,
0.011206197,
-0.007826773,
0.054717153,
0.018337414,
0.020951021,
-0.05527922,
0.019700425,
-0.008381814,
0.02686677,
-0.00083387806,
-0.02745694,
-0.004264678,
0.06486245,
0.012765931,
-0.009288146,
0.011950935,
-0.052862335,
0.016145354,
-0.015484926,
0.009393533,
0.04215497,
-0.0040784935,
0.025672378,
0.023550577,
0.045724094,
-0.03917602,
0.029564688,
0.0061405743,
0.025208674,
0.054042675,
0.041986354,
0.023100926,
-0.009309223,
-0.053930264,
-0.018927583,
-0.0016598521,
0.013763599,
0.03681534,
-0.0720569,
0.030211063,
0.0044087074,
-0.032150194,
0.017592676,
-0.019967405,
-0.025278931,
0.047691327,
0.037517928,
0.0322064,
-0.033583462,
-0.020543523,
-0.024140747,
0.0009792249,
0.040524982,
0.014993119,
0.016932247,
-0.01110081,
0.0060597775,
-0.05381785,
0.035550695,
-0.0026417116,
-0.0039239256,
-0.008929828,
-0.02669815,
-0.04417841,
-0.034089323,
0.04474048,
0.054604743,
0.03372398,
-0.0028559994,
0.03931654,
-0.0035673645,
-0.01840767,
0.035972245,
-0.010482537,
-0.038192406,
-0.037096377,
0.014908809,
0.033780184,
0.012667569,
0.028721588,
0.0019865532,
-0.008023497,
0.0054450175,
-0.038782574,
0.0050656227,
-0.013854935,
-0.028834002,
-0.009590256,
0.015316307,
-0.040047225,
-0.029002622,
-0.07391172,
0.03299329,
0.045302544,
0.009885341,
0.0019689885,
-0.017325694,
-0.009456766,
0.054323707,
-0.0051007518,
-0.05491388,
-0.021822223,
0.023606785,
-0.065649346,
0.026234444,
0.05986006,
-0.04381307,
0.015105532,
-0.050389245,
0.009885341,
-0.0048653865,
0.008044574,
-0.013426359,
-0.013770624,
-0.028890207,
0.008100781,
0.03141951,
0.009786979,
0.024225058,
0.029311758,
-0.064637624,
0.016299922,
-0.031166576,
-0.005989519,
-0.028862106,
-0.012358433,
-0.00015182377,
0.001321734,
0.044459444,
0.0072576813,
0.0039028479,
0.039709985,
-0.053986467,
-0.06992105,
0.03951326,
0.029817618,
-0.0057682055,
0.048225287,
0.01475424,
-0.024196954,
0.033049498,
-0.001014354,
0.0048232316,
0.021161797,
-0.043644447,
0.0058103604,
-0.007707334,
0.0009809814,
-0.008255349,
-0.042014457,
0.02270748,
-0.0025486194,
0.051485274,
-0.01042633,
-0.037349306,
-0.03763034,
-0.0031019035,
-0.014417001,
0.029311758,
0.013791702,
0.019770682,
-0.014613724,
-0.021302313,
0.012491924,
0.0027874976,
-0.008416943,
0.009505946,
0.05230027,
0.029367965,
-0.0010907599,
-0.051625792,
-0.030295374,
0.020965073,
-0.019798785,
0.008114832,
0.011409946,
-0.005501224,
0.0034373868,
0.0029139626,
-0.019545855,
-0.0017871952,
-0.033780184,
-0.020613782,
0.023522476,
-0.03288088,
0.0055679693,
-0.028440556,
-0.029873824,
0.04755081,
-0.014866654,
-0.05499819,
-0.025152467,
-0.007552766,
0.050754588,
0.016735524,
0.043532036,
-0.042941865,
-0.027723921,
-0.052272167,
0.02541945,
-0.05617853,
-0.007145268,
-0.045218233,
-0.008142936,
-0.018210948,
0.016131302,
0.02390187,
-0.034286045,
0.0043314234,
-0.026599787,
-0.009098449,
-0.049489938,
0.00047336522,
-0.000078052566,
0.009512972,
-0.049686663,
0.043616347,
0.011466153,
-0.012491924,
-0.0120773995,
0.010953267,
0.019826889,
0.015695702,
-0.0165388,
-0.0109954225,
0.008922802,
0.001644044,
0.013932219,
0.039232228,
-0.01882922,
0.044909097,
-0.025278931,
0.034314148,
-0.05485767,
-0.033471048,
-0.018112587,
-0.01135374,
0.02593936,
-0.027569352,
0.03493242,
-0.010306891,
0.0050691357,
-0.000259297,
0.039119814,
-0.0322345,
-0.0237473,
-0.04204256,
-0.040553086,
0.04162101,
-0.042351697,
0.014346742,
-0.021597398,
-0.00032560327,
0.064187974,
-0.039991017,
0.0044508628,
0.04136808,
0.01644044,
0.00042923423,
-0.0034514384,
0.015077429,
0.035213456,
0.019742578,
-0.016482595,
0.008501253,
-0.004268191,
0.02525083,
-0.015976734,
0.0069555705,
-0.016623111,
0.028075213,
0.04356014,
-0.024520142,
0.003015837,
-0.007904057,
-0.059522822,
-0.029733308,
0.007974315,
0.032824673,
0.0071206777,
0.014655879,
0.014431053,
-0.020417059,
0.008086729,
0.0003049649,
0.003895822,
0.0031967522,
0.06137764,
0.0010398227,
-0.00949892,
-0.018548189,
0.029705204,
-0.014135968,
-0.02450609,
-0.034651387,
0.02865133,
-0.035185352,
-0.014726137,
0.013911141,
-0.024632556,
-0.005884132,
0.055785082,
0.04755081,
-0.00029596305,
-0.030407786,
0.06295142,
0.01174016,
-0.045555472,
-0.014142994,
0.032768466,
-0.030211063,
-0.020374903,
-0.035044834,
0.02253886,
-0.050810795,
-0.02745694,
0.055728875,
-0.038810678,
-0.005058597,
0.054295607,
0.0040152613,
0.06025351,
-0.006154626,
0.017705088,
0.009730773,
-0.05617853,
-0.056909215,
-0.015527082,
-0.015442772,
0.016721472,
0.03102606,
-0.045330647,
0.002631173,
0.017185178,
0.030997956,
-0.051091827,
-0.05575698,
-0.015091481,
-0.054520432,
-0.011206197,
0.061265226,
-0.027428836,
-0.009604308,
0.031728644,
0.0072647072,
-0.052496992,
0.0036464052,
0.014185148,
-0.008662847,
0.0009599039,
-0.03434225,
0.007356043,
-0.038810678,
0.0071206777,
-0.008508279,
-0.011262404,
-0.008164013,
0.025335139,
-0.010152322,
0.00949892,
0.046848226,
0.022342136,
-0.008255349,
0.000553284,
-0.032318812,
0.01703061,
-0.03968188,
0.013264765,
-0.037012067,
0.022004897,
-0.014669931,
-0.037012067,
0.034651387,
0.009000087,
0.002585505,
-0.026655994,
0.036646724,
0.047859944,
0.0013761842,
0.0052237036,
-0.022566963,
0.007071497,
-0.029733308,
-0.005048058,
-0.0104193045,
-0.021625502,
-0.0262766,
0.016285872,
-0.019672321,
0.037517928,
0.014796396,
0.026248496,
0.019011892,
0.02364894,
0.008346684,
-0.029592792,
0.055082496,
0.012084425,
0.0007947969,
-0.023213338,
0.00419442,
0.024253162,
-0.04923701,
0.010897061,
0.014487259,
-0.02440773,
-0.005290449,
0.030154858,
-0.0047037923,
0.03973809,
0.0283984,
-0.013489591,
-0.035831727,
0.002531055,
-0.034876216,
0.0005181549,
-0.0686845,
-0.020403007,
-0.0003089169,
-0.024140747,
0.008824441,
-0.015737856,
0.005936825,
0.028749691,
-0.0049110544,
0.017114919,
-0.020417059,
-0.032487433,
0.006449711,
0.004310346,
-0.06053454,
-0.03968188,
-0.009878315,
0.07329345,
-0.029564688,
-0.021976793,
0.020276543,
0.02297446,
0.011986064,
-0.034370355,
-0.02000956,
-0.010278787,
0.017494313,
0.03765844,
-0.032768466,
0.026852718,
-0.022693427,
0.03068882,
-0.033864494,
0.015555185,
-0.030885544,
0.028510813,
0.0027453427,
0.023171183,
0.025883153,
0.034005012,
0.03771465,
-0.023367906,
0.010187452,
-0.017676985,
0.016665267,
-0.023325752,
-0.008543408,
0.0005554796,
0.048590634,
0.01762078,
0.023592733,
-0.009927496,
0.036225174,
0.023803508,
-0.048871666,
0.00068545743,
0.004398169,
0.020403007,
0.013110196,
0.0043208846,
-0.031841055,
0.019897148,
0.017157074,
0.0055187885,
0.06109661,
-0.010215555,
-0.019278875,
-0.0028770769,
-0.032852776,
0.037911374,
-0.0145996725,
-0.060309716,
0.0019127819,
0.03102606,
0.054295607,
0.02925555,
0.038951196,
-0.010159348,
0.021049384,
0.04044067,
0.0015650034,
0.0211899,
-0.00464056,
0.02043111,
-0.01627182,
0.042492215,
-0.006165165,
-0.029901927,
-0.0125832595,
-0.009260043,
-0.042548418,
0.06458142,
0.0016879553,
-0.026487375,
0.024267213,
-0.018871376,
-0.007222552,
-0.05019252,
0.044571858,
-0.04645478,
0.017564572,
0.009091423,
-0.048787355,
-0.036983963,
0.009667541,
-0.017269487,
0.010440381,
0.01310317,
0.059185583,
-0.016763628,
0.08110617,
0.045977022,
0.031166576,
0.039794296,
0.0145294145,
-0.04333531,
-0.017943967,
0.020192232,
-0.016229665,
0.019278875,
-0.033864494,
-0.07947618,
0.042688936,
-0.014297562,
-0.030154858,
-0.02457635,
-0.008817415,
0.01165585,
-0.029958135,
-0.0024572837,
0.06750416,
0.0072436295,
0.011374817,
-0.0055995854,
-0.008719054,
-0.039035507,
-0.03577552,
-0.0091968095,
0.057668004,
-0.016552852,
-0.02950848,
0.012189813,
-0.087457515,
0.004113623,
-0.0088947,
-0.016004838,
0.009997754,
0.023100926,
0.03830482,
0.025574017,
-0.012913473,
0.016847938,
-0.00041540214,
0.042239282,
0.043700654,
0.001129402,
0.0813872,
0.048169084,
0.0009976677,
-0.018604394,
0.013356101,
-0.0051956004,
-0.00570146,
-0.035297763,
0.001694103,
0.025292983,
-0.014557517,
-0.05991627,
-0.009505946,
0.0066253566,
0.002255291,
0.034538973,
-0.045302544,
-0.044909097,
-0.06233315,
-0.009850212,
-0.03178485,
0.009786979,
-0.0034356304,
-0.018365517,
0.02066999,
-0.04721357,
0.23359476,
0.055251118,
0.013798728,
-0.019672321,
0.032262605,
0.03926033,
0.004745947,
0.017775347,
0.010700338,
-0.019700425,
0.0030386709,
-0.048084773,
-0.0025767228,
0.02636091,
-0.023536528,
0.016918195,
-0.051822513,
-0.0082694,
-0.043869276,
-0.017676985,
-0.06306384,
0.031672437,
0.012182787,
-0.015414668,
0.05466095,
0.02950848,
0.0017424056,
-0.03245933,
0.023634888,
-0.050333038,
0.002950848,
-0.021583347,
-0.00958323,
-0.027625559,
-0.014128942,
-0.00012394002,
0.017157074,
-0.016299922,
0.015105532,
0.04035636,
0.025461603,
-0.06227695,
0.034454666,
-0.0046054306,
0.028285988,
0.04993959,
-0.026346859,
-0.014852602,
0.0072155264,
-0.012618389,
-0.0044122203,
-0.04763512,
0.0023905383,
-0.039457053,
-0.04423462,
0.026557634,
-0.03355536,
-0.05373354,
0.0065867146,
-0.008683925,
0.0032125602,
0.009421636,
-0.030829336,
0.021386623,
-0.013489591,
0.00506211,
-0.031841055,
0.014353768,
0.012976706,
-0.003983645,
-0.014431053,
0.01644044,
-0.036787238,
-0.029199345,
0.033161912,
0.02984572,
-0.0025925308,
0.020740246,
-0.034454666,
-0.055082496,
0.00455625,
-0.009358404,
0.004183881,
-0.013791702,
0.039653778,
0.028510813,
-0.038698263,
0.010770596,
0.024744969,
0.035382073,
0.044712376,
0.058848344,
0.019995509,
-0.00048961246,
-0.00022263094
] | If you're interested in implementing a TensorFlow model, take a look at the How to convert a 🤗 Transformers model to TensorFlow guide!
Along the way, you'll:
get insights into open-source best practices
understand the design principles behind one of the most popular deep learning libraries
learn how to efficiently test large models
learn how to integrate Python utilities like black, ruff, and make fix-copies to ensure clean and readable code |
[
0.008438965,
-0.02058522,
0.010174144,
-0.030773303,
-0.0076793884,
-0.012466812,
0.010118396,
-0.012877958,
0.01524728,
0.06868245,
0.0039442233,
0.010404108,
0.0087316455,
-0.043484014,
0.0039233174,
0.015233343,
-0.025714105,
-0.022006813,
-0.10904453,
-0.0004390213,
0.00940063,
0.008132347,
-0.061936848,
-0.02840398,
-0.044264495,
0.01796503,
0.013386665,
0.0097490605,
0.04365126,
0.07364408,
-0.031999774,
0.009094013,
-0.02019498,
-0.056445595,
0.01247378,
-0.030578181,
0.009289133,
-0.037825517,
-0.002764789,
-0.05424352,
0.049421255,
-0.025853477,
0.051734827,
-0.056166854,
-0.05591598,
0.013574817,
0.014634043,
-0.005445955,
-0.015679331,
-0.0062821857,
0.05212507,
-0.0036515421,
0.0015853547,
-0.019330874,
-0.051456083,
0.017268172,
-0.00041659115,
-0.0033449242,
-0.00423342,
0.00467941,
0.03910774,
0.005895429,
0.006696817,
-0.05360241,
0.02663396,
0.052905552,
-0.05519125,
0.015261217,
0.0045748805,
-0.015749019,
-0.039525855,
-0.013637534,
-0.007944195,
-0.004034815,
0.0011445913,
0.0031463194,
0.03944223,
-0.03386736,
-0.029435333,
0.028654851,
-0.014062619,
0.06126786,
-0.0036410894,
-0.006170688,
-0.040863823,
-0.044515368,
0.032334268,
-0.023135725,
-0.009010389,
-0.015762955,
-0.0005252576,
0.043818507,
-0.00871074,
0.022550363,
0.022703674,
0.021700196,
0.02845973,
0.02529599,
-0.019567806,
-0.020013796,
0.023302972,
0.05831318,
0.018480707,
0.033727985,
-0.030773303,
-0.005414596,
0.021156646,
0.01094069,
-0.023776837,
-0.037546773,
0.021491138,
0.0057037924,
-0.021254206,
-0.012738586,
-0.035205327,
0.039135613,
0.008250813,
0.027149634,
-0.02999282,
-0.02801374,
0.037295904,
0.019721115,
0.0056306226,
-0.033839483,
0.029881323,
-0.00087542937,
-0.0024372651,
0.08423634,
0.012090507,
-0.017588727,
0.016306505,
-0.04384638,
-0.000700779,
0.03375586,
-0.025072994,
-0.039219238,
0.01301733,
0.02890572,
0.041393436,
-0.026731519,
0.024613068,
-0.011651486,
0.027233258,
0.07899596,
-0.009323976,
0.0011689813,
0.02622978,
-0.06923993,
0.004275231,
0.013045205,
-0.014299551,
-0.0029111293,
0.02603466,
0.0071149324,
-0.0073030842,
0.012550434,
-0.03311475,
-0.0068083145,
0.04468261,
0.013832655,
-0.034592092,
0.011393648,
0.012480749,
0.048417777,
-0.042257544,
0.05396478,
-0.021992877,
-0.0024512024,
-0.0038187886,
0.0034633903,
0.014940661,
0.0034825539,
0.010229893,
0.010034773,
0.06583926,
0.033588614,
-0.0065644137,
-0.025546858,
0.027066011,
0.026661834,
0.017755972,
-0.00035430936,
0.038606,
0.032501515,
-0.0027978898,
-0.009985993,
-0.028794222,
0.009839652,
-0.017783847,
-0.024529444,
0.009442442,
0.06728873,
-0.03068968,
0.013052173,
-0.047748793,
-0.009121887,
-0.028877845,
0.047581546,
-0.005306583,
-0.04027846,
-0.047051933,
0.04351189,
-0.045463096,
0.0066340994,
-0.04459899,
-0.006595772,
-0.009261259,
0.068236455,
-0.0028675757,
0.042647783,
0.0860203,
-0.016501626,
-0.067678966,
-0.029853448,
0.042424787,
0.005968599,
-0.018870948,
-0.0130242985,
-0.01569327,
-0.020766404,
0.0012343118,
-0.008146284,
0.011344868,
-0.01287099,
0.013100953,
-0.023595653,
0.0097490605,
0.022006813,
0.006473822,
-0.016097447,
0.018634016,
0.02262005,
0.0029390038,
-0.0007687228,
0.01643194,
-0.007749074,
0.0506756,
0.040724453,
-0.018870948,
0.021100897,
-0.0014146242,
0.060766123,
-0.00028157467,
0.046661694,
-0.014411048,
0.000694246,
0.026383089,
0.013776907,
-0.010529542,
0.020278603,
-0.050201736,
0.052487437,
0.018299522,
-0.0033275026,
-0.019093942,
0.031553786,
0.059037913,
0.022829108,
-0.05691946,
-0.012195036,
-0.0132542625,
0.032445766,
0.008292625,
-0.04721918,
0.028794222,
0.033839483,
0.0093518505,
0.009317008,
-0.013470288,
-0.011937198,
-0.015066096,
-0.025156617,
-0.08691228,
-0.025616545,
-0.010801318,
0.015372714,
0.006616678,
-0.026438838,
0.040362086,
0.0118396375,
-0.0108779725,
0.018829135,
-0.02440401,
0.018090464,
0.016961552,
0.0036271522,
-0.06093337,
0.042201795,
-0.00027634823,
0.018076528,
0.012773429,
-0.037686147,
-0.012661932,
-0.0077839172,
0.010968564,
0.019428434,
0.0474143,
-0.024027705,
-0.030745428,
-0.004052236,
-0.022480678,
-0.004299621,
-0.027302943,
0.013100953,
0.0020748982,
0.05028536,
-0.019958047,
-0.029909197,
0.04721918,
0.05039686,
-0.057253953,
0.028431855,
-0.03771402,
0.023735024,
-0.051734827,
0.017853532,
0.047609422,
0.017909281,
0.025323864,
-0.000029044873,
-0.021184519,
0.008780426,
-0.005707277,
-0.010006898,
-0.054076273,
0.023177538,
0.02648065,
-0.09293314,
-0.007484268,
-0.048334155,
-0.004135859,
0.028292485,
0.008850112,
0.015149719,
-0.0071149324,
0.022689736,
-0.0020435397,
-0.0003512606,
-0.028153112,
0.018062592,
-0.0012273432,
-0.037797645,
0.062438585,
0.015470275,
0.010174144,
-0.007059184,
0.010857066,
-0.056501344,
0.026815142,
-0.026898766,
-0.018815199,
0.06667549,
0.012961581,
0.03765827,
-0.011609674,
0.00776998,
-0.043344643,
0.02409739,
-0.009721186,
0.04038996,
0.013951121,
0.04855715,
0.03107992,
0.011672392,
-0.039581604,
-0.0078257285,
-0.021421451,
-0.013776907,
0.06617375,
-0.005163727,
0.0154005885,
-0.031860404,
-0.05087072,
0.069184184,
-0.026731519,
-0.036459673,
0.047497924,
0.041504934,
-0.005651528,
-0.017588727,
-0.037686147,
-0.033142623,
0.01643194,
0.023135725,
0.024933623,
0.017226359,
-0.015177594,
-0.010208988,
-0.030271564,
0.025128743,
-0.008933735,
-0.0124040935,
-0.007937226,
-0.048780143,
-0.01880126,
-0.05321217,
0.06215984,
0.056752212,
0.004418087,
-0.030996297,
0.025226302,
0.010271705,
0.0085644,
0.02252249,
-0.01751904,
0.002776984,
-0.05909366,
0.037964888,
-0.021128772,
0.021505075,
-0.036097307,
-0.03068968,
0.012501654,
0.026522461,
0.020376163,
-0.009142793,
0.0005918948,
-0.005390206,
-0.01068982,
0.029463207,
-0.057253953,
-0.00722643,
-0.012167161,
0.037992764,
0.036905665,
-0.05301705,
-0.019233314,
-0.01633438,
0.013602692,
0.034675714,
0.017309982,
-0.028208861,
-0.027247194,
-0.011435459,
-0.08540706,
0.015498148,
0.060208634,
-0.07682176,
0.038104262,
-0.05825743,
-0.0122925965,
0.005470345,
-0.056947336,
0.021268142,
-0.0004886725,
0.019233314,
0.040863823,
0.038940493,
0.0066689425,
-0.01177692,
0.04027846,
-0.05396478,
-0.041560683,
-0.047776666,
0.039330732,
0.007519111,
-0.007121901,
-0.040640827,
0.012041727,
0.01563752,
0.036849916,
0.024278576,
0.02351203,
-0.05909366,
-0.031693157,
0.05156758,
0.008884955,
-0.039024115,
0.07531654,
0.04005547,
-0.038132135,
-0.013546943,
0.022160122,
-0.00094598636,
0.03637605,
-0.030829052,
0.0056201695,
0.014703729,
0.010905847,
-0.02009742,
-0.019958047,
0.042647783,
0.023400532,
0.017435417,
-0.020682782,
-0.06182535,
-0.055943858,
0.012759492,
0.012480749,
0.01697549,
-0.022480678,
-0.0106549775,
0.00071689393,
-0.029268086,
0.0028397013,
-0.051539708,
0.00781876,
0.024459759,
-0.0035957936,
0.03503808,
0.024181014,
0.0066793957,
-0.008815269,
0.007519111,
0.022745484,
0.008285656,
0.006167204,
-0.028501542,
0.0419788,
0.01875945,
-0.01291977,
0.0066097095,
-0.007567891,
0.014536483,
0.02999282,
-0.02514268,
0.04390213,
-0.01356088,
-0.027177509,
0.027038136,
-0.011073093,
-0.058424674,
-0.005954662,
0.017853532,
0.0364318,
0.017045176,
0.004804844,
-0.034452718,
-0.018229837,
-0.073309585,
0.021268142,
-0.018174088,
-0.0016785596,
-0.022564301,
-0.01796503,
0.01613926,
0.01563752,
0.024710627,
-0.05326792,
0.007017372,
-0.02430645,
0.02231343,
-0.027860431,
-0.024905749,
0.004438993,
-0.0031358665,
-0.0067246915,
0.060766123,
-0.0054320176,
-0.018675826,
-0.035957936,
0.053044923,
0.020780342,
0.012815241,
-0.014480734,
-0.009226416,
-0.0024093906,
0.001624553,
0.0072682416,
0.03344924,
-0.015107907,
0.0128570525,
-0.021128772,
0.0032560746,
0.009010389,
-0.017086988,
-0.027316881,
0.012550434,
0.050814975,
-0.03068968,
0.007651514,
-0.054578014,
0.027553814,
0.02405558,
-0.019888362,
-0.012132319,
0.0071497755,
0.006790893,
-0.058480423,
0.022578238,
-0.010850098,
-0.014341363,
-0.05666859,
0.038996242,
0.051790576,
-0.01835527,
0.011539988,
0.06344206,
0.01623682,
-0.011623612,
-0.027888305,
0.002825764,
0.015749019,
-0.024627004,
-0.03573494,
0.043344643,
-0.037184406,
0.0029738466,
0.0041846395,
-0.028194923,
-0.02574198,
0.011142779,
0.05009024,
0.0042299354,
0.02351203,
0.025546858,
-0.0473028,
-0.00023693213,
0.03202765,
-0.018996382,
0.013553912,
0.010501668,
0.02064097,
-0.019985922,
-0.011372742,
-0.016780369,
-0.017142737,
-0.011797827,
0.051344585,
-0.006317029,
-0.014480734,
-0.021156646,
0.03478721,
-0.04465474,
-0.048362028,
-0.02013923,
0.015553897,
-0.012132319,
-0.027414441,
0.013149734,
0.0066689425,
-0.025644418,
0.042201795,
0.041588556,
0.01875945,
-0.006578351,
0.04716343,
-0.0540484,
-0.008480776,
0.002059219,
0.024654878,
-0.031247167,
-0.029128715,
-0.010710726,
0.013526037,
-0.02692664,
-0.029463207,
0.071525626,
-0.011344868,
0.014125336,
-0.00875952,
0.021965003,
0.02539355,
-0.04301015,
0.05661284,
0.0042822,
-0.02915659,
-0.04652232,
-0.052766178,
-0.02747019,
0.014926724,
-0.00077525584,
0.016808243,
0.028654851,
0.00776998,
0.025630482,
-0.02143539,
-0.035957936,
0.0030992813,
-0.06427829,
0.010480762,
0.01955387,
-0.020376163,
0.005686371,
0.018466769,
0.053769656,
-0.04094745,
-0.018731575,
0.031163543,
0.012299565,
0.01831346,
-0.04529585,
-0.008836174,
-0.04370701,
-0.042787157,
0.002531341,
-0.006097518,
-0.022034688,
0.0042090295,
-0.050564103,
-0.02578379,
-0.04465474,
0.025282051,
-0.024417946,
0.02172807,
-0.014926724,
-0.009498191,
-0.014076556,
-0.040501457,
-0.04097532,
0.056138977,
0.002754336,
0.024125265,
0.022201935,
-0.021351766,
-0.04543522,
-0.020529471,
-0.013588754,
0.037881266,
-0.021574762,
0.012397125,
0.008480776,
0.0018536455,
-0.057142455,
-0.0049163415,
0.008689835,
-0.0005544386,
0.015024285,
0.01871764,
-0.020975461,
0.06037588,
-0.02628553,
0.026508525,
0.056055356,
0.035511944,
0.0050905566,
0.0033518928,
0.01252256,
0.004341433,
0.012320471,
-0.024069518,
-0.02781862,
-0.019372687,
-0.033588614,
0.055497866,
0.007024341,
0.005428533,
-0.035957936,
-0.0025278567,
-0.040027592,
0.032139145,
0.049867246,
-0.002379774,
-0.025658356,
-0.038522378,
-0.022006813,
-0.00013937184,
-0.03821576,
-0.0045261006,
0.007930257,
-0.06388805,
0.015289091,
-0.031219292,
-0.02192319,
-0.007296116,
0.010034773,
-0.007505174,
0.052431688,
-0.023289034,
-0.005177664,
-0.012654963,
-0.016822182,
-0.043177396,
-0.015177594,
0.0082786875,
-0.026452776,
-0.05251531,
0.028877845,
0.022160122,
-0.03478721,
-0.03579069,
-0.010264736,
0.024167078,
0.015414526,
0.0030801177,
-0.026564272,
-0.0025836055,
0.0000646228,
0.01959568,
-0.001377168,
-0.008801332,
-0.036794167,
0.02795799,
0.017393606,
0.0029599094,
-0.00045992708,
0.015776893,
0.005992989,
-0.002766531,
0.022466742,
0.025518984,
0.05864767,
0.0104250135,
0.015498148,
0.017797785,
-0.027651373,
0.040752325,
0.022912731,
0.045017105,
0.03018794,
0.027721059,
-0.016348317,
-0.07158138,
0.010675883,
0.049727872,
-0.011114905,
-0.046996184,
0.015289091,
0.049560625,
0.028180987,
-0.004240388,
0.023442343,
-0.003142835,
0.020431912,
-0.0020783825,
-0.036320303,
0.014689792,
-0.02217406,
-0.037351653,
-0.03584644,
0.003470359,
0.031219292,
0.035149578,
0.02222981,
-0.020417975,
0.02890572,
0.039860345,
0.0143831745,
-0.007519111,
-0.0037177438,
0.014954599,
0.00871074,
0.036097307,
0.0022647923,
0.011149747,
-0.019163629,
-0.04549097,
-0.044989232,
0.042536285,
-0.014236834,
0.009637563,
-0.0008114054,
-0.01732392,
0.005672434,
-0.059037913,
0.013128827,
-0.05092647,
0.025630482,
0.0364318,
0.02083609,
-0.06583926,
0.027010262,
0.008425028,
-0.024613068,
0.022787295,
0.042982277,
-0.01623682,
0.057253953,
0.03297538,
0.015749019,
0.03771402,
0.022076499,
-0.024613068,
0.0052438653,
0.024640942,
-0.010529542,
0.012815241,
-0.00074781704,
-0.05831318,
0.030801177,
-0.017407542,
0.003661995,
-0.04727493,
-0.00846684,
0.010717695,
-0.043372516,
0.0067665027,
0.038996242,
-0.022884857,
-0.0014093977,
-0.0462157,
-0.017184548,
-0.035456195,
-0.0051253997,
-0.034592092,
0.011588769,
0.0013545201,
-0.03166528,
-0.011170653,
-0.02271761,
0.025212366,
-0.03498233,
-0.013937185,
-0.018912759,
-0.001130654,
0.023567779,
0.06979742,
0.0077212,
-0.031609535,
-0.027846495,
0.036599044,
0.06784621,
0.004358854,
0.051651206,
0.08100291,
0.00383621,
-0.035121705,
0.015066096,
0.042536285,
-0.0108222235,
-0.053936902,
0.007428519,
0.0019738537,
-0.01662706,
-0.06606225,
0.0032804648,
0.031637408,
0.003919833,
0.011198527,
-0.031414412,
-0.05329579,
-0.0463272,
0.04983937,
-0.024905749,
-0.021491138,
0.0043693073,
-0.027581688,
0.009149761,
-0.056752212,
0.22667436,
0.02504512,
0.006128877,
-0.012703744,
0.04914251,
0.026452776,
-0.0022194965,
0.028055552,
0.03949798,
-0.015721144,
0.015177594,
-0.044125125,
-0.018480707,
0.01420199,
-0.021951064,
0.008146284,
-0.057142455,
0.03999972,
0.001058355,
-0.027484126,
-0.05608323,
0.01598595,
-0.000096144795,
0.05443864,
0.025309926,
-0.005459892,
0.013358791,
-0.037964888,
0.0154005885,
-0.05507975,
-0.015972013,
-0.0063727773,
0.011651486,
-0.02341447,
-0.027679248,
-0.020473724,
-0.033644363,
-0.018062592,
-0.0154424,
0.046605945,
-0.02399983,
-0.0047142524,
0.009519096,
-0.036208805,
0.02172807,
0.037853394,
-0.0429544,
0.022508552,
0.024863936,
-0.03311475,
0.05661284,
0.0010426756,
0.030271564,
-0.04549097,
-0.038076386,
-0.015721144,
-0.021240268,
-0.056752212,
0.031944025,
-0.021546887,
-0.032194894,
-0.024933623,
-0.004682894,
0.06316332,
-0.039525855,
-0.057309702,
-0.011595737,
0.020752467,
-0.010752537,
0.012431968,
0.041337688,
-0.011177622,
-0.0011785631,
-0.03409035,
-0.012508622,
0.027776808,
-0.024208888,
0.0495885,
0.022006813,
-0.03409035,
-0.0028100847,
-0.024710627,
-0.0053727846,
-0.04766517,
0.031163543,
0.008431996,
-0.047693044,
0.0014616622,
0.009247322,
-0.00871074,
0.0067525655,
0.050898597,
0.05499613,
0.03063393,
-0.033421367
] | Composition is generally favored over-abstraction
Duplicating code is not always bad if it strongly improves the readability or accessibility of a model
Model files are as self-contained as possible so that when you read the code of a specific model, you ideally only
have to look into the respective modeling_.py file. |
[
0.038321897,
-0.008743346,
-0.021092786,
-0.06416557,
0.021121405,
0.0028834438,
0.0116482545,
-0.0003034145,
-0.0033055858,
0.047337133,
0.030880753,
-0.024255272,
0.035545778,
-0.040411144,
0.028934607,
0.03669057,
-0.0014435106,
-0.009251347,
-0.065138645,
-0.0033055858,
0.034944765,
0.009680644,
-0.05048531,
-0.015554856,
-0.028304972,
0.013780429,
0.017458072,
-0.039781507,
0.078704424,
0.08139468,
-0.0044825748,
0.0067864675,
0.00090599526,
-0.011233267,
-0.026287276,
-0.02465595,
-0.0133010475,
-0.028934607,
-0.042901065,
-0.03960979,
0.01638483,
-0.053719345,
0.049884293,
-0.04501893,
-0.03148177,
0.01622742,
0.03136729,
-0.025457304,
0.015841054,
-0.091869526,
0.0021357518,
-0.0004847477,
0.018059088,
-0.011326282,
-0.020777967,
0.0076629487,
-0.013794739,
0.008106556,
-0.052002158,
-0.0072801593,
0.038464997,
-0.0029192185,
0.0043752505,
-0.059815362,
0.018273735,
0.034458227,
-0.0051551396,
-0.0016545816,
-0.009852363,
0.001604497,
-0.032168645,
-0.0057740426,
-0.023754425,
-0.0096591795,
-0.00540914,
-0.02867703,
0.030823514,
-0.0004726737,
-0.018459765,
0.07698724,
0.00044696062,
0.051315285,
-0.01491091,
0.010796816,
-0.025228346,
-0.025714882,
0.072865985,
-0.022509465,
-0.05028497,
-0.011884368,
-0.008650332,
0.049340516,
-0.012463919,
0.024827668,
0.018688723,
0.036347132,
-0.018445455,
0.03113833,
-0.0022198225,
-0.022681184,
0.012177721,
0.109671034,
-0.03711987,
0.0152543485,
-0.012592708,
0.010632252,
-0.0045505464,
-0.00543776,
-0.02582936,
-0.030594556,
0.01615587,
0.003978151,
-0.023668567,
-0.009952532,
-0.015096939,
0.0045863213,
-0.0002665218,
0.024870597,
-0.05855609,
-0.007841823,
0.031796586,
0.00950177,
-0.023554087,
-0.044417914,
0.010789661,
0.00024282103,
-0.008221035,
0.05715372,
0.01775858,
-0.007999231,
0.006493115,
0.0063392837,
0.011283352,
0.04788091,
-0.025700571,
-0.012878906,
0.001563356,
0.023539778,
0.026673645,
-0.045906145,
0.00827112,
0.022394985,
-0.029092018,
0.066569634,
-0.0075699347,
0.017944608,
-0.008464303,
-0.058212653,
-0.025400063,
0.007090553,
-0.023754425,
0.0073982156,
0.030394217,
0.012585552,
-0.04361656,
0.014524544,
-0.010002617,
-0.008135175,
0.025743501,
-0.007112018,
0.0047222655,
0.014381444,
-0.04224281,
0.032225884,
-0.0036347134,
0.021436222,
0.007212187,
-0.011734114,
0.01435998,
-0.05048531,
-0.012578398,
0.007870442,
-0.013587246,
0.022509465,
0.07252255,
0.03148177,
0.048481923,
0.022681184,
0.011419296,
-0.018531313,
-0.0013603345,
-0.012392369,
0.009759349,
0.037205726,
-0.00880774,
0.018288046,
0.021722421,
0.008528697,
-0.00648596,
0.0022663297,
-0.0008729036,
0.027417758,
-0.023997694,
0.033113096,
-0.05048531,
0.01631328,
-0.026902603,
0.037491925,
0.007884752,
-0.032368984,
-0.029592862,
0.02996492,
-0.02454147,
0.037549164,
-0.01761548,
-0.01496815,
-0.031052472,
0.0045326594,
-0.025342824,
0.002929951,
0.03279828,
0.046907835,
-0.030880753,
-0.0091511775,
0.013880598,
-0.037778124,
-0.02584367,
0.0014578205,
0.003323473,
0.006017311,
-0.0021983576,
0.0073123565,
0.014367134,
0.015483307,
0.011490846,
0.006836552,
0.023410989,
0.033656873,
-0.014696262,
-0.008321204,
-0.025514543,
0.022895832,
0.007755963,
0.05872781,
0.01360871,
-0.009630559,
0.06387937,
0.031968307,
0.011998847,
0.01360871,
0.019533006,
0.01087552,
0.019990923,
0.048195727,
-0.024913527,
-0.027875675,
0.02462733,
-0.016213112,
-0.014281276,
-0.0010947069,
-0.03420065,
0.047537472,
0.06765718,
-0.013801894,
-0.055722732,
-0.0040210807,
0.0027957957,
-0.0018620751,
-0.022724112,
-0.048310205,
0.008571628,
0.028362213,
0.017043086,
-0.022838593,
0.04765195,
0.022609634,
-0.00324298,
0.026802434,
-0.030594556,
-0.05460656,
-0.025013696,
-0.06359317,
-0.0785327,
0.014853671,
-0.038951535,
-0.022996001,
-0.013587246,
-0.044704113,
0.02727466,
-0.011190338,
-0.014173951,
0.009823743,
-0.010231575,
0.040010467,
0.011912988,
0.030279739,
-0.043731038,
0.031911068,
-0.015855365,
-0.0012932568,
0.033485156,
-0.017672721,
-0.018645793,
-0.018373905,
0.05495,
0.033599634,
0.01906078,
-0.007029736,
-0.062333904,
0.031052472,
-0.05174458,
0.012113326,
-0.0033968114,
0.028347902,
0.0007798893,
0.02854824,
-0.03691953,
-0.030766275,
0.051029086,
0.031081092,
-0.044360675,
0.01496815,
0.00019754363,
-0.007187145,
-0.025385754,
0.004704378,
0.04378828,
0.010346054,
-0.0023664988,
-0.0070726657,
-0.024283892,
-0.0067972,
-0.020591939,
0.0017735326,
-0.013172259,
0.05334729,
-0.018187877,
-0.055579633,
-0.030565936,
-0.015139869,
-0.011841438,
-0.010682337,
-0.018803202,
0.012113326,
-0.00543776,
0.014245501,
-0.010997155,
0.008714726,
-0.0101958,
0.020749347,
0.040468384,
-0.0027886408,
0.043244503,
0.06588276,
0.0122922,
-0.01230651,
0.005369788,
-0.041183878,
0.0032608674,
-0.006464495,
0.024112172,
0.03274104,
-0.005301816,
0.007140638,
-0.0037992771,
0.049455,
-0.043330364,
-0.014324205,
0.011963072,
0.014202571,
0.013558625,
0.032225884,
0.005716803,
0.0017967862,
-0.06342146,
-0.007999231,
-0.012692877,
-0.0058241272,
0.05583721,
-0.037320208,
0.013465611,
-0.024870597,
-0.031939685,
0.020620558,
-0.024784738,
-0.064680725,
0.046650257,
0.037692264,
0.0245844,
-0.020649178,
-0.03794984,
0.015397447,
-0.014553163,
0.050056014,
0.026544856,
0.016828436,
-0.04244315,
0.0040890523,
-0.009065319,
0.041555934,
0.008385599,
-0.019318359,
0.0063178185,
-0.022452226,
-0.015683645,
-0.059700884,
0.024355441,
0.057039242,
0.04244315,
0.010109941,
0.022495154,
0.002786852,
-0.037377447,
0.020720728,
-0.006110325,
0.000077251076,
-0.06256286,
0.03849362,
0.007348131,
-0.02040591,
0.0056524086,
0.011068704,
0.02167949,
0.0025006542,
-0.038951535,
0.012657102,
0.002910275,
-0.025128176,
-0.012313665,
0.05706786,
-0.04745161,
-0.01639914,
-0.030737655,
0.044246197,
0.041098017,
-0.054978617,
0.0017109269,
-0.009680644,
-0.00033941283,
0.052431457,
-0.02179397,
-0.049512237,
-0.017028775,
0.004865364,
-0.04756609,
0.023110481,
0.057840597,
-0.046879217,
0.010052701,
-0.0689737,
-0.013766119,
0.011977382,
-0.004221419,
-0.021493463,
0.02167949,
-0.00825681,
0.0014837573,
0.030508697,
0.004221419,
0.0054771123,
0.02572919,
-0.048539165,
0.0057740426,
-0.020305742,
0.0045326594,
-0.019661795,
0.05039945,
-0.016871367,
0.019905064,
0.031109711,
-0.014617558,
-0.0018692301,
0.03835052,
-0.05194492,
-0.027804127,
0.018059088,
0.023926144,
-0.041784894,
0.038636718,
0.020820897,
-0.02182259,
-0.008027852,
0.030709036,
0.009086783,
0.035631638,
0.0022448648,
0.015211418,
0.009251347,
-0.02879151,
0.02861979,
-0.07046192,
0.05743992,
-0.003806432,
-0.015812434,
-0.024927838,
-0.034887522,
-0.026916912,
-0.0028584015,
-0.030251117,
0.05217388,
0.020134022,
-0.0025274851,
-0.008013541,
-0.0066970307,
0.0202485,
-0.033427916,
-0.0050728577,
0.045648564,
0.013837668,
-0.013129328,
0.034658566,
-0.015969843,
-0.016685337,
-0.015798124,
-0.014052317,
0.014603248,
0.0008809529,
0.0018728075,
0.026129868,
0.0018200398,
-0.007104863,
-0.004443222,
-0.009766503,
-0.00064170937,
0.008771965,
-0.03969565,
0.021336054,
-0.028190494,
-0.054978617,
0.026001079,
-0.014667642,
-0.055322055,
-0.056008928,
0.022795662,
-0.0035810512,
0.03815018,
0.051258042,
-0.052288357,
-0.013630175,
-0.03162487,
0.0055093095,
-0.05460656,
-0.0001220813,
-0.029621482,
-0.0025310626,
0.022280507,
0.026530545,
0.0517732,
-0.018259427,
0.0010544604,
-0.024069244,
0.022065857,
-0.071721196,
-0.026272967,
-0.009258502,
0.00017417825,
0.007634329,
0.031052472,
0.032111406,
-0.03417203,
-0.04785229,
0.023969075,
0.049798436,
0.011376367,
-0.01896061,
-0.014796431,
0.012950455,
0.0034987694,
0.013129328,
0.063535936,
-0.030365597,
0.03545992,
-0.0040675877,
0.026687954,
-0.028090324,
-0.03794984,
-0.0116411,
-0.020620558,
0.05217388,
-0.039838746,
0.022895832,
-0.026659334,
0.003759925,
-0.02063487,
-0.022752734,
-0.023539778,
0.004976266,
-0.047480233,
-0.041985232,
0.012199186,
-0.03683367,
-0.02029143,
-0.02871996,
-0.004561279,
0.0464213,
-0.017043086,
-0.011369212,
0.058269892,
0.008743346,
-0.0069259894,
-0.012485383,
0.034372367,
0.013930683,
-0.004929759,
0.010532083,
0.0074196807,
-0.018817512,
-0.0075770896,
0.003842207,
-0.040353905,
-0.006564664,
0.048224345,
0.04493307,
0.00077273435,
0.011125944,
0.017000156,
-0.063078016,
-0.029592862,
0.02850531,
0.008650332,
-0.014188261,
0.027618097,
0.02315341,
-0.007863287,
0.016070012,
0.017200494,
-0.038837057,
-0.040182184,
0.04736575,
-0.0006828503,
-0.02309617,
0.020148333,
0.02608694,
-0.03271242,
-0.038837057,
-0.010796816,
0.024870597,
-0.041555934,
0.0125497775,
-0.0052982387,
-0.016141562,
-0.0203916,
0.06576828,
0.025314204,
-0.0043859826,
-0.015154179,
0.017472383,
-0.0019533008,
-0.016084323,
0.04232867,
0.034544088,
-0.020949686,
-0.02454147,
-0.01651362,
0.049512237,
-0.03686229,
-0.042557627,
0.051200803,
-0.018259427,
0.016499309,
0.013809049,
0.021049855,
0.022423606,
-0.005255309,
-0.004818857,
0.03671919,
-0.041183878,
-0.066455156,
-0.017873058,
0.003981728,
-0.014588938,
0.0014461938,
-0.029163565,
0.03540268,
0.022738423,
0.055522393,
-0.01297192,
-0.05992984,
0.009973997,
-0.0436738,
-0.0016939339,
0.03792122,
-0.00018546966,
0.04765195,
0.02737483,
0.007863287,
-0.069946766,
0.005283929,
0.020649178,
-0.023296509,
-0.019604556,
-0.043187264,
0.024942147,
-0.060788434,
-0.0357175,
-0.0010356787,
-0.004167757,
-0.031767968,
0.023954764,
-0.021450533,
0.004826012,
-0.020749347,
0.05723958,
0.0046077864,
0.016556548,
-0.03434375,
-0.018388215,
-0.04745161,
-0.02316772,
-0.038464997,
0.028390832,
-0.029163565,
-0.029764581,
0.0024004849,
0.00012845367,
-0.00056345214,
-0.013801894,
-0.030966613,
0.041985232,
-0.035116483,
0.0022752732,
0.00964487,
0.01768703,
-0.041470077,
0.01918957,
-0.0017127156,
-0.034372367,
-0.029678723,
0.051515624,
0.015798124,
0.047909528,
-0.002726035,
0.014152486,
-0.013186568,
0.02042022,
0.020963997,
0.008149485,
0.039953228,
0.0077130334,
-0.02716018,
-0.05154424,
-0.012156256,
0.030680414,
-0.055322055,
0.017229114,
0.0026348094,
0.017515311,
-0.03139591,
0.006396523,
-0.017372213,
0.04905432,
0.057754736,
0.02032005,
-0.022638254,
-0.045820285,
-0.017014464,
0.001910371,
-0.09095369,
-0.035860598,
0.04069734,
-0.040039085,
0.02608694,
-0.010739576,
0.009995461,
0.029392524,
0.019947995,
-0.018617174,
0.029392524,
-0.010217265,
-0.012478229,
-0.0052696187,
-0.025028007,
-0.06158979,
-0.009051009,
0.017915988,
-0.027632408,
-0.017873058,
0.011862903,
0.03800708,
0.017057395,
-0.013286738,
-0.018860443,
-0.008385599,
-0.0072157644,
0.021650871,
-0.0517732,
0.02309617,
-0.037320208,
0.04745161,
-0.010517773,
0.01903216,
-0.042786587,
0.058441613,
0.019862134,
0.0009256713,
0.032569323,
0.053948306,
0.032569323,
-0.01081828,
0.015812434,
0.02584367,
0.033656873,
-0.031166952,
-0.008120866,
0.031682108,
0.03809294,
0.032111406,
0.03308448,
0.022366365,
0.021135716,
0.033513773,
-0.029363904,
-0.0068222424,
0.019475767,
0.025156796,
0.020649178,
0.045390986,
0.00749123,
0.025299894,
0.018703032,
0.001186827,
0.018588554,
-0.0012565877,
0.003963841,
0.015511926,
-0.02326789,
0.020005234,
0.00409263,
-0.08408494,
-0.0055522393,
0.006729228,
0.060731195,
0.010989999,
0.029292354,
-0.022924451,
0.0068222424,
0.064394526,
0.02726035,
-0.0022538085,
-0.022967381,
0.029507004,
0.0080994,
0.019590246,
-0.005630944,
0.007906217,
0.010839745,
-0.04633544,
-0.030222498,
0.03425789,
-0.0074483003,
-0.01928974,
0.000810745,
-0.024026314,
-0.0043430533,
-0.060616717,
0.04221419,
-0.06433729,
-0.007144215,
0.013093554,
-0.03294138,
-0.044503774,
0.047308512,
-0.019733345,
0.007963456,
0.024670258,
0.030737655,
0.0037921222,
0.026330207,
0.030193878,
0.015841054,
0.026659334,
0.045619946,
-0.027746886,
-0.0062641567,
0.013472767,
-0.048367444,
-0.006546777,
-0.032969996,
-0.06937437,
0.02170811,
-0.004282236,
-0.031252813,
-0.019261118,
0.0064823823,
0.02721742,
-0.07395354,
-0.014739192,
0.05855609,
0.003981728,
-0.013193723,
-0.008335514,
0.011455071,
-0.045963384,
-0.037406065,
-0.042872444,
0.02175104,
-0.008521543,
-0.04098354,
-0.013458456,
-0.056982003,
0.011719804,
0.008535853,
-0.018216496,
0.012213496,
0.0129075255,
-0.011970228,
0.04939776,
-0.008020696,
-0.013851979,
-0.0080994,
0.035746116,
0.05872781,
0.03531682,
0.06158979,
0.045448225,
-0.009079629,
-0.012013157,
-0.0043323208,
0.0025793586,
-0.00020939401,
-0.016585167,
-0.027804127,
0.004443222,
-0.00022135618,
-0.07778859,
-0.018245116,
0.026187109,
-0.0028118943,
0.008736191,
-0.02740345,
-0.015855365,
-0.066569634,
-0.006096015,
-0.044160336,
0.011726959,
0.000543776,
-0.0352882,
0.041412838,
-0.054263122,
0.24292478,
0.028376522,
0.022208957,
0.03938083,
0.05174458,
0.066569634,
0.060502235,
0.023625636,
0.014882291,
-0.048939843,
-0.006564664,
-0.03958117,
0.005799085,
0.020663489,
-0.040096328,
0.028491002,
-0.060387757,
-0.014059472,
-0.039151873,
-0.0299363,
-0.08654624,
0.009816588,
0.012721497,
0.059700884,
0.023797356,
-0.01166972,
-0.015311588,
-0.06954609,
0.017329283,
-0.06376489,
-0.0041033626,
-0.03548854,
0.036461614,
-0.025185416,
-0.0076915687,
0.01642776,
0.0016742577,
-0.017071705,
-0.0067757354,
0.021135716,
0.008049316,
-0.06576828,
0.013837668,
0.025815051,
0.019575937,
0.029507004,
-0.03823604,
0.003888714,
0.007899062,
-0.029793201,
0.03837914,
-0.041727655,
0.006993961,
-0.030623175,
-0.017458072,
0.00715137,
-0.030050779,
-0.051487003,
-0.006714918,
0.0026365982,
0.009258502,
0.0038243195,
-0.049912915,
0.03294138,
0.0044575324,
-0.030651795,
-0.022409296,
0.024899218,
0.024913527,
0.005609479,
0.018917682,
0.024083553,
-0.025528852,
-0.05037083,
0.02189414,
0.016785506,
-0.027532239,
0.041384216,
0.030480076,
-0.023969075,
-0.009845207,
-0.021350363,
0.007036891,
-0.03989599,
0.06256286,
0.041813515,
-0.06313526,
-0.035631638,
0.018388215,
0.0050048856,
0.02854824,
0.041584555,
0.050943226,
-0.014467304,
0.0077344985
] |
In our opinion, the library's code is not just a means to provide a product, e.g. the ability to use BERT for
inference, but also as the very product that we want to improve. Hence, when adding a model, the user is not only the
person who will use your model, but also everybody who will read, try to understand, and possibly tweak your code.
With this in mind, let's go a bit deeper into the general library design.
Overview of models
To successfully add a model, it is important to understand the interaction between your model and its config,
[PreTrainedModel], and [PretrainedConfig]. For exemplary purposes, we will
call the model to be added to 🤗 Transformers BrandNewBert.
Let's take a look: |
[
0.026539195,
-0.027377123,
-0.02024029,
-0.0369844,
0.033054806,
0.022103956,
0.015328299,
-0.012301646,
-0.014223102,
0.051460322,
0.020355865,
-0.005851047,
0.045594826,
-0.045508146,
0.021396052,
0.032072406,
-0.004756685,
-0.00027155902,
-0.08494854,
0.0017200996,
0.036002,
0.0059088357,
-0.08177019,
-0.025946867,
-0.016180674,
-0.009600052,
0.018795587,
0.00069029717,
0.0734487,
0.063798085,
0.00033341037,
0.007393268,
-0.05024677,
-0.02885072,
-0.02151163,
-0.002815365,
-0.02135271,
-0.035250753,
-0.042011965,
-0.04178081,
0.021034876,
-0.0013724678,
0.05128696,
-0.038689148,
-0.05330954,
0.022739626,
0.022551814,
-0.01931568,
0.005439307,
-0.060850892,
0.004948108,
-0.001964796,
0.017163072,
0.004366615,
-0.008162572,
-0.015342746,
0.009217205,
-0.015675029,
-0.05050682,
0.0016045233,
0.03499071,
0.011861012,
0.006703422,
-0.054349728,
-0.00435578,
0.02418433,
-0.012128282,
0.016787449,
-0.046981744,
-0.03926703,
-0.010372967,
-0.008270925,
-0.029471941,
-0.008256478,
-0.014114749,
-0.016382933,
0.03002093,
0.0030519352,
0.022118405,
0.051258065,
0.013247927,
0.038544677,
-0.004901155,
-0.014627619,
-0.014981571,
-0.0121644,
0.03926703,
-0.016671874,
-0.057325818,
-0.010878614,
-0.027579382,
0.03478845,
-0.053974107,
0.006674528,
0.004547203,
0.024357693,
-0.017119732,
0.059579555,
-0.012178847,
-0.018549988,
-0.006233894,
0.09546598,
-0.005200931,
0.035192966,
0.0029110766,
0.016180674,
0.021266028,
0.034094993,
-0.027059289,
-0.036753245,
0.023230825,
0.004489415,
-0.040451687,
-0.029327473,
-0.031436738,
0.016108438,
-0.012005482,
0.009065512,
-0.07674263,
-0.0062302817,
0.022002827,
-0.022349557,
0.013428515,
-0.04617271,
0.026481407,
-0.024458822,
0.0060605295,
0.052702766,
0.006468658,
-0.030425446,
0.027593829,
0.0029146883,
0.019055633,
0.054205257,
-0.00939057,
-0.010719697,
-0.010372967,
-0.0072343503,
-0.0021887252,
-0.057007983,
0.0143097835,
0.021280477,
-0.0019286786,
0.069114596,
0.005641565,
-0.011608189,
0.01907008,
-0.07489341,
-0.029269684,
-0.0053526247,
-0.0114420485,
0.003649681,
0.015848393,
0.010893061,
-0.006916516,
-0.03993159,
-0.009766192,
-0.0027684122,
0.0059846826,
0.013406844,
-0.023953177,
-0.008451513,
-0.037764538,
0.05443641,
-0.022797413,
0.023779811,
-0.009101629,
-0.0045544263,
-0.003219882,
-0.02671256,
0.0051503666,
0.012684492,
0.015126041,
0.02422767,
0.045739297,
0.021872804,
0.06795883,
0.0231008,
-0.01995135,
0.011521507,
-0.0023331954,
-0.012503905,
0.030425446,
0.030194294,
0.00065282517,
-0.012727834,
-0.010741367,
0.015891733,
-0.022898544,
-0.0026925653,
0.006959857,
0.04530589,
-0.022436239,
0.03565527,
-0.07061709,
0.007331868,
-0.02096264,
0.020081373,
-0.02466108,
-0.014382019,
-0.022205086,
0.06530058,
-0.04675059,
0.0394115,
-0.014562607,
-0.012670046,
-0.00090068206,
0.013753573,
-0.040451687,
0.018925609,
0.05065129,
0.01917121,
-0.021569416,
-0.021049323,
0.0024198776,
-0.0301654,
-0.02063036,
0.009896216,
0.0017751788,
-0.009137747,
0.038400207,
-0.0018474141,
0.04290768,
-0.006768434,
0.004413568,
-0.005067296,
-0.0030356823,
0.026351383,
-0.007375209,
0.0006505678,
0.0059052235,
0.037186656,
0.014923782,
0.056401208,
0.025903525,
-0.015299405,
0.03279476,
0.01633959,
0.010784708,
0.019243445,
0.027449358,
-0.00017991068,
0.004200474,
0.019546833,
-0.011514284,
-0.015169382,
0.018622221,
0.013811361,
-0.02311525,
0.026091337,
-0.013081786,
0.066976435,
0.028677355,
-0.0011729182,
-0.04042279,
0.0077652787,
-0.00097065984,
0.029616412,
0.009621723,
-0.03094554,
0.02486334,
0.015949521,
-0.029240789,
-0.010199604,
0.050680183,
0.018463304,
0.005764365,
0.0476752,
-0.007252409,
-0.06304684,
-0.018362176,
-0.052124888,
-0.052067097,
-0.02364979,
-0.038746934,
0.0006194164,
0.011983812,
-0.046923954,
0.030714387,
0.0059846826,
0.014967124,
0.005898,
0.0020045254,
0.04937995,
0.030280976,
0.045652617,
-0.038515784,
0.015559452,
-0.010105697,
0.015068253,
0.023592,
-0.009202759,
0.0070645977,
-0.025759056,
0.013428515,
0.039469287,
0.03094554,
-0.023028567,
-0.057441395,
0.058481578,
-0.066225186,
0.03374826,
-0.013146798,
0.036088683,
0.0009670481,
0.012828963,
-0.023201931,
-0.053800743,
0.032187983,
0.055187657,
-0.028301733,
0.028792933,
-0.0032144643,
0.0072885267,
-0.026409172,
0.04617271,
0.022941884,
0.000013452386,
-0.06004186,
-0.025614586,
-0.013414068,
-0.0041029565,
0.00092731876,
-0.0077652787,
-0.02009582,
0.042387586,
0.007512456,
-0.054580882,
-0.0016812732,
-0.013125127,
-0.006551728,
-0.02831618,
-0.013096233,
0.013327385,
0.0014302561,
0.01469263,
-0.025238963,
-0.00033769934,
-0.011875459,
0.02451661,
0.036695458,
-0.002950806,
0.07373764,
0.06951911,
0.012814516,
-0.018983398,
0.007736385,
-0.0685945,
-0.016498508,
0.008292596,
0.009007723,
0.01863667,
0.014584277,
0.02096264,
0.0052984483,
0.015935075,
-0.009274994,
0.0061905524,
0.022826308,
0.011254237,
0.022754073,
0.0158195,
-0.0061905524,
-0.0046411087,
-0.058452684,
0.00861043,
-0.0083287135,
0.02077483,
0.0452481,
-0.023014119,
0.051691476,
-0.001832967,
-0.032419138,
-0.00072506035,
-0.024892233,
-0.031003328,
0.021656098,
0.05180705,
0.02607689,
-0.0015575704,
-0.044005655,
-0.0074546677,
-0.0151115935,
0.039671544,
0.047617413,
-0.0022898542,
-0.03614647,
0.01165153,
-0.03481734,
0.016614085,
0.02646696,
0.004738626,
0.0057860357,
-0.006483105,
-0.011037531,
-0.028735144,
0.020471442,
0.033054806,
0.014085854,
-0.003425752,
0.029760882,
-0.0043268856,
-0.04631718,
0.004276321,
-0.029154107,
0.007404103,
-0.043601137,
0.035539694,
0.027463805,
-0.000879463,
-0.010669132,
-0.0039259805,
0.0062302817,
-0.020861512,
-0.022537367,
0.019200103,
-0.014714301,
-0.008791018,
0.0022248428,
0.06478048,
-0.03920924,
-0.0100406865,
-0.020760383,
0.024531057,
0.024617739,
-0.05122917,
0.0067142574,
-0.043803398,
-0.003994604,
0.029125214,
-0.0002636583,
-0.046403863,
-0.007519679,
0.015270512,
-0.043947868,
0.0010302538,
0.076164745,
-0.027117075,
-0.008502077,
-0.053742953,
-0.022797413,
0.020948194,
-0.0080831135,
-0.012243859,
0.028431756,
0.0043702265,
-0.027853874,
0.015747264,
-0.011182002,
0.0053020604,
0.0071548917,
-0.05016009,
0.010322403,
-0.037331127,
-0.013081786,
-0.05102691,
0.027030393,
-0.0050311782,
0.018188812,
0.011348142,
0.0056993533,
0.0032885054,
0.04100067,
-0.04368782,
-0.046548333,
0.018723352,
0.0211649,
-0.022970779,
0.030801069,
0.027160417,
-0.03805348,
0.023014119,
0.0034239462,
-0.0100623565,
0.017206414,
0.005063684,
0.017495355,
0.0015982027,
-0.0017020408,
0.04004717,
-0.065936245,
0.037937902,
-0.01814547,
-0.035973106,
0.008603207,
-0.067149796,
-0.053511802,
-0.021815017,
0.013739126,
0.017004155,
0.02718931,
0.006649246,
0.00033115302,
0.0064000343,
0.023418637,
-0.074951194,
-0.03805348,
0.024617739,
0.038082372,
0.02096264,
0.05530323,
-0.01206327,
0.016079545,
0.0052081547,
0.0036262046,
0.028792933,
0.0032704466,
-0.031061115,
-0.003263223,
-0.0037634515,
0.018318834,
-0.01746646,
0.0021291312,
0.0061147055,
-0.018419964,
-0.028547332,
0.031927936,
-0.0028641238,
-0.036782138,
0.047328472,
0.009600052,
-0.06541616,
-0.035164073,
0.030280976,
-0.019662408,
0.023173036,
0.03764896,
-0.044525746,
-0.048166398,
-0.025426773,
0.048859857,
-0.032765865,
0.018737799,
-0.028200604,
-0.025513455,
0.020745935,
0.028894061,
0.026452513,
-0.042243116,
0.0016270968,
-0.038602464,
0.019098975,
-0.072004,
-0.0123088695,
-0.023187485,
-0.0043124384,
-0.010835273,
0.0330837,
-0.004666391,
-0.04966889,
-0.02646696,
-0.0316101,
0.015877286,
0.015429429,
-0.041809708,
-0.001594591,
0.002623942,
0.027564934,
-0.011499836,
0.047357365,
0.027290441,
0.038226843,
-0.0011963947,
0.043514457,
-0.011210896,
-0.04310994,
-0.023852047,
-0.0120415995,
0.038255736,
-0.017842082,
-0.0058799414,
-0.056458995,
0.013219032,
-0.010965296,
-0.004496638,
-0.014865994,
0.013637997,
-0.028937401,
-0.06749652,
0.028662909,
-0.005674071,
-0.015458323,
-0.01006958,
0.034037203,
0.046490543,
-0.0040198863,
-0.021973934,
0.063624725,
0.01868001,
0.0050600725,
-0.0048650377,
0.053945214,
0.01376802,
-0.0027142358,
-0.0005977459,
0.014793759,
-0.020875959,
0.030049823,
0.017105283,
-0.04261874,
-0.0029724764,
0.029067425,
0.029515283,
-0.007050151,
0.035944212,
0.0296742,
-0.046866167,
-0.03366158,
-0.0025769891,
0.010741367,
-0.0064144814,
0.0209193,
0.018261047,
-0.0076641496,
0.03692661,
-0.0072957505,
-0.03712887,
-0.0028731532,
0.056343418,
-0.00044492338,
-0.032332454,
-0.024054306,
0.0021851133,
-0.04391897,
-0.03585753,
-0.029471941,
0.020081373,
-0.0184922,
0.0013128739,
0.013052892,
0.030367658,
0.0030808293,
0.03137895,
0.04553704,
-0.0027955004,
-0.024834445,
0.0024812776,
-0.033257063,
-0.032476924,
0.0265103,
0.051893733,
-0.03805348,
-0.0121644,
-0.007360762,
0.021005983,
-0.053945214,
-0.023043014,
0.0554766,
0.02825839,
0.042532057,
-0.010185157,
0.013161245,
0.040538367,
-0.009585605,
-0.015920628,
0.017885424,
-0.024935575,
-0.06027301,
-0.026958158,
-0.01810213,
0.005190096,
-0.01863667,
-0.016859684,
0.01703305,
0.031263374,
0.04397676,
-0.015935075,
-0.061948866,
0.004749461,
-0.048975434,
-0.014952676,
0.044872478,
-0.001594591,
0.016758556,
0.026495853,
0.03513518,
-0.04417902,
-0.0027973063,
0.01931568,
-0.009137747,
-0.022479579,
-0.049264375,
0.0055765538,
-0.043225516,
-0.04305215,
-0.0051034135,
-0.032476924,
-0.01722086,
0.027810534,
-0.010127368,
0.0077219377,
-0.030223187,
0.000056207977,
-0.027507147,
0.01084972,
-0.008819913,
-0.0030880529,
-0.013507973,
-0.008148125,
-0.0074474444,
0.027998345,
-0.004381062,
-0.009787863,
0.039440393,
-0.018044341,
0.022681838,
-0.024617739,
-0.032130197,
0.025600137,
-0.026481407,
-0.021439394,
0.010611344,
0.042734317,
-0.042503163,
-0.020370314,
-0.015386088,
-0.018362176,
-0.0111964485,
0.041751917,
0.007750832,
0.043716714,
-0.02063036,
0.041520767,
0.004666391,
0.057036877,
0.053829636,
0.016440721,
0.03201462,
-0.0012018123,
-0.034123886,
0.0083070425,
0.0010365745,
-0.006927351,
-0.033112593,
0.05423415,
0.04178081,
0.0072560213,
-0.04608603,
0.022291768,
0.008191466,
0.01789987,
0.043283302,
-0.005717412,
0.02418433,
-0.055389915,
0.011456495,
-0.015039358,
-0.05030456,
-0.031927936,
0.0046411087,
-0.055910006,
0.030338764,
-0.02685703,
0.008697112,
-0.030194294,
0.0296742,
0.024921127,
0.012850634,
0.0030627705,
-0.023404188,
0.003008594,
-0.0035232697,
-0.057672545,
-0.0009769804,
-0.0020153609,
-0.008234807,
-0.058510475,
0.017509801,
0.049495526,
-0.008234807,
-0.0026058832,
-0.04042279,
-0.020803723,
-0.008949935,
0.060446374,
-0.037937902,
0.012352211,
-0.045854874,
0.022681838,
-0.025686821,
-0.011817671,
-0.036262047,
0.06431818,
0.047472943,
0.003562999,
0.053107284,
0.052731663,
-0.0054212483,
-0.016946366,
0.028518438,
0.00844429,
0.034239464,
-0.020601466,
0.015602793,
0.02135271,
0.04091399,
0.0316101,
0.01789987,
0.00793142,
0.0051467544,
0.017697612,
-0.034528404,
-0.035568587,
0.037591174,
0.03993159,
-0.000856438,
0.039440393,
0.022176191,
0.010474097,
0.016166227,
0.023375295,
0.010604121,
0.00470612,
0.005081743,
-0.016310697,
-0.025108939,
0.009231652,
0.012012706,
-0.05599669,
0.0048036375,
0.0131323505,
0.055014294,
0.018911162,
0.030049823,
-0.004904767,
0.03244803,
0.039180346,
-0.010033463,
0.03478845,
-0.022956332,
0.025816843,
-0.0025860185,
0.027608275,
-0.010416309,
0.01072692,
-0.022898544,
-0.07812954,
-0.051835947,
0.06420261,
-0.04608603,
-0.005316507,
-0.026929265,
-0.01430256,
-0.0009805922,
-0.06339357,
0.011080872,
-0.058799416,
0.0030609646,
0.0044027325,
-0.005681295,
-0.056054477,
0.028980743,
-0.02952973,
0.00035801547,
0.002696177,
0.0123088695,
0.01853554,
0.054667562,
-0.004348556,
0.03337264,
0.022855202,
0.0154005345,
-0.03727334,
-0.0036749635,
0.018896716,
-0.031407844,
0.020948194,
-0.028171709,
-0.07119497,
0.0014067796,
-0.02490668,
-0.021179346,
-0.034470614,
0.02077483,
-0.00033905375,
-0.05669015,
0.0035575812,
0.07079045,
0.022248426,
-0.007635256,
0.0024036246,
0.013970278,
-0.053685166,
-0.013197362,
-0.06917238,
0.026365831,
-0.012922869,
-0.041058462,
-0.015935075,
-0.06281569,
0.014865994,
-0.0009151291,
-0.017813189,
0.01111699,
0.03123448,
0.017509801,
0.041376296,
0.010900284,
-0.035424117,
-0.042011965,
0.015154935,
0.04354335,
0.02825839,
0.035164073,
0.03522186,
0.004756685,
-0.010495768,
-0.004131851,
0.0080397725,
0.016599638,
-0.0133779505,
-0.026799241,
-0.012503905,
-0.0045797084,
-0.05550549,
0.008964382,
0.0053779073,
-0.020745935,
-0.0238376,
-0.021092664,
0.01004791,
-0.069750264,
-0.048628703,
-0.047617413,
-0.003517852,
-0.013529644,
-0.02753604,
-0.010011792,
-0.048715387,
0.24756432,
0.036897715,
0.0035792517,
0.004857814,
0.07240852,
0.077840604,
0.018694457,
0.015703922,
0.02135271,
-0.035250753,
-0.0053562364,
-0.029067425,
-0.0050745197,
0.018058788,
-0.020760383,
0.022782966,
-0.04305215,
-0.0037164986,
-0.05250051,
-0.02476221,
-0.06530058,
-0.010091251,
0.0054862597,
0.06426039,
0.049697787,
-0.019387916,
-0.023433084,
-0.08437066,
0.013067339,
-0.046346072,
-0.00536346,
-0.039584864,
0.049004328,
-0.016787449,
0.015573899,
0.030512128,
-0.008429842,
-0.019835772,
-0.0145120425,
0.024415482,
-0.0123088695,
-0.08986053,
0.011095319,
-0.02617802,
-0.00435578,
0.011586518,
-0.052616086,
0.022421792,
0.03591532,
-0.05094023,
0.045334782,
-0.058452684,
0.024039859,
-0.040885095,
0.022320662,
0.018810034,
-0.053656273,
-0.071888424,
0.011377037,
0.0065661753,
0.005392354,
0.0047314023,
-0.026596984,
0.05128696,
-0.0014663736,
-0.0022880484,
-0.009376123,
0.03926703,
0.04724179,
-0.021728333,
0.04666391,
0.027059289,
-0.024776658,
-0.033488218,
0.010510215,
0.0150827,
0.001654185,
0.055187657,
0.025946867,
-0.05585222,
-0.010914732,
-0.006100259,
-0.004977002,
-0.06998142,
0.058857203,
0.033459324,
-0.04715511,
-0.0036009224,
0.017047497,
0.019445702,
0.047906354,
0.047212895,
0.032621395,
0.014020843,
0.0019052022
] |
As you can see, we do make use of inheritance in 🤗 Transformers, but we keep the level of abstraction to an absolute
minimum. There are never more than two levels of abstraction for any model in the library. BrandNewBertModel
inherits from BrandNewBertPreTrainedModel which in turn inherits from [PreTrainedModel] and
that's it. As a general rule, we want to make sure that a new model only depends on
[PreTrainedModel]. The important functionalities that are automatically provided to every new
model are [~PreTrainedModel.from_pretrained] and
[~PreTrainedModel.save_pretrained], which are used for serialization and deserialization. All of the
other important functionalities, such as BrandNewBertModel.forward should be completely defined in the new
modeling_brand_new_bert.py script. Next, we want to make sure that a model with a specific head layer, such as
BrandNewBertForMaskedLM does not inherit from BrandNewBertModel, but rather uses BrandNewBertModel
as a component that can be called in its forward pass to keep the level of abstraction low. Every new model requires a
configuration class, called BrandNewBertConfig. This configuration is always stored as an attribute in
[PreTrainedModel], and thus can be accessed via the config attribute for all classes
inheriting from BrandNewBertPreTrainedModel:
python
model = BrandNewBertModel.from_pretrained("brandy/brand_new_bert")
model.config # model has access to its config
Similar to the model, the configuration inherits basic serialization and deserialization functionalities from
[PretrainedConfig]. Note that the configuration and the model are always serialized into two
different formats - the model to a pytorch_model.bin file and the configuration to a config.json file. Calling
[~PreTrainedModel.save_pretrained] will automatically call
[~PretrainedConfig.save_pretrained], so that both model and configuration are saved.
Code style
When coding your new model, keep in mind that Transformers is an opinionated library and we have a few quirks of our
own regarding how code should be written :-) |
[
0.031542435,
-0.001205455,
-0.035481595,
-0.018411912,
-0.020804586,
-0.020454438,
0.053601716,
0.0067731617,
0.021738311,
0.012722019,
-0.023241028,
-0.0062661776,
0.022409428,
-0.06145085,
-0.00030250355,
0.049312413,
0.0030072548,
-0.03994597,
-0.04610273,
0.01982709,
0.026013026,
-0.010774325,
-0.07096319,
-0.01601924,
-0.010409588,
0.015669093,
0.03203848,
-0.01933105,
0.083743565,
0.02481669,
-0.03565667,
0.024451954,
0.018441092,
-0.00881204,
-0.032972205,
-0.03752412,
-0.024466543,
-0.03781591,
-0.029105995,
-0.046773843,
0.02398509,
-0.021081785,
0.050100245,
-0.016938375,
-0.04613191,
0.017769976,
-0.0014416222,
-0.03224273,
-0.0041908254,
-0.037028078,
-0.021840438,
-0.0019495181,
-0.010307461,
0.05987519,
-0.025589932,
-0.014297682,
-0.015494018,
0.01543566,
-0.04242618,
0.006594441,
0.048962265,
0.05765759,
-0.03448951,
-0.05456462,
0.011700756,
0.020921301,
0.00405952,
-0.018266018,
-0.0036564863,
-0.020293955,
-0.051588368,
0.022920059,
-0.011284956,
-0.03831195,
0.016427744,
-0.019987576,
-0.0024619733,
-0.021607006,
0.02124227,
0.053047318,
0.012948155,
0.03198012,
-0.010300167,
0.018353555,
-0.015917113,
-0.028537005,
0.04522736,
-0.006459488,
-0.0038114993,
-0.049516663,
0.0059853303,
0.045548327,
-0.02318267,
0.0272969,
0.036794648,
0.04411856,
-0.006543378,
0.045402434,
-0.01184665,
-0.01144544,
0.033439066,
0.056986474,
-0.033293173,
-0.00092460774,
-0.01903926,
-0.013524439,
-0.0074041565,
-0.00086852943,
0.006605383,
-0.02453949,
-0.022701217,
-0.008782862,
0.007411451,
-0.0056789517,
-0.02259909,
0.04443953,
-0.005704483,
0.01877665,
-0.06045877,
-0.038224414,
-0.011649692,
-0.009898956,
-0.0037148441,
-0.035335697,
0.04195932,
-0.025692059,
0.0041981204,
0.05573178,
-0.0031057335,
-0.011926892,
0.010190746,
0.006299004,
0.048582938,
0.039274856,
-0.009329966,
-0.011277661,
-0.010132387,
-0.005208441,
0.01600465,
-0.018382734,
-0.014144492,
0.0026261047,
0.039099783,
0.07860807,
0.024481133,
0.014735365,
0.016777892,
-0.061684284,
-0.025006354,
0.002797531,
-0.014108018,
0.028361931,
-0.006627267,
0.035335697,
-0.036853004,
0.017273935,
-0.0036510152,
0.004551915,
0.00620782,
0.0056570675,
-0.017186398,
0.011117177,
-0.031659152,
0.06261801,
-0.006795046,
0.02233648,
0.0009774945,
0.013677629,
0.024714563,
-0.036473677,
-0.06366845,
-0.016865429,
-0.02262827,
0.047007274,
0.03139654,
0.051413294,
0.037961803,
-0.014377924,
-0.005332452,
0.0031367363,
0.0040230467,
-0.009811419,
0.00028996574,
0.03749494,
-0.024233112,
-0.016996734,
0.021358985,
-0.00787102,
0.005193852,
-0.017697029,
-0.012714724,
0.052084412,
-0.027632458,
-0.002423676,
-0.037465762,
0.014713481,
-0.02949991,
-0.012050903,
0.007812662,
-0.020746227,
-0.056986474,
0.0751066,
-0.022438606,
0.04826197,
0.0061458144,
-0.05188016,
-0.013816229,
0.013852702,
-0.014968798,
0.007396862,
0.04195932,
0.015012566,
-0.006776809,
-0.04750332,
0.006536083,
-0.024218522,
0.0065397304,
0.031133931,
-0.03139654,
0.015508608,
0.028726669,
0.027807532,
0.0518218,
0.020527385,
0.013896471,
0.0067512775,
0.0047087516,
0.016106777,
-0.027501153,
-0.015639912,
0.0121603245,
0.008607788,
0.03335153,
0.046744663,
0.028449468,
0.018003408,
0.060633842,
0.013823524,
0.014217439,
-0.006703862,
0.036269426,
0.01572745,
0.01847027,
0.0014124431,
0.027355257,
-0.010825387,
-0.006072867,
-0.02229271,
0.0044570835,
0.021650774,
-0.060517125,
0.04735742,
0.040091865,
-0.00035516242,
-0.031309005,
-0.029966773,
-0.00018328022,
0.03060871,
-0.020337723,
-0.05269717,
0.016996734,
0.011985251,
0.0051610256,
-0.02097966,
0.033001382,
0.073589295,
-0.031279825,
-0.01793046,
-0.024597848,
-0.051354937,
-0.018324375,
-0.029660394,
-0.06641127,
0.014122608,
-0.024437364,
-0.005937915,
0.0021720075,
-0.035685845,
-0.005266799,
-0.011408966,
-0.014421692,
0.0035744205,
-0.016048418,
0.039479107,
0.038487025,
-0.0005931532,
-0.027136415,
0.032417804,
-0.027311489,
0.016369386,
0.0030893204,
-0.014983387,
-0.0028814205,
0.010628429,
0.010001082,
0.033176456,
-0.035452414,
-0.031921763,
-0.04333073,
0.022190586,
-0.027121827,
-0.027982606,
0.021110965,
0.019564481,
0.0037750257,
0.009548808,
-0.0002562276,
-0.039566644,
0.058299527,
0.04356416,
-0.0058467304,
-0.0119633665,
-0.0082576405,
0.02866831,
-0.022263533,
0.06372681,
0.07335586,
0.018076355,
-0.04193014,
-0.022555321,
-0.04300976,
0.032913845,
0.010110503,
-0.03116311,
0.016033828,
0.06973767,
-0.03005431,
-0.049020622,
-0.01706968,
-0.012065493,
-0.037378225,
-0.008403535,
-0.021358985,
0.04020858,
0.03288467,
0.03556913,
-0.026538247,
0.018586986,
-0.0023179022,
-0.003512415,
0.008622377,
-0.015406481,
0.032184374,
0.04303894,
-0.02398509,
0.005047957,
0.028639132,
-0.06944588,
0.016354797,
-0.005533057,
-0.001713351,
0.016777892,
0.005864967,
-0.0043403674,
-0.021679955,
0.0710799,
-0.05608193,
0.009125714,
0.02235107,
-0.0008689854,
0.040704623,
0.025050122,
-0.014290387,
-0.0060181567,
-0.06413531,
-0.021198502,
0.009541514,
0.010300167,
0.0755151,
-0.045052286,
0.022774164,
-0.0017425299,
-0.030696247,
0.011977956,
-0.030200206,
-0.061159063,
0.043389086,
0.044293635,
0.00938103,
-0.01199984,
0.014100724,
0.00896523,
-0.008301409,
0.002042526,
0.036882184,
0.016880019,
-0.05027532,
-0.023095133,
-0.02205928,
-0.0068388144,
0.0154648395,
-0.015712861,
-0.021067197,
0.0131597025,
-0.0106576085,
-0.038720455,
0.018645344,
0.0606922,
0.053047318,
0.008498367,
0.06594441,
0.018411912,
0.011540271,
0.044906393,
0.0018008879,
-0.00964364,
-0.048933085,
0.032096837,
0.01543566,
-0.025531575,
-0.005602357,
-0.012065493,
-0.0044680256,
0.045023106,
-0.012867914,
-0.013903766,
-0.0261881,
0.000014525357,
0.0026261047,
0.021825848,
-0.06903738,
-0.026100563,
-0.04333073,
0.014968798,
0.060633842,
-0.028901743,
-0.0011297722,
-0.042542897,
-0.02980629,
0.003858915,
0.004194473,
-0.035627488,
-0.0022595443,
0.0289601,
-0.05188016,
0.071254976,
0.02925189,
0.0042601256,
-0.0022887234,
-0.09010457,
0.025575344,
0.011270367,
-0.015887935,
0.0032206257,
0.031338185,
-0.0031312653,
-0.016938375,
0.022380248,
0.006317241,
-0.004314836,
0.0248021,
-0.00049239467,
-0.022015512,
-0.027355257,
-0.027997196,
-0.0336725,
0.0053288043,
0.008440009,
0.041404918,
0.044031024,
-0.024408186,
0.023926733,
0.091680236,
-0.01517305,
-0.035598308,
-0.003317281,
0.045373254,
-0.004847352,
0.043418266,
0.018397324,
-0.036473677,
0.03203848,
0.01033664,
0.004205415,
-0.010037556,
0.009935429,
0.0044497885,
0.01795964,
-0.008505662,
0.0031458547,
-0.045023106,
0.019418586,
0.00041511605,
-0.012977335,
-0.01297004,
-0.0496042,
-0.023824606,
0.0060911044,
0.0045555625,
-0.0023926732,
0.033293173,
0.004234594,
0.045694225,
-0.0121603245,
-0.019389408,
-0.048699655,
-0.02287629,
0.018280607,
0.057161547,
0.016617408,
0.052347023,
-0.008804746,
-0.008651556,
-0.002844947,
-0.01793046,
0.0076813563,
-0.01845568,
0.0066783302,
0.001488126,
-0.0069956514,
-0.00011027588,
-0.0075646406,
-0.009060062,
-0.044060204,
0.0049275937,
-0.011416261,
0.007422393,
-0.018659933,
-0.050975613,
0.014903145,
-0.027661636,
-0.04939995,
-0.0035780678,
0.0015774865,
0.046044372,
0.03664875,
0.03174669,
-0.035715025,
-0.058153633,
-0.035598308,
0.0076886513,
-0.06407696,
0.0036546625,
-0.036356963,
-0.025225196,
0.009862483,
0.05325157,
0.016092187,
-0.025166837,
-0.004621215,
-0.03556913,
0.01901008,
-0.06506904,
-0.02954368,
-0.013911061,
0.02207387,
-0.045081466,
0.03749494,
0.0037750257,
-0.0055512935,
-0.01625267,
0.0025294495,
0.042134393,
-0.0006847933,
-0.015917113,
-0.010963988,
0.030316921,
0.00017119832,
-0.019783322,
0.039099783,
-0.022278123,
0.043272372,
-0.023941321,
0.026406942,
-0.051150687,
-0.03361414,
-0.03965418,
-0.028916331,
0.042893045,
-0.0457234,
-0.01599006,
-0.018120123,
0.01366304,
0.011015051,
0.037436582,
-0.040237762,
-0.014516524,
-0.07428958,
-0.005554941,
0.047561675,
-0.036619574,
0.0010622959,
-0.029193532,
-0.01765326,
0.07726584,
-0.02588172,
0.007418746,
0.05456462,
-0.02013347,
0.0007244584,
-0.06267637,
0.057891022,
0.010672198,
0.036619574,
-0.03119229,
0.012029019,
-0.0286829,
0.020075113,
-0.06857052,
-0.051734265,
-0.00669292,
0.025546163,
0.047036454,
-0.021038016,
-0.0009223281,
-0.0072764987,
-0.039479107,
-0.045898475,
0.0303461,
0.007849135,
0.005285036,
0.021738311,
0.050596286,
-0.0007910229,
0.002007876,
-0.014866671,
-0.0109566925,
-0.03340989,
0.064660534,
-0.012211387,
-0.042367823,
0.024320649,
0.008782862,
-0.02261368,
-0.057482515,
-0.031017216,
0.015523197,
-0.073064074,
0.010241808,
0.004314836,
-0.006652799,
-0.030900499,
0.03717397,
0.049224876,
0.0069956514,
-0.04134656,
0.019053848,
0.014545702,
-0.008629672,
0.027107237,
0.039274856,
-0.013881882,
0.009008998,
-0.0047051045,
0.015800398,
-0.027486563,
0.0038917414,
0.08829548,
-0.018630754,
0.04446871,
0.036823824,
-0.004847352,
0.028945511,
0.0117591135,
-0.02700511,
0.01793046,
-0.031279825,
-0.029135173,
-0.016223492,
0.048349507,
0.011525682,
0.01682166,
-0.03781591,
0.010234514,
0.019083029,
0.022175996,
-0.01021263,
-0.057219904,
0.034810476,
-0.020994248,
-0.03227191,
-0.00085348403,
-0.008031504,
-0.013677629,
0.022555321,
-0.015610734,
-0.04963338,
0.03308892,
0.03504391,
-0.0031932704,
-0.0037075493,
-0.029718753,
0.020906713,
-0.05765759,
-0.025823364,
-0.0013695866,
-0.0200897,
0.018047176,
0.026800858,
0.01874747,
-0.011569451,
0.011481914,
0.05757005,
-0.0070685986,
0.010307461,
-0.022482375,
-0.00034923546,
-0.008374357,
-0.035073087,
-0.043476623,
0.015552376,
0.014691597,
-0.022219764,
0.03749494,
0.04333073,
-0.007075893,
-0.013247239,
0.0002728687,
0.052288663,
-0.035364877,
0.02207387,
-0.021607006,
0.015887935,
-0.023824606,
0.014450871,
-0.005693541,
-0.011503798,
-0.030229384,
0.059991904,
0.015304355,
0.022161406,
0.03641532,
0.0034722942,
-0.014407103,
0.010066735,
0.016092187,
-0.0011087998,
0.04105477,
-0.021636186,
0.030696247,
-0.030754605,
0.011554861,
0.047620032,
-0.021957153,
0.021052606,
0.0092570195,
-0.022205174,
-0.03338071,
0.025254374,
0.05150083,
0.051442474,
-0.0030874969,
-0.020498207,
0.011204714,
-0.0006875288,
-0.022832522,
0.0025805128,
-0.058853924,
-0.05596521,
0.015129281,
0.008337882,
0.019403996,
-0.0248021,
-0.00895064,
0.014582177,
0.013495261,
-0.0015127457,
0.046540413,
0.008228461,
0.00016698106,
0.01172264,
-0.04546079,
-0.027617868,
-0.032446984,
0.02039608,
-0.026363173,
-0.03198012,
0.046219446,
0.01075244,
-0.0063026515,
-0.021898797,
-0.009344556,
-0.013743281,
0.0073749777,
0.034868836,
-0.041288204,
0.015975472,
-0.03556913,
0.039245676,
-0.046540413,
0.005120904,
-0.02456867,
0.020804586,
0.006634562,
0.016894607,
0.043768413,
0.03994597,
0.01518764,
0.0049531255,
0.025560753,
0.038720455,
0.040500373,
-0.0042710677,
0.008104451,
-0.009701998,
0.036532037,
0.02261368,
0.032213554,
0.013188882,
0.026727911,
0.03831195,
-0.014013187,
-0.024291469,
0.03224273,
0.006543378,
-0.0054382253,
0.0017717088,
-0.002682639,
0.015771218,
0.029879237,
0.00400481,
0.042542897,
-0.004850999,
-0.009162188,
-0.0009391972,
-0.025473217,
0.01158404,
-0.0073166196,
-0.049166515,
0.002890539,
0.033730857,
0.0101542715,
0.001546484,
0.04169671,
0.024699975,
0.0261881,
0.030287743,
0.013429608,
0.0085567245,
-0.0034777652,
0.0121603245,
-0.0228617,
-0.011336019,
-0.025808774,
-0.03854538,
-0.041142307,
0.011890419,
-0.053076494,
0.040996414,
-0.0236933,
-0.01655905,
0.020571154,
-0.056052748,
-0.04551915,
-0.057161547,
0.020483617,
-0.020819176,
-0.01575663,
-0.0067075095,
-0.0029160704,
-0.04735742,
0.031688333,
-0.018324375,
0.03638614,
0.013196177,
0.01763867,
-0.003328223,
0.03641532,
0.044614602,
0.010409588,
0.024481133,
0.00799503,
-0.049458306,
0.004015752,
-0.007834546,
0.0033118099,
-0.00811904,
-0.039099783,
-0.09238053,
0.011394377,
0.018718291,
-0.040675446,
-0.03664875,
0.0069445884,
0.021271449,
-0.04750332,
0.010635724,
0.055615064,
-0.019199744,
-0.027486563,
0.0015820458,
0.011729934,
-0.04963338,
-0.058270346,
-0.03965418,
-0.0039610416,
-0.006999299,
-0.067520075,
-0.014655123,
-0.040121045,
0.0105554825,
-0.015829576,
-0.013166998,
-0.0019987575,
0.03253452,
0.0040522255,
0.04020858,
0.015537786,
-0.043184835,
-0.020206418,
0.01407884,
0.06372681,
0.016704945,
0.10632806,
0.042776328,
-0.004413315,
-0.0024656206,
-0.0056461254,
0.03556913,
-0.008914167,
0.02373707,
-0.02097966,
0.0018911602,
-0.033555783,
-0.06851216,
-0.025502395,
0.03591928,
0.017769976,
-0.056402896,
-0.014815608,
-0.011372493,
-0.052843064,
-0.012904387,
-0.013130524,
-0.0011106235,
0.007922083,
-0.002162889,
0.01253965,
-0.050041884,
0.25444037,
0.049545843,
0.028741257,
0.009782241,
0.021431932,
0.018149301,
0.0033191047,
0.00853484,
0.032213554,
-0.05266799,
0.017419828,
-0.029645804,
0.0248021,
0.033584964,
-0.019681197,
0.04776593,
-0.056140285,
0.009636345,
-0.016675765,
-0.034051824,
-0.06255965,
0.03472294,
0.023518227,
0.03250534,
0.033555783,
0.011926892,
0.01350985,
-0.03116311,
-0.051121507,
-0.0579202,
0.050041884,
-0.019418586,
0.033497427,
-0.0401794,
-0.022263533,
0.002624281,
-0.042134393,
-0.04937077,
-0.011503798,
0.017988818,
-0.009942724,
-0.016661176,
0.04522736,
0.002808473,
0.0036838413,
0.02236566,
-0.04055873,
0.02481669,
0.001321259,
-0.016704945,
0.020235596,
-0.048086897,
0.03638614,
-0.03714479,
-0.029208122,
-0.03475212,
-0.018324375,
-0.07376437,
-0.032972205,
-0.03942075,
-0.004562857,
-0.003594481,
-0.03148408,
0.0020334076,
-0.03037528,
0.040704623,
-0.03227191,
0.020935891,
-0.022672039,
-0.03419772,
-0.020323133,
0.018718291,
0.00040759335,
-0.014531113,
-0.0066199726,
0.013670335,
0.005215736,
0.034314435,
-0.007929377,
-0.004522736,
-0.015858755,
0.020994248,
-0.0097603565,
-0.029835468,
0.041200668,
0.028026374,
-0.033468246,
-0.01903926,
0.022905469,
0.035102267,
0.029178942,
0.014567587,
-0.00648502,
-0.026654964,
-0.04522736
] | Overview of tokenizers
Not quite ready yet :-( This section will be added soon!
Step-by-step recipe to add a model to 🤗 Transformers
Everyone has different preferences of how to port a model so it can be very helpful for you to take a look at summaries
of how other contributors ported models to Hugging Face. Here is a list of community blog posts on how to port a model:
Porting GPT2 Model by Thomas
Porting WMT19 MT Model by Stas |
[
0.044197835,
-0.009570749,
-0.023986317,
-0.016392136,
-0.0070331628,
0.017566187,
0.025635934,
-0.00040984983,
-0.0040088654,
0.071750894,
0.037331864,
0.01707576,
0.019052329,
-0.054363042,
-0.0341218,
0.03572683,
-0.007226361,
-0.03510265,
-0.07389093,
0.0058405343,
0.02759764,
0.0068956944,
-0.08405614,
-0.03917468,
-0.023822842,
-0.010172635,
0.011354118,
-0.024729388,
0.05023157,
0.051747434,
-0.0050120107,
-0.02086542,
0.03973941,
-0.024521329,
-0.0033066638,
-0.015619343,
0.009964576,
-0.021118065,
-0.029678237,
-0.007382406,
0.03106035,
0.008597326,
0.033111222,
-0.045267858,
-0.048685983,
0.016897423,
0.03003491,
0.0024688519,
0.016615057,
-0.041552506,
-0.012171496,
0.02160849,
0.024922585,
0.0059965793,
-0.045267858,
-0.0106927855,
0.018903714,
-0.035221543,
-0.02496717,
-0.0021028896,
0.056621976,
0.0126173375,
-0.016050324,
-0.054511655,
0.00074307056,
0.025204953,
-0.02486314,
0.0017137064,
0.0063978373,
-0.019631924,
-0.02474425,
-0.012186357,
-0.030332139,
-0.036796853,
-0.010224651,
0.021400431,
0.041285,
0.01685284,
-0.037153527,
0.037034635,
-0.0015799537,
0.022396145,
-0.008040023,
-0.011510163,
-0.038728837,
-0.0231838,
0.031892586,
-0.058375623,
-0.017729662,
-0.034894593,
0.0075681736,
0.015782818,
-0.0019208373,
0.009979437,
0.02614122,
0.042681973,
-0.024357852,
0.028682522,
0.008270375,
-0.0063086688,
0.03159536,
0.08025162,
-0.010313819,
0.011881698,
-0.034805425,
0.00853045,
0.008738509,
0.012736229,
-0.014608767,
-0.04446534,
-0.033557065,
0.014504737,
-0.019780537,
-0.0060188714,
-0.021014035,
0.032160092,
0.015976017,
0.048299585,
-0.04069054,
0.0017490023,
0.044316728,
-0.0071260463,
-0.007248653,
-0.027894868,
0.02802862,
-0.003145046,
-0.0046181832,
0.04642705,
-0.028400157,
-0.018888853,
0.026274974,
-0.023540474,
-0.007553312,
0.06592522,
-0.009630194,
0.029009474,
-0.022990603,
0.017016316,
0.031119794,
-0.02116265,
0.012260664,
-0.009347827,
0.020523608,
0.0785277,
0.012156634,
-0.048923764,
0.031446744,
-0.0121343415,
-0.028771691,
0.001418336,
-0.0491021,
-0.006754511,
-0.0050231568,
-0.017952584,
0.004930273,
-0.008418989,
0.005142048,
-0.013665067,
-0.00013247554,
0.021400431,
0.008976292,
-0.003559308,
-0.023377,
0.054957498,
-0.010417849,
0.027746255,
-0.009548456,
-0.031268407,
0.0032565068,
-0.029589068,
0.026809985,
0.0024391292,
0.014616198,
0.02192058,
0.06182347,
0.031327855,
0.032932885,
0.013427285,
0.01937928,
0.006048594,
-0.004280086,
0.025888577,
0.052222997,
0.02654248,
0.04699178,
-0.018101199,
-0.025517043,
0.02495231,
-0.011785098,
0.014259524,
0.018829407,
0.03340845,
-0.010076037,
0.023436446,
-0.044168115,
0.023778258,
-0.044405896,
0.006858541,
-0.0041054646,
-0.046189263,
-0.026319558,
0.037629094,
-0.03382457,
0.030673953,
-0.051539373,
0.019245528,
0.007928562,
0.021578768,
0.011339257,
0.049042657,
0.019498171,
-0.019810261,
-0.03370568,
-0.02727069,
0.01695687,
-0.008968862,
-0.048418477,
0.0341218,
0.013152349,
-0.01738785,
0.02854877,
0.02707749,
0.0125356,
-0.016392136,
-0.00074725033,
-0.06283405,
-0.017477019,
0.030584784,
0.036172673,
0.0041649104,
0.02455105,
0.034300137,
-0.02727069,
0.046754,
0.032992333,
0.0003796626,
0.0351621,
0.039650243,
0.030391585,
-0.009020876,
0.0019709945,
-0.015931433,
0.0054392763,
0.030733397,
0.02275282,
-0.01200802,
0.013746805,
-0.0006543665,
-0.013984588,
0.01284769,
-0.049637113,
0.07377204,
0.028296126,
-0.0060523096,
-0.02927698,
0.0011712649,
0.029871436,
0.012966581,
-0.032041203,
-0.010499586,
0.039055787,
0.016793394,
-0.026319558,
-0.028875722,
0.021207234,
0.046397325,
-0.007824533,
0.03846133,
0.013746805,
-0.03908551,
-0.026572203,
-0.021236956,
-0.07091865,
-0.02654248,
-0.05644364,
-0.03474598,
0.06949196,
-0.02392687,
0.026988322,
-0.021296402,
0.006687635,
0.015931433,
-0.04226585,
0.0600401,
0.022931157,
0.016466442,
-0.062952936,
0.033378728,
-0.018621348,
0.01917122,
0.038282994,
-0.00039336298,
0.029425593,
-0.04036359,
0.016882563,
0.010038883,
-0.0043209554,
-0.031743973,
-0.0330815,
0.01042528,
-0.0059817177,
-0.002842245,
-0.0032230685,
-0.01105689,
-0.03878828,
0.028147511,
0.040839158,
-0.044643678,
0.055373617,
0.052817453,
-0.01600574,
0.038520776,
-0.009711932,
0.0009492726,
-0.029366149,
0.040304147,
0.0381641,
0.017729662,
-0.033140946,
-0.043127812,
-0.019304972,
0.005309239,
-0.012602476,
-0.023050047,
-0.003990289,
0.038104657,
-0.01136898,
-0.048626535,
0.019245528,
-0.04086888,
-0.013962296,
-0.0021419008,
0.0009687782,
0.029455315,
0.008619619,
0.026869431,
-0.036826577,
-0.03486487,
-0.022188086,
0.030703675,
0.023585059,
-0.044346448,
0.02897975,
-0.0064424216,
0.006594751,
-0.012260664,
0.02475911,
-0.051242143,
-0.007118616,
-0.0027512186,
0.02917295,
0.010157774,
0.0011796245,
0.017506743,
-0.0012752948,
0.029024335,
-0.026557341,
0.029425593,
0.007988009,
0.05370914,
0.015961155,
0.044257283,
0.01284769,
-0.0145493215,
-0.043960053,
-0.007616473,
-0.014616198,
0.025472458,
0.027582778,
-0.02854877,
0.011569608,
-0.055254724,
-0.0011508305,
-0.019052329,
-0.023525612,
-0.02391201,
0.028474463,
0.016942007,
0.06253681,
-0.026304698,
-0.08286723,
0.059683427,
0.02621553,
0.038193826,
0.027003184,
0.030465892,
-0.023986317,
0.01073737,
-0.025115784,
0.013605622,
0.0351621,
-0.012074896,
-0.002628612,
-0.033794846,
-0.01631783,
-0.02117751,
0.023614781,
0.034419026,
0.020300686,
0.029381009,
0.02043444,
-0.01285512,
0.013494161,
0.02519009,
-0.038491055,
-0.0545711,
-0.052104108,
0.04972628,
0.024922585,
0.01813092,
0.0034422742,
0.0041389028,
0.0060448786,
-0.008448712,
-0.025204953,
0.008879693,
-0.037658814,
0.011287241,
0.013442146,
0.06467686,
-0.031327855,
-0.035548493,
-0.034181245,
0.04413839,
0.042206407,
-0.050647687,
-0.007605327,
-0.010841399,
0.018621348,
0.011956005,
-0.035280988,
-0.04066082,
-0.0050008646,
-0.0046924907,
-0.047734853,
0.0063161,
0.04791319,
-0.04054193,
0.030911734,
-0.022633929,
-0.006717358,
-0.012089757,
-0.042206407,
-0.0087608015,
0.0053352467,
-0.00563619,
0.0031431883,
-0.018784823,
-0.033349007,
0.0028701099,
0.046724275,
-0.031238686,
0.006594751,
-0.01643672,
-0.013887988,
-0.020776253,
0.00063625415,
0.0071074697,
0.021043757,
0.008887123,
-0.020583054,
-0.0070963237,
0.030049773,
-0.024402436,
-0.049964063,
0.00078022404,
0.021043757,
-0.02614122,
0.057246156,
-0.006535305,
-0.017997168,
0.018710516,
0.027047768,
-0.03159536,
-0.01464592,
-0.03325984,
0.0066616274,
-0.013189502,
-0.018353842,
0.0250712,
-0.056830034,
0.04381144,
-0.008366974,
-0.030361863,
0.027790839,
-0.087503985,
-0.003364252,
-0.008292668,
0.008493296,
0.010128051,
0.018264674,
-0.024506466,
-0.015827402,
0.0036930605,
0.014140632,
-0.013932573,
-0.053976644,
-0.008456143,
0.06099123,
-0.000032393233,
0.043008924,
-0.0053909766,
-0.04351421,
0.026869431,
-0.0026731964,
0.038996343,
0.014653351,
-0.008879693,
0.019780537,
0.0013561037,
-0.06206125,
0.02033041,
-0.0150323175,
-0.016139492,
0.0018957587,
-0.010455002,
0.0015307253,
-0.014683074,
-0.045030076,
0.043425042,
-0.022604207,
-0.06271515,
-0.020479023,
0.014653351,
-0.013174641,
-0.0069402787,
0.009875407,
-0.01327124,
-0.064320184,
-0.016481305,
0.039234124,
-0.056830034,
0.009912561,
-0.03896662,
-0.04604065,
0.008485866,
-0.018086337,
0.019096913,
-0.06372573,
0.0139028495,
-0.04785374,
0.039531354,
-0.043425042,
-0.0074752895,
-0.019527894,
0.01043271,
-0.004205779,
0.05046935,
-0.0045252996,
-0.0077873794,
0.013620483,
0.010841399,
0.02391201,
0.034894593,
-0.038372163,
-0.004993434,
0.022217808,
0.034894593,
-0.017120345,
0.0071483385,
0.007869117,
0.0022254963,
-0.012595045,
0.022381285,
-0.016823117,
-0.048180696,
0.0050008646,
-0.021519322,
0.05825673,
-0.056919202,
0.040066365,
-0.015574759,
0.001371894,
-0.022515038,
-0.0070405933,
0.009645056,
0.0024521328,
-0.042503636,
-0.07062142,
0.030852288,
-0.024729388,
0.016020602,
-0.027255828,
-0.00832239,
0.06961085,
-0.031743973,
0.021757105,
0.06699524,
0.027835423,
0.020984313,
-0.038045213,
0.04835903,
0.038401887,
-0.011302103,
-0.0062009236,
0.023897149,
-0.044940908,
0.00916206,
0.020568192,
-0.03317067,
-0.0056176134,
0.02590344,
0.0049674264,
0.03003491,
0.048507646,
-0.007129762,
-0.037094083,
-0.030391585,
0.045773145,
0.015916571,
0.019617062,
0.017848555,
0.009332966,
-0.012491016,
0.033646233,
0.0037004913,
-0.026705956,
-0.007831964,
0.038818005,
0.0002503219,
-0.008954,
-0.01369479,
0.017001454,
-0.037480477,
-0.057424493,
-0.009288382,
0.0170609,
-0.015767956,
-0.009615333,
-0.02359992,
-0.0060931784,
-0.036053784,
0.00095948984,
0.0010310104,
-0.004280086,
-0.016243521,
-0.022024611,
-0.043157537,
-0.05706782,
0.03644018,
0.043870885,
-0.06527132,
-0.027196381,
-0.0119782975,
-0.011651346,
-0.021355847,
-0.0027586494,
0.07246424,
-0.0031413308,
0.03771826,
0.03973941,
-0.009273521,
0.069254175,
-0.021073481,
0.010194927,
0.030584784,
-0.040571652,
-0.042295575,
-0.028073205,
0.0074121286,
-0.01780397,
0.0057885195,
0.017328406,
0.0004256401,
0.0058516804,
0.038580224,
-0.038491055,
-0.09428079,
0.0068511106,
-0.03825327,
-0.040066365,
0.022188086,
0.012097188,
-0.009749086,
0.032605935,
-0.0047370745,
-0.032724828,
-0.038431607,
0.031268407,
-0.019557616,
0.02834071,
-0.051687986,
0.01243157,
-0.04265225,
-0.025086062,
-0.040096086,
-0.028147511,
-0.020731669,
-0.02581427,
0.01939414,
-0.0064721443,
-0.013858265,
0.009347827,
0.011881698,
-0.006992294,
-0.020508748,
0.013954865,
-0.021504462,
0.0066504814,
0.008998584,
0.027761115,
0.006698781,
-0.017937724,
0.046754,
-0.0252644,
-0.022633929,
-0.011183212,
-0.017937724,
0.027657086,
-0.027359858,
0.0036187535,
0.0011916994,
0.021980027,
-0.06437963,
0.017105484,
-0.008931708,
-0.033943463,
-0.014764812,
0.011443286,
-0.0075904657,
0.05403609,
-0.012483585,
0.03498376,
0.016511027,
0.024833417,
0.02254476,
0.023079772,
0.012446431,
0.043395318,
-0.041195832,
-0.03593489,
0.009384981,
-0.028310988,
-0.044049222,
0.02519009,
0.011287241,
-0.021519322,
-0.031862866,
0.03783715,
-0.003930843,
0.05543306,
0.021578768,
-0.041433614,
-0.0121343415,
-0.012713937,
-0.030391585,
0.0019654215,
-0.060218435,
-0.0231838,
0.007018301,
-0.068659715,
-0.008575034,
-0.052222997,
-0.0062975227,
0.018175505,
0.047556516,
-0.0028273833,
-0.01662992,
0.0025171514,
-0.012349833,
0.017209513,
-0.053679414,
-0.0076833493,
-0.00019761032,
-0.012461293,
-0.040304147,
-0.035875447,
-0.017566187,
0.06140735,
-0.011450717,
-0.008693925,
-0.037569646,
-0.00087914534,
-0.000078486824,
0.029960604,
0.011279811,
0.01581254,
-0.04256308,
0.029975466,
-0.022931157,
0.0007518945,
-0.047972634,
0.030941457,
0.054214425,
0.026319558,
-0.020984313,
0.04137417,
-0.013858265,
-0.046605386,
0.024179514,
0.01991429,
0.08631507,
0.017625634,
0.007720503,
-0.0047482206,
0.010024021,
0.047051225,
0.023243247,
0.03863967,
0.019141497,
-0.010142913,
-0.022054333,
-0.054600824,
0.024536189,
0.044376172,
-0.0007625761,
0.026809985,
-0.021771967,
-0.002128897,
-0.019750815,
0.017417574,
0.008827678,
-0.022931157,
0.02034527,
-0.027092353,
-0.025546765,
0.020835698,
-0.006761942,
0.0017703655,
-0.00050621683,
-0.01348673,
0.08185665,
0.010908276,
0.01011319,
0.016228661,
0.029113503,
0.036707684,
0.009972007,
0.028563632,
-0.028073205,
0.013761667,
0.0027363573,
0.033527344,
-0.015396422,
0.016942007,
-0.009593041,
-0.05320385,
-0.013843404,
0.041968625,
-0.029856574,
0.0017109199,
-0.017194653,
-0.0023833988,
0.0197954,
-0.04847792,
0.024387576,
-0.05552223,
0.0075235893,
0.042503636,
-0.033349007,
-0.05246078,
0.043127812,
-0.00078719034,
-0.012669353,
0.01758105,
0.071810335,
-0.0043543936,
0.07828991,
0.019735953,
0.009890269,
0.022633929,
0.017714802,
-0.01664478,
-0.025606211,
0.011294672,
-0.022559622,
0.03129813,
-0.004971142,
-0.022990603,
-0.006958856,
-0.009258659,
-0.00669135,
-0.07781435,
0.031773698,
0.005034303,
-0.05962398,
0.00426894,
0.05700837,
0.04422756,
0.01789314,
0.014831688,
-0.016555611,
-0.053263295,
0.03979886,
-0.029886298,
-0.01073737,
-0.025056338,
-0.025427874,
-0.017417574,
-0.031654805,
0.018398426,
-0.0052312165,
-0.031446744,
0.0006864114,
0.05109353,
0.015099193,
0.033557065,
0.04256308,
-0.043781716,
-0.026304698,
0.044643678,
0.04327643,
-0.003512866,
0.05549251,
0.057989225,
-0.016198939,
-0.015574759,
-0.015708512,
0.04541647,
-0.019453587,
-0.025368428,
-0.021578768,
-0.014801965,
-0.018799685,
-0.056800313,
-0.038193826,
0.014757381,
-0.011227796,
0.00034877873,
-0.010239512,
-0.040066365,
-0.044078946,
0.028043482,
-0.03739131,
0.0170609,
-0.022188086,
-0.021831412,
0.008352113,
-0.022128642,
0.26488978,
0.06330961,
0.009332966,
-0.018933438,
0.05035046,
0.07823046,
-0.0022347847,
-0.00056798453,
-0.0044918614,
-0.057483938,
-0.0048522507,
-0.025160369,
-0.017982308,
0.027226105,
-0.0137393745,
0.029336425,
-0.08405614,
-0.01695687,
-0.0127808135,
-0.042681973,
-0.03611323,
0.019423865,
0.021846274,
0.04446534,
0.0137393745,
0.010544171,
-0.001773152,
-0.06461742,
0.01948331,
-0.013791389,
0.009451857,
-0.012386986,
0.06140735,
-0.010945429,
0.0053018085,
-0.0029759975,
-0.021727383,
-0.00061907066,
0.00063904066,
-0.005298093,
0.03162508,
-0.030882012,
-0.01674881,
-0.017283821,
-0.0022069195,
0.038045213,
0.00020283504,
0.054689992,
0.029262118,
-0.055700567,
0.051598817,
-0.039055787,
0.018591626,
-0.046783723,
-0.040423036,
-0.0113318255,
-0.009176921,
-0.05611669,
-0.010648201,
0.047170117,
0.008983723,
0.01612463,
-0.017417574,
0.01833898,
-0.009422135,
0.023094632,
-0.031357575,
0.011710792,
-0.032427598,
0.00024173013,
0.0036187535,
0.0002677376,
-0.012141773,
-0.02285685,
0.011777668,
0.028489325,
-0.013613053,
0.063606836,
0.0039865733,
-0.043454766,
0.012164065,
-0.03474598,
-0.009214074,
-0.03676713,
-0.0010755946,
0.047021504,
-0.02380798,
0.018725378,
0.0148688415,
-0.022559622,
0.011339257,
0.06015899,
0.012364694,
0.03117924,
-0.007601612
] |
The forward pass of your model should be fully written in the modeling file while being fully independent of other
models in the library. If you want to reuse a block from another model, copy the code and paste it with a
# Copied from comment on top (see here
for a good example and there for more documentation on Copied from).
The code should be fully understandable, even by a non-native English speaker. This means you should pick
descriptive variable names and avoid abbreviations. As an example, activation is preferred to act.
One-letter variable names are strongly discouraged unless it's an index in a for loop.
More generally we prefer longer explicit code to short magical one.
Avoid subclassing nn.Sequential in PyTorch but subclass nn.Module and write the forward pass, so that anyone
using your code can quickly debug it by adding print statements or breaking points.
Your function signature should be type-annotated. For the rest, good variable names are way more readable and
understandable than type annotations. |
[
0.02675066,
0.02121703,
-0.011569015,
-0.0077126767,
-0.010293126,
-0.014493524,
0.0168446,
-0.008329118,
0.03973892,
0.032341633,
-0.0128234,
0.006662577,
0.023525096,
-0.05077751,
-0.0043437565,
0.04748027,
-0.015855428,
-0.020944647,
-0.032542333,
-0.009561999,
0.026377928,
-0.0185649,
-0.055852395,
0.0068202713,
-0.018063147,
-0.00928245,
-0.0040785437,
0.0032649853,
0.102415174,
0.028284593,
-0.026463943,
0.04489982,
0.027582137,
-0.019726103,
-0.02630625,
-0.034807395,
-0.0016253247,
-0.040828444,
-0.01711698,
-0.04561661,
0.02709472,
-0.019855125,
0.05559435,
0.0017220916,
-0.061701413,
0.018106153,
0.011203451,
-0.027797176,
-0.010995582,
-0.044871148,
-0.0075119752,
-0.0075549823,
0.021432066,
0.030248601,
-0.011303802,
0.001266033,
-0.052411795,
0.021245701,
-0.030678676,
0.0021252867,
0.003544534,
0.010644354,
-0.01900931,
-0.059809085,
0.022836978,
0.016213823,
0.013461345,
-0.009726861,
-0.00269872,
-0.019611416,
-0.06319234,
0.0125940265,
-0.012257135,
-0.023682792,
0.021102343,
-0.010214279,
-0.001946089,
-0.010328965,
0.0056877406,
0.027510459,
0.023840485,
0.015525704,
-0.01519598,
0.010902399,
-0.046820823,
0.0011119228,
0.031309452,
-0.0034334313,
0.013181796,
-0.027080383,
0.017002294,
0.04954463,
-0.021174021,
0.013540192,
0.017977132,
-0.0018233384,
0.023152366,
0.028284593,
0.006157239,
0.014013274,
-0.0052648336,
0.07064697,
-0.028528303,
0.0018170665,
-0.026592964,
0.011224955,
-0.0060855597,
-0.0062826774,
-0.014894928,
-0.04538724,
-0.023152366,
0.012694377,
0.015511368,
-0.020199185,
-0.0493726,
0.039566893,
-0.021446401,
0.02045723,
-0.08744857,
-0.0025661136,
0.029474467,
-0.0021736703,
0.004064208,
-0.028198577,
0.021360386,
-0.008823703,
-0.024743643,
0.06112798,
-0.032771707,
-0.001774059,
0.008321949,
-0.035495516,
0.040971804,
0.042405386,
0.007006637,
-0.0022130937,
-0.021976829,
0.019468058,
0.02616289,
-0.026291912,
0.015697734,
0.012916583,
0.005909946,
0.07798692,
-0.0022184697,
0.043208193,
-0.012852072,
-0.03572489,
-0.019740438,
-0.0015303498,
-0.01650054,
0.022392567,
-0.01674425,
0.04492849,
0.0105870105,
-0.013941595,
-0.022464246,
-0.010085257,
0.031166095,
0.016414525,
-0.025417427,
0.067607775,
-0.035839576,
0.03933752,
-0.016873272,
0.05476287,
0.0039208494,
0.013088613,
0.0092537785,
-0.031137424,
-0.045702625,
0.00353199,
-0.046878166,
0.055364978,
0.051723674,
0.06279094,
0.03767456,
-0.016959287,
-0.00476308,
-0.030707348,
0.014708562,
-0.011483,
0.04108649,
0.024528606,
-0.011776884,
-0.0139272595,
0.018235177,
0.02581883,
0.0058633545,
-0.0128234,
-0.03403326,
0.036671054,
0.01794846,
0.019840788,
-0.063995145,
-0.01571207,
-0.046362076,
0.00035189983,
0.004501451,
-0.012063601,
-0.03971025,
0.059522368,
-0.04243406,
0.064740606,
-0.029302437,
-0.0071822507,
-0.026951361,
0.06548607,
0.00038236348,
0.008307613,
0.048111048,
0.012328814,
0.01354736,
-0.015826756,
0.009583502,
-0.029073063,
-0.0066124015,
-0.0070532286,
-0.019582745,
0.01873693,
0.03850604,
0.022435574,
0.02193382,
0.02237823,
0.026463943,
0.014092121,
0.015267659,
0.046476763,
-0.046218716,
-0.00041977104,
0.013755229,
0.004139471,
0.0063471887,
0.043580923,
0.030822035,
0.019654423,
0.077413484,
0.04114383,
-0.0018457382,
0.0064403717,
0.06600216,
0.013052774,
-0.023295725,
0.029933214,
0.027238077,
0.0074833035,
-0.010336134,
-0.040799774,
0.0029030056,
-0.0032560255,
-0.0493726,
0.037101127,
0.029560482,
-0.024800986,
-0.041344535,
-0.012321646,
0.028198577,
0.03572489,
-0.034893412,
-0.073055394,
0.0041609746,
0.037731905,
-0.008551323,
-0.029818527,
0.03867807,
0.06823855,
-0.039796263,
-0.027252413,
-0.00355887,
-0.0015231819,
-0.010701697,
-0.025073366,
-0.07104837,
-0.008063905,
-0.012701546,
-0.017446706,
0.010880895,
-0.042778116,
-0.013525856,
0.009712525,
-0.017819436,
0.0010312838,
-0.028628653,
0.0442117,
0.019181341,
-0.02045723,
-0.01728901,
0.03953822,
-0.041688595,
0.027424444,
-0.018364199,
-0.029230759,
-0.050892197,
0.003471063,
0.028370608,
0.013447009,
-0.0021503745,
-0.003282905,
-0.04263476,
0.0034280554,
-0.011181948,
-0.04458443,
0.015396682,
0.021174021,
0.02365412,
-0.0022184697,
0.0067306724,
-0.030162586,
0.059292994,
0.046648793,
-0.015296331,
-0.0049494454,
0.00470932,
0.021360386,
-0.021475073,
0.027309757,
0.061529383,
-0.021174021,
0.0031449227,
-0.0031592585,
-0.027395772,
0.025632465,
0.0026646724,
-0.009096084,
0.02065793,
0.060210485,
-0.025216725,
-0.056368485,
0.02331006,
-0.028585646,
-0.030994065,
-0.03021993,
-0.0064547076,
0.00012185456,
0.028542638,
0.03681441,
0.0052935053,
0.021432066,
-0.025231062,
0.0035015265,
0.013317986,
-0.029789856,
0.03297241,
0.0493726,
-0.026965696,
-0.0096408455,
0.011067261,
-0.022578932,
-0.018650915,
-0.00893839,
0.044125684,
0.055565678,
0.0019245852,
0.030650005,
0.0069600455,
0.05401741,
0.001944297,
0.028427951,
0.04455576,
0.033087097,
0.0112106195,
0.014966607,
0.008895382,
0.010199944,
-0.04300749,
0.0018457382,
0.031166095,
0.021088006,
0.08268907,
-0.06342171,
0.0017113397,
-0.009755532,
-0.04438373,
0.0041538067,
-0.038907442,
-0.035466842,
0.045301225,
0.025259733,
0.0068668625,
-0.053042572,
0.0077198446,
0.042176012,
-0.017647406,
0.022134522,
0.047766987,
-0.0020303119,
-0.04114383,
-0.012457836,
-0.014292823,
0.026033867,
0.01316746,
-0.03764589,
-0.008300446,
0.039996967,
-0.044154357,
-0.059292994,
-0.0044297716,
0.047021523,
0.014084953,
-0.0068668625,
0.048942525,
0.034635365,
0.021102343,
0.059637055,
0.003302617,
-0.033373814,
-0.04297882,
0.03211226,
0.012421997,
-0.015468361,
-0.004139471,
-0.050978214,
-0.00524333,
-0.0038169147,
0.0010321798,
-0.008924054,
-0.0315675,
-0.01010676,
-0.013475681,
0.032513663,
-0.04008298,
0.009913227,
-0.043294206,
0.0076553333,
0.023568105,
-0.00941864,
-0.034348648,
-0.047422927,
-0.009332625,
0.049659315,
-0.0032416896,
-0.03764589,
0.022077179,
0.01667257,
-0.04699285,
0.055909738,
0.04535857,
0.008350621,
-0.007834531,
-0.061873443,
0.011353978,
-0.0029728927,
-0.03366053,
-0.011117436,
0.0062540057,
0.0023152365,
0.027969204,
-0.01381974,
-0.0123574855,
0.016041795,
0.017848108,
-0.00811408,
0.00041551507,
0.011153276,
0.017719086,
0.013891419,
-0.0041036312,
-0.0038169147,
0.031538825,
0.03300108,
-0.012558187,
0.0043365886,
0.07643864,
-0.02417021,
-0.0145006925,
0.014106457,
0.008171423,
-0.030764692,
0.04696418,
-0.0024765148,
-0.04039837,
0.010809216,
0.008128416,
-0.003462103,
0.0004995141,
-0.0052576656,
-0.0005295297,
-0.0052899215,
-0.024815323,
-0.020342544,
-0.027897526,
0.033287797,
0.01622816,
-0.0039459374,
-0.00067020004,
-0.016830266,
-0.028815018,
-0.0016100929,
-0.0354095,
0.016686907,
0.026635973,
0.00807824,
0.029130407,
-0.03572489,
-0.026234569,
-0.043609597,
-0.018278183,
0.027782839,
0.04148789,
0.0039925287,
0.021346051,
-0.015941443,
-0.0057809236,
0.004902854,
-0.04383897,
-0.026908353,
0.0034889826,
0.014256983,
0.012608362,
0.016357182,
-0.0070532286,
-0.026105547,
-0.01794846,
-0.054074753,
0.013676382,
-0.023195373,
0.017891116,
-0.033545844,
-0.03810464,
0.020600587,
-0.0063005975,
-0.04183195,
-0.0031485066,
-0.003988945,
0.044842478,
0.029202087,
0.040627744,
-0.04022634,
-0.062446877,
-0.04541591,
0.01883728,
-0.027266748,
-0.011698037,
-0.023252716,
-0.03933752,
-0.008372125,
0.054160766,
0.042204686,
0.00050265004,
0.014622547,
-0.02272229,
0.015583048,
-0.08893949,
-0.023281388,
-0.011009918,
-0.0083434535,
-0.035782233,
0.024284896,
-0.0071213236,
-0.010472324,
-0.051924378,
-0.007157163,
0.060497202,
-0.03282905,
0.0021109509,
-0.037273157,
0.0123574855,
0.025288405,
-0.015697734,
0.020012818,
-0.041688595,
0.062217504,
-0.033029754,
0.004806087,
-0.029675169,
-0.03420529,
-0.025446098,
-0.05126493,
0.039681576,
-0.043752953,
0.0077270125,
-0.016586555,
0.0047738315,
-0.0140276095,
-0.00777002,
-0.04527255,
-0.03784659,
-0.0901437,
0.020299535,
0.04165992,
-0.05183836,
-0.0111031,
-0.021675775,
-0.011418489,
0.05421811,
0.000505338,
0.014909264,
0.07076166,
-0.035294812,
-0.0037559876,
-0.037215814,
0.066862315,
-0.010393477,
0.036355667,
-0.050318763,
0.015210316,
-0.031452812,
-0.0014308951,
-0.07615193,
-0.053931393,
-0.010945407,
0.030305944,
0.034348648,
-0.008551323,
0.017575728,
-0.009060245,
-0.0222062,
-0.036556367,
0.05352999,
-0.0151243005,
-0.014450517,
0.027453115,
0.07185118,
-0.017418034,
-0.015396682,
-0.009153428,
-0.0018242344,
-0.0029030056,
0.053587332,
0.021776127,
-0.05057681,
0.036929097,
0.011870068,
-0.010572675,
-0.046505433,
-0.0084438035,
0.014808913,
-0.05459084,
0.005060548,
-0.0016199488,
-0.010816384,
-0.011626358,
0.0338899,
0.03609762,
-0.0033366645,
-0.022707956,
0.030936722,
0.0101139285,
-0.007927714,
0.01134681,
0.025259733,
-0.007017389,
0.031166095,
-0.035810903,
-0.00065496826,
-0.03821932,
0.035266142,
0.081714235,
-0.023095023,
0.011748212,
0.021890813,
-0.0038527544,
0.02771116,
-0.008099744,
0.00135384,
0.053616006,
-0.035065442,
-0.024026852,
-0.008243103,
0.046562776,
0.028327601,
0.011045757,
-0.006920622,
0.037789248,
0.032857724,
0.019468058,
0.01701663,
-0.029617826,
0.030592661,
-0.019912468,
-0.029789856,
0.0065514743,
-0.025704144,
-0.002772191,
0.039394863,
-0.0046806484,
-0.041029148,
0.013081445,
0.066977,
0.015066957,
0.01812049,
-0.024887001,
0.011626358,
-0.05352999,
-0.039968293,
-0.053099915,
-0.0055157105,
-0.019539736,
0.02771116,
0.018722594,
0.0061393194,
0.0176044,
0.026478278,
0.0053580166,
0.030334616,
-0.0017785389,
0.0059171137,
-0.047021523,
-0.046304733,
-0.06164407,
0.046906836,
0.018335527,
-0.016486205,
0.05545099,
0.020571915,
0.013239139,
-0.012981094,
-0.0037703232,
0.070819,
-0.013059941,
0.030650005,
0.003877842,
-0.0016262208,
-0.025102038,
0.0041968143,
0.020614924,
-0.01812049,
0.0010044042,
0.03538083,
-0.0038384185,
0.020227857,
0.068009175,
0.0002185094,
-0.012185455,
0.016271167,
0.030162586,
0.007662501,
0.04699285,
-0.017590065,
-0.0010026122,
-0.015812421,
0.018636579,
0.030850707,
-0.041000474,
-0.006472627,
-0.019310363,
-0.004967365,
-0.01743237,
-0.007332777,
0.046562776,
0.001691628,
-0.013432673,
0.028628653,
-0.009712525,
-0.011303802,
-0.00794205,
-0.01485192,
-0.06164407,
-0.08182892,
-0.0035839574,
-0.011948914,
0.014364501,
0.028901033,
-0.029388452,
0.007684005,
0.023252716,
-0.0022507254,
0.028829355,
0.023152366,
-0.012407661,
0.02338174,
-0.036757067,
-0.01770475,
0.0036950603,
0.009354129,
-0.042204686,
0.004132303,
0.044813804,
0.009561999,
-0.017217332,
-0.018163497,
-0.03988228,
-0.011755381,
0.018894624,
0.011396985,
-0.033459827,
0.042950146,
-0.008321949,
0.008493979,
-0.05731465,
0.016557883,
0.008515483,
-0.006504883,
0.013884252,
0.027223742,
0.03658504,
0.01595578,
0.02791186,
0.0105870105,
0.032370303,
0.014342998,
0.010493828,
0.027238077,
0.01829252,
0.025059031,
0.013805404,
0.016529212,
0.052096408,
0.00068991183,
0.027481787,
0.03452068,
-0.029417124,
-0.011461496,
0.05287054,
0.01615648,
0.0030965393,
0.031481482,
-0.01777643,
0.02358244,
0.005132227,
-0.062274847,
0.022077179,
0.014529364,
0.020672267,
0.013869916,
-0.052096408,
0.01986946,
0.004128719,
-0.03609762,
-0.002351076,
0.00100978,
-0.0033241205,
0.013619038,
0.026105547,
0.012264303,
-0.0021682943,
0.026521286,
0.037187144,
0.0020769034,
-0.017274676,
0.0041072154,
-0.034291305,
-0.004824007,
0.0008632858,
-0.058432844,
-0.030650005,
-0.012278639,
-0.03403326,
0.010214279,
-0.016873272,
-0.003539158,
0.0076194936,
-0.04492849,
-0.0044584433,
-0.032714363,
0.008873879,
-0.027352763,
-0.0067987675,
0.017719086,
-0.0031305868,
-0.031338125,
0.04624739,
-0.00455521,
0.02090164,
0.018134825,
0.039968293,
-0.0063471887,
0.031997573,
0.018020138,
0.0020786955,
0.00706398,
0.004372428,
-0.06267625,
-0.0004385868,
0.024887001,
-0.007777188,
-0.0027703992,
0.00009155892,
-0.09639412,
-0.0009085332,
0.017862445,
-0.044670448,
-0.051178914,
-0.017145652,
0.018335527,
-0.054791544,
0.014084953,
0.035696216,
-0.008873879,
-0.015109965,
-0.018249512,
0.0069528776,
-0.05711395,
-0.0027220158,
-0.067206375,
-0.00012230255,
-0.001347568,
-0.10126831,
-0.0040785437,
-0.03423396,
-0.0013914715,
-0.008013729,
-0.029560482,
-0.040025637,
0.039624237,
-0.0020159762,
0.036929097,
-0.014823249,
-0.024714971,
-0.031653512,
-0.012171119,
0.06605951,
0.0039280173,
0.09381367,
-0.008257438,
-0.025044695,
-0.004397516,
-0.019468058,
0.027137727,
-0.0030087323,
-0.008694681,
-0.008709017,
-0.005988793,
-0.049659315,
-0.06594482,
-0.019210013,
0.032026246,
-0.00018098985,
-0.0147372335,
-0.006526387,
-0.010099593,
-0.050032046,
-0.0009389969,
0.02537442,
0.012637034,
0.0004040912,
0.0027399356,
0.027553465,
-0.041717265,
0.24451192,
0.044641774,
0.02847096,
-0.019167004,
0.03449201,
0.035094112,
0.014765905,
0.02183347,
0.02685101,
-0.05298523,
0.038047295,
-0.02313803,
-0.020313872,
0.023095023,
-0.0045301225,
0.030535318,
-0.047566283,
0.0076338295,
-0.014192472,
-0.05599575,
-0.058088783,
0.03538083,
0.025661137,
0.013525856,
-0.0061142314,
0.02547477,
0.04581731,
-0.062217504,
0.0041860626,
-0.06302031,
0.028384944,
-0.005254082,
0.005719996,
-0.051322274,
-0.011074428,
-0.02771116,
-0.04524388,
-0.04816839,
-0.018134825,
0.0050032046,
-0.018622244,
-0.0336892,
0.013382497,
0.0012785769,
-0.015626054,
0.044613104,
-0.028987048,
0.04455576,
0.018765602,
-0.01743237,
0.053558663,
-0.03971025,
0.048598465,
-0.033087097,
-0.029474467,
-0.029302437,
-0.01728901,
-0.07288336,
-0.021059334,
-0.020070162,
-0.009633678,
-0.02055758,
-0.052841872,
0.0024245472,
0.00355887,
0.030965393,
-0.05287054,
0.0051035555,
-0.0070424764,
-0.04713621,
0.0014864464,
0.0027578552,
-0.02193382,
-0.04165992,
-0.01910966,
0.026865346,
-0.030477975,
0.025718478,
-0.006404532,
-0.005967289,
-0.05289921,
0.024987351,
0.0090674125,
-0.051436957,
0.04246273,
0.034635365,
-0.012665706,
0.0009605006,
-0.0003059804,
0.02158976,
0.05633981,
0.016615227,
0.021245701,
-0.024241889,
-0.025675472
] | Porting GPT2 Model by Thomas
Porting WMT19 MT Model by Stas
From experience, we can tell you that the most important things to keep in mind when adding a model are: |
[
0.030388124,
-0.017009346,
-0.008811984,
-0.01935349,
0.010855964,
0.002051127,
0.0031213579,
-0.003273227,
0.011199011,
0.05240022,
0.014779549,
-0.0034393899,
0.034704782,
-0.04471028,
0.011184717,
0.022812534,
0.011999451,
-0.057803188,
-0.0799868,
-0.01155635,
0.01915338,
-0.019053325,
-0.07141066,
-0.02146894,
-0.033389773,
0.027343595,
-0.0040093455,
-0.023884552,
0.060318857,
0.05540187,
-0.010119846,
0.00020077996,
-0.0036430731,
-0.028701484,
-0.011363386,
-0.0580033,
-0.031360086,
-0.038163826,
-0.017166575,
-0.02575701,
0.0062034084,
-0.028229797,
0.04062232,
-0.05957559,
-0.06414953,
0.018924683,
0.004020066,
-0.014093458,
-0.010448598,
-0.05179989,
-0.01522265,
0.0028908742,
-0.009612424,
0.03013084,
-0.023126993,
-0.0029462615,
0.0017884827,
0.04322375,
-0.0644354,
0.013586036,
0.046968665,
0.048540957,
-0.01766685,
-0.0531149,
-0.0018420835,
0.041394174,
0.0032160527,
0.023227047,
-0.002574629,
-0.02375591,
-0.038363937,
0.013471687,
-0.012099505,
-0.0069788345,
-0.01982518,
-0.0137504125,
0.025028037,
-0.020425508,
-0.021711929,
0.0288873,
0.0027014844,
0.02455635,
-0.016294667,
0.021225948,
-0.025413964,
-0.013307312,
0.07123914,
-0.008983508,
0.0028301263,
-0.022398021,
-0.011106102,
0.015394173,
0.0015642523,
0.059232544,
0.0264431,
0.042451896,
-0.032617923,
0.023898846,
-0.007314733,
0.0021422484,
0.019968115,
0.07426938,
-0.052657504,
0.011985157,
-0.020754261,
0.0003271887,
0.0020636339,
-0.012578339,
-0.008047279,
-0.026371632,
-0.015651457,
0.008640462,
-0.008361737,
0.01179934,
-0.006853766,
0.021383177,
0.014250687,
0.045053326,
-0.044167124,
-0.029301815,
0.017238043,
0.021640461,
-0.019453546,
-0.024256185,
0.013107202,
-0.0045060473,
0.024785047,
0.03990764,
0.0066822427,
0.011341946,
0.021740517,
-0.013214404,
0.019039033,
0.06472127,
-0.005788895,
-0.012106652,
0.010598681,
-0.0039378777,
0.04250907,
-0.0035751786,
-0.016308961,
-0.0035376581,
0.014357889,
0.09073557,
0.026114348,
-0.011963717,
0.026142936,
-0.06986696,
-0.025928533,
0.022655305,
-0.012571193,
0.009991203,
0.0027425783,
0.04491039,
-0.016737768,
-0.0062784497,
-0.017881254,
-0.010262782,
0.014808136,
0.012849918,
-0.013893348,
0.012149532,
-0.016208906,
0.065407366,
0.00011568856,
0.018896097,
0.006092633,
0.032875206,
0.007071743,
-0.05017042,
-0.04125124,
0.005102804,
-0.042852115,
0.035076417,
0.049227048,
0.0324464,
0.05059923,
0.03181748,
-0.018095657,
0.00003330513,
-0.011427707,
0.0022726774,
-0.002538895,
0.012635514,
0.0025924959,
0.0007432655,
0.0039700386,
-0.0062534357,
0.0014713441,
-0.008726223,
0.034619022,
0.051342495,
-0.033675645,
0.0116278175,
-0.044367235,
-0.004084387,
-0.020582737,
-0.017495327,
0.023998901,
-0.029416163,
-0.037306212,
0.037220452,
-0.011148983,
0.049255636,
-0.03802089,
0.009676745,
-0.014879604,
0.02179769,
-0.051942825,
0.031217152,
0.048255086,
0.02011105,
-0.042794943,
-0.024942275,
-0.004920561,
-0.021254536,
-0.008047279,
0.013907641,
0.0108202305,
-0.000872801,
0.010126993,
0.0067680045,
0.04591094,
-0.0015981996,
0.02295547,
0.0012587273,
0.00326072,
0.032789443,
-0.013921935,
-0.021568993,
-0.0036591534,
0.008769104,
0.04142276,
0.018381529,
-0.0036877405,
0.03053106,
0.034790546,
0.06500714,
0.011299065,
-0.007897196,
0.03862122,
0.0034697636,
0.022383727,
0.024613524,
0.0026603902,
-0.0030945574,
0.008540407,
-0.035219353,
-0.005106377,
0.0128927985,
-0.035219353,
0.07912919,
0.030416712,
-0.0041344147,
-0.059232544,
-0.04142276,
0.0064499723,
0.040279273,
-0.04362397,
-0.040450796,
0.014851017,
0.02984497,
0.018410115,
-0.018595932,
0.021969214,
0.024627818,
-0.012278175,
0.014851017,
-0.02608576,
-0.038964264,
-0.01197801,
-0.047426056,
-0.09982628,
0.0025549752,
-0.011199011,
-0.0015463853,
0.0034661903,
-0.042366136,
-0.014979659,
-0.011170424,
-0.0038092358,
0.003784222,
-0.0035501649,
0.02135459,
0.040164925,
0.008561847,
-0.016880704,
0.05308631,
-0.036477186,
0.025271028,
0.010984607,
-0.0068787797,
-0.01033425,
-0.01915338,
-0.0150368335,
0.04588235,
-0.008347443,
-0.043738317,
-0.048655305,
0.0067894445,
-0.0105558,
-0.017166575,
0.000631597,
0.010584387,
-0.026757559,
0.019067619,
-0.015294118,
-0.039278723,
0.05605937,
0.059861463,
-0.014908191,
0.015923034,
0.0020618471,
0.01526553,
-0.029501924,
0.03993623,
0.06186256,
0.03184607,
-0.029387575,
-0.0568884,
-0.041279823,
0.028058274,
0.0043988456,
-0.030045079,
0.020882903,
0.056831226,
0.0069180867,
-0.055744916,
-0.013664651,
-0.007761407,
-0.04070808,
0.010076965,
-0.037877955,
0.024056075,
0.009726773,
-0.009898296,
-0.011806487,
-0.010441451,
-0.012978559,
0.025871357,
0.02179769,
0.0015749725,
0.014500825,
0.04859813,
-0.0025496152,
-0.014708081,
0.03570533,
-0.0442243,
-0.01806707,
-0.01017702,
-0.006146234,
0.032703683,
-0.0031963992,
0.015822979,
0.005717427,
0.062091257,
-0.027858164,
-0.01115613,
0.011849368,
0.005524464,
0.030245189,
0.04350962,
-0.0009469489,
0.01851017,
-0.0646641,
-0.023012644,
-0.017724024,
-0.021025838,
0.05508741,
-0.05560198,
0.032960966,
-0.028286971,
-0.036277074,
0.03773502,
-0.036763057,
-0.08633315,
0.05508741,
0.033875756,
0.048769653,
-0.033304013,
-0.0020761408,
0.0041880156,
0.0017143348,
0.031617373,
0.037077516,
0.04631116,
-0.033189666,
-0.024141837,
-0.02575701,
0.026485981,
-0.0142221,
-0.010041231,
0.00486696,
-0.004384552,
-0.009898296,
-0.057631664,
0.031217152,
0.068151735,
0.055830676,
0.0116278175,
0.03642001,
-0.023770204,
-0.007275426,
0.04839802,
0.011420561,
0.009633864,
-0.061633863,
0.031188564,
0.04122265,
-0.001116685,
-0.008161627,
-0.009633864,
0.010405717,
0.028744364,
-0.009162177,
-0.03404728,
-0.031388674,
-0.0053457944,
-0.0186674,
0.019139087,
-0.06546454,
-0.009641011,
-0.04250907,
0.0154513465,
0.03441891,
-0.049741615,
-0.014479384,
-0.037534907,
-0.009669598,
0.032960966,
0.0073254537,
-0.03013084,
-0.016623419,
0.018038483,
-0.060318857,
0.037992302,
0.049455743,
-0.014129192,
0.013628917,
-0.0844464,
0.027500825,
0.02391314,
-0.009712479,
-0.0019242716,
0.03404728,
0.007911489,
0.018838922,
0.0288873,
0.014808136,
-0.02235514,
0.026514567,
-0.020225398,
0.00031244845,
-0.018724574,
-0.01855305,
-0.030073667,
0.0042344695,
0.0051849918,
0.037677843,
0.013135789,
-0.02135459,
-0.010713029,
0.060204506,
-0.05148543,
-0.055945024,
0.010784497,
0.03739197,
-0.009919736,
0.038964264,
0.013192963,
-0.040164925,
0.040679496,
0.028558549,
-0.00076023914,
0.018567344,
-0.0073040132,
0.0018528037,
0.0019260582,
-0.009440902,
0.0059997253,
-0.05877515,
0.06826608,
0.011306212,
-0.0012703409,
-0.0030338098,
-0.032960966,
-0.016809236,
-0.0023191313,
-0.020868609,
0.005360088,
0.009862562,
-0.0052314457,
0.018924683,
-0.0022369435,
-0.019210555,
-0.0322177,
-0.030102253,
-0.0069252336,
0.03536229,
0.03610555,
0.03965036,
-0.010727323,
-0.014679494,
0.0022673171,
-0.01057724,
0.022240791,
-0.005177845,
-0.004420286,
0.01802419,
0.007682793,
-0.0028068994,
-0.010169874,
0.013979109,
-0.0195536,
0.017695436,
-0.016880704,
0.0074969763,
-0.008747663,
-0.03381858,
0.007675646,
-0.022841122,
-0.061748214,
-0.03662012,
0.024227597,
0.02115448,
0.033618473,
0.03839252,
-0.051285323,
-0.047940627,
-0.034619022,
0.026128642,
-0.059861463,
0.012235294,
-0.04250907,
-0.036505774,
0.0039879056,
0.02035404,
0.043109402,
-0.059518415,
0.00025929426,
-0.05051347,
0.03253216,
-0.05348653,
-0.02011105,
-0.021554701,
0.0013453821,
-0.0070431554,
0.048455194,
0.010069818,
-0.016480483,
-0.040679496,
0.0042273225,
0.027257834,
0.034876306,
-0.034390323,
-0.012549752,
0.026057174,
-0.005217152,
0.0052278726,
0.040279273,
-0.0074183615,
0.036505774,
-0.0022994778,
0.00011194767,
-0.039450247,
-0.033589885,
-0.062091257,
-0.008040132,
0.04719736,
-0.044338647,
0.01670918,
-0.023355689,
0.039135788,
-0.0068037384,
0.036362838,
-0.015494227,
0.02195492,
-0.052457392,
-0.03473337,
0.013371632,
-0.025099505,
0.017409565,
-0.016308961,
-0.02944475,
0.05531611,
-0.0304453,
0.016852116,
0.054572843,
-0.022540957,
-0.0004922347,
-0.053829577,
0.028672896,
0.0011908328,
0.00711105,
0.0042416165,
0.034561846,
-0.031788893,
0.010234195,
-0.031960417,
-0.06414953,
0.0017411353,
0.04142276,
0.023384277,
-0.01115613,
0.036305662,
-0.012299615,
-0.035876855,
-0.018438702,
0.03410445,
0.027858164,
-0.0031695988,
-0.001114005,
0.045167673,
-0.007890049,
0.008318856,
0.0020672074,
0.005953271,
-0.03184607,
0.068609126,
-0.0033947222,
-0.018052775,
-0.000055471326,
0.02953051,
-0.047168773,
-0.023084112,
-0.0046918634,
0.03273227,
-0.06077625,
-0.008647609,
0.0034483233,
-0.012363936,
-0.0442243,
0.049369983,
0.050056074,
-0.017309511,
-0.043338098,
0.017295217,
-0.032789443,
-0.01871028,
0.04002199,
0.056259483,
-0.023813084,
-0.0074683893,
-0.027729522,
0.008390324,
-0.033618473,
-0.025728421,
0.04971303,
-0.007282573,
0.060204506,
0.037849367,
-0.009476636,
0.04859813,
-0.00009056315,
-0.015379879,
0.044138536,
-0.022297965,
-0.04170863,
-0.059461243,
0.0010943513,
-0.0057495874,
0.027672347,
-0.020725673,
0.030359538,
0.035476636,
0.025028037,
0.0137575595,
-0.09771083,
0.017638262,
-0.03473337,
-0.031874657,
-0.008761957,
-0.013007146,
-0.00345547,
0.03153161,
0.02424189,
-0.034190215,
-0.011141836,
0.06134799,
-0.026328752,
-0.017380979,
-0.03762067,
-0.028387025,
-0.03670588,
-0.026343046,
-0.011942276,
-0.02815833,
0.020125344,
0.047769103,
-0.017766904,
-0.011299065,
-0.00023629054,
0.026628917,
-0.0061390875,
0.033275425,
-0.016451897,
0.005252886,
-0.021654755,
-0.027515119,
-0.027915338,
0.018896097,
-0.0055030235,
-0.026100054,
0.017581088,
0.0023191313,
0.00506707,
-0.0150368335,
0.0048383726,
0.06918087,
-0.04699725,
0.010405717,
-0.008240242,
0.0255569,
-0.051056623,
0.009805388,
0.0024763606,
0.0035626718,
-0.01786696,
0.021483233,
-0.015279824,
0.030902693,
0.005874656,
0.0023316382,
-0.0015722924,
0.030702583,
0.00022378367,
0.02191204,
0.033675645,
-0.009876856,
0.0046561295,
-0.034876306,
0.016694887,
0.01971083,
-0.03013084,
0.0037306212,
0.006435679,
-0.013664651,
-0.038363937,
-0.005142111,
0.02459923,
0.05448708,
0.031989004,
-0.00853326,
-0.009305113,
-0.017452447,
-0.03413304,
0.025942825,
-0.07021,
-0.06637933,
0.0029123144,
-0.04453876,
0.026986256,
-0.0014963578,
0.003098131,
0.023784496,
0.009255085,
0.0011488455,
0.027315008,
-0.00021686022,
0.011827927,
0.0020225397,
-0.054315556,
-0.03281803,
-0.04053656,
0.01882463,
-0.03610555,
-0.018767454,
-0.0015258384,
0.015408466,
0.006739417,
-0.016480483,
-0.0012301402,
-0.011299065,
0.0011961929,
0.059747115,
-0.026786147,
0.0064106653,
-0.03253216,
0.03833535,
-0.04839802,
0.006014019,
-0.013035734,
0.024227597,
0.014029137,
0.01400055,
0.016351841,
0.034761958,
0.050313357,
-0.011985157,
0.015408466,
0.006635789,
0.04588235,
0.013435953,
-0.0004998282,
-0.0038807036,
0.03341836,
0.039821878,
0.05906102,
0.0055459044,
0.050341945,
0.014229246,
-0.030359538,
-0.034590434,
0.01835294,
0.019739417,
0.014336448,
0.0029837822,
0.0041880156,
0.01570863,
0.020239692,
-0.00028274464,
0.046053875,
-0.020396922,
0.012849918,
0.007854315,
-0.04250907,
0.00547801,
-0.002420973,
-0.064492576,
-0.0166663,
0.010805937,
0.035562396,
-0.0010487905,
0.01855305,
0.017195161,
0.014272127,
0.05117097,
0.018981857,
0.0038878503,
0.0020761408,
0.021611875,
0.022612425,
-0.005542331,
-0.000011229663,
-0.0333326,
-0.033189666,
-0.025814183,
-0.046053875,
0.03873557,
-0.013971963,
-0.04025069,
0.019810885,
-0.015308411,
-0.051285323,
-0.065578885,
0.010269929,
-0.04322375,
0.0038128092,
-0.0013793292,
-0.019339196,
-0.07049587,
0.054601427,
-0.022669598,
0.01851017,
0.017137988,
0.037077516,
0.0026496702,
0.049169872,
0.024970863,
0.0015731858,
0.040679496,
0.029144585,
-0.04628257,
-0.009991203,
0.006014019,
-0.017752612,
-0.019925233,
-0.040365037,
-0.06609346,
0.03193183,
0.0036341397,
-0.034761958,
-0.04611105,
0.01482243,
0.007611325,
-0.033275425,
-0.00010591757,
0.052257285,
0.04579659,
-0.014457944,
0.004559648,
0.007314733,
-0.040365037,
-0.043481033,
-0.036905993,
0.02175481,
-0.004641836,
-0.028372733,
-0.03570533,
-0.020496976,
-0.003766355,
-0.034990653,
-0.013850467,
-0.0009951896,
0.013121495,
0.0067537106,
0.06169104,
0.019896647,
-0.026157228,
0.0007401388,
0.04519626,
0.06437823,
0.010227048,
0.08833425,
0.040650908,
0.015665751,
-0.017409565,
0.008318856,
0.0023852391,
-0.014072018,
0.014557999,
-0.02264101,
-0.01846729,
-0.036591534,
-0.07878614,
-0.012449698,
0.02588565,
0.011463441,
-0.015794393,
-0.033875756,
-0.015994502,
-0.063577786,
-0.020396922,
-0.068895,
0.010813084,
-0.018567344,
-0.026428808,
0.0047526113,
-0.044081364,
0.24379109,
0.033675645,
-0.001275701,
0.028229797,
0.03273227,
0.04142276,
0.013457394,
-0.005142111,
0.03922155,
-0.02848708,
-0.0077399667,
-0.015494227,
-0.021568993,
0.048626717,
-0.031989004,
0.0402221,
-0.07958659,
-0.002521028,
-0.021054426,
-0.048226498,
-0.058117647,
0.04122265,
0.026957668,
0.05605937,
0.058717977,
0.00672155,
-0.0025299615,
-0.01626608,
-0.024056075,
-0.02571413,
0.008197361,
-0.02944475,
0.035305113,
-0.030616822,
-0.021083012,
0.019081913,
-0.011241891,
-0.024256185,
-0.015179769,
0.024656404,
-0.0041808686,
-0.00013511888,
0.023055525,
-0.0040558,
-0.016151732,
0.06157669,
-0.020539857,
0.051028036,
-0.0031285046,
-0.054258384,
0.014879604,
-0.028115448,
0.041965917,
-0.03336119,
-0.057460144,
-0.0040808134,
-0.036477186,
-0.048969764,
-0.014122045,
-0.024227597,
0.01590874,
0.008061572,
-0.04814074,
0.0491127,
-0.021240242,
0.001707188,
-0.009012095,
0.020182518,
-0.010877405,
-0.00048732132,
0.008483233,
0.007632765,
-0.025528312,
-0.032303464,
0.024427708,
0.025299614,
0.0042344695,
0.04482463,
0.003167812,
-0.025628367,
0.0017741891,
-0.018610226,
-0.01670918,
-0.049455743,
0.06363496,
0.039078616,
-0.04588235,
-0.009140736,
-0.014143486,
0.027029136,
0.013664651,
0.03153161,
0.026171522,
-0.000021900983,
-0.016294667
] |
Don't reinvent the wheel! Most parts of the code you will add for the new 🤗 Transformers model already exist
somewhere in 🤗 Transformers. Take some time to find similar, already existing models and tokenizers you can copy
from. grep and rg are your
friends. Note that it might very well happen that your model's tokenizer is based on one model implementation, and
your model's modeling code on another one. E.g. FSMT's modeling code is based on BART, while FSMT's tokenizer code
is based on XLM.
It's more of an engineering challenge than a scientific challenge. You should spend more time creating an
efficient debugging environment rather than trying to understand all theoretical aspects of the model in the paper.
Ask for help, when you're stuck! Models are the core component of 🤗 Transformers so we at Hugging Face are more
than happy to help you at every step to add your model. Don't hesitate to ask if you notice you are not making
progress. |
[
0.058058564,
-0.01074886,
-0.03159777,
-0.0063342694,
0.010066606,
-0.021297058,
0.010956213,
-0.0021487689,
0.006675397,
0.04952369,
-0.0079328865,
-0.013752121,
0.030928895,
-0.041951995,
0.015317294,
-0.012079927,
-0.02402608,
-0.0619113,
-0.044895057,
0.0073375856,
-0.003305927,
0.03432679,
-0.02133719,
-0.027477486,
-0.049496934,
-0.0024129755,
-0.03138373,
0.008675341,
0.068921134,
0.033042546,
-0.015103254,
0.018795457,
-0.019557977,
-0.042754646,
0.010688662,
-0.017310549,
-0.0032474,
-0.003749058,
-0.044145912,
-0.0440924,
-0.0121535035,
-0.009812432,
0.028815242,
-0.043209486,
-0.03210612,
-0.017350681,
0.0032457279,
-0.0656035,
0.005601849,
-0.03285526,
0.0033259932,
-0.010387667,
0.00559516,
0.012166881,
-0.0004239011,
-0.023731772,
-0.012902646,
0.05246675,
-0.036306668,
-0.009912764,
0.021644875,
0.054553647,
-0.01828711,
-0.07828542,
-0.0012416037,
-0.0124009885,
-0.011504692,
0.0045182672,
-0.0051904893,
-0.02707616,
-0.044306442,
0.022996007,
-0.025898935,
-0.02172514,
-0.043691076,
-0.04235332,
0.034915403,
0.013711988,
-0.020026192,
0.039704565,
-0.0067824177,
0.021644875,
-0.014099937,
-0.0022340508,
-0.05185138,
-0.01922354,
0.073683545,
-0.0061101955,
-0.017658366,
-0.022313753,
-0.035637792,
0.018126579,
-0.016146703,
0.00069479644,
0.019263672,
0.05977089,
-0.0012198653,
0.04125636,
0.008969647,
0.008789049,
0.035450507,
0.070419416,
-0.034701362,
0.023357201,
-0.010815749,
0.022514416,
0.03421977,
0.00003932268,
-0.06501489,
-0.02358462,
-0.03997212,
-0.0060198973,
-0.0038126016,
0.004775785,
-0.006638609,
0.054232586,
0.0005998995,
0.00338452,
-0.069723785,
-0.0049095606,
-0.007297453,
0.010113427,
0.015946038,
-0.04743679,
0.0338452,
-0.013859141,
0.0019213505,
0.0202001,
-0.011230453,
-0.008059974,
0.045697708,
-0.0041570733,
0.0112705855,
0.05409881,
0.017457701,
0.013604968,
0.0039865095,
0.014086559,
0.019009497,
-0.0050834687,
-0.028173119,
-0.008307458,
-0.020922488,
0.057630483,
-0.0019414169,
0.025858803,
0.034139507,
-0.071757175,
-0.01234079,
0.016802201,
-0.029831935,
0.018501151,
-0.009645213,
0.028173119,
-0.053242646,
-0.03761767,
0.021644875,
-0.0051838,
0.000052308307,
-0.010735483,
-0.020975998,
-0.0066352645,
-0.01922354,
0.072559826,
-0.05099522,
0.04350379,
-0.010394356,
0.032052606,
-0.03427328,
-0.0066452976,
-0.017578099,
0.026460793,
0.0012859169,
0.057255913,
0.029136302,
0.017711876,
0.060627054,
0.01260834,
-0.012835759,
0.00096652796,
0.04398538,
-0.022407396,
-0.027745036,
0.027664771,
-0.018795457,
0.0079328865,
0.017511211,
-0.02975167,
-0.0027223313,
0.0169226,
0.019009497,
0.07068697,
-0.046259567,
0.022206731,
-0.058058564,
0.016828956,
-0.013130065,
0.0045717773,
-0.0056319484,
-0.01922354,
-0.04246034,
0.07823191,
-0.019250294,
0.036333423,
-0.004377803,
-0.012996289,
0.0014924329,
0.01566511,
-0.02445416,
0.0016178474,
0.0461793,
0.034353547,
-0.028119609,
-0.01091608,
0.040855035,
-0.035396997,
-0.009484682,
-0.005983109,
0.011203698,
-0.003722303,
0.013671855,
0.007444606,
0.05452689,
-0.0033126157,
0.03887516,
0.00041407696,
0.0073509635,
0.014099937,
-0.009324152,
0.012815692,
0.04831971,
-0.00507678,
-0.0011462887,
0.029992465,
-0.000118412216,
0.033524137,
0.022795344,
0.014260467,
0.02707616,
-0.005655359,
0.013578213,
-0.021979313,
0.022447528,
0.018327242,
-0.0031270022,
0.0007324208,
-0.03745714,
-0.036333423,
-0.01064184,
0.009263953,
0.023678262,
0.044493727,
0.05174436,
-0.0063543357,
-0.040962055,
-0.022166599,
-0.010227136,
0.031463996,
0.015330671,
-0.040801525,
0.022072956,
0.02090911,
0.02025361,
-0.0075382493,
0.039062444,
0.05688134,
0.008595075,
0.046741158,
-0.043691076,
-0.055061992,
-0.025778538,
-0.10354223,
-0.056292728,
-0.007270698,
-0.009230509,
-0.030875383,
-0.019772017,
-0.04492181,
0.002979849,
0.0023327102,
-0.013638412,
0.0040266425,
0.0016830629,
0.02581867,
-0.006424568,
0.013765498,
-0.05425934,
0.061697256,
-0.010708728,
0.0041236295,
0.02576516,
0.023571242,
-0.020695068,
-0.022594681,
0.0077389125,
0.026393905,
0.020895733,
0.010936147,
-0.022286996,
0.033577647,
-0.05902175,
-0.0037925353,
-0.006217216,
0.048881564,
-0.004765752,
0.028306894,
0.03815277,
-0.036922038,
0.046687648,
0.04104232,
-0.046339832,
0.012494631,
0.041951995,
0.02516317,
-0.007825866,
0.022059578,
0.043423526,
0.02679523,
-0.014046427,
-0.017618233,
-0.03871463,
-0.005665392,
-0.020614803,
-0.0074646724,
0.00592291,
0.057791013,
-0.0046654204,
-0.053831257,
-0.018568039,
-0.031892076,
-0.03285526,
-0.017390814,
-0.036226403,
0.011531447,
0.031249955,
-0.0008779017,
-0.014099937,
-0.008595075,
-0.011116743,
0.0195446,
0.028574446,
0.009009779,
0.023103029,
0.069349214,
0.02652768,
0.022166599,
0.0042607496,
-0.05944983,
-0.0008887709,
-0.0017424258,
0.0195446,
0.046580628,
0.0014389226,
0.015277161,
-0.007952953,
0.028039344,
0.000033339362,
0.012106682,
0.023357201,
-0.025403965,
0.022581303,
0.03930324,
0.012354167,
-0.028119609,
-0.016628293,
-0.007344275,
-0.031731546,
0.010501376,
0.033470627,
-0.044573992,
0.0024982574,
-0.003108608,
-0.038126014,
0.038473833,
-0.033657912,
-0.09658591,
0.022862231,
0.030875383,
0.032453936,
-0.004076808,
0.011069922,
0.008902759,
-0.029243322,
0.013778876,
0.04176471,
0.02969816,
-0.02838716,
-0.0045584,
-0.018848967,
0.037109323,
0.010006407,
-0.030982405,
-0.0154376915,
0.017872406,
-0.021243548,
-0.02975167,
0.032667976,
0.04607228,
0.029163057,
-0.0030601143,
0.05993142,
-0.0082071265,
-0.003297566,
0.019999437,
-0.022220109,
-0.016668426,
-0.031892076,
0.011484626,
0.036333423,
0.0009865942,
-0.039998874,
0.000046246605,
-0.021096395,
0.05907526,
-0.017176773,
0.00096820015,
-0.056453258,
-0.0011588302,
0.008628519,
0.038794894,
-0.013671855,
0.015852395,
-0.021685008,
0.007892754,
0.011237142,
-0.04125636,
-0.015250406,
-0.06426575,
0.008300769,
0.05246675,
0.027557751,
0.0024397306,
0.019638242,
-0.019397447,
-0.017270416,
0.058540154,
0.05163734,
0.0056319484,
-0.0024581247,
-0.07566342,
-0.011979596,
0.03678826,
-0.005949665,
0.016802201,
0.032721486,
-0.015584845,
-0.0007984725,
0.018447641,
0.0056754253,
0.002677182,
-0.0015743703,
-0.023878926,
-0.01566511,
-0.03871463,
0.0042707827,
-0.014046427,
-0.012855825,
0.00036453822,
0.06362362,
0.032721486,
-0.015089876,
-0.00014119585,
0.061697256,
-0.047677584,
-0.015223651,
0.014354111,
0.026393905,
-0.04382485,
0.031999096,
0.012086616,
0.0065717213,
0.0027741692,
0.017845651,
-0.019678375,
0.004906216,
0.004220617,
-0.004966415,
0.007852621,
0.018634927,
0.012695294,
-0.035905343,
0.022715079,
-0.003662104,
0.028146364,
0.00041512208,
-0.06490787,
-0.061429705,
-0.007029902,
0.0016119947,
0.024628067,
0.046473607,
0.018701814,
0.05961036,
-0.05174436,
-0.032667976,
-0.026072843,
0.0045115785,
0.027223313,
0.03395222,
0.049095605,
0.052199196,
-0.051878136,
0.0066519864,
-0.007009836,
-0.020280365,
0.010581641,
-0.0033376985,
0.0071436116,
0.00085783534,
0.027477486,
0.01555809,
0.04007914,
0.0037055812,
-0.004932971,
0.015103254,
-0.0383133,
0.016842335,
-0.01610657,
-0.08160305,
0.04120285,
-0.020761957,
-0.066994764,
-0.015678488,
-0.0022758555,
0.017952671,
0.04492181,
0.046981953,
-0.017644988,
-0.0067255627,
-0.037216343,
0.01582564,
-0.03745714,
0.04481479,
-0.041737955,
0.032667976,
-0.0017039654,
0.06314203,
0.032560956,
-0.021658253,
-0.010514754,
-0.055811137,
0.030554323,
-0.05174436,
-0.030821873,
-0.03202585,
-0.012213702,
-0.023838792,
0.0016847351,
0.01834062,
-0.029350342,
-0.05099522,
-0.0038326678,
0.027932324,
0.04403889,
-0.033310097,
-0.013190264,
-0.013471192,
0.00006840317,
0.030179752,
0.0018143301,
-0.030260017,
0.06447979,
-0.021243548,
0.007210499,
-0.024106344,
-0.05709538,
-0.03368467,
0.001278392,
0.03339036,
-0.058112074,
-0.02510966,
-0.004618599,
0.018648304,
0.025082905,
-0.018969364,
-0.0029765046,
0.009076667,
-0.007919509,
-0.022032823,
0.03930324,
-0.016962733,
-0.022113089,
-0.02243415,
0.026179863,
0.026327018,
-0.033631157,
0.015183519,
0.06410521,
-0.03202585,
0.00742454,
-0.016360743,
0.025096282,
0.008768983,
0.015156764,
-0.004775785,
0.026929006,
-0.020507783,
0.009705412,
-0.040748015,
-0.06571052,
-0.01621359,
0.048025403,
0.032721486,
-0.047998648,
0.032882016,
0.017109886,
-0.029564384,
-0.04607228,
0.013136754,
0.03285526,
0.019116517,
0.037965484,
0.025631385,
-0.004608566,
-0.0005242327,
-0.015317294,
-0.025939068,
-0.011397672,
0.06469383,
-0.02702265,
-0.06592456,
-0.03756416,
-0.016855713,
-0.0059095323,
-0.058433134,
0.018461019,
0.02450767,
-0.045296382,
0.017203528,
-0.024815354,
0.0049998593,
-0.021644875,
0.06014546,
0.02527019,
-0.021965936,
-0.035718057,
0.0417112,
-0.010253891,
0.012487942,
0.023825414,
0.052413236,
-0.024962507,
0.004775785,
-0.03248069,
0.024962507,
-0.018581416,
-0.0066452976,
0.0598244,
-0.01304311,
0.005682114,
-0.020547915,
-0.0009514782,
0.054847952,
0.01260834,
-0.025403965,
0.040373445,
-0.03159777,
-0.04743679,
-0.04323624,
0.013089932,
-0.010053229,
0.013912652,
-0.018153334,
0.018461019,
0.03537024,
0.02424012,
-0.019664997,
-0.02090911,
-0.019129895,
-0.011444493,
0.0008235554,
-0.02090911,
0.00013931464,
0.02560463,
0.015263784,
0.018795457,
-0.05987791,
0.0018678403,
0.036119383,
-0.05043336,
-0.0064111906,
-0.055276033,
0.009250576,
-0.028467424,
-0.0025801947,
-0.031945586,
-0.05257377,
0.011344162,
0.028520934,
0.010487999,
0.032400426,
0.0003168807,
0.0145815285,
0.015237029,
0.02243415,
-0.032239895,
-0.010528131,
-0.031196445,
-0.011143498,
-0.008039908,
-0.0071971216,
0.019290427,
-0.024253497,
0.023383956,
0.028574446,
-0.0042674383,
-0.008521499,
-0.008367657,
0.05115575,
-0.0330693,
0.029216567,
-0.034085996,
0.0587542,
-0.053804502,
-0.0037791578,
0.029778425,
-0.01571862,
-0.022728456,
0.029029282,
0.00737103,
0.038473833,
0.0036754818,
0.061483216,
-0.008193749,
0.044012137,
0.0064279125,
0.010113427,
0.061697256,
-0.012374233,
0.008862627,
-0.037911974,
0.012581585,
0.0027206591,
-0.020333875,
-0.0031470684,
0.03242718,
0.016935978,
-0.013089932,
0.014180202,
0.00483264,
-0.002994899,
0.027905568,
-0.0038126016,
0.014822325,
0.0110231,
0.022661569,
-0.017698498,
-0.05688134,
-0.044895057,
0.0293771,
0.0048560505,
0.041069075,
-0.03149075,
-0.01069535,
-0.015089876,
-0.0040868414,
0.026594568,
-0.017230283,
-0.0141668245,
-0.015731998,
0.02025361,
-0.03421977,
-0.0338452,
-0.018568039,
0.022835476,
-0.030286772,
-0.027530996,
0.01686909,
0.018206844,
-0.0069295703,
-0.03232016,
0.00012645965,
-0.029002527,
-0.0016571439,
0.052600525,
-0.030152997,
0.024494292,
-0.04197875,
0.04130987,
0.005384464,
-0.0495772,
-0.018514529,
0.072452806,
0.023276936,
-0.011531447,
0.008768983,
0.015237029,
0.04082828,
-0.008260637,
-0.014046427,
0.04387836,
0.023878926,
-0.015731998,
0.013056488,
-0.013163509,
0.030554323,
0.028253384,
0.017444324,
-0.02647417,
-0.013337417,
0.04072126,
-0.039490525,
-0.056025177,
0.06533595,
0.00078258663,
-0.0083743455,
0.028654711,
0.022220109,
0.018554661,
-0.0035450505,
0.004083497,
0.037055813,
-0.005899499,
-0.035450507,
0.009163621,
-0.029243322,
-0.030634588,
0.01872857,
-0.08278027,
-0.01986566,
0.029350342,
-0.020588048,
0.004334326,
-0.012273901,
-0.035744812,
0.028627956,
0.021190038,
0.034594342,
0.00483264,
-0.013899274,
0.013544769,
0.0051068794,
0.035504017,
0.009538192,
-0.022741834,
-0.034754872,
-0.022246864,
-0.071489625,
0.023597997,
-0.03400573,
-0.028280139,
0.042166036,
-0.01970513,
-0.034915403,
-0.074432686,
-0.027905568,
-0.04007914,
0.0044781347,
-0.0034413745,
-0.036172893,
-0.058647174,
0.01763161,
-0.027718281,
0.014233712,
0.01697611,
0.01091608,
-0.004254061,
0.08261974,
-0.00502327,
0.031249955,
0.021109773,
0.027691526,
-0.036547463,
-0.0146082835,
0.04294193,
-0.025016017,
-0.021685008,
-0.0299122,
-0.06581754,
0.01234079,
0.02565814,
-0.004120285,
-0.04219279,
0.010354223,
0.01642763,
-0.024387272,
-0.004983137,
0.06501489,
-0.0150229875,
-0.013484569,
0.004698864,
0.010728794,
-0.032882016,
-0.034781627,
-0.034674607,
0.022032823,
-0.015277161,
-0.035878588,
-0.045376647,
-0.02527019,
0.004956382,
-0.0029397164,
-0.019557977,
-0.015370804,
0.020387385,
0.014059804,
0.06447979,
-0.012875891,
0.00009322479,
-0.06319554,
0.02117666,
0.048132423,
0.029270077,
0.08481366,
0.0041135964,
0.030982405,
-0.012380922,
-0.049095605,
0.01883559,
0.035423752,
-0.024052834,
-0.034861892,
0.013437748,
-0.00966528,
-0.051075485,
-0.011431116,
0.046634138,
0.021751896,
-0.017109886,
-0.045697708,
-0.0066352645,
-0.048828054,
-0.011966218,
-0.02543072,
0.054847952,
-0.027250068,
-0.025189925,
0.007003147,
-0.061376195,
0.20430194,
0.047918383,
0.0482662,
0.029082792,
0.03804575,
-0.0012884252,
0.041069075,
0.009732167,
0.032507446,
-0.009451238,
0.003876145,
-0.03657422,
-0.027209936,
0.026567813,
-0.030340282,
0.06282097,
-0.04815918,
-0.020106457,
-0.055276033,
-0.009765611,
-0.046446852,
0.038741384,
0.03657422,
0.05939632,
0.018273732,
-0.017497834,
-0.00635768,
-0.02025361,
0.017618233,
-0.027397221,
-0.018875722,
-0.0343803,
0.037858464,
0.0025534397,
-0.02030712,
0.012434432,
0.0033544204,
-0.038179524,
-0.008300769,
0.03432679,
-0.047195993,
-0.06447979,
0.014554773,
0.033417117,
-0.0047624074,
0.022139844,
-0.038018994,
0.005043336,
0.034888647,
-0.06843954,
0.04213928,
-0.02849418,
0.033203077,
-0.04219279,
-0.02308965,
-0.02844067,
-0.03740363,
-0.061536726,
-0.014822325,
-0.010280646,
0.014554773,
0.0039229663,
-0.03232016,
0.039704565,
-0.006170395,
-0.01260834,
0.011665223,
-0.013912652,
0.030688098,
0.003635349,
0.02674172,
0.04219279,
-0.03159777,
-0.008782361,
-0.010487999,
0.037216343,
0.01004654,
0.009605081,
-0.022701701,
-0.023169916,
-0.03427328,
-0.0035450505,
-0.05704187,
-0.005585127,
0.034621097,
0.060627054,
-0.070205376,
-0.011471248,
0.027370466,
0.028761731,
0.049202625,
0.006949637,
0.02718318,
0.0011287307,
-0.019557977
] |
What type of model is brand_new_bert? BERT-like encoder-only model? GPT2-like decoder-only model? BART-like
encoder-decoder model? Look at the model_summary if you're not familiar with the differences between those.
What are the applications of brand_new_bert? Text classification? Text generation? Seq2Seq tasks, e.g.,
summarization?
What is the novel feature of the model that makes it different from BERT/GPT-2/BART?
Which of the already existing 🤗 Transformers models is most
similar to brand_new_bert?
What type of tokenizer is used? A sentencepiece tokenizer? Word piece tokenizer? Is it the same tokenizer as used
for BERT or BART? |
[
0.03371714,
-0.005000554,
-0.015386912,
-0.04006607,
0.006125486,
-0.019940576,
0.019632375,
-0.006876725,
0.0008196208,
0.06983824,
0.012505237,
-0.030850874,
0.06540015,
-0.060099106,
0.030465623,
0.049712747,
-0.0043995627,
-0.031451866,
-0.06657132,
-0.019354993,
0.014932317,
-0.014947726,
-0.05729448,
-0.00046157846,
-0.028030839,
0.020757306,
0.013591644,
-0.0124435965,
0.10324718,
0.04980521,
-0.018630723,
-0.0071425475,
-0.0048426013,
-0.026875088,
-0.018153012,
-0.03812441,
-0.0082443645,
-0.03907983,
-0.02847773,
-0.013630169,
0.032206956,
-0.029695122,
0.033162378,
-0.037508007,
-0.063612595,
0.023654392,
-0.0050044064,
-0.027214108,
0.024517354,
-0.06805068,
-0.013129343,
0.0225911,
0.0053241644,
0.0076741935,
0.012921308,
-0.0034903712,
-0.024224563,
0.02881675,
-0.06576999,
0.00717722,
0.07828294,
0.008321415,
0.013352788,
-0.041268054,
0.0064722113,
0.032330237,
-0.013368199,
0.009400116,
-0.008198135,
-0.02855478,
-0.015232812,
0.00044809468,
-0.006383604,
-0.03328566,
-0.011534405,
0.004676943,
0.040682472,
-0.02362357,
0.004553663,
0.052363273,
0.014639526,
0.026952138,
-0.019216305,
0.0005952123,
-0.032237776,
-0.010170618,
0.060284026,
0.0040875096,
0.004492023,
-0.04524384,
0.013614759,
0.037138164,
-0.009592742,
0.022128798,
0.005293344,
0.035997823,
-0.04447334,
0.030511854,
0.008521745,
0.01400001,
-0.0013551193,
0.07624882,
-0.036860786,
-0.0035404537,
-0.0016257579,
-0.011241615,
-0.003885253,
-0.02280684,
-0.007951574,
-0.03830933,
0.019586144,
0.011580636,
-0.00079939514,
-0.0288938,
-0.011834901,
0.0081596095,
-0.00212851,
0.01742874,
-0.057880063,
-0.008375349,
0.029171182,
-0.01622676,
-0.018075962,
-0.04589106,
0.0034190998,
-0.030696774,
-0.014516246,
0.035011582,
0.0048849788,
-0.013568529,
0.010995055,
-0.018384162,
0.013337378,
0.062996194,
-0.004911946,
-0.03340894,
-0.02906331,
0.0023461767,
0.035165682,
-0.014431491,
0.0038486542,
0.005085309,
0.010879479,
0.08031706,
0.015980199,
0.0036656603,
0.016658239,
-0.05720202,
-0.0439494,
0.026274096,
-0.026397377,
-0.005774908,
0.014385261,
0.023978002,
-0.01670447,
0.01622676,
-0.02262192,
-0.008814535,
0.02249864,
0.013352788,
-0.008444695,
0.023561932,
-0.044689078,
0.07045464,
0.0018800233,
-0.00053935096,
-0.0051199817,
0.011827196,
0.0039314833,
-0.06099289,
-0.02242159,
-0.012381957,
-0.021558627,
0.014978547,
0.07174908,
0.043548737,
0.063982435,
0.003723448,
-0.013437544,
-0.002226749,
-0.009808483,
0.0022768315,
0.021882238,
0.04105231,
-0.0073698456,
-0.011750146,
0.009746842,
0.016750699,
-0.00081913924,
0.006294996,
0.022097979,
0.049065527,
-0.01682775,
0.023762261,
-0.037477188,
-0.004923504,
-0.07094777,
0.007050087,
-0.0015708597,
-0.017844811,
-0.04465826,
0.0013320042,
-0.0008331046,
0.05134621,
-0.020680256,
-0.012489827,
0.0044958754,
0.004191527,
-0.050020948,
-0.0010305456,
0.025780976,
0.016165119,
-0.0025599909,
-0.016411679,
-0.002280684,
-0.031421047,
-0.00848322,
0.019185483,
0.023407832,
-0.001421575,
0.027522309,
-0.020726487,
0.02897085,
0.021219607,
0.030095782,
0.0014254275,
0.004538253,
0.04539794,
-0.020680256,
-0.015856918,
-0.0065261465,
0.040805753,
0.0068844296,
0.037569646,
0.053811815,
0.0039006632,
0.05069899,
0.02898626,
0.024964243,
0.015294452,
0.058681384,
0.0012231709,
0.011634571,
0.018892692,
0.0013657137,
-0.002515687,
-0.012543762,
-0.026705576,
0.00219015,
0.02329996,
-0.03926475,
0.036028642,
0.0321145,
-0.04416514,
-0.0580958,
-0.0007165663,
-0.009623562,
0.054859698,
-0.019062204,
-0.044411696,
0.034980763,
0.029340692,
0.0054975273,
-0.0275069,
0.020649437,
0.038494248,
-0.04108313,
0.044257596,
-0.001794305,
-0.022514049,
-0.014816741,
-0.054181654,
-0.098747455,
0.006021468,
-0.06284209,
-0.0016161266,
0.013660989,
-0.030542674,
-0.013399019,
-0.029587252,
0.012351137,
0.0076048486,
0.00571712,
0.058897123,
0.024471123,
0.020264186,
-0.042747416,
0.019000564,
-0.024332432,
0.011025874,
0.016581189,
0.0045498107,
-0.01144965,
-0.04139133,
0.018199243,
0.027691819,
-0.0061524534,
-0.038093586,
-0.038155228,
0.025673104,
-0.036614224,
-0.008383054,
0.00431866,
0.009076506,
-0.002554212,
0.02222126,
-0.002394333,
-0.041976914,
0.043332998,
0.02286848,
-0.014770511,
0.017567432,
0.011018169,
0.01747497,
-0.024995064,
0.03454928,
0.037230626,
0.036429305,
-0.043148074,
-0.029371511,
-0.0338096,
0.019139254,
0.02830822,
-0.0347342,
-0.0069576274,
0.06453719,
-0.01762907,
-0.044195957,
-0.020325826,
-0.008552565,
-0.018754004,
-0.02792297,
-0.016319219,
0.033316478,
-0.0043995627,
0.009507987,
-0.021758959,
0.019185483,
-0.011087514,
0.008791421,
0.031960398,
-0.019046793,
0.010293898,
0.0454904,
-0.019262534,
-0.030681364,
0.024594404,
-0.07187237,
0.01115686,
-0.004796371,
0.009253722,
0.021913059,
-0.00026124812,
0.02354652,
0.03362468,
0.03276172,
-0.029371511,
0.008105674,
0.0034556985,
0.019940576,
0.022097979,
0.025642285,
-0.015063302,
-0.0058095804,
-0.09363133,
-0.0055244947,
0.005786465,
0.009900942,
0.076680295,
-0.063304394,
0.012166216,
0.0008682587,
-0.035597164,
0.0009486798,
-0.026274096,
-0.0550138,
0.04592188,
0.020464515,
0.02864724,
0.0066263117,
-0.028030839,
-0.0070308247,
0.00051575433,
0.024378663,
0.014624116,
0.021173377,
-0.038031947,
-0.009338477,
-0.0439494,
0.01432362,
0.004757846,
-0.002378923,
-0.0064144237,
0.016920209,
0.013799679,
-0.041206412,
0.03294664,
0.053133775,
0.03553552,
0.01664283,
0.024609813,
0.0038428756,
-0.021204198,
0.041946094,
-0.026674757,
0.0003611725,
-0.06484539,
0.023793083,
0.012982948,
0.00831371,
0.016072659,
0.00282774,
-0.0061794207,
0.0018963965,
-0.021235017,
-0.02223667,
-0.021466168,
0.014454605,
-0.024471123,
0.020295005,
-0.05698628,
-0.022344539,
-0.03322402,
0.026227865,
0.059174504,
-0.03963459,
0.003586684,
-0.050544888,
0.007870671,
0.042100195,
-0.0017288125,
-0.07248877,
0.0017365174,
0.015263632,
-0.057386942,
0.055198718,
0.054027554,
-0.025765566,
-0.0018337932,
-0.036182743,
0.0027680262,
-0.00826748,
-0.024332432,
0.0010093568,
0.01687398,
0.024101282,
0.0033227871,
0.0042762826,
-0.0062025357,
0.031806298,
0.011958181,
-0.02232913,
0.0339637,
-0.02846232,
-0.024871783,
-0.032237776,
0.009292247,
0.0069191023,
0.036953244,
0.0095619215,
-0.021882238,
-0.018769413,
0.0453363,
-0.038555887,
-0.051870152,
0.026674757,
0.06164011,
-0.030665955,
0.020063855,
0.006591639,
-0.011842606,
0.029864633,
0.035288963,
-0.0061139283,
-0.01107981,
0.014970841,
0.022205848,
0.0219747,
0.0032399583,
-0.0024598255,
-0.0694684,
0.04055919,
-0.004083657,
0.014516246,
0.0029510201,
-0.04484318,
-0.033162378,
-0.002350029,
-0.025118344,
0.02276061,
0.03491912,
0.007782064,
-0.00014567291,
0.010224553,
-0.0049157985,
-0.04062083,
-0.02846232,
0.0035905363,
0.03279254,
-0.007258123,
0.043579556,
-0.023870133,
-0.0056901523,
0.00219015,
-0.009839302,
0.003883327,
-0.0054397397,
-0.0153252715,
0.026551478,
0.018938923,
-0.016272988,
-0.0021631825,
-0.025981305,
-0.012220152,
0.024193743,
-0.031544324,
0.011834901,
-0.018615313,
-0.043579556,
0.032884996,
-0.021758959,
-0.05667808,
-0.06416735,
0.014547066,
-0.0031725394,
0.030758414,
0.070393,
-0.05692464,
-0.052733112,
-0.041360512,
0.015063302,
-0.03948049,
0.0033439759,
-0.023978002,
-0.028785931,
0.007905344,
0.0064144237,
0.038340148,
-0.029479383,
-0.0052008843,
-0.05618496,
0.036275204,
-0.07452289,
-0.008906996,
0.000120812205,
0.020233365,
-0.00562466,
0.04542876,
0.02286848,
-0.031467274,
-0.037446365,
0.000330834,
0.029587252,
0.002721796,
-0.0064722113,
-0.024286203,
0.007350583,
0.0057286774,
-0.013422133,
0.05877384,
0.005123834,
0.054859698,
0.0053780996,
0.050082587,
-0.03451846,
-0.043826118,
-0.033840418,
-0.019324174,
0.035936184,
-0.036521763,
0.009246016,
-0.012589992,
0.010848659,
0.006653279,
0.008005509,
-0.027691819,
0.008259774,
-0.066324756,
-0.052979674,
0.0228993,
-0.032576796,
0.013044588,
-0.017336281,
-0.026089177,
0.043548737,
0.017413331,
-0.00041414448,
0.05150031,
-0.009115031,
0.0067110667,
-0.04545958,
0.030542674,
0.013052293,
0.002089985,
0.013506888,
-0.0056593325,
-0.0031417194,
0.007974689,
-0.02302258,
-0.035782084,
0.010024223,
0.038401786,
0.024671454,
0.008013214,
0.030773824,
-0.012173922,
-0.050883908,
-0.02254487,
0.025488185,
0.03343976,
0.0016922136,
0.029556433,
0.035504702,
0.029001672,
0.03359386,
-0.015209697,
-0.0052355565,
-0.025087524,
0.03371714,
0.02930987,
-0.032854177,
-0.0032958195,
0.0011239689,
-0.047339603,
-0.026582297,
-0.029124951,
0.024609813,
-0.058927942,
-0.002394333,
0.02339242,
0.00020394208,
-0.008182724,
0.04558286,
0.042624135,
-0.027969198,
-0.039357208,
0.0085833855,
-0.027784279,
-0.010216848,
0.013961485,
0.05174687,
-0.013206393,
-0.012297202,
-0.025596054,
-0.010062748,
-0.035134863,
0.008105674,
0.07261205,
-0.0068381997,
0.05029833,
0.031837117,
0.005389657,
0.020110086,
0.021389117,
-0.01668906,
0.042932335,
-0.009577332,
-0.048264205,
-0.037045706,
-0.013175573,
-0.0037735305,
0.008090264,
-0.0347342,
0.004649976,
0.02288389,
0.01776776,
0.0013348936,
-0.08056362,
-0.004576778,
-0.05649316,
0.003916073,
0.001224134,
-0.030866284,
0.0024213006,
0.021913059,
0.018892692,
-0.026875088,
-0.002182445,
0.061208628,
0.020680256,
-0.0051970314,
-0.029479383,
-0.012127691,
-0.042932335,
-0.04478154,
-0.027137058,
-0.020572387,
-0.012451302,
0.0456445,
-0.013067703,
-0.031837117,
-0.004858011,
0.018707773,
-0.02815412,
0.021805188,
-0.0015612284,
0.000028096212,
-0.017243821,
-0.021805188,
-0.04499728,
0.024116693,
-0.012582287,
-0.03245352,
0.037045706,
0.0038293917,
0.036151923,
-0.0077589485,
0.0030454067,
0.05683218,
-0.037908666,
-0.010093568,
-0.00444194,
0.0066840993,
-0.043394636,
0.026443606,
0.011164565,
-0.024409482,
-0.029356102,
0.036367662,
0.024902605,
0.025981305,
0.027414437,
0.016920209,
-0.0044881706,
0.024132103,
0.022205848,
-0.0028412237,
0.047462884,
0.008814535,
-0.008645025,
0.0050390786,
-0.010671444,
0.034641743,
-0.03948049,
-0.0069345124,
0.01725923,
0.004280135,
-0.033193197,
0.0060253204,
0.023762261,
0.047740266,
0.0011596045,
0.021065507,
-0.006568524,
-0.027106239,
0.00068670936,
-0.0050159637,
-0.07347501,
-0.060715508,
0.026489837,
-0.05159277,
0.013429838,
-0.0072773853,
0.01735169,
0.0035520112,
0.061239447,
0.0064799166,
0.0042146426,
0.0017191812,
0.020017626,
-0.0010902594,
-0.060314845,
-0.06404407,
0.006676394,
0.021435348,
-0.010509638,
-0.022005519,
0.004499728,
0.014208045,
0.01622676,
-0.035905365,
-0.03960377,
-0.029417742,
0.032515157,
0.063920796,
-0.017413331,
0.025488185,
-0.04046673,
0.06583164,
-0.059482705,
-0.008228955,
-0.031297766,
0.016211348,
0.0459527,
0.015448553,
0.014015419,
0.050359968,
0.009469462,
-0.00084803306,
0.01605725,
-0.0052278517,
0.040528372,
-0.0047809607,
-0.007570176,
0.021805188,
0.06872872,
0.024486532,
0.010078157,
0.010725379,
0.014454605,
0.015856918,
-0.049435366,
-0.009369297,
0.020649437,
0.031405635,
0.001177904,
0.024193743,
0.0005870257,
0.011002759,
0.014654935,
0.010047338,
0.030912515,
0.0010449925,
-0.011842606,
-0.016488729,
-0.036799144,
0.030049553,
-0.030419394,
-0.05014423,
0.0016623567,
0.0042377575,
0.04089821,
0.01708972,
0.009731432,
0.025133755,
0.014916906,
0.032052856,
-0.0015631546,
0.033008277,
-0.010209143,
-0.009068801,
0.006187126,
0.0026697873,
-0.000885595,
-0.006576229,
-0.015440847,
-0.034795843,
-0.02836986,
0.036860786,
-0.027630178,
-0.04459662,
-0.004465055,
-0.018877283,
-0.042100195,
-0.063982435,
0.020634027,
-0.054551497,
0.03279254,
0.004827191,
-0.034826662,
-0.06835888,
0.049527828,
-0.0059328605,
0.02199011,
0.0025349495,
0.036614224,
0.02291471,
0.06068469,
0.015317567,
0.0072311554,
0.007812884,
0.032484338,
-0.030049553,
0.0052779345,
0.02294553,
-0.037415545,
0.0092614265,
-0.05014423,
-0.06718772,
0.01769071,
0.008175019,
-0.02864724,
-0.049281266,
0.012944423,
0.014269685,
-0.05627742,
0.002721796,
0.037847027,
0.01708972,
-0.020387465,
0.0019146958,
0.03276172,
-0.047000583,
-0.015402322,
-0.053318694,
0.02319209,
-0.015625767,
-0.049681928,
-0.037477188,
-0.051839333,
0.012451302,
0.0023692916,
-0.0351965,
-0.00072716066,
0.05245573,
0.015510192,
0.05045243,
0.003261147,
-0.030311523,
0.0056824475,
0.031991217,
0.027768869,
0.036151923,
0.0797623,
0.0086681405,
0.021589449,
-0.026967548,
0.00071030593,
0.01115686,
-0.0057941703,
-0.018230062,
-0.025688516,
0.015995609,
-0.002561917,
-0.070331365,
-0.020248776,
0.03944967,
0.00007819385,
-0.012882783,
-0.0016536885,
-0.0170589,
-0.049928486,
-0.05063735,
-0.044719897,
0.022097979,
-0.0095619215,
-0.036521763,
0.015425437,
-0.025318675,
0.2847773,
0.043117255,
-0.003291967,
-0.020973047,
0.048356663,
0.048418306,
0.021204198,
0.019771066,
0.0075624706,
-0.031236125,
-0.023669802,
-0.021296658,
-0.025072115,
0.024455713,
-0.02758395,
0.042654954,
-0.054613136,
-0.011118335,
-0.035997823,
-0.0451822,
-0.06385915,
0.0021766664,
0.014130995,
0.037662107,
0.027414437,
0.018800233,
-0.00885306,
-0.0039122207,
-0.013368199,
-0.035473883,
0.035627984,
-0.04071329,
0.033347297,
-0.035165682,
0.00893011,
0.01776776,
0.00840617,
0.0061177807,
-0.02271438,
0.014893792,
0.0070809075,
-0.021312067,
0.0345801,
-0.0348883,
0.024763914,
0.05781842,
-0.054212477,
0.037847027,
0.00417997,
-0.02836986,
0.03911065,
-0.04043591,
0.038340148,
-0.041637894,
-0.02313045,
-0.006006058,
-0.049589466,
-0.05630824,
-0.0015766384,
-0.021019276,
0.0043995627,
-0.0012202815,
-0.037662107,
0.01435444,
-0.009061096,
0.00854486,
-0.030403983,
0.02263733,
0.019123843,
-0.030881694,
0.0041375924,
0.0028104037,
-0.022205848,
-0.024794733,
0.0043225125,
0.030003322,
-0.017213,
0.02189765,
0.009862417,
-0.03954213,
-0.01662742,
-0.0024713832,
0.005146949,
-0.03325484,
0.067372635,
0.019385815,
-0.04659992,
-0.014331325,
0.010332423,
0.01415411,
0.057725962,
0.017798582,
0.012736388,
0.008128789,
0.026428197
] |
In the following, we try to give you a general recipe that we found most useful when porting a model to 🤗 Transformers.
The following list is a summary of everything that has to be done to add a model and can be used by you as a To-Do
List:
☐ (Optional) Understood the model's theoretical aspects
☐ Prepared 🤗 Transformers dev environment
☐ Set up debugging environment of the original repository
☐ Created script that successfully runs the forward() pass using the original repository and checkpoint
☐ Successfully added the model skeleton to 🤗 Transformers
☐ Successfully converted original checkpoint to 🤗 Transformers checkpoint
☐ Successfully ran forward() pass in 🤗 Transformers that gives identical output to original checkpoint
☐ Finished model tests in 🤗 Transformers
☐ Successfully added tokenizer in 🤗 Transformers
☐ Run end-to-end integration tests
☐ Finished docs
☐ Uploaded model weights to the Hub
☐ Submitted the pull request
☐ (Optional) Added a demo notebook
To begin with, we usually recommend starting by getting a good theoretical understanding of BrandNewBert. However,
if you prefer to understand the theoretical aspects of the model on-the-job, then it is totally fine to directly dive
into the BrandNewBert's code-base. This option might suit you better if your engineering skills are better than
your theoretical skill, if you have trouble understanding BrandNewBert's paper, or if you just enjoy programming
much more than reading scientific papers.
1. (Optional) Theoretical aspects of BrandNewBert
You should take some time to read BrandNewBert's paper, if such descriptive work exists. There might be large
sections of the paper that are difficult to understand. If this is the case, this is fine - don't worry! The goal is
not to get a deep theoretical understanding of the paper, but to extract the necessary information required to
effectively re-implement the model in 🤗 Transformers. That being said, you don't have to spend too much time on the
theoretical aspects, but rather focus on the practical ones, namely: |
[
0.029389014,
0.0068729986,
-0.045083907,
-0.031864036,
0.0011754495,
-0.023194054,
0.029878091,
0.01720658,
0.011308027,
0.01999283,
-0.023031028,
-0.0068137166,
0.036043413,
-0.030708037,
-0.0038644406,
0.028736914,
-0.0037903383,
-0.03758474,
-0.055665728,
-0.009344313,
0.014627815,
0.021059904,
-0.06930057,
-0.05996367,
-0.01717694,
0.03296075,
0.041586272,
-0.019563036,
0.07001196,
0.037051205,
-0.024779845,
0.003812569,
-0.018258834,
-0.015442942,
-0.009018263,
-0.045765646,
0.005290912,
-0.04496534,
-0.038948227,
-0.0688856,
0.015768992,
-0.021193288,
0.03995602,
-0.042356938,
-0.0639652,
0.005724411,
-0.013064255,
-0.010403979,
0.0135311,
-0.03853325,
0.015946839,
0.052197736,
-0.012886409,
0.028396044,
-0.011974949,
-0.03144906,
-0.020674571,
0.013479228,
-0.041319504,
0.01695463,
0.07457666,
0.027580917,
-0.0139386635,
-0.056317832,
0.029077785,
0.06058613,
-0.025076255,
-0.029048145,
-0.035302386,
-0.014398098,
-0.03476885,
0.024690922,
-0.023208875,
-0.0590448,
-0.012278769,
-0.012871589,
0.016732324,
-0.01816991,
0.014435149,
0.023712771,
0.013953484,
0.037732948,
0.03420567,
0.022823542,
-0.0081068035,
-0.02921117,
0.06503227,
-0.0020285535,
-0.008499546,
-0.028099634,
0.013946073,
0.035628438,
-0.01879237,
0.033464648,
0.025446767,
0.042920116,
0.0011263567,
0.040489554,
0.0080401115,
0.025002154,
0.018747909,
0.05471722,
-0.002632488,
0.04831477,
-0.039363198,
0.009959363,
0.00085032516,
-0.009314673,
0.026988097,
-0.053679787,
0.012182436,
-0.007817804,
-0.0119897695,
-0.00953698,
-0.019711241,
0.019533396,
0.029433476,
0.03144906,
-0.04271263,
-0.015783813,
0.0006516381,
0.009722236,
-0.024483437,
-0.034857772,
0.027506813,
0.006335756,
0.012849358,
0.033079315,
-0.0018655282,
0.017443707,
-0.032130804,
-0.03909643,
0.020644931,
0.083172545,
0.009292442,
-0.035183825,
-0.0013597792,
-0.016984273,
0.035480235,
-0.022023236,
0.0036180501,
-0.011448822,
0.03788115,
0.08779653,
0.00539095,
0.022675337,
0.00446467,
-0.057651673,
0.018807191,
0.00923316,
-0.021385955,
0.0057392316,
-0.02802553,
0.0313305,
-0.018807191,
0.03168619,
-0.0473959,
0.0018951691,
0.0010059403,
0.0061097434,
0.025580151,
0.044698574,
-0.030826602,
0.051901326,
-0.016850887,
0.023949899,
-0.0060171154,
-0.0035068966,
0.020052113,
-0.044994984,
-0.007743702,
-0.011485874,
-0.03290147,
0.018629346,
0.021341493,
0.03779223,
0.007899317,
0.009411006,
0.03414639,
0.020229958,
0.016183967,
0.0045869392,
0.03909643,
0.06189033,
-0.021608263,
-0.009781518,
-0.002589879,
-0.0028381222,
-0.013968304,
0.00016730935,
0.0015394775,
0.049204,
-0.03853325,
0.003091923,
-0.00769183,
0.015413301,
-0.014368457,
-0.014227662,
0.017784579,
-0.07635512,
-0.033879623,
0.045854572,
-0.011974949,
0.043809343,
-0.0011235778,
-0.0062949997,
-0.006517307,
0.00039899515,
-0.033316445,
-0.011359899,
0.05388727,
0.0014440707,
-0.03284219,
-0.03728833,
0.010648516,
-0.04828513,
-0.017621553,
0.0017182496,
-0.006276474,
-0.023431182,
0.004975977,
-0.004234953,
-0.0033883327,
0.006339461,
-0.019933548,
-0.0027640199,
0.0012282474,
0.017443707,
-0.0060726926,
-0.040874887,
0.013375484,
0.01662858,
0.041023094,
0.04114166,
0.0596969,
-0.0005979138,
0.06663289,
0.036814075,
0.012649281,
-0.00986303,
0.021786109,
0.004990797,
0.016361812,
0.03636946,
0.022364106,
-0.022512311,
0.014442559,
-0.010426209,
0.011011618,
0.02027442,
-0.048729744,
0.051338147,
0.022097338,
0.012301,
-0.03965961,
-0.009692595,
0.0013959041,
0.04054884,
-0.03974853,
-0.028707273,
-0.01015944,
0.017162118,
0.016421095,
-0.0018896115,
0.021771288,
0.026054407,
-0.029389014,
0.02002247,
-0.014331406,
-0.058244493,
-0.014212842,
-0.0089738015,
-0.09431755,
0.006509897,
-0.034976337,
0.0027695775,
0.0070582544,
-0.021400776,
-0.02919635,
-0.03728833,
0.027551275,
0.0035328323,
-0.027981069,
0.035272747,
0.056021422,
0.02489841,
-0.023460822,
0.008462495,
-0.052405223,
-0.0005506735,
0.0042534783,
-0.0021934314,
-0.0053057326,
-0.052345943,
0.023860976,
-0.00090590195,
-0.036754794,
-0.0016070959,
-0.05809629,
-0.0043312856,
-0.049085435,
-0.015739352,
0.0043164655,
-0.013145767,
-0.02125257,
0.049085435,
-0.030885885,
-0.035450593,
0.03109337,
0.016687863,
0.000109995766,
0.03224937,
-0.020037292,
-0.009989005,
-0.019814985,
0.05634747,
0.07410241,
0.02245303,
-0.015027968,
-0.010529952,
-0.04149735,
-0.030218963,
0.0056725396,
-0.050389636,
-0.021119187,
0.048107285,
0.0013338433,
-0.079200655,
-0.0061023333,
-0.021267392,
-0.03500598,
-0.013627433,
-0.011256156,
0.0639652,
0.030619115,
0.026247073,
-0.011886027,
-0.0015070577,
-0.0070953057,
0.0031067436,
0.029062964,
-0.0010244658,
0.06663289,
0.010403979,
-0.027832864,
0.01661376,
0.04214945,
-0.04526175,
0.011159822,
-0.015872736,
-0.0075436253,
-0.0013180966,
-0.013004973,
0.016258068,
0.027788403,
0.04458001,
-0.061653204,
0.00706937,
-0.009477698,
0.003104891,
-0.0057688723,
0.02063011,
0.008736674,
0.020689392,
-0.045498878,
-0.0023453413,
0.0077733425,
-0.0056206677,
0.04241622,
-0.04950041,
0.022868004,
-0.013464408,
-0.033079315,
0.0054613473,
-0.030619115,
-0.03693264,
0.025906201,
0.05445045,
0.04114166,
-0.024083283,
-0.043335088,
-0.012686333,
0.024661282,
0.045854572,
0.03868146,
0.0041275043,
-0.050033946,
-0.024201846,
-0.01969642,
-0.020689392,
0.03106373,
-0.045647085,
-0.01568007,
-0.018629346,
-0.0258321,
-0.07493236,
0.030352347,
0.055013627,
0.070901185,
0.015265096,
0.033375725,
-0.0021674954,
0.0028158915,
0.04250514,
0.0032012241,
0.025061434,
-0.0418234,
0.035332028,
0.012063872,
-0.0011050522,
-0.025743177,
0.011908257,
0.009499929,
0.031241575,
-0.01077449,
-0.004794426,
-0.06094182,
-0.0011050522,
-0.004368337,
0.020793136,
-0.070071235,
-0.035183825,
-0.04398719,
0.036458384,
0.047514465,
-0.02429077,
-0.012886409,
-0.06206818,
0.006213487,
0.03995602,
-0.013079075,
-0.051842045,
0.001712692,
-0.004712913,
-0.070901185,
0.03788115,
0.042890474,
-0.0313305,
-0.0023286683,
-0.03284219,
0.040785965,
0.015635608,
-0.020066932,
-0.004460965,
-0.019577857,
-0.016154325,
0.0065914094,
0.035391312,
0.014301765,
-0.01230841,
0.0086403405,
0.0058059236,
-0.015457762,
-0.0026991803,
-0.027328968,
-0.025461588,
0.02430559,
0.011663719,
0.032812547,
0.037347615,
-0.0041015684,
0.002321258,
0.019429652,
-0.025387485,
-0.058185212,
0.023653489,
0.057740595,
0.0006108817,
0.039214995,
0.029744707,
-0.045676723,
0.01602094,
0.016080223,
-0.020259598,
-0.013308792,
-0.04369078,
0.000099111974,
0.025328204,
-0.021030264,
0.01934073,
-0.037436537,
0.055725012,
0.023253337,
0.0027195583,
-0.037614383,
-0.04120094,
-0.012012,
0.0132421,
-0.00799565,
0.048818666,
0.01479084,
0.0035754412,
0.0031437946,
0.033346083,
-0.035539515,
-0.021104366,
-0.033168238,
0.028662812,
0.046921644,
-0.008729264,
0.053027682,
0.04025243,
-0.013353254,
0.0016367369,
-0.021430416,
0.012582589,
-0.024720563,
-0.015020559,
0.013679305,
-0.021667544,
-0.029774347,
-0.010604055,
-0.032367934,
-0.010515132,
0.023623848,
-0.007625138,
0.0025713537,
-0.00036796476,
-0.04126022,
0.04425396,
-0.0033790697,
-0.04152699,
-0.0072990875,
-0.0072027543,
0.021134008,
0.040726684,
0.013471818,
-0.053116605,
-0.044461444,
-0.0547765,
0.020126214,
-0.07552517,
-0.023268156,
-0.053116605,
-0.038711097,
-0.0047759004,
0.022215903,
0.03109337,
-0.03758474,
0.0143388165,
-0.06390592,
0.022749439,
-0.036695514,
-0.021474877,
-0.013560741,
0.014842712,
-0.006217192,
0.05110102,
0.007832625,
-0.017102836,
-0.0007470449,
0.040459916,
0.03666587,
0.014553713,
-0.004209017,
-0.021667544,
0.027269686,
0.0045647086,
0.0032419804,
0.05287948,
-0.009759287,
0.056436393,
-0.005261271,
0.030070757,
-0.025995124,
-0.02643974,
-0.023475643,
-0.0038051587,
0.027254866,
-0.017088015,
0.029181529,
-0.008692212,
-0.005605847,
0.018822012,
0.013916432,
-0.0030659873,
0.011908257,
-0.043512933,
-0.054954346,
0.018970218,
-0.021697186,
-0.03293111,
-0.021400776,
-0.01046326,
0.025002154,
-0.01568007,
0.036191616,
0.047188412,
-0.013553331,
-0.0030104103,
-0.07700723,
0.052345943,
-0.0092405705,
0.014687098,
-0.018629346,
0.027314147,
-0.034294594,
-0.0064469096,
-0.026380457,
-0.007795573,
-0.024424154,
0.021489698,
0.034235314,
-0.011448822,
0.041349143,
-0.0037051204,
-0.05388727,
-0.025387485,
0.03204188,
0.007936368,
0.022230722,
-0.00829947,
0.030500552,
-0.019355549,
-0.022719799,
0.001455186,
-0.007966009,
-0.032723624,
0.08601808,
0.016243247,
-0.03995602,
-0.010626285,
0.0467438,
-0.05359086,
-0.07327246,
-0.043246165,
-0.0068433573,
-0.025698716,
0.0043498115,
0.029403836,
-0.0027955133,
-0.02830712,
0.08115696,
0.042238373,
-0.0061023333,
-0.0011698918,
0.01015203,
-0.005009323,
-0.018318115,
-0.00031632464,
0.04114166,
0.006039346,
-0.016584119,
-0.035865568,
0.0015163205,
-0.039007507,
0.004309055,
0.07570302,
-0.020882059,
0.008425443,
0.057058856,
0.0097074155,
0.04899651,
-0.003049314,
0.039155714,
0.0015959806,
-0.029285273,
-0.04858154,
-0.027906967,
0.025476407,
-0.0024527898,
0.017428886,
-0.042564422,
0.005113066,
-0.006098628,
0.01689535,
-0.009299852,
-0.049174357,
0.014235073,
-0.030559834,
-0.025031794,
0.030708037,
-0.019622318,
0.0052093994,
-0.01506502,
0.021400776,
-0.034027826,
-0.018836832,
0.024987333,
0.012338051,
-0.02240857,
-0.053383376,
-0.007106421,
-0.042297654,
-0.03506526,
0.0045017214,
0.0068729986,
-0.01788832,
0.02580246,
-0.002317553,
-0.016183967,
-0.039511405,
0.038622174,
0.006713678,
0.012352872,
-0.033435006,
-0.002202694,
-0.02802553,
-0.009677774,
-0.055784293,
0.017028734,
-0.0344428,
-0.014183201,
0.014331406,
0.030293064,
0.004334991,
-0.006898934,
0.013093895,
0.023016209,
-0.011878616,
-0.008358751,
0.03595449,
0.0005228851,
-0.04306832,
0.0036662167,
0.0090404935,
-0.023520105,
-0.010403979,
0.021000622,
0.0039311326,
0.031567626,
-0.00096240506,
-0.0026380457,
-0.015768992,
0.03479849,
0.025476407,
0.024646461,
0.00103836,
0.01879237,
0.013456997,
-0.0013875676,
0.0053613093,
0.049441125,
-0.03995602,
0.010515132,
-0.015872736,
0.004249773,
-0.0043535167,
0.007317613,
0.0032345701,
0.08204619,
0.024839127,
0.0018099514,
-0.026202612,
-0.0057466417,
-0.0063839224,
0.024098104,
-0.08097911,
-0.027951429,
0.003660659,
-0.038355406,
0.0050908355,
-0.030974807,
0.024942871,
0.0027436416,
0.0152058145,
-0.0010661484,
0.019236986,
-0.010893054,
0.035598796,
0.039718892,
-0.043750063,
-0.024335232,
-0.03933356,
0.009336904,
-0.0031530575,
-0.027106661,
0.023520105,
0.04271263,
-0.0054391166,
-0.0148723535,
-0.0110560795,
0.0105892345,
0.0063431663,
0.0045684134,
-0.027491994,
0.04366114,
-0.04277191,
0.052168097,
-0.011204285,
0.011715591,
-0.031775113,
0.0282923,
0.016939811,
0.019592676,
0.009655544,
0.042297654,
-0.009885262,
-0.005835565,
0.05468758,
-0.0019989125,
0.05468758,
0.018036526,
0.024261128,
0.002780693,
0.05136779,
0.012152795,
-0.000026341091,
0.034887414,
0.026424918,
0.013508869,
-0.0019563036,
-0.014501842,
0.012515897,
0.015946839,
-0.0044165035,
-0.026825072,
-0.0010689272,
0.0337907,
-0.017458528,
0.018614525,
0.022808721,
-0.032871827,
-0.02212698,
-0.041586272,
-0.02340154,
0.017932784,
-0.0010985682,
-0.045113545,
-0.005146412,
0.0026825073,
0.0510121,
0.014412918,
0.02522446,
0.03384998,
0.024750205,
0.019296268,
0.009151648,
0.037644025,
-0.0028659108,
-0.019548215,
-0.018881293,
0.026217433,
-0.0018923903,
-0.022364106,
-0.013753407,
0.016806426,
-0.008388393,
0.034650285,
-0.010737439,
0.013960894,
0.016169146,
-0.03716977,
-0.030085579,
-0.04342401,
-0.0021100661,
-0.05744419,
0.0072805616,
0.021934314,
0.01536884,
-0.07653297,
0.03479849,
0.028959222,
0.02922599,
0.02399436,
0.040074583,
0.00862552,
0.037999716,
0.07291677,
0.013612612,
0.020674571,
-0.008751495,
-0.03195296,
-0.012338051,
0.026676867,
-0.01476861,
-0.00070906745,
-0.036102694,
-0.04096381,
0.014620406,
0.015502224,
-0.03716977,
-0.06704786,
0.025817279,
-0.01785868,
-0.041082375,
0.0067173834,
0.04096381,
-0.0012560359,
-0.025817279,
0.0078029837,
0.0053946553,
-0.01627289,
-0.028766556,
-0.036754794,
0.04647703,
0.016747145,
-0.053442657,
-0.047158774,
-0.03906679,
0.014079458,
0.0053650145,
-0.037051205,
-0.01720658,
0.014227662,
0.02925563,
0.029952193,
0.014346226,
-0.058363058,
0.015531865,
0.049115077,
0.05880767,
0.017992064,
0.07973419,
0.055013627,
-0.00800306,
-0.033020034,
-0.001497795,
0.019948369,
-0.025016973,
0.010270594,
0.020719033,
0.004735144,
-0.013293972,
-0.045202468,
0.003471698,
0.04369078,
-0.012634461,
-0.016495196,
-0.038503613,
-0.037347615,
-0.06360951,
-0.012441794,
-0.06604007,
-0.013079075,
0.010389158,
-0.010737439,
0.0015496666,
-0.06277956,
0.26487166,
0.065743655,
-0.0026991803,
0.025565332,
0.024646461,
0.023208875,
0.007951189,
0.0089738015,
0.013390305,
-0.055191472,
0.027165944,
-0.023534926,
0.0010050139,
0.015087251,
-0.0041126837,
0.06037864,
-0.06094182,
0.02150452,
-0.043750063,
-0.024142565,
-0.05670316,
0.04096381,
0.014553713,
0.024187027,
0.0097074155,
0.012160205,
-0.0035939668,
-0.012738204,
-0.007013793,
-0.05468758,
0.042623706,
-0.011300617,
0.019563036,
-0.051189944,
-0.014242483,
0.030337526,
-0.0069656265,
-0.03906679,
-0.004412798,
0.00088645006,
-0.030856242,
0.008958981,
0.014301765,
-0.023223694,
0.008818187,
0.06503227,
-0.023638668,
0.003816274,
-0.01323469,
-0.056406755,
0.029300092,
-0.039126072,
0.021371135,
-0.010804132,
-0.054895066,
-0.024765026,
0.008380982,
-0.05931157,
0.015932018,
-0.025105895,
-0.0042201323,
-0.0017617848,
-0.022215903,
-0.016258068,
-0.043779705,
-0.00523163,
-0.012908639,
0.054569013,
0.0022638286,
-0.0074065356,
-0.027195584,
-0.0002950202,
-0.019236986,
-0.027729122,
0.04211981,
0.02769948,
-0.016999092,
0.0016413684,
0.04057848,
-0.042534783,
-0.01476861,
-0.007743702,
-0.010248363,
-0.0068767034,
0.021726826,
0.021030264,
-0.050952815,
-0.017354785,
0.0063283457,
0.029685425,
0.044787496,
0.011811924,
-0.012404744,
0.0054835784,
-0.0041719656
] | After you feel like you have gotten a good overview of the architecture of the model, you might want to write to the
Hugging Face team with any questions you might have. This might include questions regarding the model's architecture,
its attention layer, etc. We will be more than happy to help you.
2. Next prepare your environment
Fork the repository by clicking on the ‘Fork' button on the
repository's page. This creates a copy of the code under your GitHub user account. |
[
0.013528654,
0.048500832,
-0.031545486,
-0.066168584,
-0.0007889934,
-0.03396768,
0.024663612,
0.003921814,
0.01171201,
0.00829957,
-0.026629863,
0.0042993906,
0.06360391,
-0.03530701,
0.01573,
0.019064074,
0.0030028056,
-0.027869456,
-0.07574336,
-0.012296186,
0.0040892297,
-0.0028282653,
-0.05431409,
-0.019847725,
-0.005613786,
0.021614501,
0.017126322,
-0.027641485,
0.071810864,
0.03396768,
-0.05149295,
-0.016470905,
-0.0099808555,
-0.00311501,
0.0029974624,
-0.030120669,
0.0077937585,
-0.0068676267,
-0.07010108,
-0.05670779,
0.015103079,
0.0052825157,
0.0005093727,
-0.048073385,
-0.03804266,
0.03279933,
0.023053568,
-0.026943322,
0.002416849,
-0.02169999,
-0.0095249135,
0.080872715,
-0.004705464,
0.03396768,
-0.018850353,
-0.018665126,
-0.01659914,
-0.020118441,
0.0016919723,
0.026444636,
0.0115766525,
0.030861575,
-0.0057491437,
-0.0062727644,
0.025846213,
0.07927692,
-0.021828223,
-0.047389474,
-0.011156331,
-0.028111674,
-0.03969545,
0.04260208,
-0.003556704,
-0.029949691,
0.008206956,
-0.004160471,
0.037786193,
-0.013122581,
0.054770034,
0.033996176,
0.029664727,
0.067194454,
-0.0068889987,
0.055197477,
-0.031175034,
-0.008727015,
0.047104508,
0.003725901,
-0.041547716,
-0.04841534,
0.0010294316,
0.023409773,
-0.0083636865,
0.028738594,
0.027812462,
0.024392897,
-0.008249701,
0.00805735,
-0.01816644,
0.018764863,
-0.0008820519,
0.07887797,
-0.02051739,
0.004260208,
0.015986467,
-0.026701104,
0.008520416,
-0.008320942,
0.0100236,
-0.0028692288,
0.027655732,
-0.035420995,
0.031175034,
0.02107307,
0.02500557,
-0.017026585,
0.0032984554,
0.053601682,
-0.07334967,
-0.042659074,
0.024749102,
-0.024107933,
-0.027456257,
-0.018095199,
0.02814017,
-0.016157445,
-0.0139561,
0.0172973,
0.061495177,
-0.0065506045,
0.014675633,
-0.017511023,
0.034879565,
0.03892605,
0.010030724,
-0.015274057,
-0.021870969,
-0.0034088788,
0.026173921,
-0.052490324,
-0.011961354,
-0.019363288,
0.02422192,
0.08070174,
0.030605108,
0.0018647315,
-0.0037828938,
-0.025319029,
0.019947462,
0.017097825,
-0.005079479,
-0.057363205,
-0.011961354,
0.019092571,
-0.023637744,
0.05511199,
-0.055197477,
0.029294275,
0.027484754,
0.054456573,
0.015559021,
0.018508395,
0.00017398373,
0.032713838,
-0.029664727,
0.041804183,
-0.046962027,
-0.024620868,
-0.0032325576,
-0.022184428,
0.007124094,
0.027385017,
-0.008349438,
-0.05636583,
0.04000891,
-0.025475759,
0.023096312,
0.025646739,
-0.008000357,
0.0040785437,
-0.0027499003,
0.054485068,
0.024079436,
0.038242135,
-0.053658675,
-0.024905832,
-0.009517789,
0.014241064,
0.004555858,
-0.012566902,
-0.023167552,
0.04015139,
-0.06662452,
0.0066432175,
-0.042260125,
0.010679017,
0.029465253,
-0.02420767,
0.004342135,
-0.017411286,
-0.014917852,
0.012018346,
0.01689835,
0.016128948,
0.00056369393,
-0.06457279,
-0.0121822,
0.002208469,
-0.037301756,
0.005556793,
0.059785396,
0.043257497,
0.00471615,
0.022896837,
-0.012716508,
-0.03715927,
-0.01665613,
0.0035780761,
-0.009011978,
0.02405094,
0.045622695,
0.025532752,
0.036731828,
0.05103701,
0.021813976,
0.040122896,
0.00032436888,
0.024506882,
-0.018266177,
-0.018650878,
0.011590901,
0.016570643,
0.04317201,
0.018408658,
0.013656888,
-0.003193375,
0.03279933,
0.05337371,
0.014946349,
0.009489293,
0.022455145,
0.005097289,
0.023053568,
0.014746875,
-0.028838333,
0.006835568,
0.016713124,
-0.011469791,
-0.010679017,
0.017639257,
-0.056878764,
0.0196625,
0.0018771987,
-0.019163812,
-0.06007036,
-0.057192225,
-0.010358432,
0.010044972,
-0.025447262,
-0.018679375,
0.031545486,
0.011861616,
-0.01604346,
0.018579636,
0.020845098,
0.024008196,
-0.025262037,
0.057819147,
-0.023238795,
-0.026245162,
-0.03277083,
-0.0038398865,
-0.07409058,
-0.018893097,
-0.068904236,
0.010971105,
0.04040786,
-0.02963623,
0.01139855,
-0.008748387,
0.036959797,
-0.0068605025,
0.0057883263,
-0.01517432,
0.04491029,
0.050096627,
-0.001748965,
-0.015573269,
-0.012987223,
0.040521845,
-0.028239908,
0.0155162765,
0.0055674794,
-0.021001829,
0.012217821,
0.009923862,
-0.047189996,
-0.009311191,
-0.043285996,
0.004798077,
-0.05331672,
-0.0021532574,
0.016328422,
0.039894924,
0.010949732,
0.007487423,
-0.03701679,
-0.036190398,
0.03704529,
0.0007346722,
0.0102088265,
0.013143953,
-0.021842472,
0.0010677236,
-0.015388043,
0.025903204,
0.0251623,
0.032913312,
-0.04505277,
0.013998845,
-0.04434036,
-0.015160072,
-0.008235453,
-0.037244763,
-0.047446463,
0.036503855,
-0.024236167,
-0.07426155,
-0.018579636,
-0.016627636,
-0.030405633,
-0.004406252,
0.031004056,
0.041006286,
-0.0062585166,
-0.02169999,
-0.012702259,
0.027627235,
-0.012481412,
-0.030177662,
0.015915226,
-0.013834991,
0.0526898,
0.036218893,
-0.009247074,
-0.058303583,
0.02861036,
-0.05753418,
0.04473931,
-0.029921195,
0.017852979,
0.011491164,
-0.009289818,
0.022839844,
0.03405317,
0.043656446,
-0.04035087,
0.014832363,
-0.015259809,
0.016470905,
0.008719891,
0.028596113,
-0.03812815,
-0.02625941,
-0.04171869,
-0.010465294,
0.0021532574,
-0.006201524,
0.06559866,
-0.042003658,
0.014632889,
0.0072736996,
-0.013557151,
0.023010824,
-0.010878491,
-0.03419565,
0.032286394,
0.06360391,
0.023210298,
-0.010536535,
-0.084007315,
-0.02712855,
0.0066360934,
0.034167156,
0.064686775,
-0.006237144,
0.0045237998,
0.021557508,
-0.04206065,
-0.043969907,
0.0056565306,
-0.037102282,
0.009204329,
-0.028453631,
-0.01604346,
-0.036418367,
0.009268446,
0.028339645,
0.035563476,
0.006828444,
0.0005779421,
0.015929474,
-0.029180288,
0.01682711,
-0.022996575,
0.023281539,
-0.033768203,
0.022255668,
0.04505277,
-0.025618242,
-0.017083578,
-0.005873815,
0.01964825,
0.031801954,
-0.029607734,
0.0188646,
-0.017867228,
-0.010636272,
0.00068658456,
0.008100094,
-0.026672607,
-0.028467879,
-0.088224776,
0.0067215827,
0.058759525,
-0.013222318,
0.0060483557,
-0.024649365,
-0.02814017,
0.054200105,
0.0033002365,
-0.033454746,
0.014960597,
-0.0019502207,
-0.05439958,
0.040835306,
0.07266576,
-0.024150679,
-0.059329454,
-0.034452118,
-0.0061053485,
-0.015915226,
0.0030526742,
-0.023851465,
-0.016086204,
0.0048123254,
0.014419166,
0.018551141,
-0.019007083,
-0.0028603238,
0.00774389,
-0.0016082642,
0.011455543,
0.011704886,
-0.0057990123,
-0.03889755,
0.032656845,
-0.0007475846,
0.034651592,
0.018408658,
-0.01942028,
-0.017810235,
0.00013135048,
-0.04810188,
-0.079504885,
0.021500515,
0.031858947,
0.0013233004,
0.013621267,
0.034936555,
-0.036674835,
0.04889978,
0.024962824,
0.0045344857,
-0.01077163,
-0.04701902,
0.024677861,
0.019007083,
-0.0097528845,
0.01808095,
-0.030576611,
0.03490806,
0.008477672,
0.024435641,
-0.019206557,
-0.046677064,
0.016698876,
0.008563161,
0.0018130819,
0.032713838,
0.012502785,
0.013229442,
-0.028995061,
0.023566503,
-0.01942028,
-0.00048176685,
-0.045822173,
0.011334433,
0.035648964,
-0.004395566,
0.011605149,
0.007872123,
-0.016014963,
-0.014433414,
-0.0093183145,
0.023566503,
-0.010778754,
-0.059899382,
-0.011626521,
-0.012745004,
-0.036532354,
0.0019359725,
-0.045252245,
0.028567616,
-0.001902133,
0.06178014,
-0.021115813,
-0.010785878,
-0.028154418,
0.026401892,
-0.016242934,
-0.00683913,
-0.041861176,
0.006158779,
-0.009653147,
0.024905832,
0.0385271,
-0.041861176,
-0.022996575,
-0.02115856,
0.010109089,
-0.07893496,
-0.02932277,
-0.028282652,
-0.054827027,
-0.010151833,
-0.002650163,
0.00440269,
-0.05197739,
0.0127735,
-0.018722119,
-0.035164528,
-0.040236883,
0.024122182,
-0.011719135,
0.008940738,
-0.00955341,
0.030576611,
-0.008014605,
0.008541789,
-0.016399665,
0.0377292,
0.028368142,
0.039211012,
0.017553767,
-0.03396768,
0.011377178,
-0.03507904,
0.0018077388,
0.051236484,
-0.030434128,
0.01981923,
0.00058551144,
-0.0023830093,
-0.0377292,
-0.017496774,
-0.024079436,
0.024877336,
-0.039125524,
-0.01285899,
0.04915625,
0.008171336,
0.03334076,
0.0023954764,
0.020303667,
0.01830892,
0.014369297,
-0.01917806,
-0.054741535,
0.017938469,
-0.018194936,
-0.0025343965,
-0.007615656,
-0.025461512,
0.031004056,
-0.02728528,
0.038555596,
0.041832678,
0.053088747,
0.033939183,
-0.049099255,
0.037843186,
0.036104906,
-0.028325398,
0.0028371704,
-0.0015316801,
-0.0033269518,
0.031545486,
0.0040464853,
0.008727015,
-0.012232069,
0.03812815,
0.028197164,
-0.016556393,
0.018579636,
-0.036817316,
-0.06155217,
-0.047104508,
0.019192308,
0.035392497,
0.021400778,
0.013528654,
0.01667038,
0.02185672,
0.04174719,
-0.011847368,
-0.015758496,
-0.014746875,
0.038669582,
0.04442585,
-0.014176947,
0.0059414944,
0.02349526,
-0.07978985,
-0.033853695,
-0.06069728,
0.038327623,
-0.040065903,
0.0057598297,
-0.013001471,
0.00036154775,
-0.028667353,
0.0542571,
0.045394726,
-0.005891626,
-0.039011538,
-0.0037757698,
-0.033283766,
-0.023609247,
0.017112073,
0.0337967,
0.0061801514,
-0.05653681,
-0.026943322,
0.0073093204,
-0.06138119,
-0.01021595,
0.018508395,
-0.019676747,
0.034309637,
0.04308652,
0.024891583,
0.06531369,
-0.0005142705,
0.04889978,
0.01879336,
-0.012289062,
-0.054342587,
0.020075696,
-0.032200903,
-0.028439382,
0.016314175,
-0.050666556,
-0.012160828,
-0.01761076,
0.010550783,
-0.012481412,
-0.04300103,
0.008527541,
-0.003031302,
0.007437554,
0.0036030104,
-0.009817001,
0.015388043,
-0.011405674,
0.021799726,
0.0043670693,
-0.024791846,
0.011006725,
-0.013699632,
-0.032428876,
-0.036532354,
-0.026986068,
-0.04741797,
-0.06708047,
-0.009510665,
0.010073469,
-0.040122896,
0.014013093,
-0.02185672,
-0.013706757,
-0.0071062837,
0.023723232,
0.008064474,
0.04362795,
-0.02286834,
-0.03325527,
0.016228685,
0.0035371126,
-0.043200504,
0.007113408,
0.012338931,
-0.027840959,
0.048301358,
0.0065434803,
-0.0017258117,
-0.008035978,
0.027057309,
0.029921195,
-0.019591259,
-0.011377178,
0.014846612,
0.0076370286,
-0.020460397,
0.0005040296,
0.0047446466,
0.032913312,
-0.038470108,
0.0048764423,
-0.03120353,
0.038071156,
-0.02648738,
-0.01910682,
0.023110561,
0.042231627,
0.030576611,
0.009881118,
-0.013493034,
-0.02742776,
0.00682132,
-0.008028854,
-0.010044972,
0.05810411,
0.0042032152,
0.011947106,
-0.004110602,
0.013015719,
0.018294673,
0.007002984,
-0.013557151,
0.07163989,
0.017012335,
0.036247388,
-0.007149028,
-0.028567616,
0.012089587,
0.028952317,
-0.045793675,
-0.03844161,
0.009254198,
-0.048386846,
0.043371484,
-0.030576611,
0.032400377,
-0.00605548,
0.012253441,
-0.0012467164,
0.016627636,
-0.016171694,
0.048329853,
0.042573586,
-0.05257581,
-0.021742735,
-0.025347525,
0.03356873,
-0.0074019334,
-0.03664634,
0.019135317,
0.06405985,
-0.00864865,
-0.020032952,
-0.01096398,
-0.014746875,
0.0038434486,
0.02822566,
-0.034623098,
0.017169066,
-0.012353179,
0.03034864,
-0.045936156,
0.039723948,
-0.019448776,
0.047389474,
-0.0016180598,
0.038071156,
0.008121467,
0.042801555,
0.01371388,
0.021201303,
0.030234654,
0.010657644,
0.005460618,
0.0071098455,
0.0076299044,
0.0031399443,
0.09267021,
0.01815219,
0.02067412,
0.017852979,
0.02493433,
0.0014319429,
-0.0053395084,
-0.010721761,
-0.010750257,
0.022241421,
-0.012980099,
0.02295383,
-0.047902405,
-0.0052041505,
-0.023067815,
0.03704529,
0.02335278,
-0.029094798,
0.014618641,
0.008719891,
-0.012588274,
0.038669582,
-0.02742776,
-0.006226458,
0.00652567,
0.01642816,
0.024706358,
0.020617127,
0.02185672,
0.0024684984,
0.028168667,
-0.007815131,
-0.0042851423,
0.013599895,
0.015416539,
-0.01198985,
-0.032742336,
0.058047116,
-0.028710099,
0.026672607,
-0.06109623,
0.009788505,
-0.032827824,
0.0015343517,
0.016770117,
-0.009653147,
0.008776884,
-0.016100451,
-0.033711214,
-0.07676923,
0.011199076,
-0.046791047,
0.020645624,
-0.013393296,
-0.0032539298,
-0.075230435,
0.011605149,
-0.0008170445,
0.041547716,
0.007921992,
0.02932277,
0.011704886,
0.019591259,
0.037928674,
0.023965452,
0.021030325,
0.025888957,
-0.03875507,
-0.020645624,
0.012659514,
-0.026758097,
-0.011220448,
-0.03396768,
-0.015744247,
0.027869456,
0.0034534044,
-0.043257497,
-0.05220536,
0.044824798,
-0.0074161817,
-0.06537069,
0.025418766,
0.03750123,
-0.011776127,
-0.027470507,
0.011441295,
0.04385592,
-0.027085805,
-0.034993548,
-0.0330273,
0.014469035,
0.030006683,
-0.048871282,
0.011213324,
-0.0052575814,
-0.006618283,
-0.014746875,
-0.027185543,
-0.0019502207,
0.012331806,
-0.0045451717,
0.020389156,
0.0106647685,
-0.031858947,
0.03829913,
0.03835612,
0.034936555,
0.013564275,
0.05756268,
0.06109623,
-0.012880362,
-0.019676747,
0.0051970263,
0.028368142,
-0.045109764,
-0.009425176,
-0.0013339865,
0.006009173,
-0.026458884,
-0.06502873,
-0.023025071,
0.039097026,
-0.023210298,
0.019192308,
-0.018665126,
0.0018487023,
-0.061894126,
-0.10047822,
-0.065769635,
-0.010322812,
-0.016271431,
-0.0644588,
0.03174496,
-0.047930904,
0.23936956,
0.021044573,
0.017568015,
0.0079291165,
-0.015188568,
0.07295072,
0.003417784,
0.002664411,
-0.015373794,
-0.026900578,
0.01658489,
-0.037301756,
0.008221204,
0.022854093,
-0.039097026,
0.059158474,
-0.044083893,
0.021472018,
-0.035677463,
-0.061666157,
-0.05676478,
0.0122819375,
0.0110993385,
0.019562762,
0.014618641,
0.028425135,
-0.022241421,
0.006393874,
-0.038099654,
-0.047076013,
0.0345946,
-0.000436796,
0.022825597,
-0.01136293,
-0.0060269833,
0.03319828,
0.017895725,
-0.005022486,
0.013998845,
-0.00106149,
0.021001829,
-0.025062563,
0.0045309234,
0.00046929967,
-0.0032076233,
0.06126721,
-0.030918567,
-0.011063717,
0.00908322,
-0.023110561,
0.020830851,
-0.01517432,
0.034138657,
-0.033226773,
-0.027769718,
0.018451404,
-0.029465253,
-0.026672607,
-0.0041925292,
-0.044767804,
0.06799235,
0.00009545172,
0.016399665,
0.015986467,
-0.013863486,
0.0012600741,
0.0013998845,
0.085489124,
-0.030434128,
-0.013165325,
-0.028738594,
-0.014070085,
-0.03450911,
-0.08326641,
0.019349039,
0.037216265,
-0.0306621,
0.0064900494,
0.007031481,
-0.04063583,
0.028154418,
0.014718378,
0.01470413,
-0.055795904,
0.030177662,
0.008007482,
-0.031317517,
-0.024107933,
0.017810235,
0.010842871,
0.0337967,
0.0471615,
-0.0377292,
0.02256913,
0.01446191
] | Fork the repository by clicking on the ‘Fork' button on the
repository's page. This creates a copy of the code under your GitHub user account.
Clone your transformers fork to your local disk, and add the base repository as a remote:
git clone https://github.com/[your Github handle]/transformers.git
cd transformers
git remote add upstream https://github.com/huggingface/transformers.git
Set up a development environment, for instance by running the following command: |
[
0.022196688,
0.0020468845,
-0.05368501,
-0.028591856,
-0.025322577,
-0.022454789,
-0.0026562896,
0.0068325074,
-0.014446488,
0.037568036,
0.00734154,
-0.0015602565,
0.061141264,
-0.034040656,
0.00051889056,
0.038026884,
-0.008330927,
-0.019386254,
-0.043934528,
0.014582708,
0.016790904,
0.009320314,
-0.052681286,
-0.013292202,
-0.040120367,
0.031603035,
0.021049572,
-0.004473751,
0.092285454,
0.043848496,
-0.01673355,
-0.02948087,
0.010087448,
-0.01888439,
0.004516768,
-0.018712323,
-0.02229706,
0.018984763,
-0.06699155,
-0.04852299,
-0.008330927,
-0.0148121305,
0.015471722,
-0.07284184,
-0.05549172,
0.015600773,
-0.017092023,
-0.011327767,
0.016905617,
-0.0012797508,
-0.011184378,
0.031574357,
0.017708598,
0.048838448,
-0.038514405,
-0.027416063,
-0.0038751,
0.039317388,
-0.02718664,
-0.015701145,
0.017135039,
0.03765407,
0.0056495443,
-0.022139331,
0.008467147,
0.039317388,
-0.01846856,
0.03819895,
-0.007950945,
0.009363331,
-0.02840545,
0.024447901,
-0.011636054,
-0.052767318,
0.005291071,
0.010553463,
0.0037603884,
-0.030398564,
0.035646617,
0.038887218,
0.020877505,
0.0679666,
-0.0058574593,
0.027831893,
-0.03860044,
-0.0055455873,
0.0025738406,
-0.003432385,
-0.035560586,
-0.014898164,
-0.0040471675,
0.016919956,
-0.033122964,
0.027200978,
0.009370501,
0.04843696,
-0.045798592,
0.04949804,
-0.017708598,
-0.011901325,
-0.004448658,
0.11218791,
-0.015686806,
0.01278317,
0.006305551,
0.0010225461,
0.017981037,
-0.0063378136,
-0.027817553,
-0.016977312,
0.027100606,
-0.0026544973,
-0.0151132485,
0.0041654636,
0.021293333,
0.014898164,
0.011930003,
0.04106674,
-0.08064223,
-0.03768275,
0.016919956,
-0.018913068,
0.0032531482,
-0.048781093,
-0.009958398,
-0.031603035,
-0.025853118,
0.018583274,
0.051190034,
-0.0053089946,
-0.0008097023,
-0.011507004,
0.013822743,
0.038543086,
-0.012933728,
-0.04998556,
-0.020447336,
0.028104333,
0.0028606197,
-0.010904768,
-0.0034198384,
-0.01372237,
-0.0068576005,
0.089360304,
0.020332625,
-0.01644677,
0.031287577,
-0.06584444,
0.008230555,
0.009908211,
-0.025738407,
-0.014467996,
0.0057391627,
0.027616808,
-0.018138766,
0.015457383,
-0.008259232,
0.020361302,
0.031832457,
0.035589263,
0.026656099,
0.002774586,
-0.03900193,
0.037482005,
0.0030165557,
0.020217912,
-0.030255174,
-0.015055892,
0.005136927,
-0.041009385,
0.040952027,
0.013220508,
-0.045454457,
-0.022038959,
0.055950563,
-0.015643789,
0.06590179,
0.014030658,
-0.013406914,
0.016676193,
-0.026297625,
-0.022827601,
-0.016891278,
0.0421565,
0.019658694,
-0.008395452,
0.0059721707,
-0.0045705386,
0.00019099923,
0.008330927,
0.010410074,
0.02624027,
-0.029323144,
0.017651241,
-0.05314013,
0.021680485,
0.010933446,
0.037854817,
0.0015880382,
-0.0312589,
-0.031603035,
0.0033409742,
-0.016876938,
-0.01643243,
0.022196688,
0.001494835,
-0.005140512,
0.034757603,
0.005900476,
-0.004810716,
0.020103201,
0.016059618,
-0.02513617,
0.011184378,
0.0135861505,
-0.042586666,
-0.024906747,
0.023272108,
0.021637468,
-0.011987358,
0.0074275737,
0.0120590525,
0.06211631,
0.0019142492,
0.04298816,
0.00035354463,
-0.022497805,
0.04063657,
0.015428705,
-0.011922833,
0.014769114,
0.048551667,
0.015959246,
0.047633976,
-0.0045346916,
0.0038858543,
0.03590472,
0.042213853,
-0.002561294,
0.015141926,
0.03332371,
0.022139331,
-0.0086607225,
0.042644024,
-0.03140229,
-0.010962124,
-0.0052122064,
0.0012412149,
-0.0307427,
0.023415498,
-0.05778595,
0.049928207,
0.028763924,
-0.017350124,
-0.047261164,
-0.01182963,
-0.006323475,
0.060854483,
-0.012001697,
-0.03940342,
0.02229706,
0.02149408,
-0.013779727,
0.016676193,
0.031517003,
0.022325737,
-0.055807173,
0.033208996,
-0.009843686,
-0.042185176,
-0.02991104,
-0.011987358,
-0.07622583,
0.019543983,
-0.07995396,
0.010431583,
0.03059931,
-0.031058155,
0.015586433,
-0.01535701,
-0.003968303,
-0.0048143007,
0.008725248,
0.009119569,
0.06567237,
0.04184104,
-0.0041081076,
-0.0011336729,
-0.028348094,
-0.015012875,
-0.029997073,
-0.00193755,
-0.027086267,
-0.023358142,
0.042730056,
-0.01086892,
-0.012732984,
0.0025415781,
-0.057585202,
0.031316258,
-0.019759066,
0.0027297768,
0.028663551,
0.031287577,
-0.004581293,
0.005997264,
0.007072685,
-0.028161688,
0.04691703,
0.014195556,
-0.027846232,
0.029853685,
0.002093486,
0.04651554,
-0.04255799,
0.003489741,
0.028362434,
0.00072814955,
-0.07244035,
-0.017737275,
0.004355455,
-0.01304844,
-0.0018246308,
-0.011220224,
0.003120513,
0.042730056,
-0.021451062,
-0.06469732,
-0.018411206,
-0.04651554,
-0.020619404,
-0.025724068,
-0.011765105,
0.03467157,
-0.010245176,
0.01033121,
-0.020017168,
0.028935991,
-0.0429308,
-0.01142097,
0.025078814,
-0.04037847,
0.03885854,
0.037424646,
-0.011593037,
-0.024519596,
0.06486939,
-0.053082775,
0.012869203,
0.006022357,
0.0364496,
-0.020863166,
-0.0017108154,
0.0057212394,
0.015443044,
0.040321115,
-0.03438479,
0.008366775,
-0.007929437,
0.0038141594,
0.011772274,
-0.002527239,
-0.000035567304,
0.02991104,
-0.02758813,
-0.030828733,
0.018913068,
0.013342389,
0.07593905,
0.004416395,
0.027157962,
-0.014331776,
-0.035646617,
-0.01659016,
-0.0028462806,
-0.015787179,
0.048494313,
0.012431866,
0.0459133,
-0.03300825,
-0.04052186,
-0.007165888,
0.008194707,
0.05265261,
-0.0096787885,
0.011263241,
-0.008216215,
0.015400027,
-0.063320786,
-0.01846856,
0.025250882,
-0.03576133,
0.0030255173,
0.003418046,
-0.012173764,
-0.05250922,
0.024533935,
0.023558887,
0.033811234,
0.014066505,
0.048609026,
-0.0030757037,
-0.004473751,
-0.019257203,
-0.005559926,
-0.045999337,
-0.035589263,
0.034442145,
0.07450516,
-0.0060832975,
-0.031775102,
0.0021633883,
0.012933728,
-0.002244045,
-0.05833083,
0.0055957735,
-0.0015396442,
0.020418659,
-0.0068826936,
-0.00132456,
-0.024132445,
-0.05422989,
-0.04961275,
0.014403471,
0.058388185,
-0.00938484,
-0.0041690483,
-0.03340974,
-0.015256638,
0.03031253,
0.0064346017,
-0.011750765,
-0.013256355,
0.019816423,
-0.020605065,
0.01195868,
0.06051035,
-0.039231353,
-0.024648648,
-0.014073675,
-0.00584312,
-0.00018248548,
0.002993255,
-0.028864296,
-0.004703174,
0.008409792,
0.02107825,
0.024132445,
-0.024318852,
0.016891278,
0.05474609,
-0.041582942,
0.023429837,
-0.018697985,
-0.023931699,
-0.023472853,
-0.018339511,
-0.02568105,
0.046114046,
0.010825904,
-0.03914532,
0.007492099,
0.024275834,
-0.0669342,
-0.047404554,
0.02813301,
0.0049397666,
-0.010431583,
0.026770812,
0.024376206,
-0.0061370684,
0.052079048,
0.03234866,
-0.019271543,
-0.0103957355,
-0.019515304,
-0.010947784,
-0.0012322532,
-0.024949765,
0.021580113,
-0.05265261,
0.05027234,
0.026899861,
-0.012073392,
0.016246025,
-0.08861468,
0.008646384,
-0.0004274798,
-0.049412005,
0.02840545,
0.027932266,
0.023487192,
-0.011636054,
0.011392292,
0.012897882,
-0.021235978,
-0.012130748,
-0.030800054,
0.06561501,
0.011392292,
0.026383659,
-0.042644024,
-0.022354415,
0.024433563,
-0.032807507,
0.026899861,
-0.0008863261,
-0.018181782,
0.010897598,
-0.018970424,
-0.018855713,
-0.042242534,
-0.016403753,
-0.018282155,
0.0004449554,
-0.02923711,
-0.027688503,
-0.04367643,
-0.026383659,
0.08775435,
-0.010108956,
-0.040952027,
-0.036650345,
0.03533116,
0.0022655535,
0.01998849,
0.014475165,
-0.046171404,
-0.040435825,
-0.026727794,
0.044393376,
-0.069916695,
-0.009284467,
-0.020820148,
-0.020519031,
-0.016389415,
0.019759066,
0.014568368,
-0.080011316,
0.017981037,
-0.029652938,
-0.03533116,
-0.06733569,
-0.011291919,
-0.01251073,
0.004606386,
-0.009564077,
0.026584404,
-0.014711758,
0.0029341066,
-0.011356445,
0.015944907,
0.0134714395,
0.03361049,
-0.04880977,
-0.012209612,
0.014869486,
-0.02284194,
-0.0107183615,
0.025250882,
-0.021393707,
-0.010997971,
0.009478043,
0.024304513,
-0.025322577,
-0.040206403,
-0.006509881,
0.014080844,
0.042730056,
-0.004921843,
0.035560586,
0.007233998,
0.013270694,
0.039718878,
0.019228525,
-0.014898164,
0.017722936,
-0.029624261,
-0.05726975,
0.017751614,
-0.027387386,
-0.0017753406,
-0.00871091,
-0.033266354,
0.039718878,
-0.039059285,
0.0035883212,
0.061772175,
0.008072826,
0.0018335927,
-0.047347195,
0.0052157915,
0.009564077,
-0.013571812,
-0.0076068104,
0.008610536,
-0.018153105,
0.017307106,
-0.010947784,
-0.030627986,
-0.029308803,
0.013198999,
0.04118145,
0.0054595536,
0.018425545,
0.0070260833,
-0.040005658,
-0.05778595,
0.0026634592,
0.061370686,
0.009449365,
0.03521645,
0.058617607,
0.001363096,
0.07576699,
0.0056208665,
0.022139331,
0.0026760057,
0.04975614,
0.042041786,
-0.014252911,
-0.002132918,
0.011263241,
-0.050874576,
-0.04789208,
-0.0036671853,
0.0032782413,
-0.050214987,
-0.012159426,
0.013435592,
0.012618272,
0.011521342,
0.038428374,
0.04376246,
-0.003695863,
0.028204706,
0.02092052,
-0.0115285115,
-0.024548274,
0.014095183,
0.042185176,
-0.079724535,
-0.040837318,
-0.039919622,
-0.00083524355,
-0.036334887,
-0.04843696,
0.028505823,
-0.0038069899,
0.034614213,
0.071981505,
-0.011994528,
0.040693928,
0.011241733,
0.013600489,
-0.004541861,
-0.04470883,
-0.068826936,
-0.009607093,
0.009893872,
-0.023630582,
-0.0056746374,
-0.031287577,
-0.011843969,
-0.029710295,
0.02609688,
-0.011843969,
-0.04797811,
-0.01249639,
-0.0094923815,
-0.0148121305,
0.040808637,
-0.0097719915,
-0.0077143526,
-0.019070797,
-0.015385688,
-0.012474882,
-0.033782557,
0.0001562721,
-0.02173784,
-0.021451062,
-0.084140934,
0.014095183,
-0.091998674,
-0.039059285,
-0.040263757,
-0.028534502,
-0.00094637036,
0.05070251,
-0.007527946,
-0.018913068,
0.014389131,
0.048867125,
-0.018153105,
0.02760247,
-0.008015471,
-0.000006952428,
-0.00693288,
0.010424413,
-0.036478277,
0.0077000135,
0.028046977,
-0.034900993,
0.03484364,
-0.021049572,
0.066188574,
-0.014310268,
-0.02526522,
0.015658129,
-0.032664116,
-0.043447003,
0.010567803,
0.03699448,
-0.03332371,
0.02718664,
0.007180227,
-0.0168626,
-0.013356728,
0.01142097,
-0.012618272,
0.00727343,
-0.03576133,
0.0051154187,
0.018540256,
0.036134142,
0.014288759,
0.00597934,
0.0048967497,
0.012991085,
-0.030800054,
0.021135606,
0.06555766,
0.07083439,
-0.012403187,
0.013242016,
0.015041553,
-0.016661854,
0.018110087,
0.0047927923,
0.007979623,
0.058531575,
0.03946078,
-0.011227394,
-0.008051318,
-0.027272673,
-0.020146217,
0.04757662,
-0.057986695,
-0.04186972,
-0.0045705386,
-0.06297665,
-0.001036885,
-0.0091912635,
0.0044235648,
0.028348094,
0.017063344,
-0.010589311,
0.024949765,
-0.0013613036,
0.037482005,
0.0033678599,
-0.07760237,
-0.01742182,
-0.0077573694,
0.013242016,
-0.004911089,
-0.038141593,
-0.008718079,
0.07450516,
0.0029090135,
-0.0059183994,
-0.031115511,
-0.028720908,
-0.028118672,
0.052910708,
0.008137352,
0.002093486,
-0.019916795,
0.016747888,
-0.015643789,
0.035646617,
-0.035245128,
0.037969526,
0.026713455,
0.012582424,
0.0057427473,
0.019171169,
0.025996508,
-0.010675345,
-0.0040901843,
0.018009715,
0.047117773,
0.008653553,
0.020189235,
0.015199282,
0.06062506,
0.018984763,
0.024548274,
0.022340076,
0.041812364,
0.024892408,
-0.025595017,
-0.008775434,
0.0059183994,
0.016532803,
0.019658694,
0.0073092775,
-0.008782604,
0.006674779,
-0.0027100607,
0.028577518,
0.017995376,
0.0005628036,
0.019816423,
0.0155004,
0.009671618,
0.04961275,
-0.023687938,
-0.03209056,
0.017593887,
-0.0030631572,
0.06217367,
0.01251073,
0.025193527,
-0.017579546,
0.020318285,
0.05113268,
-0.029538227,
0.025595017,
0.0066245925,
-0.0037962357,
-0.027545113,
0.058674965,
-0.004054337,
-0.003961134,
-0.011442479,
-0.013442761,
-0.05164888,
0.01182963,
0.016231686,
-0.049870852,
0.0065636523,
-0.036076788,
-0.0094923815,
-0.046171404,
0.044135273,
-0.06704891,
0.034212723,
-0.0087539265,
-0.009019197,
-0.046716284,
0.006499127,
-0.0038751,
0.041124094,
0.017823309,
0.034212723,
-0.00584312,
0.08591896,
0.038715154,
0.0075637936,
0.022067636,
0.028835619,
-0.073243335,
-0.0076713357,
0.030255174,
-0.012905051,
-0.024161123,
-0.051017966,
-0.034126688,
0.03478628,
0.021106927,
-0.07272713,
-0.019658694,
-0.020103201,
0.02353021,
-0.038571764,
0.0054308753,
0.06722098,
0.058531575,
-0.008775434,
0.025437288,
0.027114945,
-0.037482005,
0.0070870235,
-0.021522757,
0.0590191,
-0.017350124,
-0.040837318,
0.008825621,
-0.031861138,
0.021580113,
0.011442479,
-0.033954624,
0.021723501,
0.0072949384,
0.021436723,
0.031115511,
0.009721804,
-0.0342414,
0.000048505965,
0.021580113,
0.018181782,
0.019414932,
0.009542568,
0.0051871133,
-0.035847362,
0.007079854,
0.041009385,
-0.004979199,
-0.028520161,
-0.0367077,
0.015313993,
0.026082542,
-0.012317154,
-0.03438479,
0.007298523,
0.0021418799,
-0.02364492,
-0.022540823,
-0.009994245,
0.0011354652,
-0.056896936,
-0.049813494,
-0.034757603,
-0.029423516,
-0.023128718,
-0.059879437,
0.013665015,
-0.043246258,
0.24295908,
0.045339745,
0.0026329888,
0.004523937,
0.031660393,
0.04238592,
-0.02702891,
0.006771567,
0.015643789,
-0.048580345,
-0.03685109,
0.005692561,
-0.022598177,
0.06073977,
-0.071694724,
0.02026093,
-0.05529097,
-0.00544163,
-0.017851986,
-0.019630017,
-0.043963205,
0.010861751,
0.03286486,
0.02188123,
-0.008065657,
-0.0048895804,
-0.011062496,
-0.035015706,
0.003554266,
-0.03002575,
0.017679919,
-0.051706236,
0.04634347,
-0.025107494,
0.028434128,
0.022555161,
0.01739314,
0.016504126,
0.008459978,
0.006373661,
0.007872081,
-0.021006554,
0.035732653,
0.0032692796,
-0.025967829,
0.03031253,
-0.019816423,
0.017350124,
0.030627986,
-0.043991882,
0.024949765,
-0.056065276,
-0.0020432996,
-0.025480306,
-0.041267484,
0.028634874,
-0.05342691,
-0.01387293,
-0.005273147,
-0.012252629,
-0.0013362104,
-0.04023508,
-0.01861195,
0.040206403,
0.010711192,
-0.0032101313,
0.0013577188,
0.045655202,
-0.042873446,
-0.032549407,
-0.010359888,
0.009535398,
-0.024892408,
-0.03791217,
0.014969859,
0.065213524,
0.010847412,
0.0155004,
-0.015715484,
-0.0538284,
0.012876373,
0.015873212,
0.023616243,
-0.036879767,
0.0135861505,
-0.0065994994,
-0.022540823,
0.022469128,
0.012905051,
0.013908776,
0.04161162,
0.053943112,
-0.004445073,
-0.011908494,
0.031201545
] | Set up a development environment, for instance by running the following command:
python -m venv .env
source .env/bin/activate
pip install -e ".[dev]"
Depending on your OS, and since the number of optional dependencies of Transformers is growing, you might get a
failure with this command. If that's the case make sure to install the Deep Learning framework you are working with
(PyTorch, TensorFlow and/or Flax) then do: |
[
0.027133612,
-0.012715333,
-0.027289715,
-0.005534576,
-0.01344618,
-0.0174552,
-0.0031256161,
-0.0059390254,
-0.009025616,
0.016078651,
-0.027601922,
-0.049953092,
0.05699194,
-0.03405893,
0.04932868,
0.049044855,
-0.0043708957,
-0.01548262,
-0.036982317,
-0.00080668216,
0.025501622,
-0.023543233,
-0.040189534,
-0.0041615753,
-0.014574382,
-0.0059567643,
0.016774021,
0.010466024,
0.08787203,
0.048392057,
-0.05003824,
-0.007819362,
-0.029063618,
-0.022677569,
0.020903667,
-0.021599036,
-0.023841249,
0.016419241,
-0.06641491,
-0.025388092,
-0.0069749844,
0.0013330877,
0.01768226,
-0.03295201,
-0.05060589,
0.0075781113,
0.012495369,
-0.01524137,
0.062725194,
-0.046206612,
-0.028552733,
0.047597352,
-0.00538202,
0.032554656,
-0.041807335,
-0.0054139504,
-0.0307098,
0.031901862,
-0.049555738,
-0.036471434,
0.05727576,
0.023656763,
0.0022439866,
-0.016774021,
0.030454358,
0.033093926,
-0.007131088,
0.028921705,
0.000662996,
0.024806252,
-0.0257003,
0.039735414,
-0.020066384,
-0.04001924,
-0.00814576,
0.01756873,
-0.008564401,
0.018476969,
0.0000069778116,
0.04609308,
0.027658688,
0.03712423,
0.00021475306,
0.012317979,
-0.024891399,
-0.017441008,
0.027843174,
-0.034938782,
-0.03479687,
-0.028311484,
-0.001289627,
0.005311064,
0.00085236016,
-0.012608899,
0.001019107,
0.050407212,
-0.019101381,
0.027658688,
0.020094767,
-0.026140226,
-0.0052294643,
0.093832344,
-0.010991099,
0.03224245,
0.013985447,
-0.010288634,
0.017242331,
-0.020165723,
-0.045979552,
-0.00619092,
0.03224245,
0.010217678,
-0.014219602,
-0.0057368004,
0.0048285625,
0.01803704,
-0.042091157,
0.04087071,
-0.04467396,
-0.008777269,
0.056736495,
-0.03175995,
0.012807576,
-0.0677205,
-0.0015308778,
-0.052904867,
-0.00640024,
0.014212507,
0.040104385,
-0.038685266,
-0.011005291,
0.02723295,
-0.01942778,
0.041466743,
0.042885866,
-0.050236918,
-0.020492122,
0.026949126,
0.046972938,
-0.021655802,
-0.008053517,
-0.008493445,
-0.0086495485,
0.07600817,
0.020151531,
-0.0064499094,
0.007989657,
-0.056225613,
-0.020052193,
0.035109077,
-0.015638724,
0.040416595,
0.02304654,
0.036272757,
-0.012701142,
0.012410222,
0.0020453096,
0.0050520743,
0.017994467,
0.03922453,
0.024295367,
0.0052755857,
-0.030113768,
0.024536619,
0.005055622,
0.03675526,
0.003074173,
-0.021400359,
-0.0125308465,
-0.029375825,
0.03349128,
0.015837401,
-0.04932868,
0.005396211,
0.05097486,
0.004417017,
0.066131085,
0.005534576,
-0.018789174,
0.008266386,
-0.029602883,
-0.007599398,
0.010189296,
0.029375825,
-0.012452795,
0.017582921,
-0.0063221883,
-0.02128683,
-0.0020293444,
0.01790932,
-0.016419241,
0.021599036,
-0.036414668,
0.044815872,
-0.070785806,
-0.0015237823,
-0.009515213,
-0.0015867557,
-0.017114611,
-0.04467396,
-0.021457125,
0.04785279,
-0.009032711,
0.0012417317,
0.034484662,
-0.0094371615,
-0.029262295,
0.01850535,
-0.016149608,
-0.028226336,
0.05909224,
0.01895947,
-0.007840649,
0.0065173176,
0.044986166,
0.020194106,
0.011381358,
0.013623571,
-0.00073483906,
-0.016944317,
0.047909558,
0.01192772,
0.07169404,
0.018193144,
0.01221864,
0.00096411596,
-0.012197353,
0.03195863,
0.043027777,
0.020406974,
0.014829825,
0.041041005,
-0.006272519,
0.014333132,
-0.016263139,
0.00196371,
0.036925554,
0.010834997,
-0.0053536375,
0.008088995,
-0.00334558,
-0.0065137697,
0.01815057,
-0.018931087,
-0.0050627175,
-0.0061554415,
-0.0136377625,
-0.0060880333,
-0.03919615,
0.02432375,
-0.033349365,
0.0022688212,
0.012906915,
-0.015255561,
-0.038940705,
-0.032128923,
-0.0119490065,
0.06516608,
-0.008578592,
-0.013254599,
0.051031627,
0.03848659,
-0.0025969932,
-0.021088153,
0.043339986,
0.06641491,
-0.02523199,
0.03317907,
-0.020307636,
-0.02943259,
-0.03760673,
-0.015298135,
-0.05247913,
0.011544557,
-0.06743667,
-0.017057845,
0.048448823,
-0.037067465,
-0.003056434,
-0.007521346,
-0.009848706,
0.027105229,
0.03036921,
0.036982317,
0.05270619,
0.010153818,
-0.038089234,
0.014758868,
-0.04546867,
0.00724107,
-0.044730723,
0.046831023,
-0.007400721,
-0.031589653,
0.05372796,
-0.008202525,
-0.018987851,
-0.0311923,
-0.02770126,
0.023316175,
-0.012027059,
0.013226217,
0.028652072,
0.014971737,
0.004839206,
-0.03584702,
0.0139003,
-0.047909558,
0.056452673,
0.015539385,
-0.028212145,
0.0057900175,
0.019115573,
0.026239565,
-0.033320982,
0.01954131,
0.014645339,
0.011225254,
-0.09042645,
-0.017313289,
-0.0075923023,
-0.0008559079,
-0.014169932,
-0.027871555,
-0.023429703,
0.025302945,
-0.022833673,
-0.041580275,
0.018363439,
-0.025742872,
-0.02013734,
-0.013524232,
-0.027318098,
0.024650149,
-0.004789537,
0.04203439,
-0.021315211,
0.026849788,
-0.015056884,
-0.01546843,
0.03269657,
-0.03434275,
0.054863255,
0.03456981,
0.01803704,
-0.018860132,
0.04663235,
-0.03908262,
0.027048465,
-0.01192772,
-0.0060277204,
-0.011920624,
0.003457336,
0.021315211,
0.05690679,
0.032270834,
-0.03791894,
0.027218759,
0.0043638,
0.014177028,
0.039111,
0.028155379,
0.0365282,
-0.007840649,
-0.031163918,
0.008834034,
-0.008798556,
-0.008961755,
0.042999394,
-0.02501912,
0.032441128,
-0.0114806965,
-0.029744796,
-0.002325586,
-0.0071843048,
-0.034626577,
0.024011543,
0.022478892,
0.027970893,
0.00037695427,
-0.039536737,
-0.025444856,
0.015553577,
0.046007935,
0.003510553,
0.0049775704,
0.004111906,
0.039394826,
-0.03618761,
-0.026452433,
0.0036400477,
-0.017625494,
0.008018039,
-0.0014501653,
-0.028779794,
-0.038571734,
0.028070232,
0.02188286,
0.033945397,
0.0077058324,
0.057389293,
0.0024887852,
0.001855502,
-0.010175104,
-0.0067443773,
-0.03059627,
-0.051258687,
0.03896909,
0.04342513,
-0.0011787582,
-0.035534814,
-0.0004510147,
0.0027122968,
0.03096524,
-0.047767647,
-0.00035123268,
0.0067337337,
-0.0044063735,
-0.023869632,
-0.003508779,
-0.04515646,
-0.040757183,
-0.031163918,
0.03107877,
0.061135773,
-0.030539505,
-0.028126998,
-0.022124112,
0.005545219,
0.036329523,
0.014184124,
-0.060341068,
0.023358747,
0.0007787432,
-0.038458206,
0.015851593,
0.031362597,
0.029574502,
-0.0013588093,
-0.046348523,
-0.05690679,
0.024423089,
-0.02047793,
-0.021102343,
-0.00855021,
0.013162356,
0.008812747,
0.0028684002,
-0.039820563,
0.013744196,
0.031816714,
-0.05841106,
0.01873241,
-0.013417798,
-0.0051159346,
-0.022251833,
-0.0005782922,
-0.00109095,
0.049612503,
-0.012211544,
-0.03945159,
0.0015752254,
0.02025087,
-0.062895484,
-0.040757183,
-0.0096429335,
-0.0054139504,
-0.0032249547,
0.03854335,
0.012665664,
-0.02418184,
0.060227536,
0.046603967,
-0.007805171,
0.023372939,
0.003725195,
0.023074923,
-0.009053998,
0.020038001,
-0.012353457,
-0.022237642,
0.044503666,
0.0070423926,
0.047682498,
0.007585207,
-0.074532285,
-0.03513746,
0.018647263,
-0.025884785,
0.02560096,
0.00989128,
0.0071772095,
0.0077555017,
-0.0030670774,
0.023358747,
-0.010600841,
-0.023713527,
0.024423089,
0.052166924,
0.05069104,
-0.0021517437,
-0.056708112,
-0.013623571,
0.013815152,
-0.023599999,
-0.009288154,
-0.019725796,
0.017994467,
0.018704027,
-0.032072157,
-0.014467948,
-0.029035235,
0.009337823,
-0.016603727,
-0.018420203,
-0.028935896,
0.00015787732,
0.02479206,
-0.06249813,
0.054409135,
-0.016348286,
-0.06403078,
-0.051826335,
0.0034874922,
0.010799518,
0.0012816446,
0.046121463,
-0.041722186,
-0.048079852,
-0.016192181,
0.039848946,
-0.055913404,
0.0052152732,
-0.010678893,
-0.03848659,
0.0001647512,
0.021769332,
0.019115573,
-0.049271915,
-0.0030315993,
-0.015298135,
-0.008195429,
-0.08020877,
-0.020917857,
-0.020307636,
-0.007070775,
-0.0043389653,
0.038117617,
-0.01675983,
-0.014872398,
-0.043254837,
0.028524352,
0.014687913,
0.034598194,
-0.026381478,
-0.028779794,
-0.0048640408,
0.0075000594,
-0.0070317495,
0.049271915,
-0.024394706,
0.027161995,
0.015212988,
0.05154251,
-0.02175514,
-0.026778832,
-0.0028488874,
0.004133193,
0.03760673,
-0.006414431,
0.0323276,
0.0042999396,
0.00942297,
0.033548042,
0.0009836289,
-0.00071044796,
-0.011211064,
-0.04106939,
-0.03405893,
0.036329523,
-0.03593217,
-0.008564401,
-0.012466987,
-0.008834034,
0.012076728,
0.011516174,
-0.00016242295,
0.063349605,
0.0120057715,
-0.008975946,
-0.039479975,
0.02816957,
0.030908477,
-0.019257486,
-0.0080393255,
-0.006258328,
-0.037067465,
-0.0025632891,
-0.03667011,
-0.059659887,
0.010629224,
0.008692122,
0.013332651,
-0.013829344,
0.03667011,
0.013254599,
-0.034144074,
-0.052337218,
0.017483583,
0.014687913,
0.023770293,
0.046376906,
0.022024773,
-0.0122683095,
0.071580514,
-0.008848226,
0.016419241,
-0.005875165,
0.0386285,
-0.021669993,
-0.023245217,
-0.005325255,
-0.0076135895,
-0.04200601,
-0.060795184,
-0.025558386,
0.00767745,
-0.050549123,
-0.0024462114,
0.024252795,
0.002765514,
-0.008855321,
0.043311603,
0.0741917,
-0.014113168,
-0.030113768,
0.027672878,
-0.02199639,
0.0009987071,
0.0087276,
0.02128683,
-0.047909558,
-0.043680575,
-0.0053394465,
0.010707275,
-0.045099694,
-0.025104268,
0.059432827,
-0.021897051,
0.043084543,
0.016376667,
-0.0011902886,
0.0365282,
0.02175514,
-0.014815633,
-0.02455081,
-0.04515646,
-0.061760187,
-0.03970703,
-0.013148165,
-0.0328101,
-0.013531328,
-0.001981449,
0.0037180996,
0.017185567,
0.021740949,
-0.020605652,
-0.0623846,
0.00012982749,
-0.017072037,
-0.03956512,
0.06386049,
-0.009678412,
-0.0023929945,
-0.024706913,
0.0117148515,
-0.024891399,
-0.0035708656,
0.013013348,
-0.032497894,
-0.021073962,
-0.057105467,
-0.0043957303,
-0.062214307,
-0.042800717,
-0.04725676,
-0.053557664,
0.0307098,
0.028453395,
0.002946452,
-0.021968007,
0.0032639806,
0.021400359,
-0.023841249,
0.0052684904,
-0.026111845,
-0.031249065,
-0.00942297,
-0.007166566,
-0.0073013827,
0.00712754,
0.029574502,
-0.048846178,
0.04538352,
-0.009046903,
0.039252914,
0.007528442,
-0.021003004,
0.02733229,
-0.056850027,
-0.025501622,
-0.0060773897,
0.03465496,
-0.035988934,
0.009160432,
0.023372939,
-0.030312445,
-0.030624652,
0.03405893,
-0.027204568,
0.010685989,
-0.022521466,
0.010749849,
-0.008557306,
0.04248851,
0.005743896,
0.023912204,
0.016674682,
0.012353457,
-0.002073692,
0.024423089,
0.022819482,
0.05852459,
-0.035478048,
0.022564039,
0.015979314,
0.011729043,
0.020151531,
0.012935297,
0.011253637,
0.0551187,
0.024465663,
0.0048321104,
0.0232736,
-0.02582802,
-0.052876484,
0.03922453,
-0.04376572,
-0.019058809,
0.019285867,
-0.06073842,
0.026111845,
-0.011941912,
0.0052684904,
0.008018039,
0.018278291,
0.017370053,
0.03014215,
-0.012573421,
0.02931906,
0.008067708,
-0.04248851,
-0.021116534,
-0.022393744,
0.049186766,
-0.0036755258,
-0.027374862,
0.006194467,
0.024962354,
-0.015496812,
-0.016206373,
-0.051230304,
-0.021329403,
-0.011133011,
0.049953092,
-0.040558506,
0.026934935,
-0.003838725,
0.043964397,
-0.07038845,
-0.013275886,
-0.037266143,
0.033349365,
0.04314131,
0.029347442,
0.022322789,
0.070785806,
-0.0037713167,
0.004580216,
-0.013282982,
0.01732748,
0.031277448,
-0.035875402,
0.019739987,
0.038373057,
0.017412627,
0.014489235,
0.025331328,
0.0035247442,
0.038004085,
0.037493203,
-0.021244256,
-0.012247022,
-0.03153289,
0.0062973537,
0.01570968,
0.0022989777,
-0.005460072,
-0.005367829,
0.00087941217,
0.028921705,
0.019143956,
-0.008990138,
0.013006253,
0.0023362294,
-0.004434756,
0.022166684,
-0.029347442,
-0.029233912,
-0.007918701,
0.013105592,
0.03987733,
0.01425508,
0.021854479,
0.0005800661,
-0.013701622,
0.06187372,
0.021201681,
0.007141731,
-0.022634996,
0.016192181,
-0.031135537,
0.0099054715,
0.010231869,
-0.010189296,
-0.00016641422,
-0.022081537,
-0.06386049,
0.05293325,
0.009678412,
-0.03502393,
-0.0070459405,
-0.03178833,
-0.014347323,
-0.04932868,
0.0067479247,
-0.08117378,
0.0084153935,
-0.006861455,
0.020336017,
-0.03527937,
0.024011543,
0.0010776457,
0.039621886,
0.038685266,
0.030738182,
-0.014829825,
0.09826001,
0.033093926,
-0.014971737,
0.048335295,
0.0156245325,
-0.07260228,
-0.01465953,
0.016788213,
-0.0022599518,
-0.0021127178,
-0.007620685,
-0.027871555,
0.04873265,
0.010160914,
-0.03896909,
-0.01861888,
-0.017511966,
0.009806133,
-0.037720263,
-0.004644077,
0.11205387,
0.04143836,
-0.01524137,
0.014531809,
0.010026096,
-0.034598194,
-0.016532771,
0.010302826,
0.026012506,
-0.027758026,
-0.053245455,
-0.004197053,
-0.05503355,
0.008706314,
0.0011237672,
-0.014730486,
0.0073936256,
0.0060099815,
0.048023086,
0.01546843,
0.05863812,
-0.0020772398,
-0.04291425,
-0.0072091394,
0.048761033,
0.034967165,
0.060114007,
0.05247913,
0.03817438,
-0.0056303665,
-0.00756392,
-0.009955141,
-0.01861888,
-0.040672034,
-0.0064641004,
0.0027158447,
-0.01792351,
-0.038685266,
-0.019243294,
0.04203439,
-0.018789174,
-0.033320982,
-0.041637037,
0.0038564638,
-0.040643655,
-0.048079852,
-0.04609308,
-0.025004929,
-0.028325675,
-0.049186766,
-0.020506313,
-0.052110158,
0.23773131,
0.028311484,
0.022734335,
-0.026736258,
0.045809258,
0.055317376,
-0.014184124,
0.008479253,
-0.007996752,
-0.055345755,
-0.022961393,
-0.016376667,
0.016532771,
0.04291425,
-0.076235235,
0.012594707,
-0.05909224,
-0.015142031,
-0.016319903,
-0.03164642,
-0.032554656,
0.012644377,
0.016646301,
0.05060589,
0.006779855,
-0.009621647,
-0.005240108,
-0.053245455,
0.012694046,
-0.07561082,
0.037975702,
-0.030312445,
0.045213226,
-0.025416475,
0.018562116,
0.035790257,
-0.010976909,
-0.0015947383,
0.0038067948,
0.00025145066,
-0.0058680694,
-0.041012626,
0.030880094,
0.0061377026,
-0.0017029464,
0.016944317,
-0.047540586,
0.0232736,
0.039962474,
-0.057389293,
0.046859406,
-0.063349605,
0.0066663255,
-0.026778832,
-0.013751292,
-0.0036790736,
-0.07186434,
-0.03269657,
-0.0123250745,
0.00028271572,
0.013836439,
-0.009898376,
-0.034229223,
0.023713527,
-0.008848226,
-0.009685507,
-0.039820563,
0.038004085,
0.007826458,
-0.0076845456,
0.023188453,
0.012438604,
-0.013417798,
-0.037777025,
-0.0066769687,
0.0577015,
0.026821405,
0.023685146,
-0.012296692,
-0.021400359,
-0.01674564,
0.010948526,
0.04132483,
-0.0037358385,
0.026963318,
0.026849788,
-0.050350446,
-0.039167766,
0.028666263,
0.022876246,
0.034967165,
0.052762955,
0.02199639,
0.028481778,
-0.005442333
] | pip install -e ".[quality]"
which should be enough for most use cases. You can then return to the parent directory
cd ..
We recommend adding the PyTorch version of brand_new_bert to Transformers. To install PyTorch, please follow the
instructions on https://pytorch.org/get-started/locally/.
Note: You don't need to have CUDA installed. Making the new model work on CPU is sufficient.
To port brand_new_bert, you will also need access to its original repository: |
[
0.031522706,
-0.01061692,
-0.032059517,
-0.020443534,
-0.0016738051,
-0.05493361,
0.011191009,
-0.0015945883,
-0.027019463,
0.0029077237,
-0.021263663,
-0.032119162,
0.054038927,
-0.047000743,
0.03253668,
0.01689462,
-0.011675629,
-0.027272958,
-0.047537554,
0.02336617,
0.0036458382,
0.0037446264,
-0.07056076,
-0.025155539,
-0.0007474341,
0.021964498,
0.03283491,
-0.012786529,
0.09656625,
0.03963451,
-0.00855169,
-0.013800505,
-0.009073589,
-0.016387632,
0.006531195,
-0.047865607,
-0.03134377,
-0.001099716,
-0.060182426,
-0.05955615,
-0.0060428465,
-0.013547011,
0.033073492,
-0.049237456,
-0.07521312,
0.01136249,
0.008730627,
-0.026050223,
0.018236646,
-0.023202144,
-0.0063820807,
0.03122448,
-0.014613176,
0.053561762,
-0.015075429,
0.00021807928,
-0.037129395,
0.008492044,
-0.07437808,
0.02305303,
0.07038183,
0.04947604,
0.0021192832,
-0.051354874,
0.015835911,
0.022560954,
-0.01720776,
-0.014784657,
-0.027750123,
-0.006173321,
-0.0038732372,
0.029450024,
-0.02739225,
-0.056514222,
-0.007362506,
-0.008231095,
0.019444471,
0.016596392,
0.005062422,
0.047925252,
0.034236584,
0.050847888,
0.028257111,
0.01764019,
-0.0192208,
-0.005405384,
0.06650486,
0.01035597,
-0.040946715,
-0.05257761,
-0.00027376405,
0.017118292,
-0.029360555,
0.022993384,
0.017491076,
0.04055902,
-0.029599138,
0.02867463,
-0.0025330747,
-0.0148964925,
0.010184489,
0.07437808,
0.011064262,
0.016939355,
-0.0023056758,
-0.027064199,
0.028972859,
-0.024096828,
-0.014926315,
-0.018505052,
0.034355875,
0.008260918,
0.009364362,
-0.021412777,
0.007888133,
0.011556338,
-0.019086597,
0.02071194,
-0.062210377,
-0.030956075,
0.014478973,
-0.03516109,
-0.006602024,
-0.047209505,
0.027436983,
-0.00860388,
0.0139421625,
0.03188058,
0.0015535819,
-0.02581164,
-0.02177065,
0.0024939324,
0.015582417,
0.058452703,
-0.00685179,
-0.0390977,
-0.02645283,
-0.00034319528,
0.010437983,
-0.04383953,
-0.03226828,
0.010266501,
0.012808896,
0.06513301,
0.0035917845,
0.005561954,
0.014985961,
-0.05788607,
-0.0031108917,
0.009595488,
-0.024588905,
0.005222719,
0.021084726,
0.0036178795,
-0.031492885,
0.018564697,
-0.016313076,
0.011742731,
-0.0033718413,
0.013092212,
-0.013293517,
0.03068767,
-0.054307334,
0.063283995,
-0.009267437,
0.03176129,
0.0059123714,
-0.019474294,
0.017580545,
-0.039276637,
-0.0031220752,
-0.008976665,
-0.048163835,
0.022173258,
0.03993274,
0.031731468,
0.06382081,
0.004451054,
-0.005327099,
0.0027642015,
-0.001651438,
-0.014792113,
0.039038055,
0.06871175,
-0.040529195,
-0.015582417,
0.010027919,
0.0059608337,
0.012488301,
0.008477133,
-0.009207792,
0.048879582,
-0.030464,
0.018236646,
-0.029047415,
-0.0005936603,
-0.012451022,
-0.009334539,
-0.007064278,
-0.037874967,
-0.03280509,
0.051474165,
-0.008678437,
0.038710006,
0.021532068,
-0.048283126,
-0.009781881,
-0.03337172,
-0.028212376,
0.0005610416,
0.039336283,
0.02048827,
-0.013621568,
0.0045405226,
0.01491886,
-0.019876901,
-0.0017287909,
0.008193816,
0.0021304667,
-0.0015535819,
0.016521836,
0.0020577738,
0.040409904,
0.023246879,
0.0356979,
0.019802345,
-0.0036607496,
0.030449087,
-0.020950522,
-0.00579308,
0.027362427,
0.022009233,
0.017610367,
0.032775264,
0.011988768,
0.0028107997,
0.04383953,
0.041185297,
0.023395993,
0.013174226,
0.036980283,
-0.009483653,
0.04234839,
-0.0061994162,
-0.0013821007,
0.0045666173,
-0.0035246832,
0.004372769,
0.011854566,
0.0105274515,
-0.048998874,
0.03566808,
0.028793922,
-0.00076653936,
-0.05192151,
-0.006531195,
0.006862974,
0.045927122,
-0.007970145,
-0.01099716,
0.009930995,
0.007985056,
0.0105274515,
-0.0075265313,
0.024081917,
0.032655973,
-0.047656845,
0.060599945,
-0.033073492,
-0.06358223,
-0.023560017,
-0.04055902,
-0.06644522,
0.0053904727,
-0.04130459,
0.009468742,
0.0001526089,
-0.0260204,
-0.009073589,
-0.007533987,
0.013479909,
0.032029696,
0.017550722,
0.0150828855,
0.035041798,
0.0013252511,
-0.052100446,
0.0089095635,
-0.041244943,
0.0021062358,
0.01720776,
0.032238454,
-0.016969178,
0.0046672695,
0.015284189,
0.03483304,
-0.029703517,
0.006404448,
-0.057707135,
0.048641,
-0.03539967,
-0.028719364,
0.03486286,
0.018549787,
-0.015627151,
0.009491108,
-0.012547947,
-0.03963451,
0.044883326,
0.018475229,
-0.011474325,
0.011712908,
-0.009110868,
0.0070605497,
-0.0237986,
0.030344708,
0.048939228,
0.04258697,
-0.048402417,
-0.023440726,
-0.048193656,
-0.0074519743,
0.004980409,
-0.02294865,
-0.006102492,
0.046374466,
-0.027735211,
-0.058005363,
-0.017252494,
-0.02569235,
-0.04867082,
-0.03366995,
-0.0394854,
0.036890812,
0.047925252,
-0.0009906763,
-0.027541364,
0.019071685,
-0.000031016883,
0.0065051,
0.012831263,
-0.0016738051,
0.05299513,
0.03441552,
-0.002126739,
-0.0012441702,
0.0023056758,
-0.066325925,
0.012547947,
-0.00008032354,
0.013532099,
0.009371817,
0.02760101,
-0.011973857,
0.010751123,
0.025573058,
-0.040380083,
0.010706388,
0.023470549,
-0.022053966,
0.028257111,
0.055798475,
0.007205936,
-0.0056626056,
-0.064238325,
0.012346642,
-0.009729691,
0.018519964,
0.045092087,
-0.05424769,
0.033282254,
-0.015895557,
-0.01179492,
-0.005479941,
-0.0036309268,
-0.058243945,
0.009364362,
0.048641,
0.026780881,
-0.02983772,
-0.022784626,
-0.021114549,
-0.014978506,
0.035548788,
0.028257111,
-0.015463126,
-0.030434176,
-0.022799537,
-0.013949619,
-0.012741795,
-0.0058079916,
-0.021174194,
-0.013204048,
-0.0005200352,
-0.014106188,
-0.048641,
0.034117293,
0.044316694,
0.04947604,
0.012465933,
0.035727724,
0.00022099167,
-0.02251622,
0.017401608,
0.0030605656,
0.0014072638,
-0.064238325,
0.016298164,
0.03760656,
0.0012395105,
-0.0019198433,
0.016581481,
0.020011105,
0.022993384,
-0.03835213,
-0.012555402,
-0.018967306,
-0.026214248,
0.0075936327,
-0.009916084,
-0.05385999,
-0.030106125,
-0.05669316,
0.0214426,
0.05329336,
-0.06578911,
-0.0045703454,
-0.05207062,
-0.011906756,
0.019727787,
0.02123384,
-0.051026825,
0.033550657,
-0.0074631576,
-0.06936785,
0.052309204,
0.05502308,
-0.022814449,
0.014024176,
-0.07706214,
-0.0041155475,
0.005774441,
-0.04738844,
0.0008131375,
0.030926252,
0.010728755,
0.014061454,
0.019250622,
0.03662241,
0.018117355,
-0.00008713852,
-0.008611335,
-0.013375529,
-0.057945717,
-0.017565634,
-0.057200145,
0.021711005,
0.011854566,
0.031373594,
0.018341027,
-0.01635781,
0.029405288,
0.04163264,
-0.019295357,
-0.024245942,
-0.013450086,
0.050818063,
-0.0011239471,
0.03390853,
0.017505988,
-0.014560986,
0.035429496,
0.020965435,
0.0019366186,
0.015970113,
-0.030717492,
0.042676438,
0.0027865686,
-0.004451054,
-0.0009832206,
-0.029569315,
0.02751154,
-0.002378369,
0.016059581,
0.0077912086,
-0.058243945,
-0.021681182,
-0.0040372624,
-0.006076397,
0.029136883,
0.027839592,
0.023500372,
0.019623408,
0.03539967,
-0.0075675375,
-0.044614922,
-0.03823284,
0.0050176876,
0.06978537,
0.024395056,
0.031045543,
-0.044853505,
-0.0069859927,
0.00770174,
-0.01264487,
0.029121973,
-0.016626215,
-0.01625343,
0.0002900734,
-0.0003849006,
-0.008119259,
0.01120592,
-0.0006113676,
0.012637415,
0.01046035,
-0.010333603,
-0.015895557,
-0.023008296,
-0.039574865,
0.03939593,
-0.011302845,
-0.06656451,
-0.051474165,
-0.01030378,
-0.022262726,
0.06948714,
0.02390298,
-0.01731214,
-0.037845142,
-0.04768667,
0.046165705,
-0.07521312,
-0.00006273274,
-0.03122448,
-0.018833103,
0.019712877,
0.019041862,
0.03429623,
-0.026050223,
-0.029867543,
-0.0390977,
0.008335475,
-0.05767731,
-0.009491108,
0.019712877,
-0.017819127,
-0.030777138,
0.04610606,
-0.019041862,
-0.017744571,
-0.026303716,
0.04097654,
0.028301844,
0.049654976,
-0.0028648535,
-0.011496692,
0.026780881,
-0.017908596,
0.0031537618,
0.07521312,
0.009319628,
0.02952458,
0.01795333,
0.05639493,
-0.029897366,
-0.028242199,
-0.057736956,
0.012518124,
0.03432605,
-0.009163057,
0.024782753,
-0.018147178,
0.012122971,
0.020026015,
0.023724044,
0.0076010884,
0.016029758,
-0.051742572,
-0.05183204,
0.025990577,
-0.026497565,
-0.00048881443,
0.0030046478,
-0.0033494742,
0.035936482,
-0.022382017,
0.018221736,
0.054635383,
-0.02464855,
-0.00021435143,
-0.07127651,
0.027645743,
0.018997129,
0.005177985,
-0.012697061,
0.0033643856,
-0.027779946,
0.023664398,
-0.050609306,
-0.035310205,
-0.0044137756,
0.003023287,
0.028957946,
-0.016715683,
0.04470439,
-0.012793984,
-0.021621536,
-0.081595205,
0.019086597,
0.030956075,
0.013099669,
0.014314948,
0.008864829,
0.022635512,
0.008805184,
0.00088955846,
0.0044212313,
-0.00987135,
0.0775393,
0.0018816328,
-0.04852171,
0.005077333,
0.016656037,
-0.053770524,
-0.042706262,
-0.034147114,
0.005125795,
-0.034355875,
0.019951459,
0.015090341,
0.028257111,
-0.012607592,
0.07038183,
0.07252907,
-0.028480781,
-0.047358617,
0.0006630915,
-0.046791986,
0.021904852,
0.018728724,
0.031522706,
-0.020011105,
-0.02855534,
-0.02008566,
0.019727787,
-0.028182553,
-0.014024176,
0.06835388,
-0.0033848886,
0.023858245,
0.020055838,
0.016417455,
0.029390378,
0.024171386,
-0.029226352,
-0.007258126,
-0.036503118,
-0.05141452,
-0.026929995,
-0.021338219,
-0.02931582,
0.004398864,
-0.037010103,
-0.007813576,
0.026467742,
0.02251622,
0.010318692,
-0.07646568,
0.017744571,
-0.02794397,
-0.00445851,
0.023664398,
0.012190073,
-0.003431487,
0.007034455,
0.02305303,
-0.04345183,
-0.011944034,
0.038381953,
-0.035638254,
-0.02454417,
-0.049028695,
0.0013112716,
-0.051354874,
-0.030180681,
0.009200336,
-0.042408034,
0.01226463,
0.02815273,
0.012309364,
-0.002378369,
0.0015712891,
0.013054934,
-0.013226415,
0.044346515,
-0.026005488,
-0.016954266,
0.0060614855,
-0.009364362,
-0.01594029,
-0.00017206362,
0.0016300029,
-0.011824743,
0.018743634,
0.00966259,
0.007679373,
0.0021919764,
-0.0034463983,
0.042944845,
-0.039336283,
-0.017282316,
-0.0060204794,
0.013606656,
-0.054963436,
0.010982249,
0.025901109,
-0.02112946,
-0.021114549,
0.05108647,
-0.03101572,
0.031731468,
0.002753018,
-0.00084762013,
0.015761353,
0.037636384,
0.027064199,
0.02475293,
0.008149082,
-0.019668141,
0.0018238511,
0.016178872,
0.0027418344,
0.022217993,
-0.026467742,
0.02508098,
0.024081917,
0.03856089,
0.01502324,
0.03539967,
0.020413712,
0.050997,
0.02473802,
-0.0040819966,
0.024454702,
-0.021084726,
-0.012585225,
-0.019295357,
-0.07521312,
-0.02560288,
0.025006425,
-0.038471423,
0.02338108,
-0.022501308,
0.008492044,
-0.014091277,
0.02877901,
0.01200368,
-0.001577813,
-0.023321435,
0.012413744,
0.01046035,
-0.037397802,
-0.05424769,
-0.008089436,
0.0139794415,
0.0042311107,
-0.036145244,
-0.0070419107,
0.03823284,
0.019608496,
-0.022382017,
-0.026333539,
-0.0023671854,
-0.0058601815,
0.04112565,
-0.05016196,
0.06304541,
-0.027735211,
0.027660655,
-0.021696093,
0.00806707,
-0.023112675,
0.030956075,
0.025230095,
0.013986897,
0.005084789,
0.042855375,
-0.022650423,
0.010534907,
0.014792113,
-0.004257206,
0.04876029,
-0.009744602,
0.01455353,
0.0017306549,
0.06489443,
0.028301844,
0.020413712,
-0.0015190992,
0.025975665,
0.006154682,
-0.01878837,
-0.047925252,
-0.0031593537,
0.019891813,
-0.012503212,
-0.019817255,
-0.009274893,
0.0008103416,
-0.013382985,
0.011273022,
0.043899175,
-0.0022367106,
0.015761353,
0.0002826177,
-0.021576801,
0.020219864,
-0.015343835,
-0.070023954,
0.0058713653,
0.007616,
0.040320437,
0.03188058,
0.008857374,
0.03131395,
0.016656037,
0.01614905,
0.008574057,
0.006807056,
-0.00020875965,
-0.016089404,
-0.009647679,
0.03283491,
-0.020637384,
-0.003325243,
-0.03769603,
-0.019578673,
-0.03677152,
0.034922507,
0.005539587,
-0.033192784,
0.019817255,
-0.012510668,
-0.02751154,
-0.09334539,
-0.0033550658,
-0.05025143,
-0.0037651295,
-0.009051222,
-0.0056737894,
-0.08040229,
0.017297229,
-0.0124733895,
0.0384416,
0.015955202,
0.024305588,
0.008260918,
0.04479386,
0.055530068,
0.0039589778,
0.027481718,
0.01158616,
-0.03706975,
0.00260204,
0.0038918764,
-0.007150018,
-0.006396992,
-0.03769603,
-0.065252304,
0.033610303,
0.008820095,
-0.04154317,
-0.04714986,
0.017356874,
-0.0023876885,
-0.0390977,
0.020473357,
0.050072495,
0.015552594,
-0.025796728,
0.026393184,
0.04216945,
-0.037546914,
-0.020592649,
-0.04142388,
0.013151858,
-0.006251606,
-0.048849758,
-0.004268389,
-0.04950586,
0.012503212,
0.015314012,
-0.015701707,
0.0011211511,
0.027660655,
0.015552594,
0.047000743,
0.03429623,
-0.02581164,
-0.022441663,
0.029360555,
0.054188043,
0.015686797,
0.09227177,
0.046881452,
0.010713844,
-0.023008296,
-0.039455574,
0.050519835,
-0.0005284229,
-0.024588905,
-0.016119227,
-0.006068941,
-0.027213313,
-0.040618666,
-0.0022963563,
0.033520836,
0.0037576738,
-0.03856089,
-0.041155476,
0.014680278,
-0.082370594,
-0.07342375,
-0.04494297,
0.007731563,
-0.020682117,
-0.031075366,
-0.016849887,
-0.049774267,
0.26554227,
0.04225892,
0.021636447,
-0.01030378,
0.031105189,
0.030165771,
0.02239693,
0.022217993,
0.015686797,
-0.021278573,
-0.005028871,
-0.04706039,
0.00584527,
0.005405384,
-0.019056775,
0.03199987,
-0.061971795,
-0.0005027939,
-0.038888942,
-0.021263663,
-0.054575738,
0.014739923,
0.026109869,
0.04521138,
0.021382954,
0.00091192557,
-0.016775329,
-0.030956075,
0.0028667173,
-0.05150399,
0.03432605,
-0.0030810689,
0.029912276,
-0.024156474,
0.023112675,
0.035041798,
-0.015261822,
-0.02197941,
-0.0055358587,
0.026467742,
0.019787433,
-0.022710068,
0.018713811,
-0.0088350065,
0.015865734,
0.03474357,
-0.039962564,
0.0023410905,
0.018177,
-0.06966608,
0.026169514,
-0.059854377,
0.03662241,
-0.04303431,
0.0060316627,
-0.020145306,
-0.06244896,
-0.06304541,
0.0028648535,
-0.028331667,
0.022262726,
-0.00023497111,
-0.02815273,
0.012115516,
0.0028387585,
0.015149986,
-0.0043690414,
0.034475166,
0.0066393027,
-0.021606624,
0.019563762,
0.03143324,
-0.028257111,
-0.03250686,
0.013420263,
0.03525056,
-0.0006584317,
0.041364234,
0.015656974,
-0.038173195,
-0.018713811,
-0.0011593617,
0.0050661494,
-0.02027951,
0.037517093,
0.025528323,
-0.04920763,
-0.009513476,
0.023127588,
0.037427623,
0.027884325,
0.013241326,
-0.00031174155,
0.021681182,
-0.011526515
] |
git clone https://github.com/org_that_created_brand_new_bert_org/brand_new_bert.git
cd brand_new_bert
pip install -e .
Now you have set up a development environment to port brand_new_bert to 🤗 Transformers.
3.-4. Run a pretrained checkpoint using the original repository
At first, you will work on the original brand_new_bert repository. Often, the original implementation is very
“researchy”. Meaning that documentation might be lacking and the code can be difficult to understand. But this should
be exactly your motivation to reimplement brand_new_bert. At Hugging Face, one of our main goals is to make people
stand on the shoulders of giants which translates here very well into taking a working model and rewriting it to make
it as accessible, user-friendly, and beautiful as possible. This is the number-one motivation to re-implement
models into 🤗 Transformers - trying to make complex new NLP technology accessible to everybody.
You should start thereby by diving into the original repository.
Successfully running the official pretrained model in the original repository is often the most difficult step.
From our experience, it is very important to spend some time getting familiar with the original code-base. You need to
figure out the following: |
[
-0.0039609782,
0.003199399,
-0.028779283,
-0.03429021,
-0.010577917,
-0.030386636,
0.01792582,
0.008465395,
0.007707643,
0.03943374,
-0.017864587,
-0.010891734,
0.058170892,
-0.045434527,
0.017772738,
0.043995563,
0.002543063,
-0.007562216,
-0.09742093,
0.013631889,
0.036923207,
-0.02642183,
-0.07568339,
-0.009674737,
-0.029161986,
0.014665187,
0.030539718,
-0.03526993,
0.09356329,
0.04172996,
-0.0327594,
-0.011251475,
0.0028894094,
-0.007722951,
0.013073143,
-0.050088197,
-0.003744751,
-0.022701956,
-0.026942307,
-0.04240352,
0.013693121,
-0.013348688,
0.036953826,
-0.045801923,
-0.06735577,
0.014741728,
0.011611216,
-0.021584462,
0.009843127,
-0.06466154,
-0.0024760899,
0.027554633,
-0.008672055,
0.04035223,
-0.026299367,
0.011909724,
-0.026927,
0.021890625,
-0.065090165,
0.014374333,
0.066620976,
0.0175125,
0.03321864,
-0.06717207,
0.06325319,
0.06600865,
-0.009957938,
-0.018186057,
-0.0030750204,
0.03928066,
-0.048802316,
0.036525197,
-0.018476913,
-0.02225802,
-0.002558371,
0.012407239,
0.009552273,
-0.013869165,
-0.005694624,
0.017053256,
0.02152323,
0.021875316,
-0.01227712,
-0.005943381,
-0.05244565,
-0.01660932,
0.035116848,
-0.024982866,
-0.0012476125,
-0.027049465,
-0.009789549,
0.027401552,
0.022380484,
0.04007668,
0.010646804,
0.049812652,
-0.026284058,
0.02355921,
0.027998568,
-0.0011997747,
-0.013494116,
0.07170328,
-0.027615866,
0.010792231,
0.002902804,
-0.023130583,
0.0024148573,
0.009008834,
-0.024018455,
-0.0551705,
0.037106905,
0.019517865,
-0.047240887,
0.0029161987,
0.008863407,
0.024248077,
-0.0052047637,
0.0018541971,
-0.044240493,
-0.05982417,
0.032943092,
0.0012791855,
-0.006299295,
-0.04396495,
0.026069744,
-0.0058438783,
0.0015930022,
0.049690187,
0.002261776,
-0.010355949,
0.016747093,
-0.022564182,
-0.020834364,
0.04326077,
-0.018446296,
-0.031044886,
0.017971743,
0.017558424,
0.009475732,
-0.0069575445,
-0.012996602,
-0.030555027,
0.009996208,
0.07347902,
0.024906326,
-0.016838942,
0.034657605,
-0.03928066,
-0.002835831,
0.04525083,
-0.036525197,
-0.0399236,
-0.00415233,
0.015155048,
0.01973218,
0.011970957,
-0.028289422,
0.018430987,
0.006647555,
0.007983189,
0.010547301,
0.047608282,
-0.041270718,
0.07911241,
0.0037868484,
0.036127184,
-0.014075825,
0.0062533705,
0.016915483,
-0.027876103,
0.037321217,
-0.006433241,
-0.052751813,
0.021982474,
0.07347902,
0.0020111054,
0.047822595,
0.011151972,
-0.03413713,
0.03658643,
-0.0027956471,
0.0039877677,
0.025396187,
0.04558761,
-0.010248792,
0.027631173,
0.026712686,
-0.011680103,
0.010799885,
0.03355542,
0.01018756,
0.025916662,
-0.011603562,
0.02306935,
-0.04616932,
-0.0030788474,
-0.043566935,
0.0131803,
-0.025901355,
-0.066131115,
-0.009177224,
0.008457742,
-0.0066016307,
0.04476097,
-0.011947995,
-0.01898208,
-0.038852032,
0.02029858,
-0.022288635,
-0.02815165,
0.04935341,
0.012223541,
-0.034565754,
-0.008932293,
0.014259522,
-0.011534675,
-0.019579098,
-0.004531206,
-0.011174934,
0.022150863,
0.049537107,
-0.003740924,
0.04534268,
0.03101427,
0.00789134,
-0.023712292,
0.011856146,
0.019257626,
0.032422617,
-0.031779677,
0.0054726563,
0.07372395,
0.0007166118,
-0.0008295092,
0.014940734,
-0.024110304,
0.06343689,
0.053731535,
-0.026467755,
0.021217067,
0.003903573,
0.039372507,
0.014657534,
-0.00896291,
-0.019089237,
-0.035759788,
-0.006414106,
-0.04665918,
-0.008358238,
0.037994776,
-0.023681676,
0.03288186,
-0.0032644586,
-0.04108702,
-0.053211056,
-0.027202545,
-0.010088057,
0.027631173,
-0.02610036,
-0.036861975,
0.027401552,
0.020819055,
-0.006039057,
-0.036647663,
0.0092537645,
0.042525984,
-0.030769339,
0.008159233,
0.00032960315,
-0.028626202,
-0.015399978,
-0.038668334,
-0.059946634,
-0.0011318448,
-0.046965342,
0.018522836,
0.038454022,
-0.031442896,
0.008174541,
-0.03199399,
-0.0039648055,
0.008664401,
-0.0034117992,
0.016961407,
0.058538284,
0.015606638,
-0.024033763,
0.007883687,
-0.011289746,
0.02478386,
-0.00033677884,
-0.01973218,
-0.005354018,
-0.020558817,
0.02766179,
-0.029299758,
-0.03312679,
-0.012698093,
-0.047914445,
0.03035602,
-0.027860794,
-0.02331428,
0.0039762864,
0.012047498,
0.015392324,
0.021232376,
-0.007952573,
-0.032300152,
0.04867985,
0.03156536,
-0.015568367,
0.010172252,
-0.016241925,
0.029070137,
-0.026222825,
0.048496153,
0.05131285,
-0.007837762,
-0.019456632,
-0.004259487,
-0.01060088,
-0.012514396,
0.0029582959,
-0.04301584,
-0.025304338,
0.06187546,
0.0018417593,
-0.06631482,
0.00785307,
-0.028258806,
-0.018859616,
0.01702264,
-0.013807933,
0.02813634,
0.009498694,
0.020926213,
-0.034657605,
0.036433347,
-0.0218447,
-0.01321857,
0.03315741,
-0.004856504,
0.039341893,
0.033249255,
-0.017680889,
-0.0299427,
0.013578311,
-0.06362058,
0.023161199,
-0.035882253,
-0.013601272,
-0.0026157766,
-0.00084912276,
0.03631088,
0.050302513,
0.05581344,
-0.03894388,
0.008564898,
-0.011419864,
0.007914303,
0.030340713,
0.023620443,
0.032024607,
0.021905933,
-0.028748667,
-0.0077650486,
-0.015024928,
0.013471154,
0.03165721,
-0.03061626,
0.0053922883,
-0.01973218,
-0.04329139,
-0.00080606865,
-0.0199618,
-0.04026038,
0.06184484,
-0.0021507922,
0.026238134,
-0.0022770842,
-0.009468078,
0.00027458958,
-0.011902071,
0.03380035,
0.018032975,
0.016502162,
-0.023452055,
-0.00230196,
-0.041576877,
-0.011021853,
0.008396509,
-0.010279409,
-0.00261769,
-0.011282091,
-0.037596766,
-0.05342537,
0.04139318,
0.0401073,
0.024967559,
-0.012001573,
0.03631088,
-0.0076655457,
0.0071756854,
0.024033763,
-0.0016111806,
-0.029759003,
-0.026176902,
0.014550377,
0.0124990875,
-0.0032606316,
0.0051703206,
-0.04035223,
-0.0011184502,
0.0150402365,
-0.001277272,
-0.0145886475,
0.0025124466,
0.028335348,
-0.0015509048,
0.0006850388,
-0.041025788,
-0.03410651,
-0.03199399,
0.0025296684,
0.034596372,
-0.012567974,
-0.008779212,
-0.06398798,
-0.008610822,
0.04417926,
-0.028610893,
-0.064294145,
-0.027018849,
0.017879894,
-0.061783608,
0.047638897,
0.040872704,
-0.0056640077,
-0.034994382,
-0.060834505,
-0.011756644,
0.024232768,
-0.033249255,
-0.012001573,
0.00076732,
0.0130042555,
0.0363415,
-0.0057252403,
-0.001459056,
0.03060095,
0.036953826,
-0.064845234,
0.02945284,
-0.010072749,
-0.0020704244,
-0.016624628,
0.028702741,
-0.039954215,
0.02495225,
0.0056142565,
-0.026483063,
-0.0031018096,
0.034565754,
-0.034596372,
-0.06882535,
0.020007724,
0.026008511,
-0.016670553,
0.051435314,
0.020176115,
-0.045128364,
0.043750633,
0.019946493,
0.0011366286,
0.03165721,
-0.028763974,
0.010554955,
0.027631173,
-0.001846543,
0.004297757,
-0.036402732,
0.052353803,
0.011106048,
0.032943092,
-0.01758904,
-0.034565754,
-0.0031687827,
0.0048105796,
-0.020512894,
0.021997781,
-0.0061270786,
-0.020421045,
0.0018752458,
0.0006850388,
0.0050134123,
-0.023023427,
-0.017971743,
0.0088404445,
0.059854783,
0.035239313,
-0.011213205,
-0.008687363,
-0.008580206,
0.0021794948,
-0.023452055,
-0.03943374,
-0.012567974,
-0.00834293,
0.024661396,
0.008886369,
-0.044883434,
-0.033341106,
-0.0063031223,
-0.012368969,
0.0105166845,
-0.02773833,
0.035116848,
-0.0075469078,
-0.039403126,
0.04638363,
-0.01611946,
-0.043505702,
-0.063008256,
-0.0066284197,
0.03542301,
0.026299367,
0.00879452,
-0.052782428,
-0.036219034,
-0.040015448,
0.037749846,
-0.049047247,
-0.0046766335,
-0.021737544,
-0.05673193,
-0.0072790156,
0.029315067,
0.050945453,
-0.035055615,
-0.014665187,
-0.030141706,
0.019915877,
-0.051190384,
0.03713752,
-0.02306935,
0.031687826,
-0.021385456,
0.026972923,
0.0062533705,
0.018997388,
-0.03133574,
0.045403913,
0.02152323,
0.03894388,
-0.00907772,
-0.030371329,
-0.011052469,
0.0022215922,
-0.009575235,
-0.010792231,
-0.031718444,
0.041025788,
-0.015315783,
0.038729567,
-0.008388855,
-0.019747486,
0.013157337,
-0.029927392,
0.021354841,
-0.0058630137,
0.060099714,
-0.00014459007,
0.023696983,
0.02643714,
-0.013096104,
0.027294394,
0.025319645,
-0.050271895,
-0.057068706,
0.020880288,
-0.05939554,
-0.018783074,
-0.033769734,
-0.024936942,
0.03312679,
0.002365106,
0.033065557,
0.07029493,
0.025824813,
-0.0024263384,
-0.028243499,
0.011764297,
0.0006850388,
0.024094995,
0.0078301085,
0.013624235,
-0.03223892,
-0.009521657,
-0.03361665,
-0.012667477,
-0.01350177,
0.019043313,
0.04378125,
0.0025047925,
0.015170356,
-0.017558424,
-0.035698555,
-0.03425959,
0.041270718,
-0.003725616,
0.026927,
0.026146285,
0.0563033,
-0.044118028,
0.06282456,
-0.01938009,
0.0046995957,
-0.015920455,
0.034810685,
-0.0075277723,
-0.03952559,
-0.0044546654,
-0.038974497,
-0.05562974,
-0.04188304,
-0.053547837,
0.009644121,
-0.058813833,
-0.027263777,
0.028641509,
-0.04212797,
-0.04598562,
0.03429021,
0.05777288,
-0.0024263384,
-0.029223219,
0.034902535,
-0.011978611,
-0.0080826925,
0.015843913,
0.04059716,
-0.024600163,
-0.000025996911,
-0.024416465,
-0.021905933,
-0.036525197,
0.003013788,
0.05082299,
-0.04148503,
0.02306935,
0.027646482,
-0.0034634643,
0.021875316,
0.01272871,
0.006800636,
0.012468471,
-0.027401552,
-0.065273866,
-0.049537107,
-0.007983189,
-0.0017460835,
-0.0004059046,
0.011144318,
0.027998568,
0.02773833,
0.017680889,
-0.01611946,
-0.05719117,
0.00031860045,
-0.037168138,
-0.004978969,
0.02568704,
-0.014642226,
-0.008220465,
-0.023696983,
0.009896706,
-0.038025394,
0.028335348,
0.017037949,
-0.01873715,
-0.008488358,
-0.015767373,
-0.013915089,
-0.047393966,
-0.043903716,
-0.019334167,
-0.050057583,
0.002717193,
0.025472727,
0.0073172855,
0.00862613,
-0.0011088826,
0.016196001,
-0.007026431,
0.01256032,
-0.0028166957,
-0.009475732,
-0.047577664,
-0.029728387,
-0.065580025,
0.025809506,
-0.0022139382,
-0.012200579,
0.035300545,
-0.0067011337,
0.024033763,
0.010845809,
-0.010616188,
0.04818999,
-0.038025394,
0.0053731534,
0.021125218,
0.028029185,
-0.042525984,
0.029085446,
0.025886046,
-0.030294787,
-0.034963768,
0.028075108,
-0.04231167,
0.03199399,
0.016058227,
0.03199399,
0.01354004,
0.008656747,
0.016578704,
0.022855036,
0.039096963,
-0.004730212,
-0.013938052,
-0.014948389,
0.029299758,
0.043903716,
-0.03468822,
-0.0011241907,
0.010080403,
0.004248006,
-0.045465145,
-0.02242641,
0.04589377,
0.04996573,
0.033279873,
0.018186057,
-0.012254157,
-0.00785307,
-0.005484137,
0.024600163,
-0.04261783,
-0.04901663,
0.003903573,
-0.058170892,
0.041362565,
-0.024584856,
0.012468471,
0.0053731534,
0.013685468,
-0.016670553,
0.010501376,
0.013425229,
0.04301584,
0.02062005,
-0.07182574,
-0.03830094,
-0.001898208,
0.030799955,
-0.0038882648,
-0.011695411,
0.021446688,
0.04901663,
-0.017236954,
-0.0007960227,
-0.029850852,
-0.0017221646,
-0.01305018,
0.032790013,
-0.0150402365,
0.00026813144,
-0.02176816,
0.039403126,
-0.06163053,
-0.015828606,
-0.026697377,
-0.00043939115,
0.05073114,
0.015752064,
-0.01964033,
0.014152366,
0.032514468,
-0.0068542147,
0.037198752,
-0.0044699735,
0.036433347,
-0.009299688,
-0.00080654706,
0.0027669442,
0.028656818,
0.033494186,
0.03713752,
0.009169569,
0.044883434,
0.025396187,
-0.009973247,
0.0009548446,
-0.02242641,
0.017083872,
0.0025679388,
-0.012330698,
0.015170356,
0.023008117,
0.010937658,
-0.027937336,
0.027615866,
-0.020819055,
-0.007099145,
-0.011664795,
-0.005801781,
0.03003455,
-0.010126327,
-0.011083085,
-0.024722628,
-0.004355163,
0.052904893,
0.015300475,
0.027615866,
0.014833577,
0.01256032,
0.044546656,
0.0199618,
0.019900568,
0.026314674,
0.008151579,
-0.06294703,
0.02758525,
0.03205522,
-0.025227796,
-0.019426016,
-0.03386158,
-0.025809506,
0.03052441,
-0.01907393,
-0.009850781,
-0.010738652,
-0.03184091,
-0.020880288,
-0.04672041,
0.004978969,
-0.060375262,
0.019915877,
-0.021308916,
0.009820165,
-0.07831639,
0.019089237,
-0.00075440377,
0.020972136,
0.053700916,
0.0337085,
-0.0126062445,
0.060405876,
0.053027358,
0.017160412,
0.020910904,
0.019227011,
-0.057007473,
0.02150792,
0.03967867,
0.010646804,
-0.012346006,
0.007083837,
-0.049537107,
0.02798326,
0.024692012,
-0.055292964,
-0.059518006,
0.006417933,
-0.012744018,
-0.058048427,
0.011748989,
0.053670302,
0.051006686,
-0.0043283734,
-0.009774241,
-0.030754032,
-0.029667154,
-0.023253048,
-0.042189203,
0.029912084,
-0.02813634,
-0.041791193,
-0.025809506,
-0.022732573,
0.0012112557,
-0.023712292,
-0.016731786,
-0.0063605276,
0.04056654,
0.013509424,
0.04803691,
0.030218247,
0.00009501803,
0.00063337386,
0.007826281,
0.07115219,
0.016226618,
0.050088197,
0.057007473,
0.006406452,
-0.013210915,
-0.003044404,
0.00011475117,
-0.02634529,
0.012453163,
-0.0074014803,
-0.014389642,
0.0069269286,
-0.049537107,
-0.023681676,
0.059854783,
-0.02971308,
-0.009184877,
-0.010233484,
-0.0052659963,
-0.04378125,
-0.051282234,
-0.040658392,
-0.015331091,
-0.007160377,
-0.004163811,
-0.0053884615,
-0.043352623,
0.28068987,
0.043811865,
-0.0044584926,
0.0033142099,
0.028840516,
0.06858042,
0.0025028791,
-0.012154655,
0.012254157,
-0.03340234,
-0.0064676846,
-0.0031879179,
-0.0019116027,
0.015430594,
-0.05171086,
0.050700523,
-0.07164204,
-0.00362994,
-0.007244572,
-0.019227011,
-0.026391214,
0.022227403,
0.014160019,
0.016838942,
0.03836217,
0.005878322,
-0.003499821,
-0.026957616,
-0.020727206,
-0.04564884,
0.03673951,
-0.032422617,
0.004248006,
-0.02945284,
0.013570656,
0.024768554,
-0.0006721225,
-0.012001573,
-0.00879452,
0.039831754,
0.0070876637,
-0.035239313,
0.010784577,
0.010310025,
-0.011044815,
0.065824956,
-0.034565754,
0.024079688,
0.06466154,
-0.032545082,
0.038974497,
-0.022227403,
0.006169176,
-0.02856497,
-0.04818999,
0.00642176,
-0.051649626,
-0.040474694,
0.0023383168,
-0.039984833,
0.045679457,
-0.014672842,
-0.050761756,
0.011029507,
0.00020259352,
0.022212096,
-0.01734411,
0.029575305,
-0.016808325,
-0.012032189,
-0.012483779,
0.001419829,
-0.023605134,
-0.04534268,
0.021033369,
0.061140668,
-0.022916269,
-0.0065824958,
0.0017087699,
-0.019318858,
-0.004749347,
0.023926606,
0.011312707,
-0.027401552,
0.04246475,
0.016578704,
-0.04295461,
-0.002772685,
0.04353632,
-0.0039801137,
0.0399236,
0.054680638,
-0.0064370683,
0.010057441,
-0.005097607
] |
It is very important that before you start the porting process, you can efficiently debug code in the original
repository! Also, remember that you are working with an open-source library, so do not hesitate to open an issue, or
even a pull request in the original repository. The maintainers of this repository are most likely very happy about
someone looking into their code!
At this point, it is really up to you which debugging environment and strategy you prefer to use to debug the original
model. We strongly advise against setting up a costly GPU environment, but simply work on a CPU both when starting to
dive into the original repository and also when starting to write the 🤗 Transformers implementation of the model. Only
at the very end, when the model has already been successfully ported to 🤗 Transformers, one should verify that the
model also works as expected on GPU.
In general, there are two possible debugging environments for running the original model |
[
0.029214194,
-0.021693092,
-0.014816879,
-0.028219668,
0.012097473,
-0.006588733,
0.024661131,
0.00047856694,
-0.0025640116,
0.066073805,
-0.02144446,
-0.009820942,
0.024723288,
-0.033813875,
-0.016969096,
-0.003830478,
0.00812714,
-0.038475715,
-0.05920536,
0.021491079,
0.023868617,
0.017031252,
-0.06868444,
-0.030985693,
-0.026277235,
0.027473774,
0.0073812455,
-0.02901218,
0.060852543,
0.048110183,
-0.016378596,
-0.04037153,
-0.019191239,
-0.034963794,
0.004498675,
0.0001638928,
-0.0033468122,
-0.019362172,
-0.019470949,
-0.028017655,
0.024552355,
-0.012517039,
0.034062505,
-0.048296656,
-0.06737912,
-0.009735474,
0.0057301777,
0.005260109,
0.011258342,
-0.031498495,
0.0018909586,
0.025857668,
-0.0025018537,
0.013309551,
-0.058055438,
-0.010046264,
0.00092993985,
0.023169342,
-0.03400035,
0.015492846,
0.06632244,
-0.0010926186,
0.019595265,
-0.058708098,
-0.00304962,
0.015135438,
-0.04208087,
-0.032943666,
-0.05109376,
-0.009323679,
-0.04385237,
0.01886491,
-0.013301781,
-0.02290517,
-0.018927068,
-0.022734236,
0.01914462,
0.0015733708,
0.0016112482,
0.021817409,
0.037854135,
0.049011473,
0.009362527,
0.008888573,
-0.044318553,
-0.05746494,
0.052181523,
-0.014443932,
-0.02786226,
0.008033903,
0.033254456,
0.019517567,
-0.012524809,
0.009984106,
0.021832949,
0.03387603,
-0.008818646,
0.04441179,
0.008282535,
0.007288009,
-0.002699982,
0.07695143,
0.0008381599,
0.050969444,
-0.05597315,
0.020418856,
0.0557556,
-0.032726113,
-0.027800102,
-0.035585374,
0.016114425,
-0.0016413559,
-0.029245272,
-0.0053339214,
-0.0019812817,
0.013744656,
0.010302665,
-0.0077269985,
-0.014078755,
-0.0059127663,
0.024738828,
-0.009098357,
0.032726113,
-0.06451986,
0.034901638,
0.003570192,
0.015539465,
0.041739002,
-0.027302839,
-0.04183224,
0.0047667306,
0.0026630757,
-0.031824823,
0.048545286,
-0.01246265,
-0.040868793,
-0.0047239973,
0.0028068158,
0.035771847,
0.010636764,
0.011817763,
-0.009012889,
0.0066547757,
0.07931343,
-0.0034730705,
0.003745011,
0.04030937,
-0.058428388,
0.0008852639,
0.035927244,
-0.055538047,
0.014762491,
0.007890163,
-0.007835775,
-0.03253964,
-0.0057884506,
-0.009308139,
0.017202187,
-0.012128552,
0.011988697,
-0.008080522,
0.04217411,
-0.02641709,
0.061940305,
0.006180822,
0.02348013,
-0.0359894,
-0.007804696,
0.04229842,
-0.040464766,
-0.0020570366,
-0.015764786,
-0.01568709,
0.02582659,
0.04820342,
0.045375235,
0.037077162,
-0.02727176,
-0.0021910644,
0.031312022,
-0.037077162,
0.00754441,
0.061380886,
-0.009618929,
-0.006072046,
0.016720464,
0.00813491,
-0.008647712,
-0.010885395,
0.010504678,
0.024956381,
0.057558175,
-0.04068232,
0.044287473,
-0.01678262,
-0.01768391,
-0.042857844,
0.014544939,
0.0030204835,
-0.06768991,
-0.035927244,
0.03751227,
-0.017606214,
0.005772911,
0.00087749417,
-0.014296307,
-0.006444993,
0.0043588197,
-0.032695033,
-0.011398197,
0.061070096,
-0.03132756,
-0.014366235,
-0.047799394,
-0.0008444728,
-0.04413208,
0.022749776,
0.0069772196,
0.0041140732,
-0.0006065247,
0.019843897,
-0.006771322,
-0.0031855903,
0.007140384,
-0.016285358,
0.004261698,
-0.013550413,
-0.015003353,
0.013410558,
0.0067985156,
0.025500262,
0.040775556,
0.0005453381,
0.049291182,
0.055227257,
-0.0141797615,
0.01568709,
0.0041645765,
-0.013472715,
0.04497121,
0.0030845837,
-0.001457796,
0.029835772,
0.0128122885,
0.0044637113,
-0.009098357,
0.00000601699,
0.013822353,
0.012555887,
0.051746417,
-0.070922114,
0.06992759,
-0.012843368,
-0.013270703,
-0.025904287,
0.005260109,
0.017373122,
0.048265576,
-0.040775556,
-0.016021188,
-0.030317495,
0.052026127,
-0.012921065,
-0.017373122,
0.06793854,
0.066695385,
0.003981988,
0.021055974,
0.0013917533,
-0.045375235,
-0.020543173,
-0.03661098,
-0.07608122,
-0.018647358,
-0.042422738,
-0.016129965,
0.000054388125,
-0.043976683,
-0.009712165,
-0.04761292,
-0.0094169155,
0.02118029,
-0.005458237,
0.015461767,
0.009121666,
0.023045026,
-0.04472258,
0.05252339,
-0.003830478,
0.019890515,
0.028654773,
-0.0174042,
0.0102715865,
-0.011724526,
0.01623874,
-0.022143736,
0.03449761,
-0.007750308,
-0.050378945,
0.0035682495,
-0.02727176,
0.01220625,
-0.0060798153,
-0.026448168,
-0.060262043,
0.03316122,
-0.00090177456,
-0.025375945,
0.025391486,
0.03685961,
-0.025298249,
0.0094169155,
-0.025702275,
-0.0021832949,
-0.033503085,
0.05317605,
0.024350341,
0.0009158572,
-0.0012616103,
-0.006643121,
-0.0359894,
0.016829241,
0.016829241,
-0.01827441,
-0.019082462,
0.061411966,
-0.026774498,
-0.041925475,
-0.001659809,
-0.015011122,
-0.0025581843,
-0.008733179,
-0.010527987,
0.050658654,
0.032446403,
-0.0019589437,
-0.03626911,
-0.008368001,
-0.00023612702,
0.041024186,
0.02063641,
-0.02177079,
0.04531308,
0.0278778,
-0.004758961,
-0.011530283,
0.020962738,
-0.060324203,
0.0119731575,
0.031420797,
-0.0031778205,
-0.0059011118,
0.017917003,
-0.006899522,
0.009409145,
0.03390711,
-0.07334627,
0.0010887338,
-0.010551296,
-0.014917886,
-0.002888398,
0.036206953,
0.010496908,
0.043417264,
-0.03804061,
-0.026650181,
0.023868617,
0.008880804,
0.035025954,
-0.031265404,
0.037698742,
-0.013985518,
-0.03623803,
-0.020185765,
0.008756489,
-0.034963794,
0.025158392,
0.036704216,
0.05317605,
0.004067455,
-0.021024896,
-0.0040558004,
-0.02349567,
0.051715337,
0.026168458,
0.023946315,
-0.021304606,
-0.01769945,
-0.010520218,
0.004389899,
0.0020104183,
-0.008865264,
0.006033197,
-0.017295424,
-0.006421684,
-0.06893306,
0.05019247,
0.052616626,
0.020496555,
0.023247039,
0.03285043,
-0.03375172,
0.003665371,
0.03163835,
0.031467415,
-0.005769026,
-0.05373547,
0.026525866,
-0.012043085,
0.021226909,
-0.06389828,
-0.0028728584,
-0.008888573,
0.0071831173,
-0.035150267,
-0.019035844,
-0.01539184,
-0.009331449,
-0.026463708,
0.032632876,
-0.054450285,
-0.008251456,
-0.030270876,
0.02203496,
0.04121066,
-0.082856424,
-0.017497437,
-0.032322086,
0.027489312,
0.013597031,
-0.017373122,
-0.044598263,
-0.0353989,
-0.026448168,
-0.0644577,
0.05255447,
0.050565418,
-0.0494155,
0.009277061,
-0.063183464,
0.02700759,
0.017186647,
-0.008026133,
-0.010411441,
0.030659365,
0.02696097,
0.011087408,
0.0116235195,
0.001915239,
0.0047706156,
0.019393252,
-0.035305664,
0.018989226,
-0.07458943,
-0.010551296,
-0.016114425,
0.021351224,
-0.03103231,
0.032073453,
0.00362458,
-0.0008405879,
0.01042698,
0.02641709,
-0.004727882,
-0.02351121,
0.028483838,
0.056221783,
-0.004867737,
0.021568777,
0.017155569,
0.0006055535,
0.039532397,
0.026805576,
-0.00027898196,
0.021242447,
-0.04099311,
-0.0008444728,
-0.032415323,
-0.003471128,
0.013480485,
-0.042267345,
0.032943666,
-0.002206604,
-0.028281825,
-0.013534874,
-0.050814047,
-0.02756701,
-0.0025368177,
-0.004669609,
0.013332861,
0.013029841,
-0.0032283238,
0.009393606,
-0.0039528515,
-0.04030937,
-0.04208087,
-0.026059682,
0.012540348,
0.043665897,
0.006763552,
0.049601972,
0.012672434,
-0.013107538,
0.02958714,
-0.0220505,
0.018087937,
-0.032726113,
0.00011782071,
-0.0039004057,
-0.023946315,
-0.015337451,
0.012276177,
-0.005971039,
-0.0018064628,
-0.026790038,
-0.012509269,
0.037263636,
0.020822883,
-0.023309197,
0.043044318,
0.008647712,
-0.05920536,
-0.009152745,
0.024536815,
-0.016922478,
0.0028048733,
0.0061303186,
-0.06458201,
-0.04730213,
-0.043417264,
0.047395367,
-0.03685961,
0.020978278,
-0.017575134,
-0.07999717,
-0.008189298,
0.0014927598,
0.042422738,
-0.040526923,
0.0033778911,
-0.04730213,
0.016906938,
-0.057154153,
-0.0018035491,
0.0004705544,
-0.017590674,
-0.034715164,
0.032011297,
-0.0067402427,
-0.03763658,
0.0039936425,
0.023899697,
0.03825816,
0.045095526,
-0.031125547,
-0.030845838,
0.017310964,
0.018756134,
-0.0014422565,
0.012936604,
-0.022330211,
0.0047162273,
-0.017310964,
0.07284901,
0.030162102,
-0.032726113,
-0.03919053,
-0.014296307,
0.055879913,
-0.01912908,
0.012921065,
-0.03856895,
-0.009844251,
0.029851312,
0.050006,
0.017637292,
0.037046082,
-0.029711457,
-0.07272469,
0.017606214,
-0.02236129,
-0.018942608,
-0.01073777,
-0.0048366585,
0.044101,
-0.001130496,
0.044038843,
0.041676845,
0.0054621217,
-0.010489139,
-0.011165106,
0.024614511,
-0.011064099,
0.008647712,
0.020698566,
-0.0039528515,
-0.041055266,
-0.0018462826,
-0.0123072555,
-0.045437396,
0.000659456,
0.016673846,
0.03403143,
-0.00960339,
0.066633224,
-0.0071831173,
-0.063463174,
-0.04009182,
0.008803107,
-0.02613738,
0.038382478,
-0.002668903,
0.00053659716,
0.0067441277,
0.0012140207,
-0.018258872,
-0.022501145,
0.017590674,
0.055227257,
-0.028608155,
-0.05109376,
0.026199536,
0.016067807,
-0.04065124,
-0.08391311,
-0.008243686,
-0.0022978983,
-0.018196713,
-0.016829241,
0.02380646,
0.012594736,
-0.062561885,
0.014925656,
0.057620335,
-0.017233266,
-0.004242274,
-0.0058739176,
-0.03915945,
-0.033782795,
0.026883274,
0.018429805,
-0.016363056,
0.007781387,
-0.043634817,
-0.022314671,
-0.032881506,
-0.03225993,
0.051155917,
-0.014187532,
0.01771499,
0.02641709,
0.019051384,
0.05479215,
0.013767966,
-0.020807343,
-0.00478227,
-0.0014296308,
-0.039812107,
-0.044007763,
0.0029466709,
0.0075949132,
0.010768849,
-0.010038494,
0.017279884,
0.0053921943,
0.025888748,
-0.03449761,
-0.086585894,
-0.00080610975,
-0.051746417,
-0.0029563832,
0.02290517,
-0.009953027,
-0.013659189,
0.019191239,
0.0041412674,
-0.035336744,
-0.008733179,
-0.004040261,
0.0034167399,
0.0045996816,
-0.05482323,
-0.031545114,
-0.03222885,
-0.028343983,
-0.016751543,
-0.013239624,
-0.0045957966,
0.031467415,
-0.007664841,
-0.025795512,
-0.014614866,
0.0371704,
-0.023697684,
0.013084229,
-0.036486663,
-0.001255783,
-0.0094246855,
-0.024800986,
-0.029431745,
0.02929189,
-0.0023250924,
0.004564718,
0.026168458,
-0.021335686,
0.017963622,
-0.008818646,
0.0090828175,
0.06305914,
-0.023013948,
-0.005535934,
-0.0119731575,
0.0075288704,
-0.03974995,
0.017559595,
0.009409145,
-0.03137418,
-0.0047978098,
0.04062016,
0.003453646,
0.06464417,
0.0020609214,
0.02522055,
0.00084981445,
0.03860003,
0.007835775,
0.019082462,
0.017497437,
0.0278778,
-0.009222672,
-0.009704395,
0.0020648064,
-0.009176054,
-0.048265576,
0.03050397,
0.058739178,
0.02958714,
-0.010046264,
0.024288183,
0.0153607605,
0.06349425,
0.0504411,
-0.0031273172,
-0.02296733,
-0.008958502,
0.0014480839,
-0.022641,
-0.0620957,
-0.03313014,
0.010069573,
-0.043417264,
0.018833831,
-0.026277235,
-0.008142679,
0.0106134545,
0.07216527,
0.010123962,
-0.017357582,
-0.0085777845,
0.032881506,
0.010248277,
-0.017637292,
-0.029960088,
-0.0059399605,
-0.0072957785,
0.0063439864,
-0.026681261,
-0.0011674023,
0.036517743,
0.01247042,
-0.026603563,
-0.012167401,
-0.009020659,
0.023433512,
-0.015259754,
-0.041428212,
0.035554294,
-0.05075189,
0.043292947,
-0.009517922,
0.00017226953,
-0.019315554,
0.042982157,
0.01335617,
0.02991347,
-0.016487371,
0.010924243,
-0.0038382479,
-0.013876742,
0.052181523,
0.029136496,
0.05923644,
-0.02874801,
0.00986756,
0.010201658,
0.04155253,
0.024630051,
0.028002115,
0.028794628,
0.046867024,
0.034280058,
-0.029773613,
-0.052430153,
0.017481897,
0.016052267,
-0.03396927,
-0.0057379473,
0.025981985,
0.030737061,
-0.002377538,
0.004817234,
0.017062332,
0.008298074,
0.007816351,
-0.037605505,
-0.052150443,
0.0033798337,
-0.008880804,
-0.048607446,
-0.003556595,
0.018647358,
0.05407734,
-0.0011314673,
0.008880804,
0.022578843,
0.04319971,
0.0057884506,
-0.006441108,
0.021537699,
-0.029493904,
-0.0061070095,
-0.032104533,
0.013503795,
-0.023992933,
0.0073851305,
0.010551296,
-0.008321383,
-0.021724172,
0.05631502,
-0.018476423,
0.01103302,
0.023371356,
-0.031545114,
-0.0046385303,
-0.047364287,
0.013946669,
-0.07266254,
-0.0077619627,
0.012656894,
-0.023759842,
-0.08385095,
0.009650008,
0.010698921,
0.030690443,
0.037605505,
0.050099235,
0.022392368,
0.08012148,
0.033534165,
-0.0047045727,
-0.008523396,
0.012221789,
-0.011374888,
-0.0030418502,
-0.002022073,
0.003943139,
0.006184707,
-0.021289067,
-0.04326187,
0.021568777,
0.011149566,
-0.010590145,
-0.04347942,
-0.0012072221,
-0.005248454,
-0.04158361,
-0.000022459382,
0.04789263,
0.025329327,
0.022827474,
0.004817234,
-0.0045763724,
-0.027520392,
-0.0024591202,
-0.040402606,
-0.0058156447,
0.0067752064,
-0.065452226,
-0.03542998,
-0.04699134,
0.00082553405,
-0.012610275,
-0.022625461,
-0.034870557,
0.0435105,
0.0033973155,
0.05370439,
0.037263636,
-0.030954614,
-0.02090058,
0.043603737,
0.040185057,
0.02091612,
0.06744128,
0.04577926,
0.015446228,
0.001045029,
-0.0061691673,
0.049446575,
0.0011411795,
0.018616278,
-0.0036187528,
0.0013626168,
-0.042733528,
-0.04127282,
-0.03424898,
0.03400035,
-0.004440402,
-0.0342179,
-0.012680203,
-0.033813875,
-0.074092165,
0.0021425036,
-0.03971887,
0.019579725,
0.012167401,
-0.018445345,
-0.0365799,
-0.051528864,
0.28841245,
0.06700617,
0.0059632696,
0.009168284,
0.055569127,
0.0016258165,
0.010256046,
-0.01771499,
0.0009313967,
-0.017870385,
-0.02961822,
-0.01656507,
-0.021133672,
0.018196713,
-0.01189546,
0.031234324,
-0.04963305,
-0.012866677,
-0.0070665716,
-0.024661131,
-0.068560116,
0.014350696,
0.022112658,
0.009517922,
0.027737943,
0.021568777,
0.004238389,
-0.016891398,
-0.008958502,
-0.0116235195,
0.060914703,
-0.0085777845,
0.025438104,
-0.031980217,
0.010341514,
0.027380537,
-0.011833303,
-0.016518451,
-0.033192296,
0.03103231,
0.02349567,
-0.00005933526,
0.017326502,
-0.03418682,
-0.015073281,
0.04702242,
-0.038662188,
0.046898104,
0.046867024,
-0.10007415,
0.020869501,
-0.04065124,
0.0058972267,
-0.02003037,
-0.040837713,
-0.01856966,
-0.037232555,
-0.035492137,
0.016642766,
-0.0056757894,
0.02988239,
-0.017917003,
-0.003741126,
0.02063641,
-0.0059593846,
0.009774324,
-0.0075288704,
0.035523217,
-0.026665721,
0.020185765,
0.029260812,
0.007284124,
-0.033005822,
0.027162984,
0.03720148,
0.043603737,
-0.00421508,
0.034901638,
0.024800986,
-0.04009182,
0.017559595,
0.02293625,
-0.025267169,
-0.023464592,
0.019393252,
0.034870557,
-0.031591732,
-0.005493201,
0.018321028,
0.012043085,
0.041024186,
0.012260637,
-0.008880804,
0.022283591,
-0.01103302
] |
Jupyter notebooks have the advantage that they allow for cell-by-cell execution which can be helpful to better split
logical components from one another and to have faster debugging cycles as intermediate results can be stored. Also,
notebooks are often easier to share with other contributors, which might be very helpful if you want to ask the Hugging
Face team for help. If you are familiar with Jupyter notebooks, we strongly recommend you work with them.
The obvious disadvantage of Jupyter notebooks is that if you are not used to working with them you will have to spend
some time adjusting to the new programming environment and you might not be able to use your known debugging tools
anymore, like ipdb.
For each code-base, a good first step is always to load a small pretrained checkpoint and to be able to reproduce a
single forward pass using a dummy integer vector of input IDs as an input. Such a script could look like this (in
pseudocode):
python
model = BrandNewBertModel.load_pretrained_checkpoint("/path/to/checkpoint/")
input_ids = [0, 4, 5, 2, 3, 7, 9] # vector of input ids
original_output = model.predict(input_ids)
Next, regarding the debugging strategy, there are generally a few from which to choose from: |
[
0.016031528,
-0.047102496,
-0.03114286,
0.015255113,
0.018274503,
-0.008842502,
-0.010445654,
-0.00915163,
0.023163041,
0.057080865,
0.015542674,
0.035916373,
0.0029043665,
-0.09598787,
-0.03614642,
0.042702813,
-0.025362883,
-0.03378842,
-0.07039494,
-0.008547752,
0.0049352665,
-0.009503892,
-0.07597362,
-0.04258779,
-0.025736712,
-0.0059884586,
0.009345734,
-0.021265138,
0.053601377,
0.016491625,
-0.0292162,
0.018101968,
0.0008375215,
-0.010510356,
-0.0014494873,
-0.057540964,
0.023925077,
-0.0336734,
-0.026843822,
-0.0076059895,
-0.0073220227,
-0.011948161,
0.038648203,
-0.01594526,
-0.06493128,
-0.02427015,
0.012846789,
-0.021581456,
-0.010560679,
0.009856154,
-0.020848176,
0.008296136,
0.037066616,
0.013673527,
-0.012278856,
-0.016261576,
0.004633327,
-0.0057620043,
-0.06458621,
0.0037526714,
0.06941723,
0.056189425,
-0.019654797,
-0.06884211,
-0.0022411789,
0.017742516,
-0.04580847,
0.015657699,
-0.029014908,
-0.042702813,
-0.037641738,
0.0075628553,
-0.010129337,
-0.007907928,
-0.035082445,
-0.0074550197,
0.042300228,
-0.0036753896,
-0.019439125,
0.059007525,
0.005283934,
0.01846142,
0.009913666,
-0.04296162,
-0.036117665,
-0.028252872,
0.048655327,
-0.007929496,
0.009841776,
-0.048569057,
-0.041955154,
0.03453608,
-0.0046512997,
0.040316056,
0.0049136993,
0.016879832,
-0.022602297,
0.009367301,
0.01246577,
0.013472235,
0.02878486,
0.050064377,
-0.024413932,
0.03240813,
-0.01202724,
-0.029532518,
0.04471574,
-0.0028324763,
-0.041667596,
-0.039654665,
0.022041554,
-0.018159479,
-0.032235593,
0.015988393,
0.00027879942,
0.014737503,
0.020431211,
0.0023795676,
-0.07194777,
-0.0048669707,
0.02280359,
-0.015585808,
0.007397508,
-0.031833008,
0.04480201,
-0.01889276,
0.010977643,
0.05969767,
-0.052192327,
-0.001849377,
0.058489915,
-0.023896322,
0.0059668915,
0.038331885,
0.00074720936,
-0.0024406742,
-0.026757555,
-0.018562065,
0.020977577,
-0.0069769495,
0.008971904,
-0.0065563917,
0.07246538,
0.06481626,
0.026110541,
0.0023562033,
0.013867631,
-0.018907137,
0.0019032946,
0.022242846,
-0.056189425,
-0.015528296,
0.016865455,
0.021998418,
-0.026067408,
-0.026441237,
-0.038188104,
-0.023177419,
-0.015140088,
-0.0010657731,
-0.033040762,
-0.0015510323,
-0.015025064,
0.059640158,
-0.0055175773,
0.0383894,
-0.0064449618,
0.016362222,
0.027102627,
-0.008432727,
0.010301874,
0.025736712,
0.021638967,
0.0036448361,
0.012480149,
0.028324762,
0.04966179,
0.01616093,
0.014140814,
0.038993277,
-0.015513917,
0.027850285,
0.031200372,
0.025118457,
0.00490651,
-0.01844704,
0.012386692,
0.0076059895,
-0.0008087654,
0.012746143,
0.05584435,
0.0485403,
-0.0336734,
0.016089039,
-0.037843034,
0.022084687,
-0.041149985,
0.008799368,
0.000326876,
-0.04212769,
-0.046297327,
0.005172504,
-0.0336734,
0.015226357,
-0.037239153,
-0.012163832,
-0.0004311169,
0.043220423,
-0.028281627,
0.023134286,
0.028827993,
0.007864795,
-0.02937436,
-0.03614642,
-0.008892825,
-0.04022979,
-0.0057440316,
0.015327003,
0.03145918,
0.03137291,
0.023939457,
0.037612982,
0.038475666,
-0.0020165218,
0.0015914706,
-0.011919404,
-0.014162381,
0.024615224,
0.00878499,
-0.012487338,
0.01416957,
0.01269582,
0.012437015,
0.01667854,
0.01616093,
-0.0022232062,
0.041897643,
0.02132265,
0.00061196584,
0.019453503,
0.043623008,
0.016247198,
0.020790663,
0.018533308,
-0.010215606,
-0.012623929,
-0.010309063,
-0.011006398,
-0.016045906,
0.030510226,
-0.03933835,
0.06659914,
0.024773384,
-0.01195535,
-0.029316848,
-0.02789342,
0.006315559,
-0.012343558,
-0.02789342,
-0.022918614,
0.06953226,
0.0010145513,
0.0303952,
-0.047361303,
0.023105528,
0.044974547,
0.0153988935,
0.009920856,
-0.03712413,
-0.022185333,
0.033184543,
-0.011380228,
-0.080056995,
-0.01778565,
-0.043565497,
-0.014967551,
-0.011243637,
-0.038216863,
-0.00029362677,
-0.026585018,
0.0011223867,
-0.012408258,
-0.0315742,
0.062228207,
0.01358007,
0.0043457663,
-0.061423037,
0.026383724,
-0.003152388,
0.018662712,
0.024830895,
-0.0042451196,
-0.00042572513,
-0.039079543,
-0.04117874,
-0.00841835,
-0.021265138,
-0.003538798,
-0.03844691,
-0.004877754,
-0.0010433074,
-0.01646287,
-0.0029870402,
0.02346498,
-0.043651763,
0.045204595,
0.009367301,
-0.059525132,
0.027706506,
0.06378104,
0.013781362,
0.04494579,
-0.016692918,
0.00058006454,
-0.02258792,
0.063263424,
0.030654006,
-0.009999935,
-0.0067037665,
-0.02619681,
-0.013249375,
0.014406808,
-0.024989054,
-0.013752607,
-0.012437015,
0.05388894,
-0.004532681,
-0.038130593,
-0.011286771,
-0.0013119972,
-0.003581932,
0.025779847,
0.0024334854,
0.036060154,
0.02153832,
-0.0071602697,
-0.055614304,
-0.015025064,
-0.01992798,
0.026843822,
0.042616546,
-0.028353518,
0.013112783,
0.034708615,
0.0131631065,
0.001969793,
0.013091216,
-0.06562143,
0.00031991166,
-0.019324102,
0.006391044,
0.046527375,
-0.0010352198,
0.004273876,
-0.002235787,
0.03430603,
-0.027979689,
0.007857605,
0.02103509,
0.041638836,
0.02324931,
0.02117887,
-0.010517545,
0.011552764,
-0.051243376,
-0.02421264,
-0.037756763,
0.061538063,
0.032638177,
-0.039798446,
-0.009338545,
-0.012724576,
-0.018590821,
0.02928809,
-0.007907928,
-0.07476587,
0.0026851012,
0.023364333,
0.07764148,
-0.0076347454,
-0.03836064,
0.0012571809,
-0.016822321,
0.015686454,
0.028741725,
0.039453372,
-0.005866245,
-0.021437675,
-0.04716001,
0.0014126436,
0.0037059428,
0.0044104676,
0.00085055165,
-0.011595898,
-0.026297456,
-0.051876012,
0.014449942,
0.041437544,
0.04014352,
0.0336734,
0.014550588,
0.02228598,
0.011653411,
0.0612505,
-0.024816517,
0.028583568,
-0.04480201,
0.046354838,
-0.016103419,
0.040862422,
-0.03327081,
-0.014155192,
-0.0017738921,
0.027390188,
0.007721014,
-0.020790663,
-0.017023614,
0.019741066,
0.009899288,
0.054579083,
-0.046469864,
-0.036175177,
-0.028468542,
0.014507454,
0.0777565,
-0.06309089,
-0.007185431,
-0.0016184294,
0.039970983,
0.02280359,
-0.02125076,
-0.045204595,
-0.019971114,
-0.011329905,
-0.06803694,
0.050064377,
0.037382934,
-0.032063056,
-0.0050970195,
-0.005190477,
-0.0074550197,
-0.012710198,
-0.01985609,
-0.030050129,
0.00653123,
-0.007056029,
0.015068199,
0.025564175,
-0.0016939142,
-0.02405448,
0.015298247,
-0.042041425,
0.026139298,
-0.033242054,
0.026843822,
-0.07746894,
0.016002772,
-0.0011538387,
0.0038389398,
0.013465045,
-0.019654797,
-0.019467883,
0.023968212,
-0.04655613,
-0.044169374,
0.004403278,
0.06067538,
-0.00623648,
0.03594513,
0.017958187,
-0.0124010695,
0.02280359,
-0.009187575,
-0.013889198,
-0.009841776,
-0.0414663,
0.0048597814,
-0.010208417,
-0.016175307,
-0.0040114764,
-0.023752542,
0.021854639,
0.005194071,
-0.026771933,
-0.022702944,
-0.050524473,
0.02162459,
-0.016908588,
0.018878382,
0.007145892,
0.04994935,
-0.0030930783,
0.027735261,
0.004856187,
0.0071494863,
-0.03232186,
-0.053601377,
-0.03925208,
0.038935766,
0.032753203,
0.059007525,
0.0021009927,
-0.024845274,
0.0020452777,
-0.03519747,
0.008403971,
0.0094032455,
-0.01431335,
0.027404567,
0.037843034,
-0.01985609,
0.011351472,
-0.017469333,
-0.012206966,
0.0013218821,
-0.020503102,
0.009050984,
-0.032005545,
-0.055010427,
0.0030679167,
-0.020833798,
-0.05748345,
-0.036491495,
0.02346498,
0.0079870075,
0.017426198,
0.02258792,
-0.02700198,
-0.007943873,
-0.0109273195,
0.038274374,
-0.034219764,
-0.010567868,
-0.03298325,
-0.0303952,
0.020876931,
-0.008274569,
0.020876931,
-0.10041631,
-0.01327813,
-0.04480201,
-0.0029187445,
-0.01040252,
-0.010618191,
-0.014938796,
-0.0074118855,
-0.011559954,
0.040546104,
0.011157368,
-0.0061861565,
0.0153988935,
0.020057382,
0.027260786,
0.0466424,
-0.028281627,
-0.018547686,
-0.01372385,
-0.0023454197,
0.017210528,
0.013335643,
-0.025722334,
0.013004947,
-0.034334786,
0.043651763,
-0.037900545,
-0.034075983,
-0.036203936,
-0.016649785,
0.0027839502,
-0.038907006,
-0.005438498,
-0.051185865,
0.06481626,
-0.0030751058,
0.061538063,
-0.007253727,
0.01823137,
-0.044169374,
-0.045348376,
0.04885662,
-0.011092667,
0.0013416519,
-0.00841835,
0.01121488,
0.05673579,
-0.004705217,
0.04485952,
0.06487377,
0.027965311,
0.04414062,
-0.05247989,
0.059122548,
-0.008907203,
-0.02148081,
-0.017383065,
0.003953964,
-0.028526055,
-0.0051832874,
-0.030308932,
-0.028669834,
-0.010064636,
-0.01837515,
0.038475666,
-0.00093187747,
0.0360314,
-0.0029600814,
-0.06044533,
-0.039597154,
0.025808603,
0.006506068,
0.035542544,
0.00863402,
0.040373567,
-0.01925221,
0.01468718,
-0.01143774,
-0.012437015,
-0.016261576,
0.041581325,
0.009352922,
-0.038907006,
0.019151565,
0.028209737,
-0.05667828,
-0.0636085,
0.014140814,
-0.01299057,
-0.03462235,
-0.018389529,
-0.022918614,
-0.02117887,
-0.03482364,
-0.012595173,
0.05210606,
-0.043047886,
-0.008145167,
0.028454164,
-0.01867709,
-0.025492286,
0.0033518833,
0.05800106,
-0.035973884,
-0.0036699977,
-0.03867696,
-0.043191668,
-0.011250826,
0.008439916,
0.021811504,
0.010007124,
0.041811373,
0.020920064,
0.0072573214,
0.10346446,
-0.040891178,
0.02035932,
0.009381679,
-0.017296797,
-0.06176811,
-0.03933835,
-0.019151565,
0.010841051,
-0.002922339,
-0.0038389398,
0.005438498,
0.009805831,
0.052192327,
0.024011346,
-0.07982694,
0.0020380889,
-0.017282419,
-0.0151832225,
-0.013831685,
-0.035801347,
0.0021405325,
0.0077569587,
-0.02080504,
-0.014895662,
-0.014967551,
-0.0064845015,
-0.012523283,
-0.026700042,
-0.03962591,
-0.021380164,
0.027936554,
-0.04606728,
-0.0013784957,
-0.03999974,
0.000009070529,
0.0046297326,
-0.03419101,
-0.010337819,
-0.02539164,
0.026872579,
-0.018475797,
-0.016333466,
0.0013919751,
0.0076131783,
0.016060283,
-0.010301874,
-0.029316848,
0.040344812,
0.016822321,
-0.013587259,
0.014708747,
-0.009460758,
-0.0034435433,
-0.004302632,
0.020172406,
0.029359981,
-0.019065296,
0.0075916112,
-0.03410474,
-0.009252276,
-0.038619447,
-0.0013641176,
-0.0115311975,
-0.029058043,
0.005851867,
0.03778552,
-0.02125076,
0.06395357,
0.0011331702,
0.038935766,
-0.0024838084,
0.024902785,
0.042242717,
0.031200372,
0.0506395,
0.01571521,
-0.03482364,
0.00494605,
-0.010783539,
-0.030884055,
-0.037181642,
0.031286642,
0.00057736866,
-0.002873813,
-0.0035567705,
0.0052372054,
0.017871918,
0.045204595,
0.048080206,
-0.008382404,
0.013069649,
0.008871258,
0.0006258946,
0.005657763,
-0.060387816,
-0.067921914,
-0.0069410047,
0.0043745223,
0.054435305,
0.014723125,
-0.0156145645,
-0.032350615,
0.018317638,
0.003874885,
0.044917032,
0.007070407,
0.018346393,
0.019280966,
0.00032058562,
-0.02664253,
-0.0060783215,
0.022314737,
-0.047706377,
-0.013766984,
0.0038317507,
0.03939586,
-0.00061151653,
-0.0012787479,
0.002199842,
0.00010721758,
0.009086928,
0.052048545,
0.004302632,
0.021797126,
-0.03528374,
0.041380033,
-0.04969055,
0.019511016,
-0.020560615,
0.021869017,
0.016347844,
0.019582907,
0.008303325,
0.05144467,
0.0056110346,
0.008626831,
-0.019539772,
0.009417624,
0.022789212,
-0.004360144,
0.020761907,
-0.036577765,
0.031229129,
0.045578424,
0.038705714,
0.015211979,
0.041753862,
0.022127822,
-0.03807308,
-0.025938006,
0.008217056,
0.039798446,
-0.007246538,
-0.013443478,
-0.021207627,
-0.012271667,
-0.0036178771,
0.025894871,
0.04695872,
-0.017095504,
-0.014004222,
-0.06682918,
-0.023867566,
0.008569319,
-0.012853978,
-0.037526716,
-0.0066821994,
0.025190346,
0.028425409,
0.054147743,
0.007548477,
-0.010273118,
0.03844691,
0.023738163,
0.006595931,
0.02973381,
-0.007145892,
0.007196215,
-0.018763358,
0.036491495,
-0.0058303,
-0.016549138,
-0.02737581,
-0.019654797,
-0.059525132,
0.024241395,
-0.022012796,
-0.024744626,
-0.0069877333,
-0.012314801,
-0.006545608,
-0.057224646,
0.015010686,
-0.048454035,
0.013953899,
0.027634615,
-0.020431211,
-0.060617864,
0.07045245,
0.013256564,
-0.0012463974,
0.017915053,
0.060847916,
0.02553542,
0.0525374,
0.04730379,
-0.017469333,
0.03919457,
0.058231108,
-0.037152886,
-0.028468542,
0.013299698,
-0.03749796,
0.027145762,
0.00811641,
-0.050236914,
-0.009101307,
0.0199136,
-0.041725107,
-0.04008601,
0.03614642,
-0.0052875285,
-0.054349035,
0.044514447,
0.057886034,
0.0018457824,
-0.00019893382,
-0.013515369,
-0.011509631,
-0.041753862,
-0.004597382,
-0.037440445,
0.032206837,
0.019467883,
-0.05069701,
-0.016074661,
-0.012731764,
-0.029791323,
-0.040689886,
-0.016031528,
-0.012738953,
0.03577259,
0.006506068,
0.05742594,
0.024227018,
-0.014644045,
-0.012214155,
0.057742257,
0.028008444,
0.012746143,
0.0607904,
0.069877334,
-0.01889276,
-0.018490175,
0.0053162845,
0.043939326,
-0.0024892,
-0.02146643,
-0.0061214557,
-0.0030337689,
-0.023623139,
-0.054406546,
-0.028324762,
0.035168715,
0.009690807,
0.030423958,
-0.03145918,
-0.027418945,
-0.06590899,
-0.03232186,
-0.01955415,
0.02258792,
-0.026038652,
-0.023824431,
0.012113509,
-0.03683657,
0.2459222,
0.046383593,
-0.020761907,
0.014500265,
0.046441108,
0.055297986,
-0.03260942,
-0.07315553,
0.020560615,
-0.011423362,
-0.0023292443,
-0.01867709,
-0.011150179,
0.029791323,
-0.01912281,
0.031487934,
-0.058633696,
-0.008058898,
0.02900053,
-0.019467883,
-0.0379293,
0.011495252,
0.019280966,
0.04839652,
0.030481469,
0.036433984,
0.01594526,
-0.010761972,
-0.043421715,
-0.03410474,
0.042271473,
-0.009791453,
0.0028989746,
-0.007397508,
-0.010244362,
0.027835907,
0.016362222,
-0.026728798,
-0.00535223,
0.019971114,
0.021063846,
-0.021222005,
0.008411161,
-0.033328325,
-0.0001488353,
0.018216992,
-0.024442688,
0.05941011,
0.06372353,
-0.028583568,
0.018935895,
-0.007828849,
0.043709278,
-0.032005545,
-0.050984573,
-0.0038569123,
-0.04169635,
-0.040028498,
0.009036605,
-0.018820869,
0.008238624,
0.013335643,
-0.018475797,
0.007469398,
-0.034219764,
-0.009065362,
-0.0099496115,
0.04385306,
-0.025420396,
-0.03114286,
-0.0012625727,
-0.012552039,
-0.007113541,
-0.023220554,
-0.008677154,
0.037584227,
-0.048454035,
0.06907216,
-0.005345041,
-0.051013328,
0.05483789,
-0.021552699,
0.014449942,
-0.034421057,
0.04212769,
0.054492816,
-0.0069697606,
0.0068978705,
-0.0018889166,
-0.008080465,
0.04753384,
0.02708825,
0.02612492,
0.04569345,
-0.0017658045
] | Decompose the original model into many small testable components and run a forward pass on each of those for
verification
Decompose the original model only into the original tokenizer and the original model, run a forward pass on
those, and use intermediate print statements or breakpoints for verification |
[
0.047451973,
-0.006058174,
-0.053294048,
-0.026050894,
0.011579831,
0.02301063,
-0.0032395956,
-0.0039940733,
-0.01962759,
0.050223976,
0.01280935,
0.006326433,
0.02223566,
-0.05013456,
0.0049888655,
0.055469926,
-0.014098481,
-0.022951016,
-0.069985695,
-0.012824253,
0.009843602,
0.014918161,
-0.050402816,
-0.00065574335,
-0.030313225,
-0.0210434,
0.008323469,
-0.0072988705,
0.041729122,
0.05654296,
0.025454763,
0.033234265,
-0.0052869306,
-0.029225288,
-0.018643975,
-0.030194,
-0.017675264,
-0.05156527,
-0.022801984,
-0.04044744,
-0.002226174,
0.0040052505,
0.007414371,
-0.055499732,
-0.04798849,
0.009642407,
-0.014955419,
-0.035499558,
-0.019448752,
-0.002749651,
-0.005018672,
0.0036643385,
0.030044967,
-0.009806343,
-0.016825778,
0.002971337,
-0.03564859,
-0.0005719125,
-0.038450405,
0.015193871,
0.042861767,
0.028375803,
-0.0021330288,
-0.07356248,
0.0010516112,
0.026781155,
0.0052757533,
0.015320549,
-0.022578435,
-0.034188073,
-0.04748178,
0.014120837,
-0.015208774,
-0.032906394,
-0.024769215,
0.0054285116,
0.025454763,
-0.008271308,
0.010782507,
0.04003015,
0.025275925,
0.04596165,
-0.012727382,
0.00814463,
-0.022876501,
-0.037317757,
0.0042213476,
-0.032548714,
-0.004981414,
-0.018718492,
0.01441145,
0.028241673,
-0.042802155,
0.035529368,
0.031356454,
0.039702278,
0.00043219447,
0.058987092,
0.028480126,
0.0005416403,
-0.00713866,
0.084471665,
-0.033502523,
-0.0011717686,
-0.022503918,
0.017869005,
0.010260893,
-0.00947102,
-0.030819938,
-0.002065964,
0.0057750125,
0.025648506,
-0.048614427,
0.0039083795,
-0.014657354,
0.03087955,
0.0038785727,
-0.036840852,
-0.051028755,
0.00809992,
0.010745249,
0.021773659,
0.008405438,
-0.03508227,
0.0498663,
-0.024277406,
-0.028316189,
0.036989886,
-0.041103184,
0.009597698,
0.014478515,
-0.0072280797,
-0.015134258,
0.042414673,
-0.041282024,
-0.023293791,
-0.027839284,
-0.010037344,
0.022951016,
-0.018092554,
0.04217622,
-0.014456159,
0.032131422,
0.05201237,
0.0011876033,
0.0030607565,
0.007809307,
-0.013852578,
-0.006363691,
0.009716924,
-0.04950862,
0.025693215,
-0.020193914,
0.005979932,
-0.00578619,
-0.020432366,
-0.013383125,
0.0034836365,
0.021401078,
0.02937432,
-0.012615607,
0.015976293,
-0.04190796,
0.03496304,
-0.00196723,
0.031445872,
-0.028837804,
-0.023725986,
0.048614427,
-0.04548474,
-0.00052114826,
0.0020044881,
0.02785419,
0.016244551,
0.03371117,
0.012958382,
0.042206027,
0.015469582,
0.013107415,
-0.009612601,
-0.039076343,
-0.031147808,
0.040596474,
0.01477658,
0.015290743,
-0.023949536,
-0.022384692,
-0.006043271,
-0.030819938,
-0.0040238798,
0.015857067,
0.039314795,
-0.026110508,
0.031028582,
-0.015961388,
-0.0007419028,
-0.033055425,
-0.0210434,
0.015454678,
-0.025126893,
-0.0074218223,
0.022697661,
-0.012839156,
0.046647195,
-0.000097977274,
0.06199755,
0.008517211,
0.040775314,
-0.03687066,
0.0056893188,
0.06921073,
-0.019061266,
-0.029538257,
-0.022727467,
0.0026248363,
-0.0333833,
-0.02365147,
0.025335537,
0.024620181,
0.001123333,
-0.0057191253,
0.04232525,
0.019523267,
-0.027571026,
0.015857067,
-0.04780965,
-0.016035905,
0.033413105,
0.01120725,
0.011199798,
0.008927051,
0.017183457,
-0.013517255,
0.040536862,
0.030700712,
-0.013547061,
0.06011974,
0.034009233,
0.03239968,
0.0033830395,
0.032816973,
0.019880945,
0.0288229,
0.00404996,
-0.007365935,
-0.005558915,
-0.004057412,
-0.006095432,
-0.040775314,
0.027556123,
-0.02950845,
0.056066055,
0.031118002,
-0.012190864,
-0.044918418,
-0.016229648,
0.0067921598,
0.022503918,
-0.034158267,
-0.029806515,
0.032101616,
0.016781067,
0.017168554,
-0.018494943,
0.023502437,
0.04515687,
0.016393583,
0.04017918,
-0.008271308,
-0.031654518,
-0.009947925,
-0.046408743,
-0.084829345,
-0.032131422,
-0.023323597,
-0.015149161,
0.007101402,
-0.012541091,
0.021520304,
-0.015424872,
0.015976293,
0.01262306,
-0.007529871,
0.05046243,
0.013025447,
0.009180407,
-0.052399855,
0.0146349985,
-0.009016471,
0.026840767,
0.035529368,
-0.019150686,
-0.018286297,
-0.017943522,
0.0078838235,
-0.004191541,
0.020521786,
-0.018658878,
-0.04447132,
0.03129684,
-0.027123928,
0.0053726244,
0.007161015,
0.023323597,
-0.013696094,
0.041609894,
0.023576954,
-0.04107338,
0.012682673,
0.051118173,
0.007712436,
0.04748178,
0.017630553,
0.017928619,
-0.037436984,
0.075708546,
0.04950862,
-0.021117916,
-0.007906178,
-0.045067452,
-0.05165469,
-0.020134302,
-0.0038264114,
-0.078748815,
0.0034109831,
0.048256747,
-0.03320446,
-0.03880808,
-0.0060060127,
-0.05406902,
-0.0516845,
-0.0063152555,
0.014105934,
0.028435415,
0.022027014,
0.0034519671,
-0.039016727,
0.009031374,
-0.016527712,
0.06089471,
0.009940472,
-0.005920319,
0.047183715,
0.03779466,
0.010268345,
-0.0041654604,
0.00053744874,
-0.048107717,
-0.004660994,
0.038271565,
0.019538172,
0.030044967,
-0.0026155217,
0.02008959,
0.01427732,
0.01971701,
-0.025395151,
0.060507227,
0.004739236,
0.03023871,
-0.013152124,
-0.00319116,
0.01748152,
-0.029910838,
-0.031416066,
-0.018167071,
0.02351734,
0.025961475,
0.03806292,
-0.027347477,
0.012660317,
-0.011706509,
-0.023249082,
-0.017809393,
-0.022086628,
-0.048763458,
0.030551678,
0.0146797085,
0.045186676,
-0.054545924,
-0.01903146,
0.014567934,
0.012749737,
0.054337278,
0.057347734,
0.03362175,
-0.0043629287,
0.002412465,
0.0031818454,
-0.0045305905,
0.041192602,
0.0079136295,
-0.0068592243,
-0.011505315,
-0.03514188,
-0.064620525,
0.03269775,
0.060328387,
0.028122447,
-0.006181126,
0.023666373,
-0.01020128,
0.0040909443,
0.043726157,
-0.011169991,
-0.013427835,
-0.059583224,
0.053353664,
0.010402474,
0.016736358,
-0.046557777,
-0.02484373,
0.018077651,
0.0027440623,
0.0061103357,
-0.0042250734,
-0.048197135,
-0.007667726,
-0.023263985,
0.029731998,
-0.04867404,
-0.010342861,
-0.056572765,
0.012280284,
0.06557433,
-0.04217622,
0.011721412,
-0.039583053,
0.026572509,
0.037258144,
-0.0503134,
-0.041282024,
-0.031416066,
0.006635675,
-0.03600627,
0.02694509,
0.04855481,
-0.014202804,
-0.000050414925,
-0.042355057,
0.011892799,
-0.0047131553,
-0.0047876714,
-0.021833273,
-0.0070119826,
-0.010380119,
0.030179096,
0.0075037903,
0.01061112,
-0.025931668,
0.025723023,
-0.040477246,
0.015499388,
-0.031922776,
0.011065668,
-0.011155088,
0.015901776,
-0.02690038,
0.015901776,
0.014105934,
-0.017749779,
-0.017228166,
0.020164108,
-0.0135992225,
-0.03910615,
0.016438292,
0.014895806,
-0.008688599,
0.028256577,
0.0173921,
-0.016229648,
0.025305731,
0.024828827,
-0.0102087315,
-0.018763201,
-0.040775314,
0.015991196,
-0.004191541,
-0.026408572,
0.039702278,
-0.052131593,
0.04035802,
-0.0054918504,
-0.03284678,
-0.022131337,
-0.08721387,
-0.017347392,
-0.037496597,
0.007209451,
0.050969142,
0.023949536,
-0.008852535,
-0.006419578,
-0.012034381,
-0.009724376,
-0.019508364,
-0.041341636,
0.010953894,
0.06950879,
0.013301157,
0.053860374,
-0.02977671,
-0.012712479,
0.018837718,
0.005924045,
0.025916765,
0.016125325,
-0.031237228,
0.027109025,
0.011594734,
-0.030611292,
-0.014202804,
0.000908633,
0.00530556,
0.008107373,
-0.015588808,
-0.002790635,
-0.033979427,
-0.03463517,
0.019553075,
0.018032942,
-0.076423906,
-0.039821506,
0.007727339,
0.020462172,
0.017645458,
0.05114798,
-0.063666716,
-0.036244724,
0.0015918541,
0.026527798,
-0.009962828,
0.010968798,
-0.06390517,
-0.06116297,
-0.00027524453,
0.007231806,
0.04867404,
-0.029150771,
0.02113282,
-0.043994416,
0.048823074,
-0.045544356,
-0.005301834,
-0.0333833,
0.0064344816,
-0.015484485,
0.027421994,
0.020641012,
-0.019165589,
0.0074218223,
0.00919531,
0.05046243,
0.03710911,
-0.061341807,
-0.019314623,
0.021833273,
0.008547018,
-0.0038822987,
-0.023815406,
-0.039910924,
0.06029858,
0.0016691649,
0.06283213,
-0.035618786,
-0.037645627,
-0.01770507,
-0.011475508,
0.039314795,
-0.0416397,
-0.026617218,
-0.012146155,
0.03806292,
-0.023472631,
0.006576062,
-0.028495029,
0.000462001,
-0.016527712,
-0.055827603,
0.010924088,
-0.028763287,
-0.032101616,
0.0014232611,
0.014553031,
0.050760496,
-0.013196834,
0.039404213,
0.064262845,
0.0011773574,
-0.004862188,
-0.040745508,
0.049449008,
0.010484442,
0.02566341,
-0.014538128,
0.010685636,
-0.009359246,
-0.00947102,
0.014463612,
-0.023338502,
0.005961303,
-0.0003842246,
0.045872226,
0.023293791,
0.036483176,
0.005495576,
-0.030506968,
-0.0035972737,
0.017094037,
0.024366826,
0.031624712,
0.0024012874,
0.060656257,
-0.021341465,
0.0018498668,
0.003029087,
-0.02950845,
0.010894281,
0.038450405,
-0.018092554,
-0.043487705,
0.011475508,
0.022220757,
-0.02672154,
-0.064382076,
-0.024381729,
-0.014553031,
-0.047511585,
-0.011609638,
0.019389138,
0.0060879807,
-0.045693386,
0.045633774,
0.025961475,
-0.03359194,
-0.029478643,
0.0002754774,
-0.03943402,
-0.05344308,
0.023785599,
0.049896106,
-0.052906565,
-0.024605278,
-0.04336848,
0.0070343376,
-0.053145017,
-0.04217622,
0.062653296,
-0.024098568,
0.0029433933,
0.005998561,
0.008710954,
0.069985695,
-0.027436897,
-0.0077795004,
0.0366024,
-0.035439946,
-0.037645627,
-0.025559086,
0.027287865,
-0.013144673,
0.013427835,
-0.0034650073,
0.025991281,
0.028793093,
0.06730311,
-0.018793007,
-0.091148324,
0.011110378,
-0.023636566,
-0.038092725,
0.0035451124,
-0.021803467,
-0.03207181,
0.020521786,
-0.023189468,
-0.041371442,
-0.0052086883,
-0.009321988,
-0.025514377,
0.0026732718,
-0.057615995,
0.0076602744,
-0.022310177,
-0.053145017,
-0.021758756,
-0.02360676,
-0.0040313313,
0.0038524922,
0.0015657735,
-0.012205768,
-0.012190864,
0.008055211,
0.0056334315,
-0.012272833,
-0.009612601,
0.00013308143,
-0.05225082,
-0.009843602,
-0.0074404515,
0.06754156,
0.028703675,
-0.047690425,
0.007876372,
-0.016930101,
-0.0058905124,
-0.014843645,
-0.0043629287,
0.05475457,
-0.0010758289,
-0.017854102,
0.012779543,
0.013889836,
-0.040149376,
-0.004601381,
-0.0013459504,
-0.037496597,
-0.0016989714,
0.00553656,
0.014694612,
0.050343204,
-0.005860706,
0.03564859,
0.009135697,
0.02612541,
0.02274237,
0.031833358,
0.008114824,
0.0051490753,
-0.0016356325,
-0.0046311873,
0.008852535,
0.0074590803,
-0.04867404,
0.04098396,
0.017809393,
0.0068592243,
-0.022518823,
-0.0010627885,
0.029806515,
0.02172895,
0.018867524,
-0.03308523,
-0.032816973,
-0.005476947,
-0.0007577375,
0.003155765,
-0.054963212,
-0.04617029,
0.011594734,
-0.015886873,
0.020283334,
-0.037705243,
-0.039046533,
-0.010529151,
0.055887215,
0.018167071,
-0.010432281,
0.019269912,
0.011088024,
-0.0065537076,
-0.023964439,
-0.03728795,
-0.008658793,
-0.008174437,
-0.042295445,
-0.030760324,
-0.009448665,
0.060089935,
0.02690038,
-0.021430884,
-0.044501126,
-0.0018433466,
0.016721455,
0.052280627,
-0.00035325377,
0.03147568,
-0.06980686,
0.027109025,
-0.016229648,
-0.034843817,
0.009739279,
0.049449008,
0.027898898,
0.022787081,
0.034307297,
0.0030998776,
-0.021162625,
-0.019925656,
0.007533597,
0.017213263,
0.020119397,
-0.030164193,
0.013614126,
-0.0037779757,
0.05344308,
0.06688582,
0.027526317,
-0.016930101,
0.04062628,
0.02172895,
-0.016825778,
-0.04566358,
0.043666545,
0.020193914,
0.021758756,
0.042533897,
-0.019821333,
-0.030939164,
0.029806515,
-0.003856218,
0.008859986,
0.0011913291,
0.012727382,
-0.021311658,
-0.036751434,
0.045276098,
0.005663238,
-0.006501546,
-0.010022441,
-0.015633518,
0.060417805,
0.041222412,
0.00075354596,
-0.0029042724,
0.0079285335,
0.016945004,
0.02305534,
0.010141667,
-0.01070799,
-0.005283205,
-0.0049143494,
0.018539652,
-0.018360814,
-0.03693027,
-0.04035802,
-0.017958425,
-0.035529368,
0.03275736,
-0.018256491,
-0.016676744,
0.0063934973,
-0.020164108,
-0.004836107,
-0.04822694,
0.0061475937,
-0.050074946,
0.022176048,
0.0073771123,
-0.020566495,
-0.054963212,
0.056811217,
-0.009687117,
0.005353995,
0.01221322,
0.098838404,
0.02795851,
0.07254906,
0.049031716,
0.027779672,
0.02201211,
0.02108811,
-0.014351837,
-0.020968884,
0.009538085,
-0.014791483,
-0.034605365,
-0.035112076,
-0.059911095,
-0.0090835355,
0.044590548,
-0.019389138,
-0.0562747,
0.03746679,
-0.00029317502,
-0.03147568,
0.013181931,
0.09335401,
0.015812356,
-0.02369618,
-0.013293706,
-0.0042660576,
-0.03609569,
-0.024217794,
-0.04855481,
0.026915284,
-0.051088367,
-0.057496767,
0.00006805433,
-0.021177528,
-0.02228037,
0.011408444,
-0.0101193115,
-0.04578281,
0.021192431,
-0.0023249083,
0.044769384,
0.04044744,
-0.010380119,
-0.008815276,
0.083458245,
0.04217622,
-0.00031296842,
0.044858806,
0.038211953,
-0.021565014,
0.00526085,
0.020611206,
-0.002431094,
0.0006049791,
0.010126764,
-0.013703546,
0.005845803,
-0.04432229,
-0.060864903,
-0.032667942,
0.041788734,
-0.00089745555,
0.005905416,
-0.0064531104,
-0.021475594,
-0.064978205,
0.004374106,
-0.028033027,
-0.0065909657,
0.005245947,
0.009187859,
-0.025261022,
-0.06235523,
0.26611257,
0.06962802,
0.017228166,
0.00585698,
0.06271291,
0.0329362,
0.022697661,
-0.00878547,
-0.018137265,
-0.033651557,
0.026199928,
-0.019821333,
-0.03335349,
0.0039195567,
-0.008912148,
0.026915284,
-0.0434579,
0.023040436,
-0.0026993526,
-0.016766164,
-0.04283196,
0.019001653,
-0.008494857,
0.038390793,
0.032667942,
0.015946485,
0.000777298,
-0.044411708,
0.013211737,
-0.01903146,
0.0068219663,
-0.015588808,
0.033681363,
-0.019165589,
0.006933741,
0.024813924,
0.0090835355,
-0.017928619,
-0.030268516,
0.0037444434,
0.003997799,
-0.04232525,
0.012563447,
-0.016348874,
-0.011169991,
0.03728795,
-0.014120837,
0.010894281,
0.047779843,
-0.049657654,
0.04822694,
-0.018867524,
0.03138626,
-0.03389001,
-0.035261106,
0.009254923,
0.0035898222,
-0.016676744,
-0.01980643,
-0.008703503,
-0.01907617,
0.02575283,
-0.044888612,
0.02864406,
0.007816759,
0.01216851,
-0.022518823,
0.0590169,
-0.01564842,
0.003455693,
0.025633603,
0.017526232,
-0.04918075,
-0.037496597,
0.007772049,
0.03189297,
-0.011281766,
0.046647195,
-0.021535207,
-0.058361158,
0.027272962,
-0.0011810831,
0.0024571747,
-0.053174824,
0.032280456,
0.072072156,
0.0011624541,
2.6560983e-7,
-0.023159662,
-0.007846565,
0.015335452,
0.01564842,
0.03427749,
0.026796058,
-0.00016021002
] |
Where to find the pretrained weights?
How to load the pretrained weights into the corresponding model?
How to run the tokenizer independently from the model?
Trace one forward pass so that you know which classes and functions are required for a simple forward pass. Usually,
you only have to reimplement those functions.
Be able to locate the important components of the model: Where is the model's class? Are there model sub-classes,
e.g. EncoderModel, DecoderModel? Where is the self-attention layer? Are there multiple different attention layers,
e.g. self-attention, cross-attention?
How can you debug the model in the original environment of the repo? Do you have to add print statements, can you
work with an interactive debugger like ipdb, or should you use an efficient IDE to debug the model, like PyCharm? |
[
0.014647037,
-0.0042371275,
-0.017971389,
-0.02256013,
-0.027063632,
-0.012068533,
0.0014774896,
0.0014037928,
0.004482192,
0.026026549,
0.020855334,
0.0044253655,
-0.0040844064,
-0.036028016,
-0.005352348,
0.005018492,
-0.018752754,
-0.013808846,
-0.056968592,
0.0071565905,
0.060236115,
0.010278498,
-0.07432909,
-0.012928034,
-0.03284573,
0.027120458,
0.046114724,
-0.027702931,
0.0921158,
0.07592024,
-0.014341594,
-0.015456814,
-0.014043255,
-0.020429136,
-0.03116935,
-0.03849997,
-0.0057252725,
-0.037136134,
-0.024762157,
-0.0336413,
0.02003135,
-0.03267525,
0.043870077,
-0.052138336,
-0.085296616,
0.012615488,
0.008559495,
-0.035743885,
0.0010131104,
-0.04381325,
-0.011123792,
0.013638366,
0.012821484,
-0.0053203832,
-0.0076573743,
-0.0018859303,
0.037675984,
0.030203298,
-0.0119619835,
0.049126532,
0.045091845,
-0.009042521,
0.014789103,
-0.058929104,
0.044125795,
0.024264926,
-0.021281533,
-0.018227108,
-0.010129328,
-0.02521677,
-0.037988532,
-0.020912161,
-0.020855334,
0.0018806028,
-0.02416548,
-0.01047739,
0.027092045,
-0.012388182,
-0.021238914,
0.009660509,
0.00084085495,
0.029720273,
0.03335717,
-0.0040701996,
-0.030459017,
-0.0006392984,
0.030203298,
0.0046455683,
-0.05600254,
0.0047166017,
0.011940673,
0.04781952,
-0.0046207067,
0.03267525,
0.01951991,
0.05966785,
0.0044076075,
0.019235779,
0.015016409,
-0.003111252,
0.035829123,
0.052990735,
0.0053203832,
0.008133296,
-0.036454216,
-0.002448868,
0.015783567,
-0.019619357,
0.022020278,
-0.025344629,
-0.008580805,
-0.013148237,
-0.019420465,
-0.020130796,
-0.027163079,
0.0037860672,
0.009433203,
0.020997401,
-0.060747553,
-0.020912161,
0.03324352,
-0.008694458,
0.015456814,
-0.0332151,
0.058417667,
-0.003081063,
-0.0075437212,
0.05662763,
-0.030373776,
-0.026182821,
-0.015272128,
-0.0016382021,
0.0038322387,
0.052251987,
0.016792238,
0.0015059029,
0.013680986,
0.019406257,
0.009603683,
-0.022673784,
0.029862339,
0.011876743,
0.041142404,
0.062679656,
0.0019178952,
-0.014902756,
0.01951991,
-0.08069366,
-0.010129328,
0.046796642,
-0.020628028,
-0.0014819292,
-0.0006464017,
0.0042904024,
-0.034181155,
0.0004515045,
-0.012821484,
0.0031929403,
0.003425574,
0.02800127,
-0.005125042,
0.02817175,
-0.023156809,
0.05819036,
-0.03281732,
0.0400627,
-0.00464912,
0.03744868,
0.019420465,
-0.035402924,
0.033385582,
-0.008048057,
-0.038556796,
0.01467545,
0.03563023,
0.07040806,
0.020386515,
0.017090578,
0.03648263,
0.04807524,
-0.029152008,
-0.00151567,
0.042818785,
0.034607355,
0.013830155,
0.0005425157,
-0.005835374,
0.0067410464,
0.020926367,
0.018085042,
0.03639739,
0.05853132,
-0.009440307,
0.06046342,
-0.011272961,
0.0029833924,
-0.019122126,
0.05887228,
-0.0073093115,
-0.044012144,
-0.06569146,
0.036198497,
-0.05330328,
0.058929104,
-0.030032817,
-0.037590746,
-0.03693724,
0.038045358,
-0.03187968,
-0.0015378678,
0.038130596,
0.021224707,
-0.05608778,
-0.02900994,
-0.0025891585,
-0.015002202,
-0.015755154,
-0.0026317784,
0.0079273,
-0.0016692792,
0.0344937,
0.006858251,
0.018497033,
-0.0021416496,
0.0108680725,
0.001555626,
0.016706998,
0.019647771,
0.015954047,
0.0007298657,
0.024563266,
0.05330328,
-0.0064000874,
0.04250624,
0.008928868,
-0.007856267,
0.059724677,
0.057337962,
-0.009376377,
0.031055696,
0.043500703,
0.017602015,
0.013780432,
0.04119923,
-0.024421198,
-0.0015476348,
0.02918042,
0.01467545,
0.024506439,
0.03545975,
-0.028995734,
0.02095478,
0.02238965,
0.01619556,
-0.017616222,
0.00020388735,
0.008488462,
0.017445743,
-0.052678186,
-0.025458284,
0.0012794847,
0.02703522,
0.0017811564,
-0.023682455,
0.013361337,
0.017530983,
0.0041909562,
0.0003351877,
-0.036170084,
-0.047592215,
-0.026537986,
-0.031396654,
-0.039295543,
-0.009937539,
-0.036028016,
0.030885216,
-0.012530249,
-0.029123593,
0.00831088,
-0.042648308,
-0.02015921,
0.023568802,
0.0010326445,
0.033754956,
-0.002489712,
0.024236513,
-0.041568603,
0.04031842,
-0.015740948,
0.04222211,
0.0079273,
-0.023994999,
-0.009106451,
-0.03707931,
0.019207366,
0.009042521,
0.0012270977,
-0.03207857,
-0.052592948,
-0.032192226,
0.011343995,
-0.010697593,
0.0118483305,
0.009852299,
-0.0067694597,
0.021153674,
-0.02926566,
-0.061031688,
0.044097383,
0.039579675,
-0.039125063,
0.028839462,
-0.050632432,
0.021182086,
-0.022531716,
0.050234646,
0.044892956,
-0.02530201,
-0.006858251,
-0.043870077,
-0.016337626,
-0.0009642751,
0.022844262,
0.014689657,
-0.00582827,
0.052649774,
-0.0018237763,
-0.06336158,
-0.013936705,
-0.016650172,
-0.03938078,
-0.014306078,
-0.02568559,
0.035061967,
-0.01694851,
0.0069612493,
-0.030828388,
-0.016536519,
-0.01321927,
0.016976925,
0.0265664,
-0.038016945,
0.048103653,
0.037249785,
0.0108325565,
-0.018823786,
0.014085875,
-0.05608778,
-0.00026104684,
-0.029663445,
0.01720423,
0.041881148,
-0.027006805,
0.0015938064,
0.007913093,
0.03520403,
-0.034436874,
0.029947579,
-0.030061232,
-0.0050824224,
0.048274133,
0.048558265,
0.0016222197,
0.028668981,
-0.060065635,
-0.016167145,
-0.00023085775,
0.026054962,
0.06336158,
-0.026197027,
0.038045358,
-0.021622492,
-0.043671183,
0.024179686,
-0.028200163,
-0.053019147,
0.010484493,
0.03753392,
0.035005137,
-0.050916567,
-0.011422131,
-0.0067019784,
0.053104386,
0.037874877,
0.0332151,
0.030714735,
-0.028328022,
0.0031680786,
-0.049694795,
-0.0048018415,
0.012324252,
-0.026793705,
0.02660902,
-0.021764558,
-0.026154408,
-0.095241256,
0.05435457,
0.044211037,
0.022986328,
-0.006776563,
-0.0017527431,
-0.0011374184,
-0.0027685172,
0.029663445,
0.00049012876,
0.008339292,
-0.025543522,
0.032874145,
0.021920832,
0.0027276732,
-0.006048473,
-0.016877478,
0.02074168,
0.021068433,
-0.017019544,
-0.026978392,
-0.02015921,
-0.003269301,
0.024847398,
0.07592024,
-0.032959383,
-0.033499237,
-0.029890751,
0.043756425,
0.051399592,
-0.06625973,
-0.044978194,
-0.0263533,
0.021650905,
0.040119525,
0.0054162783,
-0.03849997,
-0.019136332,
-0.034266394,
-0.054837596,
0.02918042,
0.045716938,
-0.03710772,
0.017559396,
-0.042534653,
-0.007206314,
0.00009983488,
-0.0016470812,
0.0077994405,
0.028058097,
0.0042904024,
0.0059419232,
0.037590746,
0.010029881,
-0.008637631,
0.007025179,
-0.04111399,
0.017815115,
-0.054326158,
-0.009930435,
-0.0066771167,
0.027305145,
-0.0344937,
0.03622691,
0.02403762,
0.022957915,
-0.016295006,
0.031851266,
-0.061997738,
-0.028313816,
0.013041687,
0.041256055,
-0.020628028,
0.054752357,
0.013666779,
-0.0070535922,
0.012437905,
0.02631068,
-0.011457648,
0.046967123,
-0.005217385,
0.01197619,
-0.012224806,
-0.022119725,
0.00207772,
-0.058588147,
0.021721939,
0.015570467,
-0.010306911,
-0.0614863,
-0.04688188,
-0.017019544,
-0.004055993,
-0.007479791,
0.006392984,
-0.028910493,
0.0053203832,
0.016962718,
0.01191226,
-0.025500903,
-0.039323956,
-0.011024346,
0.0042904024,
0.018397586,
0.02909518,
0.031851266,
0.007117522,
-0.01589722,
0.00040133734,
-0.0018912577,
-0.0030846149,
-0.017275263,
-0.0349199,
0.006311296,
0.0009873608,
-0.028228575,
-0.019832456,
-0.02264537,
0.0160677,
0.020514375,
-0.01851124,
0.024364373,
-0.0010406357,
-0.07313573,
0.029080974,
-0.031908095,
-0.07199921,
-0.008751284,
0.0051428005,
0.008104883,
0.032703664,
0.007138832,
-0.06142947,
-0.03395385,
-0.07194238,
0.007998333,
-0.056684457,
-0.01467545,
-0.023639834,
-0.05966785,
0.015399988,
0.012395286,
0.042108454,
-0.012281633,
-0.029123593,
-0.06750991,
0.016721204,
-0.043926902,
-0.034522112,
-0.0033865056,
0.014156908,
0.020258656,
0.054212503,
0.025017878,
-0.037505507,
-0.032305878,
0.03884093,
0.044296276,
0.032106984,
-0.0073235184,
-0.025884481,
-0.00091987936,
0.00073918875,
-0.0030526498,
0.012878311,
-0.034209568,
0.0114718545,
-0.028470088,
0.039068237,
-0.0023831623,
-0.033868607,
-0.007827854,
-0.0060449215,
0.04895605,
-0.029635033,
0.019619357,
-0.052308816,
0.020272862,
0.03205016,
0.012210599,
-0.034152742,
0.041710667,
-0.034522112,
-0.056741286,
0.024975257,
-0.030345364,
0.004244231,
-0.020414928,
-0.014604417,
0.040574137,
-0.010250084,
0.025131531,
0.063873015,
-0.0023707314,
0.0072382786,
-0.006403639,
-0.01880958,
0.030459017,
-0.0154284015,
0.027148873,
0.018454414,
-0.03867045,
-0.008389016,
-0.018127661,
-0.05722431,
-0.020315483,
0.026665846,
0.04460882,
-0.013276096,
0.03796012,
-0.009894919,
-0.060690727,
-0.035175618,
0.01056263,
0.010392151,
0.023753487,
0.029038353,
0.048984464,
-0.03989222,
0.008843628,
-0.008559495,
-0.0017580705,
-0.026907358,
0.06739626,
0.0014188873,
-0.0332151,
0.037335027,
0.03858521,
-0.057423204,
-0.03935237,
-0.017886149,
0.018610686,
-0.026154408,
-0.01336844,
0.02159408,
0.0023405424,
-0.02568559,
0.033129863,
0.03761916,
0.0004057769,
-0.020358102,
0.032021746,
-0.00037536584,
-0.025628762,
0.034436874,
0.04023318,
-0.024634298,
-0.012416596,
-0.018795373,
0.007636064,
-0.0015653932,
-0.009752852,
0.050547194,
0.012615488,
0.026069168,
0.008460049,
0.0061656777,
0.04208004,
-0.02560035,
0.028981527,
0.031652372,
-0.051001806,
-0.049495902,
-0.045006607,
-0.027120458,
0.019420465,
0.0107189035,
0.0054624495,
0.03849997,
0.0006481775,
0.007025179,
-0.0070820055,
-0.049694795,
0.0053416933,
-0.046199962,
-0.009347963,
-0.015584675,
-0.019889284,
0.009305343,
-0.0074584815,
0.029862339,
-0.041142404,
0.0057110656,
0.017530983,
0.011557095,
-0.012729142,
-0.044722475,
0.0009296464,
-0.072510645,
-0.042563066,
-0.0056435843,
0.0004959002,
-0.0016177801,
0.014362904,
-0.015925633,
0.009880712,
-0.02896732,
0.039835393,
-0.027248317,
0.012423699,
-0.02560035,
-0.011990396,
0.0015547381,
-0.004897736,
-0.060577076,
0.027717138,
-0.014377111,
0.029237246,
0.021565666,
-0.0044182623,
0.001089471,
-0.0136170555,
-0.0054162783,
0.03023171,
-0.019093713,
-0.0052635567,
-0.00057847623,
-0.0022783885,
-0.061258994,
0.019875078,
0.004535467,
-0.038301077,
0.0029691858,
0.0025447628,
0.016394453,
0.06375936,
-0.012047223,
0.037335027,
0.008964384,
0.039608087,
0.026637433,
-0.01064787,
0.01716161,
0.034039088,
-0.02082692,
-0.025245184,
0.0075437212,
0.019022679,
-0.07114681,
0.0038322387,
0.006403639,
-0.0030064783,
-0.047137603,
-0.003164527,
0.01859648,
0.039011408,
0.042449415,
0.0091348635,
-0.0077923373,
-0.029379314,
0.011059863,
0.020230243,
-0.0687601,
-0.022716403,
0.03807377,
-0.03545975,
0.024634298,
-0.0069576977,
0.016508106,
0.015499434,
0.017815115,
-0.005458898,
0.034124326,
-0.004095061,
-0.009227207,
0.0004905727,
-0.024833191,
-0.064498104,
0.014561797,
0.01480331,
-0.023000536,
-0.043244984,
0.015513641,
0.013986428,
-0.031283002,
0.005458898,
-0.00052786514,
0.008396119,
0.034209568,
0.01724685,
-0.04659775,
0.039323956,
-0.0033651958,
0.05730955,
0.025159944,
-0.020670649,
-0.04989369,
0.011052759,
0.05017782,
-0.010747316,
-0.019150538,
0.017687256,
0.042364173,
-0.005085974,
0.050575607,
0.0051534553,
0.06785087,
0.0136951925,
0.038443144,
0.029322486,
0.04642727,
0.025373043,
0.019178951,
0.032419533,
0.011052759,
0.024534851,
-0.013631263,
-0.038471557,
0.018014008,
0.042847198,
-0.008808111,
-0.042534653,
0.05216675,
0.043557532,
-0.03378337,
0.0018628445,
-0.0020297724,
-0.021153674,
0.0048728744,
-0.028271196,
-0.02517415,
0.011940673,
-0.031737614,
-0.058417667,
-0.012558661,
-0.004936804,
0.025103116,
0.014647037,
0.011990396,
-0.018156074,
0.036170084,
0.029492967,
0.019321019,
0.042875614,
-0.0042904024,
-0.010456081,
0.0015804877,
0.024449611,
0.019661978,
0.006765908,
-0.008616322,
-0.018880613,
-0.009305343,
0.019463085,
-0.019264191,
0.003881962,
-0.018497033,
-0.02703522,
-0.004816048,
-0.033328757,
0.0026175717,
-0.05182579,
-0.016536519,
0.03267525,
-0.0086092185,
-0.072624296,
0.0047805314,
0.023625627,
0.016081907,
0.033413995,
0.0066167386,
-0.02020183,
0.047677454,
0.057423204,
-0.004169646,
0.0017554068,
0.032590013,
-0.0057963054,
0.003860652,
0.016920097,
-0.03023171,
-0.009951745,
0.021480426,
-0.04364277,
0.016962718,
-0.009262724,
-0.011564198,
-0.037761226,
0.0041270265,
0.029549792,
-0.07387448,
0.0041234745,
0.049154945,
-0.0031698546,
0.01334713,
-0.03116935,
-0.016479691,
-0.056229845,
-0.010292704,
-0.08069366,
0.032192226,
0.026907358,
-0.04452358,
-0.022062898,
-0.036539454,
0.019676184,
-0.024307545,
-0.03858521,
-0.033556063,
-0.0014224389,
-0.0066948747,
0.06523685,
0.017047957,
-0.023852933,
0.0055441377,
0.05503649,
0.028910493,
-0.004297506,
0.066771165,
0.060236115,
-0.0052031786,
-0.012572869,
0.019093713,
0.021508839,
0.009958848,
-0.0013132255,
-0.01197619,
0.013624159,
-0.051428005,
-0.061713606,
0.028995734,
0.043159746,
0.0035125895,
-0.01172047,
-0.0045461217,
-0.0024257821,
-0.052592948,
-0.041824322,
-0.04102875,
0.0106052505,
-0.011635231,
-0.005373658,
0.0051285936,
-0.02302895,
0.24003524,
0.05705383,
0.010456081,
0.009866505,
0.061940912,
0.05131435,
0.043955315,
0.0068760095,
0.040915098,
-0.05949737,
0.012551558,
-0.033044625,
-0.0047272565,
-0.018156074,
-0.009312446,
-0.002718794,
-0.047251254,
0.0067730113,
-0.014973789,
-0.025316216,
-0.086262666,
0.04330181,
0.0054553463,
0.021807179,
0.014178217,
-0.0053168316,
0.0031627512,
-0.05435457,
0.00020610714,
-0.057991467,
-0.004858668,
-0.013794639,
0.004631362,
-0.011649437,
-0.0119974995,
0.015598881,
-0.0026193475,
-0.01343237,
-0.0044253655,
0.024591679,
-0.0013052343,
-0.031567134,
0.013169547,
-0.025188357,
-0.0060662315,
0.06762356,
-0.049126532,
0.034607355,
-0.0020457548,
-0.037931703,
0.048046827,
-0.032305878,
0.0447793,
-0.038897756,
-0.040147938,
-0.026197027,
-0.03790329,
-0.056911763,
0.027731344,
-0.03682359,
0.0053630034,
-0.011684954,
-0.04136971,
0.045432806,
-0.018127661,
-0.032362707,
0.012807278,
-0.01476069,
0.0022357686,
0.008786801,
-0.0036546558,
-0.015783567,
-0.019633563,
-0.017218437,
0.03520403,
0.00027369964,
-0.04816048,
0.051399592,
0.03065791,
-0.030771563,
-0.027134664,
-0.03264684,
0.015073235,
-0.03605643,
0.047137603,
-0.022275997,
-0.068305485,
-0.009504236,
-0.01973301,
-0.012636798,
0.021309946,
0.028569534,
0.019406257,
-0.008971487,
-0.0034113673
] | Again, it is up to you which strategy to choose. Often, one or the other is advantageous depending on the original code
base.
If the original code-base allows you to decompose the model into smaller sub-components, e.g. if the original
code-base can easily be run in eager mode, it is usually worth the effort to do so. There are some important advantages
to taking the more difficult road in the beginning: |
[
0.013660662,
-0.0142490985,
-0.02449087,
-0.027529884,
0.0013900878,
-0.03199902,
0.023001159,
-0.006647841,
0.016640086,
0.030226262,
0.021779593,
-0.000043382053,
0.018993832,
-0.08068282,
-0.0106142005,
0.007761401,
-0.0054188287,
-0.0023090541,
-0.067752115,
0.014457658,
-0.0066701868,
0.011292019,
-0.055029973,
-0.052527256,
-0.04832627,
0.01568667,
0.037689723,
-0.033816468,
0.06513022,
0.042784538,
-0.036229804,
0.013839427,
0.00782099,
-0.012915806,
0.0055417297,
-0.021571035,
0.009206422,
-0.063819274,
-0.01382453,
-0.05508956,
0.010241772,
0.0013379479,
0.016714573,
-0.045019105,
-0.061733678,
-0.004200989,
0.014599181,
-0.03810684,
-0.022941569,
-0.034620915,
-0.028989801,
0.01118774,
-0.017176382,
0.032356553,
-0.02428231,
0.010599303,
0.0129456,
-0.009042554,
-0.044244457,
0.012305024,
0.07931228,
0.02806618,
-0.004431894,
-0.06042273,
0.024744121,
-0.0019813173,
0.0027298979,
-0.0040222234,
-0.0019180046,
-0.0016126136,
-0.052318696,
0.014174612,
0.011746381,
-0.05017351,
-0.01336272,
-0.017057206,
0.01206667,
0.0073070386,
-0.011061114,
0.026636057,
-0.004074363,
0.03143293,
-0.019068317,
-0.010964283,
-0.0331312,
-0.04981598,
0.04302289,
-0.0012783593,
-0.0067037055,
-0.03584248,
-0.01631235,
0.032118198,
-0.010465229,
0.039536964,
0.026442394,
0.04603211,
-0.023671528,
0.019276878,
0.015701568,
-0.0013835703,
0.040728733,
0.07657121,
-0.005370413,
0.046151288,
-0.041443795,
0.009675682,
0.013690456,
-0.002958941,
-0.017280662,
-0.05199096,
0.01754881,
-0.004830392,
-0.04567458,
0.008461566,
-0.010688686,
0.023894986,
0.0148002915,
0.0054486226,
-0.07341302,
-0.029704863,
0.033160996,
0.009333048,
-0.012126259,
-0.041026678,
0.05732413,
0.0031079124,
0.017265765,
0.04484034,
-0.0016861681,
-0.013094571,
-0.0038769762,
0.0040147747,
0.014256547,
0.043529395,
-0.017235972,
-0.024580253,
-0.00064802484,
-0.0047298367,
-0.0041860915,
0.014576835,
-0.008059343,
0.0015334726,
0.0378089,
0.06304462,
0.002811832,
0.007437389,
0.03101581,
-0.047343057,
-0.009779961,
-0.0035194454,
-0.030896634,
0.0069420594,
0.0049272235,
0.0017895169,
-0.034412354,
-0.018815067,
-0.042784538,
-0.008483912,
-0.008379632,
-0.009050002,
-0.0034263383,
-0.006327553,
-0.010189632,
0.060512114,
0.0107259285,
0.045495816,
-0.011217534,
0.011642101,
0.041086264,
-0.025801817,
-0.023165027,
0.0009347945,
-0.035067827,
0.004863911,
0.07263837,
0.068288416,
0.041026678,
0.0032829535,
-0.006714878,
0.016297452,
-0.0031432929,
0.0018556229,
0.020587824,
0.048177294,
-0.0024971303,
0.005735392,
0.03268429,
0.0034188898,
0.021839183,
0.011820867,
0.013802185,
0.06667952,
-0.06501105,
0.02081128,
-0.037034247,
0.008245558,
-0.041026678,
0.03867293,
-0.0057093226,
-0.051812194,
-0.07323426,
0.026412599,
-0.021064531,
0.034054823,
-0.028334329,
-0.03536577,
-0.038226016,
0.031701077,
-0.021451857,
0.026993588,
0.04373795,
0.0047298367,
-0.001472953,
-0.037004452,
0.0012625312,
0.0020111117,
-0.0013267751,
-0.0033052992,
0.00859564,
0.018338358,
0.01579095,
-0.0022885706,
0.011321814,
0.0069271624,
0.0004934672,
0.0014375724,
0.002374229,
0.0104503315,
0.015239757,
-0.036944866,
0.01754881,
0.03992429,
0.04939886,
0.02200305,
0.023567248,
0.014628975,
0.037213013,
0.014926917,
0.012126259,
0.0067037055,
0.04743244,
0.0051767505,
0.018293668,
0.010956834,
0.003569723,
-0.011560167,
0.022330787,
0.010629097,
0.018219182,
0.039745525,
-0.035753094,
0.059737463,
0.026889307,
0.005526833,
-0.036080834,
0.009809756,
0.0077539524,
0.013817081,
-0.040788323,
-0.02666585,
0.012588069,
0.0070910305,
0.015850538,
-0.02428231,
0.03488906,
0.036527745,
-0.0022047742,
0.009057451,
-0.04913071,
-0.056311127,
-0.020304779,
-0.024297208,
-0.10475657,
0.0065361126,
-0.058843635,
-0.020498442,
-0.013541485,
-0.037838694,
-0.002655412,
-0.020111116,
0.0017885858,
0.021243297,
-0.009712924,
0.047819763,
0.05520874,
0.0015474387,
-0.046687584,
0.04406569,
-0.024058854,
0.011254776,
0.0040967087,
-0.035902068,
-0.01066634,
-0.053510465,
0.025623051,
-0.0015809572,
0.017906342,
-0.022017948,
-0.061912443,
0.004815495,
-0.016923131,
-0.05148446,
-0.020572927,
0.018874655,
-0.018576713,
0.052616637,
-0.0010791103,
-0.042129062,
0.004945845,
0.045942727,
-0.00064523163,
0.0033332312,
-0.040639352,
0.016699675,
-0.03152231,
0.05741351,
0.03649795,
0.0017392391,
-0.030926427,
-0.013660662,
-0.006379693,
0.016193172,
0.009720373,
-0.012714694,
0.0013351546,
0.06453434,
-0.015023748,
-0.04561499,
-0.014144818,
-0.010204529,
-0.033518527,
0.023984369,
-0.024729224,
0.04126503,
0.01564198,
-0.013347822,
-0.033518527,
0.021213504,
0.007109652,
0.0057242196,
0.017578606,
-0.029019596,
0.021526342,
0.035335977,
0.0059625735,
0.013995847,
-0.0012588069,
-0.063819274,
0.038851697,
-0.01719128,
-0.0011833903,
0.038970873,
-0.021526342,
-0.032296963,
0.0073554544,
0.022971364,
-0.057443306,
-0.02231589,
-0.015507905,
0.024788812,
0.032386344,
0.058217958,
-0.0124316495,
0.037689723,
-0.07114866,
-0.03444215,
-0.027276631,
0.015105682,
0.033846263,
-0.00136588,
0.0008728783,
-0.006722327,
-0.038196225,
0.03816643,
0.009288357,
-0.078358866,
0.022986261,
0.06638158,
0.042605773,
-0.015314243,
-0.048862565,
0.0026870687,
-0.017131692,
0.0120741185,
0.009079796,
0.016222967,
-0.018591609,
-0.015954819,
-0.04028182,
-0.022166919,
0.02371622,
-0.026501982,
-0.0010940075,
-0.012915806,
-0.01880017,
-0.035484947,
0.029094081,
0.053629644,
0.037689723,
0.012044324,
0.0398647,
0.012804077,
-0.018472433,
0.028647168,
-0.022390377,
0.026278526,
-0.053659435,
0.015850538,
-0.0019645581,
-0.020423956,
-0.0043425113,
-0.0039589102,
0.0065100426,
0.031552106,
0.0029905974,
-0.038196225,
-0.013921361,
-0.006539837,
-0.0017755509,
0.039596554,
-0.058843635,
-0.002931009,
-0.02624873,
0.04028182,
0.061614502,
-0.05937993,
-0.0102566695,
-0.03998388,
0.010703583,
0.04329104,
-0.015850538,
-0.029660173,
0.013437205,
-0.013966053,
-0.06900347,
0.06292545,
0.04498931,
-0.0034188898,
-0.0023760912,
-0.037421573,
0.020096218,
0.0039589102,
-0.042397212,
0.010025764,
0.014651321,
0.013466999,
0.019440746,
0.027812928,
0.0060556806,
-0.0047708037,
0.0085435,
-0.059469316,
0.010219427,
-0.038196225,
-0.0032699185,
-0.058188163,
0.026055068,
-0.026650954,
0.020721897,
-0.012044324,
-0.005120886,
0.003502686,
0.013705353,
-0.044155072,
-0.047760177,
0.012640209,
0.070969895,
-0.009429879,
0.04132462,
-0.015835641,
-0.037034247,
0.0108078625,
0.0014645734,
-0.02066231,
0.03655754,
-0.045227665,
-0.013787287,
0.028423712,
-0.0096235415,
-0.0007206483,
-0.03101581,
0.017697781,
0.000025735362,
-0.014867329,
-0.032952435,
-0.025712434,
-0.03459112,
0.0030166674,
0.01662519,
0.04427425,
0.03661713,
0.023582146,
0.019351363,
0.012029427,
0.0126849,
-0.027440501,
-0.017712679,
0.0060296105,
0.028751448,
0.02516124,
0.043678366,
-0.016744366,
-0.010740826,
-0.044125278,
0.008424323,
-0.0073405574,
0.008915928,
0.017563708,
0.042963304,
-0.008223212,
-0.010606752,
0.01900873,
-0.009310702,
-0.025503874,
-0.017489223,
-0.016118687,
-0.009809756,
-0.005318273,
-0.057443306,
0.038792107,
-0.027425604,
-0.0657857,
-0.040252026,
-0.002958941,
0.012677452,
0.04701532,
0.023999264,
-0.05783063,
-0.020721897,
-0.053123143,
0.044244457,
-0.058426518,
0.010956834,
-0.03712363,
-0.00051814056,
0.037779104,
0.024788812,
0.0331312,
-0.046776965,
-0.04344001,
-0.041562974,
0.018114902,
-0.04370816,
-0.02526552,
0.017861651,
-0.018680992,
-0.023969471,
0.02624873,
0.024103545,
-0.04686635,
0.007441113,
0.029019596,
0.03494865,
0.027798032,
-0.010763171,
-0.014599181,
-0.009765064,
0.011299468,
0.0040818118,
0.026948895,
-0.009444776,
0.030658279,
-0.013355271,
0.052467667,
0.00091198325,
-0.017667988,
-0.033935647,
-0.018144695,
0.030539103,
-0.023492763,
0.008550948,
-0.04826668,
0.021079428,
0.035216797,
0.030837044,
-0.029704863,
-0.0037354536,
-0.027619267,
-0.042635567,
0.043976307,
-0.029958114,
-0.01138885,
-0.030166674,
-0.009362842,
0.058486104,
-0.0037782828,
0.045942727,
0.05505977,
0.020379264,
-0.014234201,
-0.030017704,
0.03786849,
0.010048109,
0.009779961,
-0.0043052686,
0.014628975,
-0.014405518,
0.023016054,
-0.054821413,
-0.046151288,
0.0126849,
-0.0021563584,
0.019693997,
0.01331058,
0.015493008,
-0.0029738382,
-0.061972033,
-0.01838305,
0.019217288,
0.00004527329,
0.011224982,
0.005292203,
0.03039013,
-0.038970873,
0.0006443006,
-0.026278526,
-0.0012783593,
-0.019410951,
0.070433594,
-0.0031153609,
-0.04495952,
0.003422614,
0.012491237,
-0.03840478,
-0.04966701,
-0.03044972,
0.021347577,
-0.05079919,
-0.02149655,
-0.0026051344,
-0.008774405,
-0.029838938,
0.027351119,
0.056519683,
-0.0006810778,
-0.011157945,
0.047194086,
-0.017087,
-0.029794246,
0.015135477,
0.043529395,
-0.02319482,
-0.0053927586,
0.0042456803,
-0.016059099,
-0.021571035,
-0.035335977,
0.06995689,
-0.012751937,
0.028185356,
0.044453014,
0.0076347757,
0.041860916,
-0.010063007,
0.014599181,
-0.005757738,
-0.011128151,
-0.059677877,
-0.031879842,
0.012223089,
0.019649304,
-0.0061450633,
-0.02863227,
-0.00041991266,
0.004122779,
0.028304534,
0.0056050424,
-0.05059063,
0.013250991,
-0.025712434,
-0.012558275,
0.001990628,
-0.02770865,
0.013489345,
0.0012504272,
0.0005274513,
-0.041056473,
0.02469943,
0.059975818,
0.016729468,
-0.0007537013,
-0.035276387,
0.0147183575,
-0.024461076,
-0.01796593,
0.013504242,
-0.025757127,
0.00003407135,
0.04534684,
-0.013884119,
-0.027097866,
0.018055312,
0.028334329,
-0.028349224,
0.013943708,
-0.008945722,
-0.013116917,
-0.00078815094,
-0.019619511,
-0.059201166,
0.030226262,
-0.010107698,
0.0016768574,
0.01387667,
-0.0046739723,
0.013794736,
0.01050992,
0.017638193,
0.04630026,
-0.02620404,
0.028081076,
0.015865436,
0.024833504,
-0.029034493,
0.0027783134,
-0.0023705047,
-0.016371937,
-0.023165027,
0.02185408,
-0.006949508,
0.050858777,
0.0077539524,
0.04111606,
-0.0021861529,
0.026546674,
0.02672544,
0.019217288,
0.029332435,
0.010025764,
-0.019396054,
0.011023871,
0.011210085,
-0.008819097,
-0.044572193,
0.024759019,
0.0052735815,
0.0022252577,
-0.00024114718,
0.039477374,
0.03846437,
0.07228084,
0.0383154,
-0.014509798,
-0.011604859,
-0.008953171,
-0.024893092,
0.015984613,
-0.07001648,
-0.030405028,
0.007679467,
-0.019321568,
-0.0063945903,
0.017667988,
0.023686426,
0.015403626,
0.03044972,
0.0059067095,
0.025042064,
0.012714694,
0.0012616001,
0.012521032,
-0.029555893,
-0.037689723,
-0.015038646,
0.02800659,
-0.024788812,
-0.04463178,
0.010487575,
0.035693508,
-0.021392269,
-0.021571035,
-0.023120334,
-0.0019161424,
0.02971976,
0.033905853,
-0.0027503814,
0.027336221,
-0.042129062,
0.049071122,
-0.055119354,
0.011887904,
-0.013690456,
0.03438256,
0.012103912,
0.021466754,
0.0042531285,
0.052259106,
0.03500824,
-0.008401978,
0.0066925324,
-0.0011116978,
0.047819763,
-0.011195188,
0.020185601,
0.016133584,
0.041801326,
0.007783747,
0.02242017,
0.013020085,
0.044423223,
0.050292686,
-0.013757493,
-0.0036330358,
-0.0087148165,
0.016729468,
0.0057055983,
-0.015582391,
-0.016342144,
0.027470294,
0.008833994,
0.014055436,
0.035216797,
-0.041205443,
-0.026218936,
-0.020885767,
-0.045138285,
0.0019254532,
-0.037779104,
-0.071387015,
-0.027976798,
0.02045375,
0.06238915,
-0.0072511747,
0.031671282,
0.009377739,
0.015612185,
0.033876058,
0.0009971762,
0.020796385,
-0.0069271624,
0.001286739,
-0.03670651,
0.0062716887,
0.020677207,
-0.00756029,
0.013668111,
-0.035335977,
-0.013072225,
0.06048232,
0.005865742,
-0.0054895896,
-0.004547347,
-0.05705598,
-0.015597288,
-0.06399804,
0.009794858,
-0.046836555,
-0.020438854,
0.0117985215,
-0.0047037667,
-0.1004662,
0.047253676,
0.018397948,
0.016640086,
0.04132462,
0.038643137,
0.015507905,
0.06930142,
0.0559238,
-0.02361194,
0.03801746,
0.032326758,
-0.056430303,
0.0014664355,
-0.017742474,
-0.014554489,
0.005318273,
-0.017667988,
-0.05205055,
0.002361194,
-0.0133403735,
-0.052110136,
-0.041086264,
-0.0010176597,
0.011277122,
-0.058486104,
0.009608644,
0.04293351,
0.017131692,
0.011567616,
-0.0024468524,
-0.007873129,
-0.009928932,
-0.03179046,
-0.036736306,
0.044780754,
0.019604614,
-0.041920505,
-0.0232991,
-0.048743386,
-0.0043611326,
-0.0065323883,
-0.005530557,
-0.0073070386,
0.038434576,
0.0019180046,
0.061078206,
0.028304534,
-0.030837044,
0.018442638,
0.018740581,
0.050709806,
0.0025716159,
0.08407936,
0.08735673,
0.006323829,
-0.0075230473,
-0.025906097,
0.01620807,
0.0044244453,
0.0064541786,
0.027619267,
-0.00533317,
-0.004182367,
-0.032237373,
-0.029481407,
0.03453153,
-0.038077045,
0.022226507,
-0.041443795,
-0.031045604,
-0.050203305,
-0.025146343,
-0.05213993,
0.0065025943,
-0.014338481,
-0.018532021,
0.021883873,
-0.05240808,
0.26528797,
0.05047145,
-0.009489467,
-0.009385187,
0.056430303,
0.020736795,
-0.023760911,
-0.018308565,
0.027351119,
0.011895353,
-0.009712924,
-0.042963304,
-0.0036125523,
0.0029868733,
-0.014509798,
0.0036162767,
-0.061316557,
-0.0008388942,
-0.011128151,
-0.04049038,
-0.063878864,
0.0057651866,
0.022032846,
0.020796385,
0.026382806,
0.015731363,
-0.011269674,
-0.014651321,
-0.03438256,
-0.07865681,
0.046627995,
0.00049579487,
0.029377127,
-0.014785395,
-0.004405824,
0.022792598,
-0.016297452,
-0.017087,
-0.018040417,
0.01842774,
0.0098991385,
-0.010800414,
0.029645275,
-0.022464862,
-0.0108749,
0.039447583,
-0.054910794,
0.021049635,
0.019425848,
-0.053272113,
0.016729468,
-0.05789022,
0.0398647,
-0.01522486,
-0.063700095,
-0.019798277,
-0.037570544,
-0.062269974,
0.0047559068,
-0.010316257,
0.017280662,
0.0031134987,
-0.028557785,
0.022226507,
-0.045793757,
-0.0048080464,
-0.043112274,
0.035246592,
-0.0034300627,
0.0140852295,
-0.004446791,
0.0105322655,
-0.0044393428,
0.011984736,
0.030360337,
0.026412599,
-0.026933998,
0.039447583,
0.008975517,
-0.023328895,
-0.0017988276,
-0.0016628914,
0.0055417297,
-0.03634898,
0.049577624,
0.045585196,
-0.033905853,
-0.031462725,
0.0075565656,
0.0014403656,
0.056430303,
0.03432297,
0.017325355,
0.024148237,
-0.0409075
] |
at a later stage when comparing the original model to the Hugging Face implementation, you can verify automatically
for each component individually that the corresponding component of the 🤗 Transformers implementation matches instead
of relying on visual comparison via print statements
it can give you some rope to decompose the big problem of porting a model into smaller problems of just porting
individual components and thus structure your work better
separating the model into logical meaningful components will help you to get a better overview of the model's design
and thus to better understand the model
at a later stage those component-by-component tests help you to ensure that no regression occurs as you continue
changing your code |
[
0.04848849,
0.009299536,
-0.009899505,
-0.005798574,
-0.04287059,
-0.007015559,
0.015790122,
-0.010090405,
-0.001280902,
0.05127017,
-0.025689626,
0.026357776,
-0.024585137,
-0.009538161,
-0.022321614,
-0.006418998,
0.012565282,
-0.04930663,
-0.038861696,
-0.018176366,
0.028798562,
0.036434546,
-0.0497157,
-0.012347111,
-0.01898087,
0.05350642,
0.012463015,
-0.0084813945,
0.045461368,
0.0024697632,
-0.018421808,
-0.029316718,
-0.012912991,
-0.04709765,
0.0089381905,
-0.02207617,
0.024435144,
0.0077655213,
-0.0012953898,
-0.02798042,
0.015340144,
-0.0045884075,
0.0021868227,
-0.015081066,
-0.07619619,
-0.022757955,
-0.0001954803,
0.00713828,
0.04374327,
-0.015844664,
-0.03370741,
0.052006494,
0.020330803,
-0.012053944,
-0.06648759,
0.021558015,
-0.04415234,
-0.014031118,
-0.012592553,
-0.02877129,
-0.0018016146,
0.043143302,
0.028444035,
-0.028607663,
0.0020470568,
0.015449229,
0.00969497,
-0.012142575,
-0.021680735,
-0.004871348,
-0.012231207,
0.029125819,
0.019294491,
-0.049797513,
-0.011358524,
0.018626343,
0.01967629,
-0.0005211388,
0.008058689,
0.041207034,
0.043634184,
0.041070677,
-0.0026760027,
0.012810724,
-0.0814323,
-0.016853705,
0.049442988,
0.0009093296,
-0.004145248,
0.0063405926,
0.020630788,
0.003572549,
-0.018299086,
0.009919959,
0.028962191,
0.05748804,
-0.011010814,
0.031198442,
-0.024680587,
0.014344739,
0.021298937,
0.058742523,
-0.0014223722,
0.0026129377,
0.0016294641,
-0.0032350658,
0.047234006,
-0.04232516,
-0.046634037,
-0.0137379505,
-0.009299536,
0.0034532368,
0.017821837,
0.0075473506,
0.033871036,
0.015735578,
0.0012118713,
0.004124794,
-0.0048849834,
-0.018149095,
-0.011644873,
-0.014426553,
0.031007543,
-0.043443285,
-0.026207782,
-0.041397933,
-0.07445083,
0.015421958,
0.0127152745,
-0.038043555,
-0.0062996857,
-0.023303382,
-0.01228575,
0.010356301,
-0.027135009,
-0.026003247,
-0.03572549,
0.05391549,
0.057160784,
-0.024585137,
-0.012367564,
-0.03817991,
0.004387281,
0.1013404,
0.0073428154,
0.0015374232,
0.011583513,
-0.05170651,
-0.027666802,
0.06763299,
-0.0041077496,
-0.05994246,
0.017344588,
-0.0014283378,
-0.030980272,
0.0063883173,
-0.0033646047,
0.05069747,
0.05710624,
0.033107437,
-0.023317019,
-0.01996264,
-0.0051815594,
-0.017917287,
0.018258179,
0.06550582,
-0.043225113,
-0.017112782,
0.019321762,
-0.031689327,
0.0073428154,
-0.0017879789,
0.024435144,
0.01986719,
0.06757844,
-0.015490136,
-0.0007397358,
0.0040702512,
0.006269005,
0.04210699,
-0.03231657,
0.0017283228,
0.011794866,
-0.022907948,
0.026835024,
0.022921583,
0.033461966,
0.017330954,
0.01674462,
-0.0063951355,
0.001314139,
0.0806687,
-0.06556036,
0.0007904435,
-0.031880226,
0.0062962766,
0.0011206827,
0.0033629003,
-0.0042406972,
-0.05672444,
-0.011317617,
0.05397003,
-0.030653015,
-0.06474222,
0.00021422937,
0.02413516,
0.015626492,
0.039898008,
-0.04611588,
-0.0053110984,
0.06485131,
-0.020998951,
-0.03935258,
-0.016090106,
0.0047929427,
-0.02138075,
-0.021898907,
0.012026672,
-0.0009314876,
-0.00091955636,
0.024816943,
0.016131014,
0.013219794,
0.02056261,
-0.026112333,
0.039461665,
-0.011003996,
0.0058565256,
-0.00010881914,
0.014890166,
0.020685332,
0.003050984,
-0.043606915,
0.06348774,
0.0016482131,
0.039898008,
0.0493339,
0.05549723,
-0.04453414,
0.034171022,
-0.018217273,
0.056778982,
-0.03253474,
0.04927936,
-0.022253435,
0.009319989,
-0.007104191,
0.021039858,
-0.022498878,
0.03297108,
-0.073196344,
0.012660732,
0.0016226462,
-0.027912242,
-0.01765821,
-0.030789372,
0.002135689,
0.023548825,
0.0020061499,
0.00273225,
-0.007895061,
0.0698147,
-0.04807942,
0.012817542,
0.01143352,
0.05097018,
0.006841704,
0.00093319203,
0.0033714226,
0.0071246442,
-0.06010609,
-0.0009902915,
-0.054270018,
0.009354078,
-0.080177814,
0.010622197,
0.049061187,
-0.035070978,
0.002488512,
0.010179037,
-0.0021868227,
0.0044145524,
0.01667644,
0.023916988,
0.043552373,
0.0083109485,
-0.048652116,
-0.0013456715,
-0.015681036,
0.032234754,
-0.05069747,
0.021121673,
-0.008399581,
0.03888897,
0.0043736454,
-0.004049798,
-0.005883797,
-0.0013371492,
-0.033161983,
-0.021298937,
-0.021776186,
-0.0034191476,
0.052415565,
-0.028062236,
-0.041779734,
0.0050179316,
0.03430738,
-0.03588912,
0.039898008,
0.019526297,
-0.027012289,
0.059778836,
-0.02094441,
0.0142492885,
-0.057815295,
0.077177964,
0.01664917,
0.019444484,
-0.009749513,
-0.017753659,
-0.04336147,
-0.009401804,
0.024476051,
0.009176815,
-0.047397636,
0.03378922,
-0.02346701,
-0.08715928,
0.031198442,
-0.024407873,
-0.006582626,
-0.051542882,
0.01478108,
-0.009183632,
-0.020398982,
0.03730723,
-0.038834427,
0.030107588,
-0.014890166,
-0.0009647246,
0.026916837,
-0.02855312,
0.04213426,
0.006279232,
0.011672145,
-0.020821689,
-0.0007508148,
-0.03548005,
0.058578894,
-0.0028566755,
-0.04188882,
-0.025035113,
0.012790271,
0.053042807,
-0.009940413,
0.020808052,
-0.015517407,
0.02833495,
-0.022880675,
-0.015040158,
-0.01083355,
0.063815,
0.050370213,
0.016035562,
-0.005897433,
-0.032480195,
-0.015094701,
0.0023777222,
0.050615653,
-0.033407424,
0.062342342,
0.0216671,
-0.040416166,
-0.004646359,
0.025103291,
-0.007881424,
-0.0078337,
0.016281005,
0.06774207,
0.03174387,
-0.027557716,
-0.0069371536,
-0.0427615,
0.02507602,
0.0048952103,
0.038261726,
0.04573408,
0.010342666,
-0.045979522,
-0.010854004,
-0.03817991,
0.02444878,
0.017235503,
-0.00091103406,
-0.015135608,
-0.0046940837,
0.01705824,
0.020958045,
0.023726089,
-0.0030458707,
0.021885272,
-0.022403426,
0.025266921,
0.011903951,
0.019635383,
-0.02056261,
-0.037225414,
0.023167025,
0.04270696,
0.010526747,
-0.06245143,
-0.02425788,
-0.012517557,
0.052797366,
-0.01979901,
-0.011651691,
-0.007649618,
0.02334429,
0.013587958,
-0.02615324,
-0.006405362,
0.014112932,
-0.025825983,
-0.020794416,
0.049661156,
-0.0074519007,
-0.035643674,
0.0007384575,
0.015435593,
0.005723578,
-0.016976425,
-0.04767035,
-0.03278018,
-0.048788473,
-0.029207634,
0.035916388,
0.018217273,
-0.002210685,
0.005788347,
-0.04273423,
0.016471906,
-0.008672294,
0.044015985,
0.015531043,
0.011713051,
0.019280856,
0.02207617,
0.00016629141,
-0.0247624,
-0.034607362,
0.027707707,
-0.044015985,
0.01938994,
-0.029643975,
0.013560687,
-0.023412468,
-0.035043705,
-0.028634934,
0.036025476,
-0.001380613,
-0.033052895,
0.02615324,
0.02056261,
-0.008167774,
-0.029753061,
0.041807003,
-0.010744918,
0.0021612558,
0.027707707,
0.018040009,
-0.028225863,
0.027407723,
0.030162131,
-0.02934399,
0.014235653,
-0.04077069,
0.014808352,
0.010888093,
0.012906174,
0.02008536,
-0.0049940688,
0.021421658,
-0.016567355,
0.0012757886,
0.021830728,
-0.056778982,
0.012701639,
-0.040143453,
-0.019744469,
0.04017072,
-0.0024799898,
-0.029834874,
0.0026742984,
-0.043988712,
-0.000089803754,
-0.049252085,
0.034498278,
-0.027584987,
0.028034965,
0.025539635,
0.012756182,
-0.030680288,
-0.08159593,
0.061796915,
-0.026739575,
-0.00041524915,
-0.033216525,
0.010915364,
0.021408021,
-0.038452625,
-0.018394537,
-0.0043838723,
-0.0559063,
-0.01809455,
-0.057978924,
0.028253134,
0.033189252,
-0.019062685,
0.010799461,
0.0042850133,
-0.024598772,
-0.045379553,
-0.050206583,
0.0074723545,
-0.032643825,
0.0035486864,
0.031034814,
-0.018408172,
-0.014603817,
-0.030271215,
0.081323214,
-0.038207185,
0.023685182,
0.0069439714,
-0.070360124,
-0.053397335,
-0.0070769195,
0.058251638,
-0.039816193,
0.0065553547,
-0.044070527,
0.0037702664,
-0.047179464,
-0.0020112633,
-0.015626492,
-0.028171321,
-0.042897858,
0.058033466,
-0.014712902,
0.03670726,
-0.012190301,
0.030707559,
-0.024735129,
0.039434396,
-0.015749214,
-0.027707707,
-0.010349483,
-0.020535339,
0.005583812,
0.021694371,
-0.010560837,
-0.004441824,
-0.033052895,
0.008870012,
-0.017085511,
0.016990062,
-0.038807154,
-0.0028413355,
0.023439739,
-0.0025464639,
0.0007158734,
-0.027339544,
0.040961593,
-0.032043856,
0.024626043,
-0.015462864,
-0.0016354297,
-0.0557154,
-0.056615356,
0.046824936,
-0.044970483,
0.00461227,
0.0064462693,
0.018108187,
0.018599072,
-0.023644274,
0.027080467,
0.037743572,
0.034852806,
0.025185106,
-0.009340443,
0.014522002,
-0.014085661,
-0.036216374,
-0.0014999252,
-0.031089358,
0.003528233,
0.0028157686,
0.007901878,
-0.025116928,
0.0021919361,
0.030271215,
0.033680137,
-0.034252837,
0.044425055,
0.022880675,
-0.06697848,
-0.037089057,
0.026194148,
-0.024980571,
0.0081405025,
0.05268828,
-0.009292718,
0.03212567,
0.034880076,
-0.031416614,
-0.030843915,
0.033598322,
0.049143,
-0.011044904,
-0.05148834,
0.012183483,
0.040034365,
-0.0367618,
-0.048870288,
0.045188654,
0.028607663,
0.005287236,
-0.050397485,
0.020262625,
-0.0060099275,
-0.054842718,
0.010519929,
0.03638,
-0.061742373,
0.021885272,
0.012660732,
-0.034089208,
-0.0052190577,
0.042597875,
0.02893492,
-0.012837996,
-0.01888542,
-0.027012289,
-0.0058667525,
-0.009756331,
-0.03812537,
0.021189852,
-0.037279956,
0.028607663,
0.03572549,
0.01339024,
0.052006494,
0.04472504,
0.011597148,
-0.01936267,
-0.043443285,
-0.031580243,
-0.042979673,
0.015231058,
0.008270042,
0.0060031093,
0.01689461,
0.027012289,
0.048297588,
0.019458119,
0.011917587,
-0.0941953,
-0.010240398,
-0.071832776,
-0.0017879789,
0.00897228,
-0.025935069,
-0.011631237,
-0.030598473,
-0.033052895,
-0.038670797,
-0.030243944,
-0.004731582,
-0.0311439,
-0.009067729,
-0.026098697,
-0.036216374,
-0.034471005,
-0.02706683,
-0.0377163,
0.008508666,
0.011672145,
0.02178982,
-0.03654363,
0.005798574,
-0.016199192,
0.035016432,
-0.0022873858,
-0.010117677,
-0.00021241838,
-0.027312273,
-0.053179163,
-0.008079142,
-0.02836222,
0.01332888,
-0.0005935783,
-0.011324435,
0.00072695233,
-0.020780781,
0.027653165,
-0.032425653,
0.0028225863,
0.027530445,
-0.03256201,
0.01979901,
-0.06806933,
-0.011910769,
-0.015353779,
-0.008604116,
0.00044188136,
-0.009429075,
0.01367659,
0.038152643,
0.030843915,
0.049033917,
0.00002828339,
0.021871636,
-0.01516288,
0.01231984,
0.035234604,
0.0013797607,
0.013915215,
-0.037825383,
0.037225414,
-0.035698216,
0.029834874,
0.002643618,
-0.029998502,
0.022594327,
-0.00748599,
0.0013482282,
-0.009497253,
-0.0091086365,
0.00559063,
0.023071576,
0.03588912,
-0.028034965,
-0.014399281,
-0.008883648,
-0.045406826,
0.007220094,
-0.035180062,
-0.023194296,
0.03291654,
-0.07025104,
0.00533837,
0.013165252,
-0.023112483,
0.020480797,
0.044425055,
-0.018203637,
-0.032616552,
-0.041425206,
0.058142554,
-0.005764485,
-0.03837081,
-0.018435443,
0.040443435,
-0.0021050086,
-0.022717047,
0.019989911,
-0.0012774931,
0.056451727,
0.031662054,
-0.011153989,
-0.039270766,
-0.038452625,
0.016853705,
0.010922182,
-0.016062835,
-0.004220244,
-0.05069747,
0.02416243,
0.010254034,
0.004206608,
-0.041370664,
0.05650627,
-0.0048099873,
0.04047071,
0.0009809169,
0.031034814,
0.012592553,
-0.012769817,
0.03635273,
0.035616405,
0.0068314774,
0.013976575,
-0.029780332,
-0.00008799277,
0.03155297,
0.017303681,
0.043143302,
0.010267669,
0.061578743,
0.02286704,
-0.01326752,
-0.043852355,
-0.02116258,
0.01996264,
-0.01926722,
-0.008017781,
-0.02665776,
-0.038507167,
-0.0101585835,
-0.0003117032,
0.0004657438,
-0.03970711,
-0.021244394,
-0.027257731,
-0.020630788,
0.018462716,
-0.026712302,
-0.022826133,
0.020767145,
0.0137379505,
0.0433342,
0.0045986343,
0.027175916,
0.028525848,
0.019226313,
0.010854004,
0.013840218,
-0.011269892,
-0.021108037,
0.020330803,
-0.023535188,
-0.014890166,
-0.032452926,
0.022130713,
0.03834354,
0.010683558,
-0.044370513,
0.04968843,
0.024148794,
-0.024598772,
0.023835175,
0.0044452325,
0.0106699215,
-0.0442887,
0.03894351,
-0.04191609,
0.027462266,
0.021721642,
-0.013417512,
-0.02037171,
0.0074382653,
0.011590331,
0.032480195,
0.04153429,
0.07805065,
0.016826432,
0.034416463,
0.04472504,
0.0371436,
0.0007231173,
0.01007677,
-0.0030373484,
-0.016430998,
0.013035713,
0.005648582,
-0.0072541833,
-0.07226912,
-0.030707559,
0.052933723,
0.04469777,
-0.021203486,
-0.0059553846,
0.0057747117,
0.005556541,
-0.024271516,
0.010813097,
0.112358026,
-0.020112632,
-0.003487326,
-0.004782716,
0.041152492,
-0.02106713,
-0.019335398,
-0.011481245,
0.008774562,
-0.03297108,
-0.042488787,
-0.026398683,
-0.04074342,
-0.0059110685,
-0.008065507,
-0.00022371042,
-0.05432456,
0.009129089,
0.015749214,
0.058851607,
-0.003465168,
-0.026071426,
-0.019730832,
0.024844214,
0.03959802,
0.04017072,
0.056833528,
0.004220244,
0.018367264,
-0.017603667,
0.017317317,
0.0018459306,
-0.0029879191,
0.0014803238,
0.055360872,
0.020276261,
-0.01212894,
-0.07221457,
-0.02555327,
-0.01307662,
-0.0049190726,
0.02504875,
-0.0076428005,
-0.015653765,
-0.06485131,
-0.0011845999,
-0.034089208,
0.0071587334,
0.03054393,
-0.035861846,
-0.044615954,
-0.06697848,
0.2139166,
0.03817991,
0.059506122,
0.013601594,
0.02583962,
-0.013751586,
0.036461815,
-0.004527047,
0.011590331,
-0.029125819,
-0.014767445,
-0.016908247,
0.030243944,
0.05233375,
-0.03515279,
0.02018081,
-0.07090555,
-0.011160807,
0.01089491,
-0.003379945,
-0.05110654,
0.010649469,
0.0053349608,
0.009585885,
0.01538105,
0.014740174,
0.0066030794,
-0.040061638,
0.012251661,
-0.037907198,
0.06206963,
-0.0097904205,
0.034443736,
-0.011426702,
-0.0019891053,
0.0041929726,
-0.024557864,
-0.0073428154,
-0.003940712,
0.056997154,
-0.016008291,
-0.005941749,
0.0081405025,
0.016471906,
-0.004602043,
0.028089507,
-0.008447305,
0.04194336,
0.061960544,
-0.05031567,
0.041643377,
-0.022021629,
0.0086245695,
-0.008945008,
-0.040607065,
-0.013799312,
-0.018394537,
-0.012872085,
-0.026875932,
0.027775886,
0.024776036,
0.011903951,
0.012163029,
-0.010867639,
-0.030107588,
0.009831327,
-0.006398544,
0.027148645,
-0.04671585,
-0.0448614,
0.012347111,
0.010744918,
0.009040458,
-0.053806406,
0.034225564,
0.056778982,
0.0074928077,
0.045843165,
-0.034389194,
0.0030458707,
0.041016135,
0.016281005,
-0.011924405,
0.028716749,
-0.009510889,
0.057597123,
-0.050452027,
0.03256201,
0.00089398946,
0.00074953644,
0.025430549,
-0.012401653,
-0.023071576,
0.0361891,
0.024803307
] | Jupyter notebooks / google colab
Local python scripts. |
[
0.010980749,
-0.009750215,
-0.017744765,
-0.01882638,
0.015479642,
-0.0011413787,
-0.0032468059,
-0.0100167,
0.023246896,
0.058689397,
0.0023768109,
0.03370251,
0.015424778,
-0.09430433,
-0.031319823,
0.031586308,
-0.004659568,
-0.018591246,
-0.07380066,
-0.014202082,
0.022196632,
-0.021459877,
-0.058407236,
-0.021224745,
-0.05129052,
0.027479304,
0.058908854,
-0.06373694,
0.0694115,
0.041508954,
-0.015409102,
0.006450504,
0.00048251415,
-0.030457666,
0.022322036,
-0.05370456,
0.038373835,
-0.056620218,
-0.006532801,
-0.037057087,
-0.013096953,
0.006411315,
0.017572332,
-0.05687103,
-0.037057087,
-0.000042066906,
0.02421878,
0.025049588,
0.010643723,
-0.04414245,
-0.024892831,
0.052168354,
0.010181294,
0.00056628056,
-0.035176016,
0.00834725,
0.003058699,
-0.009577784,
-0.052231055,
-0.0046438924,
0.06840826,
0.020002048,
0.0160518,
-0.049064588,
0.04708946,
0.041258145,
-0.057811566,
0.017493956,
-0.019061513,
-0.015973423,
-0.047935944,
-0.03423548,
0.00095278176,
-0.028749026,
-0.037872218,
-0.0032448464,
0.0042324085,
-0.002827484,
0.008958598,
-0.00087881257,
0.0069207717,
0.018387463,
-0.011999662,
-0.027542006,
-0.024250133,
-0.025582558,
0.020237183,
0.023952296,
-0.0103694005,
0.00948373,
-0.034831155,
0.03655547,
-0.009977511,
0.036712226,
0.022259334,
0.010204807,
-0.012775604,
0.005349294,
0.015620722,
0.042919755,
0.008480492,
0.08358223,
-0.0076849563,
0.043421376,
-0.027855517,
0.0038189648,
0.028513892,
-0.0063055046,
-0.018763678,
-0.025833366,
-0.01655342,
0.02373284,
-0.039815992,
0.015777478,
0.008504006,
-0.0054825363,
0.02766741,
-0.006838475,
-0.05395537,
-0.0013118506,
0.020362588,
-0.009468054,
-0.012603172,
-0.03501926,
0.009256434,
-0.014891808,
-0.0011276625,
0.06323532,
-0.026005799,
-0.0019085027,
-0.013810192,
-0.00023966502,
-0.0011746893,
0.0547705,
-0.00017867719,
-0.000220193,
0.006744421,
0.01193696,
0.022902032,
0.012846143,
0.03392197,
-0.004275516,
0.04596082,
0.08063522,
0.012454254,
-0.0005128856,
0.019453403,
-0.032166306,
0.008018062,
-0.0021397176,
-0.046807304,
-0.042324085,
0.025566882,
0.023105815,
0.0049574045,
-0.033796564,
-0.056181304,
0.0025453235,
0.010055889,
0.026350662,
0.010463454,
0.008723464,
-0.0092094075,
0.037025735,
-0.042637598,
0.04332732,
-0.027996598,
0.00362302,
0.015863694,
-0.051698085,
0.01254047,
0.022651223,
-0.0059449663,
-0.007818199,
0.066652596,
0.01029886,
0.0076849563,
0.014735051,
0.027965248,
0.021569608,
0.0050436202,
0.024877157,
0.044926234,
0.052858077,
0.013559382,
0.012085877,
0.044550017,
-0.007626173,
0.02525337,
0.019453403,
0.04997377,
0.033294946,
-0.025065264,
0.030536043,
-0.07179419,
-0.029752264,
-0.017102065,
0.03100631,
-0.013057764,
-0.0360225,
-0.03288738,
0.0300501,
-0.04602352,
0.018371787,
-0.0547078,
-0.016428014,
-0.017431252,
0.054300234,
-0.033859268,
0.015268021,
0.06310991,
0.010918046,
-0.018669624,
-0.015322886,
-0.02631931,
-0.02429716,
-0.0039835586,
-0.025347425,
-0.008919409,
0.012321011,
0.032417115,
0.028247407,
0.009773728,
0.02376419,
-0.02497121,
0.0073675257,
-0.001641038,
0.040787876,
0.026946334,
-0.014319649,
0.007982792,
0.058877505,
0.031210093,
0.041070037,
0.043170568,
-0.01711774,
0.015973423,
0.02199285,
0.0054707797,
0.0056392923,
0.032730624,
0.0313982,
-0.015213157,
0.027040387,
0.0006397599,
-0.03605385,
-0.01761936,
-0.017164767,
0.012799117,
0.017948547,
-0.059912093,
0.06483423,
0.013457491,
-0.021742038,
-0.021209069,
-0.029830642,
-0.004969161,
0.014782079,
-0.037590057,
-0.021052314,
0.057059135,
0.021647986,
-0.011921284,
-0.025488503,
0.02909389,
0.067028806,
0.05310889,
-0.009687513,
-0.012164256,
-0.059504528,
-0.009585622,
-0.0033702513,
-0.08985247,
-0.018403139,
-0.06483423,
-0.037778165,
0.007771172,
-0.027040387,
-0.0015126942,
-0.02777714,
0.0073048235,
0.005607941,
-0.0031449145,
0.011215882,
0.009005625,
0.00007017275,
-0.04301381,
0.019437728,
0.0024943778,
0.050914306,
-0.028576596,
-0.024014998,
-0.02791822,
-0.044926234,
-0.0035897093,
-0.016028287,
0.005314024,
-0.040254906,
-0.026632821,
-0.005807805,
-0.035865743,
-0.034360886,
0.015550182,
-0.007057933,
0.009828593,
0.036273308,
-0.009828593,
-0.0051376736,
0.025943097,
0.04248084,
0.004491056,
0.02233771,
-0.00888022,
-0.0072656344,
-0.026476067,
0.06571206,
0.048249457,
-0.005423753,
-0.001754686,
-0.029219294,
-0.012007499,
-0.022039875,
0.002709917,
0.013347763,
-0.030708475,
0.048155405,
-0.00784955,
-0.06803205,
0.001875192,
-0.03821708,
0.004483218,
0.031837117,
-0.008088603,
0.03790357,
0.018873407,
-0.011474529,
-0.062671,
0.007477255,
-0.01193696,
0.009773728,
0.021789066,
-0.056432113,
0.015605046,
0.012908846,
0.0060938844,
-0.0010874938,
-0.0036367362,
-0.06803205,
-0.009742377,
-0.04332732,
-0.03633601,
0.025519855,
-0.018403139,
0.010894533,
0.026538769,
0.055209417,
-0.011976148,
-0.0092094075,
-0.022133928,
0.045584608,
0.014225595,
0.0023866082,
-0.014656674,
0.024485266,
-0.061887216,
-0.018559895,
-0.008221845,
0.025660936,
0.039972745,
-0.026240932,
-0.0057451027,
0.017399902,
-0.034298185,
0.028357137,
-0.013128304,
-0.06470882,
0.002657012,
0.050977007,
0.05552293,
-0.007626173,
-0.058877505,
0.0017184363,
-0.013966948,
0.029830642,
0.0050632143,
-0.021162042,
-0.03389062,
-0.018512867,
-0.031225769,
-0.009750215,
-0.010847506,
0.0034819397,
-0.0009885418,
-0.017008012,
-0.03370251,
-0.049472153,
0.040819228,
0.042668946,
0.033012785,
0.031413876,
0.020723125,
0.03711979,
0.016678825,
0.019406376,
-0.036430065,
0.026523093,
-0.022604195,
0.032385763,
0.0016733689,
0.021365825,
0.02124042,
-0.025143642,
0.022071226,
0.002617823,
-0.024344187,
-0.031163067,
-0.031413876,
0.025190668,
-0.002316068,
0.05003647,
-0.05445699,
-0.024798779,
-0.017008012,
0.04009815,
0.014844781,
-0.06577476,
0.006035101,
-0.0090213,
0.0414149,
0.02788687,
-0.022494467,
-0.01040859,
-0.02965821,
-0.025629584,
-0.06226343,
0.049284045,
0.03552088,
-0.033859268,
-0.035991147,
-0.026476067,
-0.015119104,
0.010714264,
-0.031366847,
-0.051792137,
0.008927247,
0.008911571,
0.047998648,
0.034893855,
-0.000934167,
-0.015189644,
0.029720912,
-0.0694115,
0.033263594,
-0.023466354,
0.022792304,
-0.06633908,
0.02149123,
-0.02696201,
0.004357813,
-0.020503668,
-0.023090139,
-0.0130028995,
0.0069129337,
-0.0533597,
-0.046337035,
0.02390527,
0.030379288,
-0.021005286,
0.020252857,
0.014695862,
-0.02233771,
0.009319136,
0.009859944,
-0.0032115357,
0.013081277,
-0.041320845,
0.019735564,
0.016239908,
-0.013018575,
0.0041697063,
-0.035959795,
0.05373591,
0.022259334,
-0.008645087,
-0.041540306,
-0.030426314,
-0.012634523,
-0.03128847,
-0.007982792,
0.012179931,
0.046337035,
-0.010949397,
-0.011396152,
-0.014006137,
0.0069599603,
-0.014962347,
-0.021914471,
-0.038561944,
0.019798266,
0.022463117,
0.052732673,
0.02059772,
0.013771003,
0.0005447266,
-0.029783616,
-0.010745615,
-0.01655342,
0.024077702,
0.010628048,
0.0173372,
-0.019296648,
-0.0025962691,
-0.013786678,
-0.012995061,
-0.012846143,
-0.00941319,
-0.005094566,
-0.0020691776,
-0.052419163,
0.054676447,
0.00025105433,
-0.05630671,
-0.04897053,
0.010416428,
0.0024375538,
0.004483218,
0.019955022,
-0.07191959,
-0.017979898,
-0.041885167,
0.05292078,
-0.055993196,
-0.014390188,
-0.0547078,
-0.03232306,
-0.00083178584,
0.018810704,
0.041164093,
-0.065022334,
-0.025206344,
-0.027996598,
0.03033226,
-0.023090139,
-0.031601984,
-0.050538093,
-0.023293922,
-0.0027980923,
0.031696036,
0.0095150815,
-0.0073832013,
0.0075791464,
0.0267112,
0.008966436,
0.017274497,
0.0029156592,
-0.035332773,
-0.028482541,
0.032918733,
0.002980321,
0.031241445,
-0.02713444,
0.033294946,
-0.044111103,
0.038844105,
-0.0055883466,
-0.0008601978,
0.0063642883,
-0.031084688,
0.023795541,
-0.031993873,
0.02149123,
-0.03282468,
0.02696201,
-0.016600447,
0.017211795,
-0.036743574,
0.013802354,
-0.043672185,
-0.04834351,
0.05906561,
-0.013520193,
-0.021898795,
-0.001957489,
0.010439941,
0.023419326,
0.002294514,
0.035081964,
0.041508954,
0.05768616,
0.005604022,
0.012266147,
-0.00042348576,
0.02603715,
0.011788041,
0.038812753,
0.025284722,
-0.029877668,
0.013810192,
-0.03285603,
-0.054143477,
0.002862754,
0.010330211,
0.049566206,
-0.0033349812,
0.039471127,
0.019265296,
-0.0801963,
-0.01481343,
0.0070305006,
0.0038209243,
0.008433466,
-0.00007188726,
0.046713248,
-0.049252693,
0.014672349,
-0.007136311,
-0.028670648,
0.0058234804,
0.02418743,
-0.0048633507,
-0.037276544,
0.013473167,
0.031131715,
-0.043484077,
-0.035395473,
-0.031241445,
0.011184531,
-0.0044087586,
-0.020440966,
-0.024798779,
-0.0072969855,
-0.028921457,
0.008864544,
0.03690033,
-0.010126429,
-0.033483054,
0.017008012,
-0.003914978,
-0.024877157,
0.037307896,
0.03530142,
-0.031601984,
-0.00674834,
-0.038750052,
-0.023497704,
-0.03658682,
-0.0025864718,
0.04201057,
0.020002048,
0.0346744,
0.008370764,
0.013104791,
0.061542355,
-0.0011570542,
0.01750963,
0.008794004,
-0.032056574,
-0.057309944,
-0.05693373,
-0.022008523,
0.009052651,
0.015268021,
0.0007676139,
0.015550182,
0.024532294,
0.056620218,
-0.005208214,
-0.0574667,
-0.014970185,
-0.055711035,
-0.0035152503,
-0.014452891,
-0.0440484,
-0.008198332,
-0.009562108,
-0.008456979,
-0.01885773,
-0.010878857,
0.0017791791,
0.007512525,
0.024783103,
-0.040443014,
-0.0138807325,
-0.0160518,
-0.024783103,
-0.030990636,
-0.025049588,
-0.010345887,
0.00072401616,
-0.022149604,
-0.021365825,
-0.004557677,
0.02909389,
-0.02994037,
0.007927928,
-0.00027824167,
-0.0028686323,
-0.03186847,
-0.013810192,
-0.07298553,
0.05577374,
0.0037954515,
0.0014176609,
0.010776966,
-0.0061213165,
-0.0021612716,
0.005462942,
0.05630671,
0.067154214,
-0.0068110423,
0.013559382,
0.007845631,
0.0011237436,
-0.002137758,
0.03019118,
-0.009076165,
-0.029752264,
0.0064348285,
0.009961835,
-0.016725851,
0.05693373,
-0.002529648,
0.02859227,
-0.002390527,
0.0064936117,
0.030394962,
0.033012785,
0.018497193,
0.016318286,
-0.027447952,
0.014829105,
-0.0068815826,
-0.02418743,
-0.053077538,
0.012164256,
0.028012274,
-0.021522582,
-0.00095278176,
-0.0053806454,
0.018136654,
0.045835417,
0.042292733,
-0.011208044,
0.00050210865,
0.00030787833,
-0.04461272,
0.018058276,
-0.059473176,
-0.03207225,
-0.01708639,
-0.020017724,
-0.0045694336,
0.025943097,
-0.009726701,
0.018795028,
0.011466692,
0.009773728,
0.035928447,
-0.011646961,
0.010886695,
0.012556145,
-0.01584018,
0.0024610672,
-0.0047457837,
0.028858755,
-0.0346744,
-0.024140405,
0.017102065,
0.06922339,
-0.0153620755,
0.025127966,
-0.0013735733,
-0.0166945,
0.018795028,
0.05150998,
0.020315561,
0.0028294434,
-0.015895044,
0.03207225,
-0.055084012,
0.020080427,
-0.014876132,
0.009930484,
0.02081718,
-0.012062364,
-0.03558358,
0.058125075,
0.037276544,
-0.007445904,
0.01992367,
-0.01885773,
0.04273165,
0.0063055046,
-0.0020770153,
0.0022964734,
0.032699276,
0.022745276,
0.035928447,
-0.025347425,
0.053328346,
0.022760952,
-0.050287284,
-0.018606922,
0.003701398,
0.027463628,
-0.0055609145,
-0.003058699,
-0.02592742,
0.051165115,
-0.003950248,
-0.0053806454,
0.018622598,
-0.052764025,
0.0022612035,
-0.021867443,
-0.007892658,
0.02575499,
0.00020635441,
-0.034360886,
-0.035364125,
0.024908507,
0.05552293,
0.0010007883,
-0.01420992,
-0.010690751,
0.020660423,
0.0346744,
0.0022788385,
0.0480927,
-0.00019361799,
0.0021906632,
-0.035144664,
0.054582395,
0.027965248,
0.028122002,
0.0014392148,
-0.013637761,
-0.04881378,
0.02319987,
-0.025723638,
-0.02685228,
-0.018105302,
-0.005843075,
-0.0035034937,
-0.05075755,
0.004483218,
-0.039627884,
0.024767427,
0.031774413,
0.01193696,
-0.040160853,
0.050820254,
0.043358672,
-0.011795879,
0.05176079,
0.054112125,
0.005725508,
0.05771751,
0.03765276,
-0.020973936,
0.04059977,
0.018199356,
-0.049848367,
0.0034153184,
-0.0029313348,
-0.009585622,
0.010149943,
-0.0034545076,
-0.011356963,
0.0141707305,
0.005231727,
-0.02575499,
-0.037339248,
0.0026374175,
-0.012179931,
-0.06533585,
-0.01133345,
0.05850129,
0.009185893,
-0.019437728,
-0.037276544,
-0.01616153,
-0.00031816543,
-0.032056574,
-0.03896951,
0.04708946,
-0.0009797242,
-0.03019118,
-0.015079915,
-0.043139216,
-0.034925207,
-0.020472316,
-0.037213843,
0.0039051806,
0.02631931,
0.024359861,
0.051980246,
0.011137504,
-0.020660423,
0.021506906,
0.049754314,
0.052952133,
0.009609135,
0.050538093,
0.056996435,
-0.016098827,
-0.016396664,
-0.017196119,
0.00895076,
-0.012603172,
-0.017211795,
0.031774413,
0.011137504,
-0.02508094,
-0.054362934,
-0.017948547,
0.009264272,
-0.006415234,
0.01787017,
0.013974786,
-0.025551207,
-0.07016393,
-0.026946334,
-0.032950085,
-0.018136654,
0.0030293071,
-0.022055551,
0.017917195,
-0.03313819,
0.29219294,
0.050005123,
0.0005412976,
0.017431252,
0.05132187,
0.041258145,
-0.0045028124,
-0.044957582,
0.04586677,
-0.020299885,
-0.016459366,
0.006379964,
-0.017290173,
0.0023964054,
-0.025723638,
0.023591759,
-0.030081451,
0.018356113,
0.009468054,
-0.024877157,
-0.057059135,
0.020221507,
0.0043813265,
0.026789578,
0.010251834,
0.017446928,
0.019469079,
-0.023435002,
-0.009036976,
-0.05094566,
0.055711035,
-0.009405352,
0.012995061,
-0.0046125413,
0.0052591595,
0.030739825,
0.011208044,
0.02319987,
-0.013998299,
0.0019594484,
0.021334473,
-0.03611655,
0.016631797,
-0.04003545,
0.0076065785,
0.029783616,
-0.015173968,
0.042825703,
0.05900291,
-0.03978464,
0.018089628,
-0.05395537,
0.041007336,
-0.043734886,
-0.06320397,
-0.024642022,
-0.03423548,
-0.03288738,
0.029846318,
-0.005870507,
0.007410634,
-0.007935766,
-0.030630097,
0.048218105,
-0.034078725,
-0.024892831,
-0.033263594,
0.052858077,
0.0017801588,
-0.003675925,
-0.018371787,
-0.004067815,
-0.011748852,
-0.0020535018,
-0.0015851937,
0.031382523,
-0.045177042,
0.047497027,
-0.0024787022,
-0.02682093,
0.03232306,
0.0043029487,
0.027573356,
-0.01953178,
0.047904592,
0.03690033,
-0.0147037,
-0.007077527,
-0.03186847,
-0.0038130865,
0.057404,
0.030144153,
0.006266316,
0.02301176,
-0.002578634
] |
Lysandre's integration checks for ELECTRA
gives a nice example of how this can be done.
However, if the original code-base is very complex or only allows intermediate components to be run in a compiled mode,
it might be too time-consuming or even impossible to separate the model into smaller testable sub-components. A good
example is T5's MeshTensorFlow library which is
very complex and does not offer a simple way to decompose the model into its sub-components. For such libraries, one
often relies on verifying print statements.
No matter which strategy you choose, the recommended procedure is often the same that you should start to debug the
starting layers first and the ending layers last.
It is recommended that you retrieve the output, either by print statements or sub-component functions, of the following
layers in the following order: |
[
0.025641374,
0.0043480066,
-0.023505755,
-0.023156798,
-0.006640655,
-0.031043231,
-0.00456436,
-0.021035139,
-0.01222746,
0.039557785,
-0.0014455551,
0.0027375692,
0.026450954,
-0.0562519,
-0.025110958,
-0.0011341108,
0.00085799844,
-0.01360933,
-0.048519008,
-0.031434063,
-0.000036258833,
0.017364109,
-0.04260069,
-0.022221593,
-0.02176097,
-0.009931321,
0.0029033236,
-0.03023365,
0.04123278,
0.012618291,
-0.02378492,
0.002495044,
0.01238798,
-0.038273625,
-0.025934497,
0.0050738375,
0.001467365,
-0.037101127,
-0.013602351,
-0.025794914,
0.0040374347,
-0.028460948,
0.0028160845,
-0.05572148,
-0.061416462,
-0.013923392,
-0.009840593,
0.007816641,
0.011068922,
-0.024664294,
-0.0098754885,
-0.0025438978,
0.018075982,
0.0024967885,
0.010231424,
-0.033555724,
-0.025990332,
-0.015689114,
-0.053599823,
-0.033025306,
0.07889224,
0.018885562,
0.042098194,
-0.06498978,
-0.024887625,
0.0137768295,
-0.01352558,
-0.0038559767,
0.0051540975,
-0.003032438,
-0.046425264,
-0.008689034,
-0.013651205,
-0.02428742,
-0.037101127,
0.020197641,
0.025222626,
-0.013741934,
-0.012611313,
0.044275686,
0.00027872954,
0.03430947,
0.018159732,
0.02583679,
-0.0064347703,
-0.04106528,
0.027595533,
-0.024510752,
0.0033709262,
-0.012925374,
-0.032801975,
0.043047357,
-0.040702365,
0.051952746,
0.044945683,
0.057340644,
-0.050724417,
0.0096940305,
-0.010636215,
-0.0014464275,
0.010852568,
0.12517792,
-0.039697368,
0.03252281,
-0.024161795,
0.021551596,
0.044861935,
0.0049412334,
-0.021314304,
-0.0029033236,
-0.008381952,
0.005115712,
0.0035070197,
0.00497264,
-0.02437117,
0.046313595,
0.007635183,
-0.0002817829,
-0.03707321,
0.0068884147,
-0.0094916355,
-0.020937432,
0.0019454362,
-0.029675318,
0.009135699,
-0.03430947,
-0.032131977,
0.037771124,
-0.0035768112,
0.0020187174,
0.00090030953,
-0.016805777,
0.01808994,
0.033220723,
-0.007872474,
-0.035816964,
-0.058568973,
-0.025725123,
0.029535735,
-0.0037687374,
0.041679446,
-0.021063056,
0.000033314507,
0.08972387,
0.010412882,
0.019122854,
0.014146724,
-0.008081848,
-0.04628568,
0.036207795,
-0.046453178,
0.011348087,
0.016205572,
0.062477294,
-0.006993102,
0.0028248085,
0.0048784213,
-0.030205734,
0.015982239,
0.0032941557,
-0.00052343577,
-0.0033220723,
-0.030094067,
0.07822224,
0.0020396546,
0.012360063,
0.014062975,
-0.016191613,
0.05167358,
-0.062979795,
0.007893411,
0.011697045,
0.042516943,
0.011215484,
0.018620355,
0.029870734,
0.033388223,
0.01972306,
0.025613457,
0.0036640505,
0.0073560174,
-0.016177654,
0.040562782,
-0.0030708231,
0.0023362683,
-0.00046542165,
0.011885482,
0.002868428,
-0.0252645,
0.018355148,
0.04676026,
0.057563975,
-0.008528514,
-0.01881577,
-0.070963934,
0.027190743,
-0.021007223,
0.017001193,
-0.031071147,
-0.026534704,
-0.017070984,
0.026618453,
-0.003243557,
0.035789046,
0.009624239,
0.008430805,
0.015549532,
0.027162828,
-0.06850728,
0.012073918,
0.048519008,
0.01694536,
-0.007439767,
-0.059518136,
0.01857848,
-0.01930431,
-0.012520583,
0.018480772,
0.025627416,
-0.017671192,
0.039976534,
0.0013591882,
0.040227782,
-0.0031144428,
-0.040144034,
-0.018173689,
0.02713491,
0.03274614,
-0.0016767392,
0.012171626,
0.009275282,
0.008528514,
0.016233487,
0.04260069,
0.037045293,
0.03668238,
0.03023365,
0.01441891,
0.017043069,
-0.0125485,
0.043856937,
-0.014725992,
0.02819574,
0.031043231,
0.002444445,
0.022430968,
-0.008758825,
0.022724092,
-0.02950782,
0.011515587,
-0.041930694,
0.033918638,
0.027651368,
-0.019122854,
-0.08458722,
-0.028642405,
0.039055288,
0.024147836,
0.0021373627,
-0.039641537,
0.020169726,
0.032550726,
-0.011543503,
-0.02469221,
0.029200736,
-0.0014848128,
0.01467016,
0.03121073,
-0.019206604,
-0.025250541,
-0.017796816,
-0.061639797,
-0.07392309,
-0.005960189,
-0.044722352,
-0.04458277,
0.024329295,
-0.004138632,
-0.0054123257,
-0.016722027,
0.015395991,
-0.05622398,
-0.03285781,
0.030010317,
0.03682196,
0.052818157,
-0.062086463,
0.015326199,
-0.004602745,
0.027372202,
0.022710133,
0.018648272,
0.0075514335,
-0.034532804,
0.011382983,
-0.019918475,
0.0089053875,
-0.006640655,
-0.012841624,
0.015465782,
-0.03983695,
-0.009547468,
-0.029200736,
0.020113891,
-0.02485971,
0.04198653,
0.025362208,
-0.010796735,
0.015828697,
0.05901564,
0.009659135,
0.048854005,
0.026799912,
-0.0062288856,
-0.016303279,
0.044610687,
0.03266239,
0.004187486,
-0.027246576,
-0.017671192,
-0.039725285,
0.012813708,
0.020337224,
-0.028307406,
0.023533672,
0.050640665,
-0.020434933,
-0.05091983,
-0.013846621,
-0.0552469,
-0.030987397,
-0.035900716,
0.016387029,
0.04254486,
0.017364109,
0.012883499,
-0.07113143,
-0.041595697,
0.0013024827,
-0.009917363,
0.046899844,
-0.03684988,
0.0064347703,
0.0301499,
-0.03269031,
-0.021928469,
0.026660329,
-0.04695568,
0.026785953,
0.033444054,
0.027916575,
0.034951553,
0.02216576,
-0.0013775085,
-0.021412013,
-0.0006795941,
-0.012185585,
0.027274493,
0.01303704,
0.03690571,
0.04327069,
-0.016233487,
-0.008612263,
0.0027934022,
-0.041874863,
-0.029759068,
-0.016568488,
0.03405822,
0.055861063,
-0.08324722,
0.0036780087,
0.034086138,
-0.032718226,
0.029703235,
-0.00611373,
-0.052259825,
0.028056158,
0.0006761045,
0.051701497,
-0.002657309,
-0.016819736,
-0.006134667,
-0.03227156,
0.028181782,
0.06337062,
0.052818157,
-0.0002839639,
-0.025362208,
-0.012981207,
-0.004393371,
0.007998099,
-0.0017299552,
-0.007809662,
-0.020769931,
-0.024734085,
-0.02844699,
0.005991595,
0.0104617365,
0.024720127,
0.025404083,
0.019737018,
-0.007718933,
-0.012688083,
0.049077336,
-0.0400882,
-0.044108186,
-0.014223495,
0.062644795,
-0.0070594037,
-0.0347003,
0.017503692,
-0.0067034676,
-0.020937432,
0.02437117,
-0.003496551,
-0.0030830367,
-0.029703235,
0.014321202,
0.0036919669,
0.03782696,
0.006933779,
-0.023184715,
-0.057173144,
0.027162828,
0.07721724,
-0.04377319,
0.014349119,
-0.017699108,
0.036766127,
0.038329456,
-0.00051471184,
-0.033639472,
0.0020483786,
-0.012667146,
-0.0604673,
0.052511077,
0.036235712,
-0.028474906,
-0.0009622494,
-0.015368074,
0.025083043,
0.0027654856,
-0.01386058,
0.014614327,
-0.00076378003,
-0.020574516,
-0.025864705,
0.032466974,
-0.0021635345,
-0.008277264,
-0.02061639,
-0.031350315,
0.048379425,
-0.030568648,
-0.025864705,
-0.00920549,
-0.001360933,
-0.005084306,
0.05957397,
-0.00072277756,
-0.014684118,
-0.016107863,
0.007942266,
-0.018313272,
-0.04279611,
0.027553659,
0.05817814,
-0.013518601,
0.0002702237,
0.021007223,
0.04246111,
0.019862643,
0.021621387,
-0.03860862,
-0.020881597,
0.0047039427,
-0.0027305898,
0.0040862886,
-0.032774057,
0.030261567,
-0.016777862,
0.02892157,
0.0033639472,
-0.03665446,
-0.028321365,
-0.04162361,
-0.045839015,
0.011913398,
-0.03193656,
0.012080898,
0.029675318,
-0.017322235,
0.03137823,
-0.011145692,
0.016680153,
-0.012018085,
-0.055358566,
0.0022280915,
0.052287742,
-0.02883782,
0.077775575,
0.0023345235,
-0.032941557,
0.020518683,
0.003985091,
0.033220723,
-0.0042154025,
-0.03154573,
0.013218498,
-0.008814658,
0.0066755507,
0.012611313,
-0.029842818,
-0.037938625,
-0.027693242,
-0.009386948,
-0.0028474906,
-0.011320171,
-0.0392507,
0.047402345,
-0.0045434223,
-0.06454312,
-0.05426982,
0.03592863,
0.006358,
0.0072932052,
0.0461461,
-0.036124047,
-0.039948616,
-0.019513685,
0.018369107,
-0.026018247,
0.012262356,
-0.045057353,
-0.019053062,
-0.0025648354,
-0.0014795784,
0.026520746,
-0.055609815,
0.016931402,
-0.045504015,
0.04260069,
-0.031573646,
-0.016331196,
-0.030624483,
-0.021788886,
-0.0027358243,
0.002648585,
0.0013548263,
-0.023854712,
-0.021635344,
-0.038413208,
0.018690147,
0.03609613,
-0.03269031,
0.011941315,
0.02012785,
-0.047653593,
0.010873506,
0.02883782,
-0.012367043,
0.029284487,
-0.028084073,
0.032997392,
-0.016038071,
-0.013483705,
-0.029954484,
0.0108665265,
-0.009568406,
-0.03757571,
0.0018616866,
-0.024594503,
0.02086764,
-0.01783869,
0.052287742,
-0.03112698,
-0.042154025,
-0.06275646,
-0.054130238,
0.021872636,
-0.02772116,
0.014893493,
0.010168612,
-0.00847268,
0.0070175286,
0.027790949,
0.04611818,
0.0694006,
0.030624483,
0.022514718,
-0.058568973,
0.00782362,
0.008214452,
-0.022444926,
-0.012073918,
-0.0046236827,
-0.030540733,
0.019820768,
-0.016442861,
-0.044024438,
-0.012988186,
0.040953614,
0.05533065,
-0.026464913,
0.047541928,
-0.023854712,
-0.066553116,
-0.0503615,
0.029312404,
-0.011222463,
0.012674125,
0.01556349,
0.015898488,
0.002493299,
0.020476807,
-0.021747012,
-0.042684443,
-0.014007141,
0.045643598,
-0.014600368,
-0.007160601,
0.019974308,
0.019360144,
-0.03341614,
-0.04832359,
0.014739951,
0.0005635658,
-0.060523134,
-0.027093036,
0.032606557,
0.0037792062,
-0.035426132,
0.017461818,
0.02297534,
-0.017964315,
-0.016596403,
0.014377036,
0.004759776,
-0.015619324,
0.050864,
0.018187648,
-0.0012396703,
0.0012318188,
-0.01955556,
0.0006050045,
-0.056614812,
0.011724961,
0.03830154,
0.011292255,
0.0063091456,
0.026395122,
-0.01834119,
0.08324722,
-0.027358243,
-0.022752007,
0.01842494,
0.0033098587,
-0.063928954,
0.0151726585,
0.016847653,
0.01940202,
0.0041839965,
-0.030289482,
-0.007628204,
0.028363239,
0.019025145,
-0.02266826,
-0.06605061,
0.027637409,
-0.044191938,
-0.0013556987,
-0.025418041,
0.008786742,
-0.006207948,
0.01157142,
0.023770964,
-0.036375295,
0.022626383,
0.020365141,
-0.02118868,
-0.01662432,
-0.039222788,
0.030429065,
-0.004529464,
-0.028865738,
0.02053264,
0.0043235794,
-0.019122854,
0.00017349714,
-0.0031824894,
-0.0094706975,
-0.027846783,
0.0054786275,
-0.040618617,
-0.010098821,
0.000036913127,
0.01075486,
-0.015451824,
-0.012513604,
-0.047960676,
0.013867558,
0.04921692,
-0.018075982,
0.005963678,
0.018787855,
0.010685069,
-0.0151587,
0.0448061,
0.048211925,
-0.005747325,
0.015270366,
0.018131815,
0.03372322,
-0.028670322,
0.002331034,
0.001189944,
0.0021705136,
0.0036466026,
0.054130238,
0.06498978,
0.03863654,
0.007795703,
0.032131977,
-0.020993264,
0.0224868,
0.020058058,
-0.030568648,
-0.00399207,
0.006975654,
0.0050145146,
-0.032550726,
-0.03405822,
0.035733216,
-0.047234844,
0.005820606,
0.020002225,
-0.019946393,
-0.032997392,
-0.0052936804,
0.020588474,
0.03330447,
0.019946393,
0.0009535255,
0.00970101,
0.0031458489,
-0.017378068,
0.0037443105,
-0.0712431,
-0.028209697,
0.03425364,
-0.04776526,
-0.0019419467,
-0.011271317,
-0.008758825,
0.015019117,
0.045001518,
-0.0022664769,
0.01279277,
0.021816803,
0.02363138,
0.004142122,
-0.06532478,
-0.023938462,
-0.010329133,
-0.0052099307,
-0.019904517,
-0.041484028,
0.027330326,
0.01686161,
0.026395122,
-0.022235552,
-0.040311534,
-0.024413044,
0.012332147,
0.020965347,
-0.032718226,
0.061583962,
-0.008039974,
0.014851618,
-0.04971942,
-0.010015071,
-0.04977525,
0.021286387,
0.027749075,
0.010810694,
0.029451985,
0.019681185,
0.040506948,
-0.016079947,
-0.008989137,
0.0010302961,
0.016652236,
-0.042879857,
-0.0017369343,
-0.0046271724,
0.054883987,
0.06526895,
-0.020490766,
-0.028754072,
0.05329274,
0.00986153,
-0.020351183,
-0.012025065,
0.059908967,
0.049105253,
-0.017545568,
0.025613457,
-0.028809905,
-0.00013129514,
-0.01287652,
-0.0407582,
-0.001989056,
0.008158619,
-0.033444054,
0.003862956,
-0.04522485,
-0.006731384,
-0.033974472,
-0.04662068,
-0.010322154,
0.025473874,
0.02208201,
0.039892785,
0.04458277,
-0.00054655416,
0.03425364,
0.00057839655,
0.03609613,
0.020714099,
-0.031322397,
0.0031249116,
0.005778731,
0.03316489,
-0.0021408524,
-0.015340158,
0.0025735593,
-0.042405277,
-0.054213986,
-0.0025386636,
-0.036068212,
-0.053990655,
0.027916575,
-0.030819898,
-0.032466974,
-0.037687376,
0.017001193,
-0.02307305,
-0.0033848847,
0.012367043,
-0.01662432,
-0.021384096,
0.006549926,
0.018145774,
0.0044771205,
-0.034114055,
0.037743207,
0.057508145,
0.07816641,
0.031964477,
-0.034672387,
0.014335161,
0.038776122,
0.003226109,
0.017280359,
0.031099064,
-0.038357373,
0.008786742,
-0.05435357,
-0.06493395,
0.010377986,
0.030121984,
-0.014293286,
-0.021244513,
-0.0017857883,
-0.007774766,
-0.041902777,
0.032383226,
0.070740595,
-0.0040304554,
0.011480691,
0.009798718,
0.013874537,
-0.01753161,
-0.012541521,
-0.07191309,
0.036124047,
0.008130702,
-0.052287742,
-0.028419072,
-0.057898976,
-0.0116342325,
-0.009763822,
-0.0039990493,
-0.0010076138,
0.02363138,
0.03763154,
0.03821779,
0.020490766,
-0.00019170834,
-0.013539539,
0.055637732,
0.013700059,
0.022696175,
0.09201303,
0.02395242,
0.007530496,
0.019513685,
0.010063925,
0.053739406,
-0.014837659,
0.0034773583,
-0.020923473,
0.015116825,
-0.035649464,
-0.07570975,
-0.028056158,
0.052511077,
0.0005426284,
0.015298283,
-0.005157587,
-0.012932353,
-0.066553116,
-0.013162665,
-0.016359113,
0.037771124,
-0.025404083,
-0.018843688,
-0.036319464,
-0.08224223,
0.22980924,
0.046983596,
0.010112779,
-0.026339287,
0.048239842,
0.0712431,
0.027190743,
0.040144034,
-0.0120390225,
-0.031071147,
0.02925657,
0.009917363,
-0.027469909,
0.047486093,
-0.0026765016,
0.02339409,
-0.03383489,
-0.020686181,
-0.014739951,
-0.044471104,
-0.052594826,
0.042684443,
0.022612425,
0.02673012,
0.031071147,
0.025683248,
0.011669128,
-0.035342384,
-0.008102786,
-0.04084195,
0.056531064,
0.013532559,
-0.005269253,
-0.016191613,
0.030987397,
-0.005454201,
-0.00072234136,
-0.029898651,
-0.025390124,
0.042321526,
-0.00017524193,
-0.06800477,
0.024748042,
-0.024817834,
0.018285356,
0.014460785,
-0.05265066,
0.01287652,
0.036542796,
-0.0018791344,
-0.00082441134,
-0.046174012,
0.030177817,
-0.08659721,
-0.03668238,
0.036207795,
-0.06515729,
-0.051059414,
-0.019862643,
0.005328576,
-0.034365304,
0.00594623,
-0.018369107,
0.0018180669,
0.0034075668,
0.0066022696,
-0.010531528,
0.030540733,
0.0133929765,
0.0056217,
0.02664637,
-0.012569438,
-0.022849716,
-0.014279327,
0.008751846,
0.04441527,
-0.029144904,
0.024413044,
0.010985172,
-0.0350353,
-0.009603302,
-0.011271317,
0.018634314,
-0.04279611,
0.0041595697,
0.07509559,
0.00021744394,
-0.006389406,
0.0100778835,
0.029870734,
0.048379425,
0.008696013,
-0.0012379256,
0.02379888,
0.035370298
] | Retrieve the input IDs passed to the model
Retrieve the word embeddings
Retrieve the input of the first Transformer layer
Retrieve the output of the first Transformer layer
Retrieve the output of the following n - 1 Transformer layers
Retrieve the output of the whole BrandNewBert Model |
[
0.031802554,
-0.013040171,
-0.019683277,
-0.016393358,
0.03188691,
-0.041812904,
0.02778154,
0.012997993,
-0.013026112,
0.027134804,
-0.002929645,
-0.043162614,
0.072884366,
-0.039647743,
0.024308847,
-0.004172152,
0.018600697,
-0.040575672,
-0.05123276,
-0.0047485908,
-0.010186096,
-0.0055745854,
-0.06995999,
-0.0005263519,
-0.0037152185,
0.010551643,
-0.01225987,
-0.00136377,
0.07265941,
0.047999077,
-0.017743068,
-0.02696609,
-0.025405487,
-0.0155076105,
-0.0015236966,
-0.045805797,
-0.01635118,
-0.0030456358,
-0.067373045,
-0.037988726,
0.009996293,
-0.01989417,
0.028906299,
-0.025419546,
-0.03922596,
0.03486752,
0.0055991895,
-0.0031405373,
0.024027659,
-0.044203017,
-0.023141911,
0.028850062,
-0.015226421,
0.035542376,
-0.016280882,
-0.0110999625,
-0.055900507,
0.0139962165,
-0.06546096,
-0.00062213215,
0.0462557,
0.04085686,
0.004442797,
-0.05525377,
-0.0072336043,
0.04406242,
-0.0075288536,
-0.023774587,
-0.004404133,
0.0005342604,
-0.0033391274,
0.042037856,
-0.021735962,
-0.029356202,
-0.004010468,
-0.009061337,
0.023858944,
0.015591968,
-0.014453149,
0.032561764,
-0.0076343,
0.016758904,
-0.017419701,
0.027823718,
-0.017026035,
0.00421433,
0.069228895,
-0.0015474219,
-0.03756694,
-0.042290926,
-0.019163076,
0.020822095,
-0.0071492475,
0.007838163,
0.017616533,
0.024716573,
-0.02997482,
0.022115568,
-0.0077538053,
-0.014481269,
0.0015852068,
0.05533813,
-0.046902437,
-0.007887371,
0.03236493,
0.009701044,
0.017574355,
0.017236928,
-0.019795753,
-0.008281036,
0.028315801,
-0.0026695444,
0.0090964865,
0.0009455003,
0.016168406,
0.023605874,
-0.02640371,
0.026783317,
-0.08407571,
-0.028414218,
0.037201393,
-0.024379145,
0.00014784426,
-0.050332952,
-0.00407725,
-0.035458017,
-0.0043443805,
0.03897289,
0.023760527,
-0.0040948247,
0.0036203172,
0.008618464,
0.00077854394,
0.019964468,
0.019542683,
-0.0027451143,
-0.039703984,
0.0013620125,
0.012913636,
-0.051907614,
-0.01414384,
-0.00091474515,
-0.036329705,
0.0790143,
0.009750252,
0.02072368,
-0.00094374287,
-0.06591086,
-0.014129781,
-0.00030930864,
-0.015198302,
-0.0058628046,
0.023184089,
0.019486444,
-0.036132872,
-0.0040385867,
0.0003846587,
-0.0033074936,
0.01225284,
0.025250833,
-0.020569025,
0.004467401,
-0.012063038,
0.060062114,
-0.011500658,
0.019388027,
0.011866204,
-0.016505834,
-0.018277328,
-0.03489564,
-0.011261647,
0.0012662322,
-0.025082119,
0.02097675,
0.049489383,
0.007704597,
0.06472986,
0.0038558135,
-0.004499035,
0.014453149,
0.010214215,
0.011451449,
-0.026375592,
0.017293165,
-0.024041718,
-0.01958486,
0.04164419,
-0.012941755,
-0.012625417,
-0.004527154,
0.019500503,
0.040210124,
-0.031971265,
0.012386405,
-0.056969028,
0.011873234,
0.0026572424,
-0.022213984,
-0.01171858,
-0.024716573,
-0.047830366,
0.04231905,
-0.0071773664,
0.044877872,
-0.0054129013,
-0.040800624,
-0.0108961,
0.015845038,
-0.035711087,
-0.00368007,
0.027106686,
0.033799,
-0.007971727,
0.02315597,
0.01795396,
-0.0036097725,
-0.0075569726,
0.031324532,
0.00979243,
-0.013609581,
0.05179514,
0.008049054,
0.07119723,
0.04597451,
0.023746468,
0.01611217,
0.0029981849,
0.04392183,
-0.00707192,
0.0060842414,
-0.008850445,
0.0065833535,
0.005318,
0.058937356,
0.005430476,
0.009757282,
0.039366554,
0.041025575,
0.011943531,
0.025827272,
0.013138588,
-0.024126075,
0.004636115,
-0.009047278,
-0.022481116,
0.00951827,
0.001347953,
-0.007430437,
-0.0064884517,
0.0071035544,
-0.022242103,
0.028161146,
0.051288996,
-0.015423254,
-0.06214292,
-0.0180102,
-0.016407417,
0.05859993,
-0.018122675,
-0.010432137,
0.013019082,
0.011001546,
0.010319661,
-0.0061721136,
0.05067038,
0.029159369,
-0.021862498,
0.057053387,
-0.020315954,
-0.04597451,
-0.008034995,
-0.055450603,
-0.055422485,
0.004330321,
-0.068216614,
-0.04816779,
0.03573921,
-0.042122215,
0.0077256863,
0.004815373,
0.024097955,
0.0038839325,
0.024716573,
0.039928935,
0.038016845,
0.00046132682,
-0.03163384,
0.02038625,
-0.027472232,
0.0068047903,
-0.020765858,
0.036414064,
-0.0019279068,
-0.023212207,
0.010312632,
0.057587646,
-0.029553035,
-0.04248776,
-0.048645813,
0.031661958,
-0.071759604,
-0.008027965,
-0.0018031289,
0.043387566,
0.0017706163,
-0.008548167,
0.013532253,
-0.057390813,
0.07299684,
0.023352802,
-0.03455821,
0.022734186,
0.025236774,
0.00872391,
-0.0075850915,
0.031015221,
0.024744691,
0.080307774,
-0.0720408,
-0.025419546,
-0.041587953,
0.018192973,
-0.019795753,
0.009398765,
-0.01798208,
0.03267424,
-0.03028413,
-0.045918275,
0.008203709,
-0.018755352,
-0.029777987,
-0.022973197,
-0.010319661,
0.004745076,
-0.003732793,
-0.017082272,
0.00023242085,
0.027345696,
-0.02371835,
-0.02536331,
0.052104447,
-0.016815143,
0.031718194,
0.04037884,
0.018600697,
-0.018656936,
-0.0068504834,
-0.065854624,
0.016758904,
-0.016843261,
-0.005360178,
0.019851992,
0.004386559,
0.028189264,
0.026249057,
0.025742915,
-0.030143533,
0.010291542,
0.050839093,
0.0017864332,
0.01903654,
0.039900817,
0.005743299,
-0.032083742,
-0.06861028,
-0.011085903,
0.0015263327,
0.015493551,
0.06371758,
-0.0659671,
0.01280819,
0.030115414,
-0.01685732,
-0.0006761733,
0.007388259,
-0.03942279,
0.023085672,
0.033602167,
0.032055624,
-0.027612826,
-0.016744845,
-0.0024445928,
-0.030734032,
0.029553035,
0.053257324,
0.01498741,
-0.037173275,
-0.00038399966,
-0.027430054,
-0.00052767,
-0.00040948245,
-0.032055624,
0.003729278,
-0.004386559,
0.009708074,
-0.012133335,
0.020512788,
0.018221091,
0.03818556,
0.038016845,
0.017939901,
-0.024829049,
-0.0196411,
0.006267015,
-0.011472539,
0.024379145,
-0.04330321,
0.022677947,
0.04026636,
-0.018994363,
0.005662457,
0.023310624,
0.0021001354,
0.04574956,
-0.038551103,
-0.011479569,
-0.028625108,
-0.0071984557,
0.006882117,
0.015999693,
-0.039816458,
-0.004829433,
-0.017040094,
0.004801314,
0.04271271,
-0.058712404,
0.0035342027,
-0.039816458,
0.022987256,
0.063323915,
0.020273775,
-0.033011667,
0.02262171,
-0.011831055,
-0.038719818,
0.048561458,
0.09054308,
-0.00871688,
0.0062037474,
-0.0480272,
-0.011641253,
0.0019595406,
-0.024112014,
0.010846891,
0.01552167,
0.015676325,
0.009370646,
0.017602473,
-0.019458326,
0.004622055,
-0.0041264584,
-0.034614448,
0.010678178,
-0.034755044,
-0.016772965,
-0.065685906,
0.03160572,
0.013433836,
0.045046587,
0.0070156823,
-0.030312248,
-0.012238781,
0.036807727,
-0.07968915,
-0.033377215,
0.0016616553,
0.04465292,
-0.013145617,
0.022776363,
0.024843108,
-0.030649675,
0.016435537,
0.047014914,
-0.021075167,
0.03517683,
0.0015887216,
0.050248597,
0.03126829,
0.020217538,
0.01666049,
-0.046677485,
0.018038318,
-0.020554965,
0.012920666,
0.010839862,
-0.04577768,
-0.026867673,
0.008063114,
-0.02099081,
0.0180102,
0.023830825,
0.026586484,
0.026783317,
0.013131558,
0.015634146,
-0.02828768,
-0.03756694,
0.008906683,
0.031746313,
0.034417618,
0.028147087,
-0.058093786,
-0.017293165,
-0.01008768,
-0.015648205,
0.007437467,
-0.036414064,
-0.035514258,
0.032533646,
-0.0060842414,
-0.011542836,
-0.0009832851,
-0.020554965,
-0.0077186567,
0.0031212054,
0.0039718044,
0.00037235665,
-0.018108616,
-0.048111554,
0.028273622,
-0.01389077,
-0.080476485,
-0.027472232,
0.025152417,
-0.0029349173,
0.0370608,
0.07119723,
-0.031915028,
-0.0480272,
-0.037201393,
0.02585539,
-0.062199157,
0.00571518,
-0.0028558327,
0.00095868105,
0.0058171116,
0.043218855,
0.012618387,
-0.04279707,
-0.014129781,
-0.021989033,
-0.0073671695,
-0.071422175,
-0.0054058717,
0.00043891952,
-0.0050578993,
-0.015662266,
0.039619625,
0.0062494404,
-0.029665511,
-0.059555974,
0.021061108,
0.030087296,
0.024660334,
-0.009694014,
-0.019570801,
-0.0025043455,
-0.0017820395,
-0.027964313,
0.061186872,
-0.013862651,
0.028273622,
-0.0000062093764,
0.039057247,
-0.05145771,
-0.028175205,
-0.009131635,
-0.0072546937,
0.025532022,
-0.011205409,
0.01225284,
-0.012027889,
0.055928625,
-0.0016247492,
-0.0040385867,
-0.003035091,
0.0051774047,
-0.049067598,
-0.03787625,
0.03022789,
-0.034220785,
0.016590191,
0.01524048,
-0.0059858253,
0.04279707,
0.022228044,
0.014178989,
0.028076788,
-0.02754253,
0.0114092715,
-0.047858484,
0.03079027,
0.023648052,
-0.014284436,
0.013532253,
0.009377676,
-0.0047310162,
0.04574956,
-0.043359447,
-0.02641777,
-0.009307378,
0.021862498,
0.038269915,
-0.012948785,
0.03270236,
-0.013033141,
-0.057700124,
-0.06253658,
0.013187796,
0.027655005,
0.01770089,
0.036301587,
0.021257939,
0.052245043,
0.065685906,
-0.017729009,
-0.011149171,
-0.020020705,
0.047633532,
0.0046958677,
-0.021721903,
0.0036484362,
-0.030368485,
-0.05283554,
-0.007110584,
-0.0028821942,
0.025953807,
-0.073615454,
0.018867828,
0.0039155665,
0.012983933,
-0.0064427583,
0.061186872,
0.03562673,
-0.032871075,
-0.032055624,
-0.002079046,
-0.024997761,
0.036863968,
0.044203017,
0.037538823,
-0.027584707,
-0.01636524,
-0.032027505,
0.0033830632,
-0.033377215,
0.02097675,
0.062817775,
0.016140288,
0.056856554,
0.0004644023,
0.0180102,
0.04054755,
0.022931019,
-0.042937662,
0.036076635,
-0.024997761,
-0.04296578,
-0.03408019,
-0.021834379,
-0.024168253,
0.0119927395,
-0.0370608,
-0.009089456,
0.031015221,
0.0100806495,
0.009075397,
-0.049489383,
0.011085903,
-0.029918581,
-0.020414371,
0.0016010237,
-0.0026256086,
0.005416416,
0.030818388,
0.044203017,
-0.040997457,
-0.005525377,
0.05182326,
0.0061158757,
-0.012449673,
-0.04364064,
-0.020512788,
-0.037173275,
-0.038635463,
-0.0019173621,
-0.037538823,
-0.02097675,
-0.00368007,
-0.002611549,
-0.014593745,
0.009075397,
0.0016607766,
-0.001559724,
0.023816766,
-0.025110237,
-0.00571518,
0.005265277,
-0.021707844,
-0.020526847,
0.025236774,
0.021862498,
-0.035795446,
0.040210124,
-0.011367093,
0.012435613,
0.016646428,
-0.007163307,
0.016027812,
-0.043612517,
-0.0129769035,
-0.016393358,
0.029609272,
-0.0446248,
0.040969335,
0.01007362,
-0.00173371,
-0.026909852,
0.036667135,
-0.0020087487,
0.02671302,
0.0064919665,
0.0136869075,
-0.011008576,
0.018825648,
0.020217538,
0.011599074,
0.039563388,
-0.015704444,
0.016196525,
0.018867828,
-0.024618156,
0.044034302,
-0.046902437,
0.01497335,
0.027612826,
0.018291388,
-0.010867981,
0.028273622,
0.0010808228,
0.03022789,
0.018431984,
0.009729163,
0.008660642,
-0.028400157,
-0.0002497755,
0.010636,
-0.07513388,
-0.053791586,
0.040435076,
-0.050192356,
0.03675149,
-0.028315801,
-0.010769565,
-0.018108616,
0.01962704,
0.0035377177,
0.004295172,
0.002288181,
0.029271845,
0.013089379,
-0.05227316,
-0.028006492,
-0.004766165,
0.030593436,
-0.010200156,
-0.037285753,
-0.0063865203,
-0.000516686,
0.017518116,
-0.015071766,
-0.016477715,
-0.027865898,
-0.0031545968,
0.07164713,
-0.03481128,
0.04296578,
-0.01826327,
0.033292856,
-0.07788954,
-0.021721903,
-0.034417618,
0.046536893,
0.030143533,
0.033658404,
0.039085366,
0.070072465,
0.018150793,
0.026502127,
0.018108616,
0.005184435,
0.028821941,
0.007332021,
-0.013743145,
0.00017706162,
0.048364624,
0.032927312,
0.0407725,
-0.0073249913,
0.021103285,
0.02097675,
-0.02371835,
-0.044231135,
0.011943531,
0.01691356,
0.007676478,
0.036414064,
-0.013883741,
-0.003838239,
0.000389931,
0.020878334,
0.01308235,
-0.014467209,
0.0023742954,
-0.018221091,
-0.025953807,
0.0127941305,
-0.03652654,
-0.050810974,
-0.0071246433,
0.007458556,
0.021314178,
0.040069528,
-0.0090051,
-0.022354579,
0.0058206264,
0.023141911,
0.026220938,
0.008245887,
-0.02013318,
0.0015342411,
-0.0016247492,
0.020836156,
0.016182465,
0.021426653,
-0.030902745,
-0.025630439,
-0.05311673,
0.023648052,
0.00094637903,
-0.04257212,
0.01497335,
-0.016154347,
-0.023535576,
-0.07502141,
0.0007328506,
-0.040182006,
0.0064884517,
-0.03270236,
-0.017180689,
-0.061749253,
0.054353964,
-0.033011667,
0.041559834,
0.0041510626,
0.008414601,
-0.007852222,
0.05961221,
0.017672772,
0.0027398418,
0.013152647,
0.03022789,
-0.0468462,
-0.012758981,
0.016435537,
-0.049123835,
0.0045869066,
-0.046396296,
-0.07524636,
0.03486752,
0.012555119,
-0.019739516,
-0.04850522,
0.00558513,
0.028765704,
-0.058656167,
0.024702514,
0.062817775,
0.026656782,
-0.025560142,
0.010516494,
0.028723525,
-0.030340366,
-0.02073774,
-0.048898883,
0.014635922,
-0.027697183,
-0.03048096,
-0.029553035,
-0.03683585,
0.020105062,
0.0021528585,
-0.0370608,
0.005940132,
0.02044249,
0.02044249,
0.018347627,
0.023493398,
-0.0037468525,
0.004829433,
-0.0051598307,
0.055956747,
0.030846508,
0.08143253,
0.012407495,
0.024590038,
0.008618464,
-0.02748629,
0.037763774,
-0.016562073,
-0.01848822,
-0.025630439,
-0.003377791,
-0.014551566,
-0.06591086,
-0.0048083435,
0.055928625,
-0.008878564,
-0.029918581,
-0.04712739,
-0.007964698,
-0.057306457,
-0.08171372,
-0.045102824,
0.033292856,
-0.05876864,
-0.04712739,
0.024575979,
-0.05609734,
0.23327495,
0.014361762,
0.04001329,
-0.01854446,
0.015732562,
0.04026636,
0.011838085,
-0.0036449211,
-0.01743376,
-0.039085366,
-0.021440713,
-0.026010046,
0.022649828,
0.043246973,
-0.03242117,
0.05421337,
-0.04411866,
-0.014748398,
-0.012751952,
-0.04527154,
-0.045552727,
0.0185304,
0.029806105,
0.06456115,
0.01823515,
0.018024258,
-0.01636524,
-0.030087296,
-0.015873156,
-0.05365099,
0.06338015,
-0.03222434,
0.061355587,
-0.006288104,
-0.026347473,
0.02017536,
-0.015620086,
-0.0015096371,
-0.0015746622,
-0.008850445,
-0.0017319527,
-0.055534963,
0.0064216694,
0.009223022,
0.0035289305,
0.013715027,
-0.069566324,
0.02669896,
0.0075288536,
-0.047464818,
0.037960608,
-0.023493398,
0.06253658,
-0.07648359,
0.019388027,
0.013363539,
-0.074571505,
-0.048392743,
-0.02395736,
-0.027753422,
0.033067904,
-0.00040684632,
-0.021721903,
0.026600543,
-0.0029876402,
-0.0044252225,
-0.01909278,
0.03222434,
0.016548013,
0.009469062,
0.023254387,
0.010741445,
-0.0261647,
-0.024941524,
-0.008407571,
0.020259716,
-0.00049340003,
0.052385636,
0.016140288,
-0.01334245,
-0.016182465,
-0.015704444,
0.019514564,
-0.04437173,
0.029665511,
0.039394673,
-0.057981312,
-0.025054,
0.0061334497,
0.018952183,
0.039001007,
0.020203479,
0.011788878,
0.0024463502,
0.008759058
] | The following section gives you more specific details/tips on how you can do this for brand_new_bert.
5.-14. Port BrandNewBert to 🤗 Transformers
Next, you can finally start adding new code to 🤗 Transformers. Go into the clone of your 🤗 Transformers' fork: |
[
0.02040473,
0.004708784,
0.0046818545,
-0.037239403,
-0.026098358,
-0.023759354,
-0.00010855882,
-0.017419424,
-0.009163663,
0.062045153,
0.009756108,
-0.004724172,
0.02235903,
-0.06801577,
-0.01299532,
-0.011987395,
0.0065476717,
-0.01617298,
-0.0810034,
-0.028806679,
0.017127048,
-0.000137051,
-0.048811316,
-0.0225283,
-0.051765848,
0.01372626,
0.0054320283,
-0.031145683,
0.08814351,
0.038070366,
0.008863593,
0.0024717269,
-0.0028102668,
-0.05139653,
0.029022112,
-0.019712262,
0.018327326,
-0.0042163623,
-0.023343874,
-0.035300493,
0.008140349,
-0.006205285,
-0.006470731,
-0.06124497,
-0.041086446,
0.019804591,
-0.00028636446,
-0.00011204521,
-0.0124413455,
-0.054166403,
-0.0010848669,
-0.005905215,
0.04090179,
0.029930016,
-0.044995047,
-0.0015580535,
-0.0118489005,
-0.011325703,
-0.07614073,
-0.025790595,
0.016280698,
0.0022216688,
0.0071093403,
-0.057551805,
0.026036805,
0.032653723,
-0.017511752,
-0.0018658171,
-0.026375346,
-0.031207236,
-0.05345855,
0.007490198,
-0.020189296,
-0.04379477,
-0.047888026,
0.010679399,
0.014080187,
0.008278842,
-0.026436899,
0.037239403,
-0.02540589,
0.03576214,
-0.013987858,
0.016542297,
-0.0019908461,
-0.022297477,
0.02888362,
-0.016650014,
-0.018527372,
-0.013303084,
-0.014941925,
0.03794726,
-0.022636017,
0.052381374,
0.052381374,
0.03588524,
-0.02132802,
0.043671664,
0.016019098,
-0.0038893633,
0.019835368,
0.112764604,
-0.023113051,
0.052873798,
-0.018419655,
0.034900397,
0.029699193,
0.021651173,
-0.07146272,
-0.0043433146,
0.011679631,
0.026129134,
-0.012141276,
0.025713654,
-0.008509665,
0.05345855,
-0.001052167,
0.017927233,
-0.05444339,
-0.018373491,
0.029268324,
-0.012510593,
0.011379561,
-0.023528531,
0.017034719,
-0.044687282,
0.020989481,
0.03939375,
0.014849597,
-0.0040855627,
-0.011564219,
0.025467442,
-0.0006982388,
0.019573769,
0.00679773,
-0.026298404,
-0.007809503,
-0.022728346,
0.013418496,
-0.007520974,
0.009594532,
-0.007859514,
-0.019866144,
0.07146272,
-0.0075517506,
-0.01265678,
0.023574697,
-0.025559772,
-0.0055128164,
-0.0030372427,
-0.043856323,
-0.027544847,
0.028483527,
0.012664475,
0.0049203713,
-0.017850293,
-0.01248751,
-0.0153035475,
-0.02040473,
0.0036316111,
0.010933304,
0.0040163156,
-0.009317544,
0.047980353,
-0.00554744,
0.05284302,
0.008501971,
-0.027406354,
0.0025428971,
-0.04317924,
0.052227493,
0.012295159,
-0.014380257,
0.02405173,
0.058444317,
0.018096503,
0.05056557,
-0.0010435112,
0.021543456,
0.016388414,
-0.009232909,
0.012048948,
0.02160501,
0.010517823,
0.0065130484,
0.0026025265,
0.016388414,
-0.0382858,
-0.013410801,
-0.004477961,
0.03465419,
0.027929552,
-0.022989945,
-0.0074324924,
-0.07300154,
-0.028868232,
0.005147347,
0.03920909,
-0.033823226,
-0.06296845,
-0.011148739,
0.024190223,
-0.0039028279,
0.019342946,
-0.015726723,
-0.01427254,
-0.002579444,
0.013403107,
-0.038932104,
0.011564219,
0.019835368,
-0.016957777,
-0.00038686855,
0.023359261,
-0.017757963,
-0.011364173,
0.006997776,
0.015603618,
0.02557516,
0.024944244,
0.012556757,
-0.0015917151,
0.044194862,
0.022405194,
0.019327559,
-0.005370476,
0.0046972428,
0.020620165,
0.05087333,
-0.0014003246,
0.024959633,
0.062722236,
0.033915553,
0.005555134,
0.017373258,
-0.0014532215,
0.039670736,
0.030253168,
0.017557917,
0.0053743226,
0.02489808,
0.021558844,
0.0129722385,
-0.00902517,
-0.0066823186,
0.0070939525,
-0.0050280886,
0.01241057,
-0.033638567,
0.048072685,
-0.034192543,
0.059552267,
0.04431797,
-0.022205148,
-0.0733093,
-0.06826198,
0.0071785874,
0.041486543,
-0.037208628,
0.01109488,
0.025298173,
0.00277372,
0.027283248,
-0.010771728,
0.030668648,
0.023774743,
0.008963617,
0.03106874,
-0.021958938,
-0.03283838,
-0.04234828,
-0.04327157,
-0.067523345,
0.00015027523,
-0.05207361,
-0.038716666,
-0.0033488532,
-0.023697801,
0.03176121,
0.013657012,
-0.005051171,
0.0040047746,
0.011764266,
0.0019668022,
0.045087375,
0.031207236,
-0.059736926,
0.045302812,
0.003564288,
0.01701933,
0.02042012,
0.0009718599,
-0.00014907302,
-0.030160839,
0.012364405,
-0.0059321444,
0.0295607,
-0.020912541,
0.0027179378,
0.028421974,
-0.03905521,
0.0077710324,
-0.018450432,
0.008663547,
0.0043433146,
0.040686354,
0.005147347,
-0.018065726,
0.018358102,
0.028514303,
0.013010709,
0.024144059,
0.012733721,
-0.0017302089,
-0.009417568,
0.04936529,
0.010479352,
0.01079481,
-0.01427254,
-0.018635089,
-0.010225448,
0.02574443,
-0.0013089573,
-0.010494741,
-0.0011637313,
0.060660217,
-0.008940535,
-0.033484686,
-0.017988786,
-0.05927528,
-0.029406818,
0.019758428,
-0.008855899,
0.04176353,
0.02540589,
-0.007994161,
-0.056967054,
-0.026560003,
-0.013118426,
-0.0043510087,
0.040255487,
-0.011579608,
-0.0066784713,
0.013710871,
-0.0022409041,
-0.009325239,
0.023313098,
-0.044687282,
0.022297477,
-0.0025813677,
0.0086173825,
0.015257384,
0.012610616,
0.009963849,
0.027144754,
0.04428719,
-0.0073709395,
-0.004185586,
0.021112587,
0.019096736,
0.059583046,
-0.013410801,
-0.003318077,
-0.0056089927,
-0.036039125,
-0.0081480425,
-0.018588925,
0.0015551682,
0.021620397,
-0.021666562,
0.023282321,
0.013580072,
-0.032992262,
0.014611079,
-0.004147115,
-0.057305593,
0.046041444,
0.02371319,
0.060106244,
-0.026698498,
-0.041609645,
0.036439218,
-0.041855857,
0.040070828,
0.012756804,
0.03810114,
-0.001515736,
-0.04853433,
-0.027113978,
0.006370708,
-0.022897616,
-0.011656549,
-0.021097198,
-0.044902716,
-0.02871435,
-0.029683804,
0.009709943,
0.049303737,
0.031699657,
-0.0035335114,
0.017465588,
0.012064335,
0.012779886,
0.027837222,
0.008548136,
-0.025590548,
-0.020281626,
0.016311474,
0.0040240097,
-0.010494741,
0.015088113,
-0.019342946,
-0.012087418,
-0.0038951337,
-0.016650014,
-0.0030237779,
0.0023332331,
0.009663779,
-0.011533443,
-0.002935296,
0.0309918,
-0.031730432,
-0.05318156,
0.018234996,
0.016357638,
-0.06413794,
-0.015065031,
-0.019558381,
0.022989945,
0.030961024,
-0.007236293,
-0.0068785176,
-0.039670736,
-0.046379983,
-0.023559308,
0.00774795,
0.06567676,
-0.032038197,
0.0151804425,
-0.076756254,
-0.0086173825,
0.01912751,
-0.040778685,
-0.023913236,
0.019712262,
-0.012533675,
-0.0073593985,
0.040532473,
-0.009448344,
-0.020004638,
0.004120186,
-0.066600055,
0.016049875,
-0.04724172,
0.006928529,
-0.0040124687,
0.018404266,
-0.031022577,
0.048995975,
-0.019835368,
-0.01434948,
-0.01643458,
-0.009817661,
-0.05318156,
-0.052566033,
0.00953298,
0.034007885,
0.0099869305,
0.022405194,
0.001205087,
0.0034123296,
0.01278758,
0.020343177,
-0.010494741,
0.035946794,
-0.01897363,
-0.0015907534,
-0.003797034,
0.0046972428,
0.013618542,
-0.05324311,
0.050011594,
0.01376473,
-0.03259217,
-0.016896226,
-0.02912983,
-0.0106409285,
0.0064399545,
-0.03717785,
0.010864057,
0.023482367,
-0.024020953,
0.013179978,
-0.010333165,
0.020650942,
-0.0017254,
-0.006089873,
0.0014888067,
0.055089694,
0.0064591896,
0.026390733,
-0.010125425,
-0.04887287,
-0.005639769,
-0.040594026,
0.021881996,
0.0047357134,
-0.0046780077,
0.010987163,
-0.02042012,
-0.013387719,
-0.012395182,
0.0017340558,
-0.0309918,
-0.036716204,
-0.014072494,
0.0068785176,
-0.031099517,
-0.03702397,
0.04979616,
-0.004485655,
-0.054474168,
-0.041794304,
0.00021904116,
0.0067592594,
0.030391661,
0.03868589,
-0.04287148,
-0.041055672,
-0.015772887,
0.03819347,
-0.0406248,
0.01641919,
-0.07324775,
-0.02243597,
-0.0067861886,
0.020774046,
0.028822066,
-0.05428951,
-0.025636712,
-0.01938911,
0.024682645,
-0.035177387,
-0.029452981,
0.0020062344,
-0.0040509393,
-0.020343177,
0.01583444,
-0.012425957,
-0.024451822,
0.0070208586,
0.004027857,
0.0292991,
0.0845119,
-0.03862434,
-0.02286684,
0.00068092707,
0.009356015,
-0.012587533,
0.0044971965,
-0.021943549,
0.035700586,
-0.03209975,
0.05739792,
-0.016480744,
-0.002958378,
-0.008325007,
-0.007301693,
0.02676005,
-0.031438056,
0.023251545,
-0.026621556,
0.03065326,
-0.00032868196,
0.021943549,
-0.005789804,
-0.019189063,
-0.041301884,
-0.041548092,
0.036777757,
-0.029191382,
0.019973861,
-0.016142204,
-0.013556989,
0.02243597,
0.00034455102,
0.04225595,
0.07952613,
0.024020953,
0.037824154,
-0.0239594,
0.0074401866,
-0.0050973357,
-0.02066633,
0.011502666,
0.024944244,
-0.03954763,
0.01897363,
-0.03133034,
-0.05453572,
-0.0018081114,
0.011964312,
0.054320287,
-0.002519815,
0.041024897,
-0.01761947,
-0.074478805,
-0.053827863,
0.030407049,
0.0056551574,
0.017588694,
0.036531545,
0.017096272,
0.010556294,
0.029345265,
-0.014626468,
0.021143364,
-0.019758428,
0.05265836,
-0.021189528,
-0.0077902675,
0.0013041485,
0.0011973929,
-0.040686354,
-0.043548558,
-0.030514767,
0.012125888,
-0.036962416,
-0.0360699,
-0.0040586335,
0.02608297,
-0.05216594,
0.033823226,
0.037085522,
-0.0051011825,
-0.010994856,
0.018742807,
-0.007347857,
-0.0064322604,
0.056628514,
0.0755252,
-0.015003478,
-0.019927697,
-0.020727882,
0.0025313562,
-0.035515927,
-0.023590084,
0.04613377,
-0.03499273,
0.041024897,
0.035854466,
0.014334092,
0.040440146,
0.0017234765,
-0.006024474,
0.011564219,
-0.0021081811,
-0.08481967,
-0.035669807,
0.007217058,
0.004239444,
0.03134573,
-0.009909989,
0.0050742533,
-0.0030468602,
0.06182972,
0.0084327245,
-0.07786421,
0.022974556,
-0.044933494,
-0.02709859,
0.0024313328,
-0.005959074,
0.00049386447,
0.0013810894,
0.0045241257,
-0.05376631,
0.0006583257,
0.006790036,
-0.032715276,
-0.012987627,
-0.059736926,
0.00060062,
-0.024759587,
-0.00092136743,
-0.028929783,
-0.041701976,
0.010971774,
0.020481672,
-0.0077248677,
-0.01931217,
0.01265678,
-0.0014368716,
-0.04616455,
0.014195599,
-0.008140349,
-0.017311705,
-0.0005467614,
-0.015003478,
-0.061429627,
0.004031704,
0.015603618,
-0.02362086,
0.012887604,
0.0065476717,
0.034900397,
-0.0053820168,
-0.00018922656,
0.060352452,
-0.039639957,
-0.017588694,
0.023282321,
0.06893906,
-0.073863275,
0.007978773,
-0.018096503,
-0.022836063,
0.020220073,
0.032561395,
-0.007744103,
0.03702397,
-0.018850524,
0.03065326,
-0.01769641,
0.030622484,
0.023559308,
0.01600371,
0.018665865,
-0.019004406,
0.008263454,
-0.018758195,
0.027560236,
-0.0013782041,
-0.0136877885,
0.030668648,
0.0298223,
0.008071102,
-0.006636154,
0.006482272,
-0.021743502,
0.019558381,
0.009886907,
-0.0227899,
0.011179515,
0.00808649,
0.0035219702,
0.035423595,
-0.06647695,
-0.05158119,
0.03939375,
-0.063399315,
0.021020258,
-0.043548558,
-0.02745252,
0.015595923,
0.028929783,
0.019019794,
0.026036805,
0.028052658,
0.007217058,
0.016234534,
-0.058044225,
-0.032992262,
0.005697475,
0.008863593,
-0.016157592,
-0.023759354,
0.0022158984,
0.041855857,
-0.015195831,
-0.0016946236,
-0.031607326,
0.009625308,
0.011164127,
0.024851914,
-0.020466283,
0.019281393,
-0.039085984,
0.01566517,
-0.051796623,
-0.007978773,
-0.009848437,
0.004347162,
0.020527836,
0.02040473,
-0.0033315415,
0.018373491,
0.024574928,
-0.0075325156,
0.02828348,
0.011833512,
0.04564135,
-0.04022471,
0.015403571,
0.020789435,
0.027406354,
0.024713421,
0.00476649,
-0.020974094,
0.057120934,
0.025128903,
-0.06930838,
-0.028945172,
0.021543456,
0.01906596,
-0.008940535,
0.022312865,
-0.020989481,
0.027975716,
0.012833744,
-0.022836063,
0.024790363,
0.0057744156,
-0.0036873934,
0.028945172,
-0.028560467,
0.03640844,
-0.009594532,
-0.049857713,
-0.029960793,
0.005816733,
0.06376863,
0.045764457,
0.012687556,
-0.03262295,
0.035823688,
0.013541601,
0.009563755,
0.026636945,
-0.015942158,
0.04616455,
-0.02506735,
0.044040978,
0.009979237,
0.0064399545,
0.02303611,
-0.059736926,
-0.038562786,
0.028498914,
-0.0045741373,
-0.012795274,
0.012949156,
-0.01414174,
0.007994161,
-0.06376863,
0.036008347,
-0.061768167,
-0.031207236,
-0.027037038,
-0.040101606,
-0.027052425,
0.031022577,
0.010779422,
0.004639537,
0.031438056,
0.060414005,
0.0144033395,
0.097191766,
0.019819979,
-0.02142035,
0.048288118,
0.026944708,
-0.0445334,
-0.0006756374,
-0.013026097,
-0.014864985,
0.028437361,
-0.02745252,
-0.07971079,
0.008648159,
-0.007217058,
-0.03970151,
-0.05832121,
0.022666793,
0.0144648915,
-0.016726954,
-0.0030064662,
0.06555366,
0.04317924,
0.020589389,
0.004797266,
0.0044433377,
-0.023528531,
-0.026713885,
-0.03625456,
0.003189201,
-0.02769873,
-0.030407049,
-0.0110102445,
-0.048472777,
-0.01675773,
0.02151268,
0.008017243,
0.0063476255,
0.036870085,
0.013918611,
0.03443875,
0.033484686,
-0.019743038,
0.0035027352,
0.038562786,
0.065984525,
-0.010202365,
0.048565105,
0.0298223,
0.011333397,
-0.011695019,
-0.024097895,
0.0074401866,
-0.0059552267,
0.017342482,
-0.013549295,
0.021312634,
-0.032192077,
-0.033607792,
-0.0017677175,
0.021528067,
-0.021066422,
0.009840743,
-0.043394677,
-0.027083201,
-0.05216594,
-0.010025402,
-0.041209552,
0.024667257,
-0.06149118,
-0.027544847,
0.017096272,
-0.051119544,
0.28215772,
0.05893674,
0.020574,
0.0072055166,
0.025528995,
0.051365755,
0.026483063,
-0.019881532,
0.006555366,
0.0044317967,
-0.017265541,
0.0014099423,
0.014234069,
0.029206771,
0.00068092707,
0.018419655,
-0.062106706,
-0.024097895,
-0.011117962,
-0.042809926,
-0.03588524,
0.026406122,
-0.0015118889,
0.016973166,
0.05324311,
-0.012979932,
-0.026375346,
-0.04964228,
0.0035412055,
-0.04825734,
0.035115834,
-0.009971542,
0.020389343,
0.015819052,
0.018281162,
0.011187209,
-0.0060167797,
-0.033269253,
-0.022420583,
0.029422205,
0.04047092,
-0.03523894,
-0.0010127348,
-0.021989712,
-0.019912308,
0.0225283,
-0.04853433,
0.02514429,
0.071339615,
-0.08512743,
0.006724636,
-0.048718985,
0.032807607,
-0.059521493,
-0.07275533,
0.034100212,
-0.09072872,
-0.03091486,
-0.016265308,
-0.014518751,
0.014095576,
-0.0020427813,
-0.0203124,
0.049826935,
0.00087327935,
-0.010964081,
-0.030930247,
0.050011594,
0.0047587957,
0.004124033,
0.028191151,
0.016049875,
-0.015280466,
-0.004312538,
0.015380489,
0.05850587,
-0.034407977,
0.043917876,
0.001306072,
-0.053396996,
0.0047472543,
-0.0023274627,
0.010979469,
-0.047826473,
0.04244061,
0.061706614,
-0.030299332,
0.00046068372,
0.018788971,
0.008271148,
0.013541601,
0.03225363,
0.0037662578,
0.028206538,
-0.025621325
] |
Input IDs should thereby consists of an array of integers, e.g. input_ids = [0, 4, 4, 3, 2, 4, 1, 7, 19]
The outputs of the following layers often consist of multi-dimensional float arrays and can look like this:
[[
[-0.1465, -0.6501, 0.1993, , 0.1451, 0.3430, 0.6024],
[-0.4417, -0.5920, 0.3450, , -0.3062, 0.6182, 0.7132],
[-0.5009, -0.7122, 0.4548, , -0.3662, 0.6091, 0.7648],
,
[-0.5613, -0.6332, 0.4324, , -0.3792, 0.7372, 0.9288],
[-0.5416, -0.6345, 0.4180, , -0.3564, 0.6992, 0.9191],
[-0.5334, -0.6403, 0.4271, , -0.3339, 0.6533, 0.8694]]],
We expect that every model added to 🤗 Transformers passes a couple of integration tests, meaning that the original
model and the reimplemented version in 🤗 Transformers have to give the exact same output up to a precision of 0.001!
Since it is normal that the exact same model written in different libraries can give a slightly different output
depending on the library framework, we accept an error tolerance of 1e-3 (0.001). It is not enough if the model gives
nearly the same output, they have to be almost identical. Therefore, you will certainly compare the intermediate
outputs of the 🤗 Transformers version multiple times against the intermediate outputs of the original implementation of
brand_new_bert in which case an efficient debugging environment of the original repository is absolutely
important. Here is some advice to make your debugging environment as efficient as possible. |
[
0.0474011,
0.013969651,
-0.045274127,
-0.0151926605,
-0.01981123,
-0.032937687,
0.029777614,
0.00850789,
-0.004421064,
0.01838312,
-0.0072848806,
-0.02055567,
0.03533813,
-0.05366048,
-0.0030670185,
0.026708698,
0.0016018761,
-0.044787962,
-0.03676624,
-0.0022447156,
0.009062422,
0.004253945,
-0.08058187,
-0.047644183,
-0.025690788,
0.014144367,
0.041263267,
-0.026389651,
0.08343809,
0.041719045,
-0.025022311,
0.013589835,
-0.0065062568,
0.002434624,
0.01844389,
-0.035429284,
0.00519589,
-0.020479707,
-0.0341531,
-0.048829213,
0.009077615,
-0.0113793025,
0.018231193,
-0.061986055,
-0.050378863,
0.02730121,
-0.032633834,
-0.01264789,
0.0131948255,
-0.048677284,
-0.013384734,
0.05293123,
-0.025235008,
0.04247868,
-0.031783044,
-0.014797651,
-0.011166605,
-0.016073834,
-0.045881834,
0.005450367,
0.03153996,
0.0598287,
-0.0135138715,
-0.033150386,
-0.0038228533,
0.023533432,
-0.035763524,
0.00927512,
-0.02117857,
-0.022864955,
-0.01576998,
0.009776477,
0.0012837799,
-0.063201465,
-0.012397211,
-0.006183413,
0.012890972,
-0.0014936285,
0.008226826,
0.09352602,
-0.004421064,
0.048221506,
0.027483523,
0.021193761,
0.0046565505,
-0.023032073,
0.074687116,
-0.0011328028,
-0.02026701,
-0.043420624,
-0.017577909,
0.0277418,
-0.019385835,
0.04311677,
0.027483523,
0.03947053,
-0.017972918,
0.033150386,
0.014402642,
-0.006889872,
0.051381577,
0.06988624,
-0.008849725,
0.016058642,
0.004010862,
0.008978862,
0.020889908,
-0.019431412,
-0.010748807,
-0.010657651,
0.013779744,
-0.020403743,
0.011933835,
-0.011189395,
-0.041020185,
0.019097174,
-0.0010710825,
0.04566914,
-0.06690848,
-0.032785762,
-0.005382,
-0.018580625,
0.00035655274,
-0.047370717,
0.032360367,
-0.0065746238,
0.017866569,
0.028577395,
-0.0034012569,
-0.024885578,
-0.028592587,
0.010323413,
0.043481395,
0.051594276,
0.00335378,
-0.03934899,
-0.0101942755,
-0.0073646423,
0.03037013,
-0.01976565,
-0.03330231,
0.003908312,
0.013498679,
0.082648076,
0.017608294,
-0.0105588995,
0.005218679,
-0.042509064,
-0.004618569,
-0.010368991,
-0.006434092,
0.026161762,
-0.00927512,
0.017046165,
-0.031327266,
0.022515522,
-0.02958011,
-0.008849725,
-0.008994055,
-0.009100404,
0.013984844,
0.027893726,
-0.044362567,
0.074261725,
-0.01393167,
0.014957175,
-0.005454165,
-0.001577188,
0.018854091,
-0.027422752,
-0.010574092,
-0.023032073,
-0.017289247,
0.0003411227,
0.024369027,
0.029549725,
0.049710386,
-0.0042197616,
0.015086312,
0.0014784358,
-0.010801982,
-0.021497615,
0.0076646972,
0.042660993,
-0.027559487,
-0.016605578,
0.021497615,
-0.000043026088,
-0.0028619175,
-0.009267523,
-0.002943578,
0.024065174,
-0.021208955,
0.010862753,
-0.013491083,
0.012852991,
-0.013096074,
0.0175931,
0.018033689,
-0.04852536,
-0.026556771,
0.06617923,
0.0066126054,
0.02461211,
-0.001080578,
-0.04332947,
-0.014045615,
-0.009616954,
-0.05727633,
0.01804888,
0.04661108,
0.031843815,
-0.0258731,
-0.008675009,
-0.012207303,
-0.023548624,
-0.00767989,
0.015299009,
-0.010794385,
0.0012154129,
-0.012685872,
0.013308771,
0.046945322,
0.021330496,
0.012457982,
0.021041835,
-0.020981064,
0.01444822,
0.0019142752,
0.01809446,
0.020813946,
0.03427464,
0.028714128,
0.05615207,
-0.0016949312,
0.011987009,
0.041536734,
0.0075051743,
0.03889321,
-0.002554266,
0.020358166,
0.016529614,
0.03779934,
0.03094745,
-0.0034069542,
-0.025432514,
-0.0152838165,
-0.00856866,
0.012435193,
-0.0034145506,
-0.04998385,
0.05065233,
0.031205725,
0.016939817,
-0.047765724,
-0.031722274,
-0.004071633,
0.038741283,
0.00440967,
-0.029534532,
0.008485101,
0.008712991,
0.034912735,
-0.00016142202,
0.023579009,
0.03336308,
-0.0072848806,
0.0081508625,
-0.026982166,
-0.099360004,
-0.03037013,
-0.006327743,
-0.084653504,
0.010034752,
-0.039592072,
0.016924623,
-0.013308771,
-0.04369409,
-0.025554055,
-0.038163964,
0.0027023945,
0.016453652,
-0.014159559,
0.01430389,
0.023882862,
0.0012913762,
-0.029017981,
0.01362022,
-0.030765139,
0.025174238,
0.0035626788,
-0.009594165,
-0.0052490644,
-0.0420229,
0.006137835,
0.03266422,
-0.04241791,
-0.026799854,
-0.0341531,
0.014660917,
-0.026450422,
-0.021193761,
0.029261064,
0.016985394,
-0.022986496,
-0.0059441286,
-0.00685189,
-0.038802054,
0.041658275,
0.056486312,
-0.012815009,
0.007038,
-0.008226826,
-0.01167556,
-0.029245872,
0.017046165,
0.05642554,
0.03305923,
-0.03324154,
-0.02289534,
-0.02123934,
-0.0042691375,
0.00022705906,
-0.0012704863,
0.0030461284,
0.058370203,
-0.04220521,
-0.047704954,
-0.022773799,
-0.014433027,
-0.045942605,
-0.025554055,
-0.039713614,
0.048768442,
0.023898056,
0.011326129,
-0.038255118,
-0.005723835,
0.0077330642,
-0.0014651422,
0.023730936,
-0.013544257,
0.03552044,
0.009936,
-0.012321248,
0.004899633,
0.043542165,
-0.08191883,
0.0011271056,
-0.014554569,
-0.0052148807,
0.012260477,
0.0071025686,
-0.012093358,
-0.0071823304,
0.0707978,
-0.045426056,
0.012169321,
0.02330554,
-0.0057770093,
0.041901357,
0.04454488,
0.0060048993,
0.002713789,
-0.05539244,
-0.0150103485,
-0.0021250735,
0.014402642,
0.07025086,
-0.031327266,
0.013916478,
-0.010437358,
-0.015519303,
-0.022561101,
0.003587367,
-0.049315378,
0.022105321,
0.038012035,
0.0519589,
-0.012100955,
-0.0049755964,
-0.0044742385,
0.0010283532,
0.041324038,
0.014129174,
0.0057124402,
-0.038528588,
-0.000049554186,
-0.01273145,
-0.040868256,
0.02409556,
-0.007246899,
-0.006365725,
-0.015861137,
-0.022485137,
-0.044058714,
0.021573579,
0.028592587,
0.0790626,
0.03758664,
0.03752587,
-0.021406459,
0.0011546422,
0.021057028,
-0.012594716,
0.020434128,
-0.063869946,
0.04345101,
0.008978862,
-0.0025333762,
0.0041665873,
0.0188389,
-0.00048355391,
0.042114057,
0.003678523,
-0.015633248,
-0.03764741,
0.0084699085,
-0.005059156,
0.03175266,
-0.03226921,
-0.02455134,
-0.03792088,
0.029078752,
0.072438605,
-0.05013578,
0.012260477,
-0.043542165,
-0.012951743,
0.015739596,
0.009958789,
-0.06630077,
-0.008940881,
-0.0051579084,
-0.07365402,
0.041901357,
0.0374651,
-0.012184514,
0.011812294,
-0.054116257,
0.010832367,
0.0068139085,
-0.029838385,
-0.0041058166,
0.025143852,
0.012587119,
-0.016757505,
0.036462385,
0.024004404,
-0.00006433142,
0.01929468,
0.013491083,
-0.0015790871,
-0.02512866,
-0.017258862,
-0.040078238,
0.02335112,
-0.007060789,
0.047249176,
0.0036386421,
-0.011310936,
0.048282277,
0.011083046,
-0.0465807,
-0.047765724,
0.028060844,
0.061347965,
0.0033689726,
0.032633834,
0.011318532,
-0.024627304,
0.04852536,
0.016955009,
0.0054199817,
0.009981578,
0.0066999635,
0.018489469,
0.0036272476,
0.014098789,
0.013323964,
-0.059312146,
0.040807486,
-0.010065137,
0.0014281101,
-0.028364697,
-0.034882348,
-0.00428433,
0.010817175,
0.013962056,
0.043299083,
0.03591545,
-0.010953908,
0.023259964,
0.004390679,
-0.010657651,
-0.031388037,
-0.046368,
0.028227963,
0.036401615,
0.009700513,
0.045881834,
-0.020115083,
-0.022074936,
0.0013616421,
0.014797651,
0.020601248,
-0.021771083,
-0.0068822755,
0.011303339,
-0.018003304,
-0.027468331,
0.010141101,
-0.0035284953,
-0.028349504,
0.00007471703,
0.0025162844,
0.018003304,
-0.023685358,
-0.037495486,
0.036067378,
-0.024703266,
-0.064173795,
-0.034760807,
0.017547524,
0.0021250735,
0.038407046,
0.05350855,
-0.04208367,
-0.03758664,
-0.04858613,
0.023928441,
-0.07110165,
0.0012970734,
-0.047583412,
0.0066771745,
0.021041835,
0.026678313,
0.010870349,
-0.027620258,
-0.027817762,
-0.028030459,
0.015861137,
-0.049193837,
-0.0114704585,
-0.000575422,
0.004485633,
-0.021740697,
0.052900843,
0.017000588,
-0.03764741,
-0.038103193,
0.0068708807,
0.038680512,
0.040959414,
-0.008462312,
-0.0056858533,
0.021254532,
-0.015694018,
0.0032341375,
0.066543855,
-0.009973981,
0.028911633,
0.0107412115,
0.044970274,
-0.044301797,
-0.049528074,
-0.039744,
0.00024225173,
0.03427464,
-0.0004975596,
0.023563817,
-0.012807413,
-0.020692404,
0.017274056,
0.048069578,
-0.013050496,
-0.0014290597,
-0.07827259,
-0.03707009,
0.014812844,
-0.013050496,
-0.022910532,
-0.016590385,
-0.030020697,
0.057519414,
-0.010323413,
0.012723853,
0.050530788,
-0.010938715,
0.019446606,
-0.08908976,
0.050561175,
-0.0021573578,
0.02775699,
-0.0019503578,
0.009928403,
-0.029716844,
0.014296293,
-0.0440891,
-0.029017981,
-0.006570826,
0.035641983,
0.014683707,
-0.013832917,
0.030917065,
-0.027255634,
-0.057610568,
-0.042235598,
0.041020185,
0.033910017,
0.010027156,
0.024536148,
0.02169512,
0.016772697,
0.025189431,
-0.0037639816,
0.01570921,
-0.055301286,
0.074261725,
0.0032417339,
-0.026480807,
0.003919706,
0.017410789,
-0.048889983,
-0.0395313,
-0.022029357,
0.00834077,
-0.061196037,
-0.003980477,
-0.021269726,
0.019947963,
-0.007357046,
0.066969246,
0.047097247,
-0.0065176515,
-0.026602348,
-0.009677725,
-0.0073266607,
-0.0086977985,
0.010004367,
0.04992308,
-0.019780844,
-0.04105057,
-0.016757505,
0.018519854,
-0.05247545,
0.00041328784,
0.068488516,
0.016256146,
0.036614314,
0.04460565,
0.0031144954,
0.03855897,
0.014455817,
0.013582239,
0.000815656,
-0.038194347,
-0.059980623,
-0.037130862,
0.0086522205,
0.0054655597,
-0.008583853,
-0.041020185,
-0.016894238,
0.026617542,
0.052566607,
-0.013946863,
-0.05457204,
0.033788476,
-0.04539567,
-0.017653871,
0.026860625,
0.0026188348,
0.014493798,
0.0004785688,
0.006958239,
-0.056273613,
0.010566495,
0.034851965,
-0.024657689,
-0.034730423,
-0.04475758,
0.018079266,
-0.036735855,
-0.04661108,
-0.0043564956,
-0.02374613,
0.0060390825,
0.020601248,
-0.014258312,
-0.014501395,
-0.034791194,
0.046185687,
-0.035945836,
0.019780844,
-0.0107412115,
-0.0013246101,
0.016909432,
-0.009016844,
-0.029808,
-0.017745027,
0.010406973,
-0.017608294,
0.027772184,
0.025143852,
0.010384183,
0.006753138,
0.005028771,
0.023487853,
-0.015952293,
-0.0093814675,
0.015542092,
0.008044514,
-0.028744513,
0.007991339,
-0.025113467,
-0.031661503,
-0.029504146,
0.05721556,
-0.014000037,
0.029595302,
0.011576807,
-0.0110602565,
-0.005264257,
0.034244258,
0.022469945,
-0.0114704585,
-0.007767248,
-0.010589285,
0.025098275,
-0.00927512,
0.007243101,
0.03135765,
-0.028790092,
0.015093909,
-0.006228991,
0.0055605136,
0.0033461836,
0.023427082,
0.024840001,
0.082648076,
0.018717358,
-0.0072089173,
0.01981123,
-0.029337028,
-0.015299009,
0.009594165,
-0.08495736,
-0.041810203,
0.04345101,
-0.037617028,
0.028759707,
-0.047158018,
0.030749945,
0.023837285,
0.044119485,
-0.013627817,
0.045243744,
0.004778092,
0.013916478,
0.015739596,
-0.034061946,
-0.03245152,
-0.01008033,
0.019203523,
-0.0019750458,
-0.07110165,
0.040108625,
0.031448808,
-0.01575479,
-0.025645211,
-0.014926789,
0.0023073854,
-0.009054826,
0.015268624,
-0.031722274,
0.00948022,
-0.032755375,
0.026192147,
-0.026875816,
0.028622972,
-0.023898056,
0.017517138,
0.021482423,
0.014638129,
0.017350018,
0.05797519,
-0.0054845503,
0.0018829404,
0.030461285,
0.0068253027,
0.044909503,
0.0019171239,
-0.0026947982,
-0.005313633,
0.050865028,
0.007269688,
0.0042691375,
0.025310973,
0.020996258,
0.018489469,
-0.009411853,
-0.02678466,
0.030795524,
0.02250033,
0.0036918165,
0.00015085837,
0.009032037,
0.01302011,
-0.014524183,
-0.013346752,
0.025265394,
-0.0042007705,
-0.027924111,
-0.023624588,
-0.04317754,
0.028698936,
-0.0038323486,
-0.05572668,
0.009237138,
0.0039728805,
0.05098657,
0.0070266053,
-0.0010881743,
0.022318019,
0.011804697,
0.021831853,
0.026982166,
0.025159046,
0.007998936,
0.010262642,
-0.006718954,
0.01575479,
-0.007953358,
-0.031965356,
-0.016180184,
-0.02370055,
-0.03150958,
0.039744,
0.01090833,
-0.018474275,
0.02113299,
-0.022014165,
-0.034851965,
-0.052141212,
-0.0014043716,
-0.03545967,
-0.0254629,
0.004322312,
0.0010397477,
-0.07711794,
0.016772697,
0.015185065,
0.059707157,
0.012754238,
0.026025027,
0.006912661,
0.02958011,
0.024764037,
-0.011728734,
0.019780844,
0.008750972,
-0.031965356,
-0.006206202,
-0.0034430367,
-0.019066788,
0.0035398898,
-0.054723963,
-0.059190605,
-0.0020946881,
-0.0075013763,
-0.06551075,
-0.04995347,
0.01798811,
-0.0053174314,
-0.053812403,
-0.0016284633,
0.0585829,
-0.0018592018,
-0.03858936,
0.007767248,
0.047127634,
-0.008059707,
-0.04229637,
-0.030765139,
0.017501945,
0.0008555367,
-0.03123611,
-0.010771597,
-0.05025732,
0.02386767,
0.020130275,
-0.014425431,
0.025721174,
0.026587157,
0.023487853,
0.032633834,
0.014957175,
-0.03858936,
0.016499229,
0.01581556,
0.06435611,
0.0025409725,
0.09759765,
0.04928499,
-0.009176367,
-0.015724404,
0.009578972,
0.013361945,
-0.0027422751,
-0.007220312,
-0.003425945,
-0.01747156,
-0.039713614,
-0.02591868,
-0.013339156,
0.04241791,
-0.0016256147,
-0.030993028,
-0.043147158,
-0.008750972,
-0.0881782,
-0.042630605,
-0.05110811,
-0.00639611,
-0.011660367,
-0.0028771101,
0.010498129,
-0.051351193,
0.2763849,
0.05721556,
0.00030812615,
0.024566533,
0.02906356,
0.04032132,
0.017790606,
0.0106044775,
0.0242171,
-0.03947053,
-0.0021250735,
-0.02945857,
0.023776514,
0.026708698,
-0.03591545,
0.030218203,
-0.062776074,
-0.010642459,
-0.026237724,
-0.034122717,
-0.052779302,
0.012602312,
0.011303339,
0.059433687,
0.01672712,
0.025675597,
-0.02906356,
-0.019051597,
-0.01339233,
-0.073289394,
0.051928513,
-0.010300624,
0.023214385,
-0.008355963,
-0.00006249169,
0.038346276,
-0.00017257912,
-0.044149872,
-0.016028257,
0.012852991,
0.013650605,
0.010361395,
0.03506466,
-0.013832917,
0.015306606,
0.05025732,
-0.04253945,
0.015572477,
0.008477504,
-0.05603053,
0.025235008,
-0.05988947,
0.039835155,
-0.03242114,
-0.020373357,
-0.03232998,
-0.038923595,
-0.056790166,
-0.019097174,
-0.02061644,
0.022424366,
0.019279486,
-0.022910532,
0.018686973,
-0.0476138,
0.011797101,
-0.015109101,
0.023928441,
-0.0069620367,
-0.013627817,
-0.002322578,
-0.0061986055,
-0.029397799,
-0.017046165,
0.02409556,
0.019628918,
-0.0086066425,
0.048099965,
0.01621057,
-0.03861974,
0.010566495,
-0.0016493532,
-0.016089028,
-0.052110825,
0.015602862,
0.032360367,
-0.05156389,
-0.014000037,
0.024764037,
0.03226921,
0.014341871,
-0.0001601164,
-0.019051597,
0.01136411,
-0.015694018
] |
In both cases, you will be prompted with a questionnaire to fill in the basic information of your model. The second command requires to install cookiecutter, you can find more information on it here.
Open a Pull Request on the main huggingface/transformers repo
Before starting to adapt the automatically generated code, now is the time to open a “Work in progress (WIP)” pull
request, e.g. “[WIP] Add brand_new_bert”, in 🤗 Transformers so that you and the Hugging Face team can work
side-by-side on integrating the model into 🤗 Transformers.
You should do the following: |
[
0.023383927,
0.013527639,
-0.043111734,
0.0014034164,
0.000007802873,
-0.0015728928,
-0.00021612993,
-0.006409633,
0.02710098,
0.056639373,
0.016483001,
0.00905651,
0.038389247,
-0.058284625,
-0.02678107,
0.007342705,
0.014175077,
-0.02678107,
-0.053348865,
-0.001642397,
0.001433884,
0.012156595,
-0.08250641,
-0.029218482,
-0.020870345,
-0.012004256,
-0.003050574,
-0.030452423,
0.0728177,
0.048961524,
0.0003149118,
-0.00883562,
-0.0023764772,
-0.016863847,
0.018829012,
-0.013878018,
0.009589694,
-0.013603808,
-0.028959507,
-0.02332299,
0.025653766,
-0.002191767,
0.012849734,
-0.048717782,
-0.08463915,
0.010838869,
-0.015363315,
-0.014335033,
0.02781697,
-0.020002017,
-0.017198991,
0.025242453,
0.017122822,
0.014411202,
-0.027040044,
0.0174732,
0.020504732,
-0.022271857,
-0.032478523,
-0.01885948,
0.06611481,
0.009665864,
0.00656578,
-0.050484907,
0.02189101,
0.04381249,
-0.05069818,
-0.01046564,
-0.040735256,
-0.028670065,
-0.055816747,
-0.012788799,
-0.008911789,
-0.0400345,
-0.042807057,
0.016208792,
0.029111845,
0.0019032764,
-0.012430804,
0.01591935,
0.009757266,
0.043111734,
-0.0014776813,
-0.0034809296,
-0.012354635,
-0.043446876,
0.034885466,
-0.03561669,
0.005050014,
-0.013245814,
-0.02144923,
0.012484122,
-0.011074993,
0.015485186,
0.027070513,
0.025943208,
-0.018250126,
0.016208792,
0.041953962,
0.008363372,
-0.0051871184,
0.06836942,
-0.00038560628,
0.016528703,
-0.03186917,
0.03235665,
0.046767853,
-0.020245757,
-0.034794062,
-0.036469784,
-0.0046044243,
0.011311118,
-0.0118900025,
0.0041207504,
-0.012941137,
0.03677446,
0.018768076,
0.009467824,
-0.039943095,
-0.012666928,
0.036104172,
-0.016025987,
-0.004482554,
-0.04469605,
0.03768849,
-0.016787678,
0.02742089,
0.056334697,
-0.024998711,
-0.0015490899,
0.00044820778,
-0.012788799,
0.0012425091,
0.052465305,
-0.014555923,
-0.015134808,
0.015424251,
0.0022984038,
0.025440494,
-0.015325231,
0.028197816,
-0.02105315,
0.02248513,
0.06648043,
-0.018600505,
-0.03522061,
0.025044413,
-0.0038313076,
-0.017290395,
0.01957547,
-0.046615515,
-0.010541809,
-0.0020127695,
0.000059150098,
0.004631084,
-0.031168412,
-0.02650686,
0.006131616,
-0.0017699804,
0.013108709,
0.0017395128,
0.039272808,
-0.029919239,
0.041679755,
-0.015218594,
0.023673369,
-0.0043378323,
-0.030391486,
0.028670065,
-0.018326296,
0.031534024,
0.014487371,
0.029690731,
0.017244693,
0.051764548,
0.013839933,
0.060813442,
0.011676729,
0.029507924,
0.03186917,
-0.0462499,
0.008119631,
0.04262425,
0.031153178,
0.036743995,
0.014243629,
-0.010496108,
-0.019194623,
-0.003976029,
0.030589527,
0.023064015,
0.043081265,
-0.022713637,
0.034276113,
-0.052221563,
-0.02618695,
-0.022332791,
0.010899804,
-0.007350322,
-0.040125903,
-0.023262056,
0.021738673,
-0.0050233547,
0.04539681,
-0.038693924,
0.017762644,
0.013702828,
0.019286025,
-0.009498292,
0.014083674,
0.056273762,
-0.0036808737,
-0.04862638,
-0.03421518,
-0.025029179,
-0.026522094,
-0.025486194,
0.037779894,
0.022332791,
0.0079215905,
0.018432932,
0.021601569,
0.029020442,
-0.0049167178,
0.030818034,
-0.037109606,
-0.006859031,
0.01281165,
0.017930215,
-0.010442789,
0.027756035,
0.058650237,
-0.0035475777,
0.018356763,
0.04262425,
-0.012583142,
0.029705964,
0.049205266,
0.0057545784,
0.027009577,
0.036104172,
0.019377429,
0.024176085,
-0.002090843,
-0.022942144,
-0.00446732,
-0.029020442,
-0.006333464,
-0.02964503,
0.0349464,
-0.04667645,
0.06520078,
0.01930126,
-0.04759048,
-0.058132287,
-0.026232652,
0.0066647995,
0.009673481,
-0.03915094,
0.0036770653,
0.039059535,
0.029782133,
-0.016681042,
-0.034915935,
0.042807057,
0.047620945,
-0.017442733,
0.05344027,
0.021830076,
-0.0267049,
-0.011158779,
-0.027009577,
-0.062214952,
-0.038541585,
-0.047285803,
-0.0019803976,
0.032112908,
-0.020078186,
0.014395967,
0.0015224307,
0.001525287,
-0.019209856,
-0.03872439,
0.057919014,
0.02579087,
0.024069449,
-0.007765444,
0.04027824,
-0.0048367404,
0.035921365,
0.019712573,
-0.019316494,
-0.0047605713,
-0.0215711,
0.007468384,
-0.0013891347,
0.017777877,
-0.030878969,
-0.011638644,
0.031564493,
-0.015256679,
-0.022713637,
-0.014601625,
-0.0015024362,
-0.01794545,
0.02574517,
-0.0056136656,
-0.03613464,
0.02379524,
0.054019153,
0.022728872,
0.042014897,
-0.0059945113,
0.02216522,
-0.029401287,
0.05304419,
0.023581965,
0.003574237,
-0.008157715,
-0.055146456,
-0.007285578,
-0.0021117893,
0.009696332,
-0.055542536,
-0.027314253,
0.042593785,
-0.03704867,
-0.024115149,
-0.0061201905,
-0.035769027,
-0.047864687,
-0.00076121534,
0.012651694,
0.04247191,
0.03991263,
-0.008363372,
-0.08859994,
-0.00498527,
-0.0052899467,
0.03857205,
0.030635228,
-0.031077009,
0.011341585,
0.031564493,
-0.0061544664,
-0.01199664,
0.016056454,
-0.07598633,
0.017381798,
0.008462392,
0.028472025,
0.0022070007,
-0.008698516,
0.019179389,
-0.006474377,
0.029995408,
-0.010061943,
0.030421954,
0.019179389,
0.039029066,
0.04807796,
0.001266312,
0.008241501,
-0.002791599,
-0.025943208,
-0.014738728,
0.003884626,
0.014251246,
0.03461126,
-0.049601343,
0.010229516,
-0.011448221,
0.016681042,
0.0038541586,
-0.014243629,
-0.055816747,
0.0431422,
0.014517838,
0.0709287,
-0.0047605713,
-0.044604648,
0.020002017,
0.0027478018,
0.03915094,
0.051825482,
0.008233884,
-0.021677738,
-0.0002658779,
-0.033179276,
-0.015195743,
0.0027858864,
0.014304564,
-0.016970484,
-0.027436124,
-0.01510434,
-0.033087876,
0.03613464,
0.050119296,
0.015294763,
0.012583142,
0.016513469,
-0.02280504,
0.0066876505,
0.010770316,
0.0012977318,
-0.021753907,
-0.040978998,
0.020123886,
-0.015256679,
0.018432932,
0.022469897,
-0.010915038,
-0.00033847662,
-0.01811302,
0.00020327639,
-0.010473257,
-0.018234892,
0.016574405,
0.0013139177,
0.017762644,
-0.01922509,
-0.007266536,
-0.02964503,
0.013200112,
0.03546435,
-0.042563315,
0.02574517,
-0.026857238,
-0.002692579,
0.009795351,
-0.052191094,
-0.026141249,
-0.020718006,
-0.018311061,
-0.055420667,
0.043446876,
0.039272808,
-0.04759048,
-0.028746234,
-0.039272808,
0.0016661999,
0.023581965,
-0.041131336,
-0.037261944,
0.00745315,
0.0011796695,
-0.004242621,
0.0007512181,
0.0071637076,
0.022820273,
0.01695525,
-0.042410977,
0.037444748,
-0.048230298,
-0.008949874,
-0.022058584,
0.022911677,
-0.011790982,
0.025943208,
0.010138112,
-0.015127191,
0.009300252,
0.009262168,
-0.0063601234,
-0.051886417,
0.008508093,
0.03238712,
0.01189762,
0.006592439,
0.018204425,
0.009597312,
0.034245644,
0.031412154,
-0.01066368,
-0.008569028,
-0.013375301,
0.022332791,
-0.06017362,
-0.008112013,
0.020047717,
-0.06532265,
0.033971436,
-0.01735133,
-0.02586704,
0.011219715,
-0.045214,
-0.011326351,
-0.019438364,
-0.010930272,
0.022073817,
0.025425259,
-0.026080314,
-0.006832372,
-0.010229516,
-0.036104172,
-0.008005377,
-0.04429997,
0.0001366284,
0.050119296,
0.013329599,
-0.0056403247,
-0.020794176,
-0.051002856,
0.029066144,
-0.012842117,
0.007830188,
0.008927023,
-0.043203138,
0.0034656958,
0.00047891345,
-0.060295492,
0.012027107,
0.00204895,
0.0041474095,
-0.009665864,
-0.02216522,
0.013778998,
-0.019286025,
-0.01663534,
0.045274936,
-0.035159674,
-0.059990816,
-0.05209969,
0.022789806,
0.010694147,
0.010610362,
0.032326184,
-0.038907196,
-0.060478296,
-0.005198544,
0.04198443,
-0.021510165,
0.0058993,
-0.052556705,
-0.08250641,
-0.005465136,
-0.019072752,
0.03092467,
-0.05834556,
0.0035456736,
-0.012232764,
0.015081489,
-0.032295715,
0.0053394567,
-0.009703948,
0.011311118,
-0.01066368,
0.052191094,
-0.0087213665,
-0.004314982,
0.011943321,
-0.007289387,
0.021007448,
0.06017362,
-0.056365162,
-0.033362083,
0.02643069,
-0.0016281153,
-0.0013948474,
-0.04171022,
0.008073929,
0.009391655,
-0.02833492,
0.05484178,
-0.031092243,
-0.029233716,
-0.004551106,
-0.007666424,
0.026689667,
-0.040765725,
0.03561669,
0.0017928311,
0.022561299,
-0.030025875,
0.036104172,
0.015492803,
0.022469897,
-0.019087987,
-0.06977093,
0.019087987,
-0.030437188,
-0.003124839,
-0.031046541,
-0.011349202,
0.07360986,
0.0013215346,
0.061971214,
0.07123338,
0.004235004,
0.01902705,
-0.019346962,
0.04798656,
-0.012453655,
0.0025611874,
0.016147858,
0.021068385,
-0.012293699,
0.009940073,
-0.0012720246,
-0.030025875,
0.0026278354,
-0.0008702324,
0.021190254,
0.007837804,
0.04533587,
-0.017214226,
-0.054019153,
-0.048778716,
0.014121759,
0.03531201,
0.04609756,
0.00041369363,
0.030132512,
-0.00636774,
0.0021479698,
-0.002883002,
-0.013002072,
-0.0030277234,
0.040765725,
0.00043559226,
-0.051368468,
-0.010831252,
0.027238084,
-0.033362083,
-0.070502155,
-0.024099916,
0.0016243069,
-0.018615738,
-0.024922542,
-0.018311061,
-0.0035228226,
-0.05706592,
0.0073312796,
0.038328312,
-0.014434052,
-0.012027107,
-0.016483001,
-0.05209969,
-0.05094192,
0.02554713,
0.053074658,
-0.044421844,
-0.0046767853,
-0.038297843,
-0.044025764,
-0.039699357,
0.006165892,
0.04902246,
-0.004741529,
0.015188127,
0.0379627,
-0.0051338,
0.06538359,
-0.013047773,
0.027923606,
0.0134133855,
-0.01730563,
-0.057766676,
-0.04862638,
0.005408009,
0.00078359,
0.0307571,
0.01994108,
0.019164156,
0.006082106,
0.035769027,
-0.02149493,
-0.10188384,
-0.0030182023,
-0.015226211,
-0.024648333,
-0.008363372,
0.00069123495,
-0.03976029,
0.013063007,
-0.017716942,
-0.0045701484,
0.0025516662,
0.010252366,
0.006143041,
-0.005465136,
-0.045092132,
-0.011029292,
0.0022984038,
-0.0411618,
-0.039029066,
-0.03732288,
-0.0073008123,
0.006333464,
-0.001466256,
0.005686026,
-0.016924784,
0.0039722207,
0.00067409687,
0.011311118,
0.0007897788,
0.009239317,
-0.010359003,
-0.016132623,
-0.048230298,
0.03442845,
0.015843181,
-0.0073465137,
0.020916047,
-0.022865975,
0.01703142,
-0.0069770934,
0.036622122,
0.0512466,
-0.007369364,
-0.014037972,
0.017716942,
0.02964503,
-0.03613464,
0.018341528,
-0.027999775,
-0.022591766,
-0.03936421,
0.040186837,
-0.013954187,
0.059838478,
-0.013215345,
0.038023636,
0.004684402,
0.049540408,
0.01826536,
0.025288155,
0.019636404,
0.03522061,
-0.044269506,
-0.02865483,
0.04539681,
-0.04497026,
-0.021464463,
0.025059648,
-0.0032619433,
-0.011143546,
-0.004174069,
0.0121794455,
0.020062951,
0.032326184,
-0.010953123,
0.001333912,
-0.012430804,
0.0077882945,
0.0066571827,
0.01811302,
-0.028746234,
-0.04222817,
0.0058993,
-0.039059535,
0.02320112,
-0.015294763,
-0.013337216,
-0.0057393447,
0.050271634,
0.0027630355,
-0.017412266,
-0.005655559,
0.010351386,
0.040156372,
-0.03628698,
-0.030345785,
-0.0070380284,
0.008203416,
-0.03144262,
-0.02809118,
-0.012278466,
0.073792666,
0.03147309,
0.007982526,
-0.020763708,
0.006143041,
0.023688603,
0.03622604,
-0.006066872,
0.009772501,
-0.0131467935,
0.03048289,
-0.049113862,
-0.012545058,
0.0018299636,
0.0066876505,
0.024054214,
0.03573856,
-0.008355754,
0.030437188,
-0.011707197,
-0.029858302,
0.0277408,
0.0026735368,
0.024648333,
0.002117502,
-0.00036061328,
-0.013398152,
0.05292232,
0.019331727,
0.03260039,
-0.019880146,
0.0461585,
-0.010975973,
-0.064957045,
-0.04302033,
-0.0076626153,
0.016818145,
0.0003315738,
0.016498236,
-0.034915935,
-0.0072513022,
-0.01821966,
-0.00575077,
0.004128367,
-0.010191431,
0.055908147,
-0.018371997,
-0.038907196,
0.029294651,
-0.014076057,
-0.002584038,
-0.0045777652,
-0.032813665,
0.06611481,
0.015165276,
-0.014258863,
0.02451123,
0.03720101,
0.017183758,
-0.009627779,
0.04783422,
-0.020702772,
0.0059031085,
-0.014342649,
0.037505686,
-0.008340521,
-0.002625931,
-0.04171022,
-0.033453487,
-0.021159787,
0.046859253,
-0.02905091,
-0.0046729767,
-0.009307869,
-0.0047224867,
-0.00178331,
-0.054141026,
-0.01599552,
-0.073975466,
0.016132623,
-0.015736545,
-0.022073817,
-0.056852646,
0.032478523,
0.012575525,
0.02554713,
-0.0025726126,
0.075742595,
0.020778941,
0.08591879,
0.030863736,
-0.011471072,
0.009886755,
0.02598891,
-0.021723438,
-0.019255558,
-0.010770316,
0.000006080886,
0.013580957,
-0.018524336,
-0.0595338,
-0.032996472,
-0.0056136656,
-0.006619098,
-0.07720504,
0.03936421,
-0.029279418,
-0.0503021,
0.017320862,
0.06270243,
0.047133464,
0.0037037244,
-0.006135424,
0.0030296275,
-0.041100867,
0.030056342,
-0.040369645,
0.014121759,
-0.019286025,
-0.059076786,
-0.0047834218,
-0.02224139,
-0.021144554,
-0.0043225987,
-0.039272808,
-0.0411618,
0.04122274,
-0.026826771,
0.07001467,
0.035647158,
-0.010153347,
-0.0045130216,
0.05149034,
0.044665582,
-0.009170764,
0.061209522,
0.08281109,
-0.0109226545,
-0.015302381,
-0.015454719,
0.04119227,
-0.034915935,
0.0023612434,
-0.014106525,
-0.007068496,
-0.03330115,
-0.052830916,
-0.042441446,
0.025714701,
-0.028426323,
-0.007498852,
-0.021662503,
-0.007239877,
-0.065017976,
-0.04887012,
-0.019286025,
0.007929208,
-0.0103894705,
-0.016224027,
0.03857205,
-0.030452423,
0.27762127,
0.05950333,
0.022424195,
-0.023414394,
0.05395822,
0.06550546,
0.0058307475,
-0.0462499,
-0.022576533,
-0.009307869,
-0.009498292,
-0.035068274,
-0.0059792777,
0.0056936434,
-0.010229516,
0.029081378,
-0.04353828,
-0.0147691965,
0.010823634,
-0.060143154,
0.005952618,
0.04798656,
-0.0016385886,
0.04356875,
0.060752507,
0.024176085,
0.0073960233,
-0.049449004,
-0.01056466,
-0.0076511903,
0.023353457,
-0.012644078,
0.007929208,
0.006234444,
0.0135581065,
0.03653072,
-0.00082453096,
-0.02236326,
0.0051795016,
-0.01611739,
0.043081265,
-0.008264352,
-0.023749538,
-0.045183532,
-0.033179276,
0.0034599833,
-0.009696332,
0.028152114,
0.038419712,
-0.073000506,
0.034885466,
-0.026369756,
0.04539681,
-0.042410977,
-0.06824755,
0.0028906188,
-0.032844134,
-0.025714701,
0.0076016802,
0.012971604,
0.0140684405,
0.020321926,
-0.009643013,
0.037810363,
-0.00044225706,
0.042867992,
-0.010023858,
0.026811536,
-0.02021529,
-0.025440494,
0.03132075,
-0.004688211,
-0.06526172,
-0.0039874543,
-0.008294819,
0.06581014,
-0.02236326,
0.05069818,
-0.017899748,
-0.06690697,
0.020885577,
-0.002608793,
0.006775245,
-0.06477424,
0.018250126,
0.043507814,
0.014213162,
0.017991152,
-0.006626715,
0.00841669,
0.026826771,
0.05925959,
0.008942257,
0.04716393,
0.011311118
] |
Find the best way of debugging intermediate results. Is the original repository written in PyTorch? Then you should
probably take the time to write a longer script that decomposes the original model into smaller sub-components to
retrieve intermediate values. Is the original repository written in Tensorflow 1? Then you might have to rely on
TensorFlow print operations like tf.print to output
intermediate values. Is the original repository written in Jax? Then make sure that the model is not jitted when
running the forward pass, e.g. check-out this link.
Use the smallest pretrained checkpoint you can find. The smaller the checkpoint, the faster your debug cycle
becomes. It is not efficient if your pretrained model is so big that your forward pass takes more than 10 seconds.
In case only very large checkpoints are available, it might make more sense to create a dummy model in the new
environment with randomly initialized weights and save those weights for comparison with the 🤗 Transformers version
of your model
Make sure you are using the easiest way of calling a forward pass in the original repository. Ideally, you want to
find the function in the original repository that only calls a single forward pass, i.e. that is often called
predict, evaluate, forward or __call__. You don't want to debug a function that calls forward
multiple times, e.g. to generate text, like autoregressive_sample, generate.
Try to separate the tokenization from the model's forward pass. If the original repository shows examples where
you have to input a string, then try to find out where in the forward call the string input is changed to input ids
and start from this point. This might mean that you have to possibly write a small script yourself or change the
original code so that you can directly input the ids instead of an input string.
Make sure that the model in your debugging setup is not in training mode, which often causes the model to yield
random outputs due to multiple dropout layers in the model. Make sure that the forward pass in your debugging
environment is deterministic so that the dropout layers are not used. Or use transformers.utils.set_seed
if the old and new implementations are in the same framework. |
[
0.019548718,
0.017752118,
-0.01728158,
-0.03444909,
-0.0018268997,
-0.032509904,
-0.0032634668,
-0.02704881,
-0.0011193103,
0.045285724,
0.034392055,
-0.0016941153,
0.04231991,
-0.044202063,
-0.010494425,
0.041236248,
0.027890075,
-0.0074573155,
-0.08361319,
-0.010038146,
0.002883828,
-0.008662178,
-0.07060923,
-0.040124066,
-0.025665713,
-0.0005872814,
0.02033295,
-0.06325173,
0.08327098,
0.042262875,
-0.05868893,
-0.026506979,
0.014037719,
-0.040323686,
-0.0044059474,
-0.04229139,
-0.025152398,
-0.01919225,
-0.010929316,
-0.04713936,
0.02177308,
-0.047852296,
0.02121699,
-0.043745782,
-0.06171178,
0.020860521,
0.031682897,
-0.038669676,
-0.0054468345,
-0.033508014,
-0.007735361,
-0.0015996512,
-0.022985073,
0.014194565,
-0.020632382,
0.010822376,
-0.0106584,
0.01830821,
-0.031369206,
0.008241545,
0.04075145,
0.025380539,
0.0068727075,
-0.041435868,
0.018450797,
0.028488941,
-0.03524758,
0.020561088,
0.021302542,
0.0050832373,
-0.017880447,
-0.015057218,
0.0035593354,
-0.02255731,
0.008904576,
-0.013388947,
0.021245508,
-0.030171473,
0.020119067,
0.015542015,
-0.019919446,
0.044145025,
-0.0026806411,
-0.0053826706,
-0.008312839,
0.015869966,
0.083442084,
-0.025123881,
-0.035219062,
0.008120347,
-0.010622754,
0.05073256,
0.030342577,
0.04919262,
0.016383281,
0.058974106,
-0.0014374582,
0.021445129,
0.03390726,
-0.03792822,
0.011021998,
0.069012254,
-0.06547609,
0.032909147,
-0.005453964,
-0.020803487,
0.006901225,
-0.0065376274,
-0.0056500216,
-0.03581793,
0.035447203,
-0.021872891,
0.0045841816,
-0.01279008,
0.014444093,
0.01896411,
0.010915058,
0.03938261,
-0.02649272,
-0.046055697,
0.03154031,
-0.0042918776,
-0.067985624,
-0.02456779,
-0.0022475324,
-0.015727378,
-0.005781915,
0.033821706,
0.013232101,
-0.005881726,
0.012626105,
-0.032595456,
0.015869966,
0.0756283,
-0.023968924,
-0.02043276,
0.0067515085,
0.059658524,
0.031141065,
-0.037985254,
-0.030228507,
0.02087478,
0.036502346,
0.076769,
0.01649735,
0.015955519,
0.023626715,
-0.06792859,
-0.061597712,
0.0021495034,
0.0058068675,
-0.005386235,
0.015185547,
0.054382794,
0.0016709449,
-0.012034368,
-0.021473646,
0.010594236,
0.011998721,
-0.009888429,
-0.016639937,
-0.0123195425,
-0.03433502,
0.052586194,
-0.020489795,
0.043289505,
-0.0018999757,
0.0095747365,
-0.0064841574,
-0.031968072,
-0.00302998,
0.022072513,
-0.027448054,
0.041036624,
0.06285248,
0.03154031,
0.04152142,
0.031597346,
0.019947963,
0.0057427036,
-0.02322747,
0.03424947,
0.04300433,
0.020703675,
0.01875023,
-0.0073004696,
0.0044843704,
-0.044287615,
0.012219732,
0.007664067,
0.030941444,
0.05295692,
-0.032709524,
0.057747856,
-0.06427836,
0.004452288,
-0.047652673,
0.024952777,
0.010565719,
-0.03134069,
-0.054268725,
0.03613162,
-0.016254952,
0.035874963,
-0.034163915,
-0.0050689783,
-0.013296265,
0.006566145,
-0.016354762,
0.044914998,
0.04511462,
-0.0009847435,
-0.009945464,
0.0051367073,
0.02951557,
0.03256694,
-0.012946926,
0.025466092,
0.004106514,
-0.0033775365,
0.020732192,
0.003473783,
0.04959186,
0.03613162,
0.011649382,
0.027248433,
0.0057712207,
0.04206325,
0.0006095607,
0.00527573,
-0.015755896,
0.017894706,
0.028888186,
0.0077995253,
0.00015595485,
0.0016691625,
0.06416428,
0.02716288,
-0.033736154,
-0.007428798,
0.04003851,
0.059772596,
0.02951557,
0.03929706,
-0.027676195,
-0.019833893,
0.008298581,
-0.007443057,
0.021231249,
0.018892817,
-0.029487053,
0.020561088,
0.025950888,
-0.014130401,
-0.04220584,
-0.005518128,
0.016654195,
0.02804692,
-0.023184694,
-0.018037293,
0.022072513,
-0.012369448,
-0.01178484,
-0.033393946,
0.022300653,
0.027219914,
-0.016768266,
0.013445982,
-0.018807264,
-0.025737006,
-0.04075145,
-0.04522869,
-0.08657901,
0.00830571,
-0.053299133,
-0.022229359,
0.0057213153,
-0.031112548,
0.0076711965,
-0.007364634,
-0.0038391629,
0.032481387,
-0.002302785,
0.02637865,
0.042348426,
0.024097253,
-0.052728783,
0.07340394,
-0.035732377,
0.000689766,
0.031226618,
0.004466547,
0.006109866,
-0.010579977,
0.0076355496,
0.008319968,
0.012219732,
-0.040637378,
-0.04163549,
0.011164585,
-0.017695084,
-0.0057890443,
-0.022813966,
-0.012376578,
0.0007423451,
0.02446798,
-0.013716898,
-0.05543794,
0.04086552,
0.063822076,
-0.013175067,
0.011378466,
0.02414003,
0.035846446,
-0.026107734,
0.029144844,
0.03499092,
0.01594126,
0.0005618831,
-0.015955519,
-0.016169399,
0.024553532,
-0.013046738,
0.028275061,
-0.015784414,
0.050789595,
-0.028103957,
-0.05803303,
-0.02974371,
0.009139846,
-0.0012253596,
-0.01929206,
-0.048736338,
0.02033295,
0.041378833,
0.0027982758,
0.00662318,
-0.004758851,
0.011064774,
0.01604107,
0.0023010024,
-0.013880873,
0.04862227,
0.005453964,
0.00048747033,
0.0041813725,
0.020675158,
-0.056521606,
0.030456647,
-0.020960333,
0.008170252,
-0.016925111,
-0.018365243,
-0.019092439,
0.021787338,
0.020960333,
-0.013966425,
-0.017794894,
-0.0030620622,
-0.0043382184,
0.038669676,
0.034049846,
-0.023070624,
0.006555451,
-0.053612825,
-0.017823411,
0.0093109505,
-0.016226435,
0.047994886,
-0.0017351091,
0.027448054,
-0.008540979,
-0.0563505,
0.05837524,
-0.020817745,
-0.04984852,
0.049677413,
0.02974371,
0.015812932,
-0.0098813,
-0.036245693,
0.009403632,
-0.036530863,
0.014073366,
0.01695363,
-0.0105086835,
-0.022286395,
-0.016682714,
-0.030285541,
0.00007134934,
-0.017695084,
-0.009004388,
0.0031315736,
-0.065247945,
-0.04026665,
-0.041920666,
-0.0005177701,
0.05241509,
0.028987998,
-0.016098106,
0.02257157,
0.048679303,
0.018764488,
-0.0026307355,
-0.042519532,
0.028802633,
-0.045913108,
0.0377286,
0.022129549,
-0.0028820457,
-0.0020015691,
-0.028873928,
0.005439705,
0.023213211,
0.017024923,
-0.017395651,
-0.04243398,
-0.022386206,
-0.023156177,
0.03590348,
-0.04097959,
-0.015285358,
-0.05769082,
0.023626715,
0.050989218,
-0.04480093,
-0.02783304,
-0.027219914,
-0.013274877,
0.037101213,
0.004537841,
-0.031682897,
-0.033479497,
-0.00807757,
-0.05592274,
0.02265712,
0.060685154,
-0.013631346,
-0.015542015,
-0.050304797,
-0.015584791,
0.019477425,
-0.04423058,
-0.009966852,
-0.0067158616,
-0.0003849857,
0.02154494,
0.015627567,
0.017110476,
0.025879594,
0.0013563617,
-0.020803487,
-0.0071222354,
-0.04691122,
0.020404242,
0.0031618732,
-0.019591495,
-0.02200122,
0.022486016,
-0.014301506,
-0.009268174,
-0.032909147,
0.024981294,
-0.083442084,
-0.031169582,
0.016754007,
0.016226435,
0.003201085,
0.049477793,
0.035931997,
-0.03972482,
0.030713303,
-0.0037072697,
-0.008034795,
0.048593752,
-0.0078066546,
0.03096996,
0.016868077,
-0.024168547,
0.0144512225,
-0.052158434,
0.04568497,
0.008227287,
0.039125953,
-0.0073788925,
-0.027476572,
-0.046169765,
0.032823596,
-0.027633417,
0.010252027,
-0.004926391,
0.005828256,
0.009524832,
0.043802816,
0.009225398,
-0.05384096,
-0.023384316,
0.009054293,
0.014586681,
0.017395651,
0.02905929,
-0.0057890443,
-0.015684603,
-0.036302727,
-0.0072648227,
0.0062132413,
0.01852209,
0.0072648227,
0.043688748,
0.014180306,
-0.057633784,
-0.0006429796,
-0.024282616,
0.004580617,
0.0149574075,
-0.013845227,
0.01997648,
-0.008455426,
-0.018978368,
0.01648309,
-0.021516424,
-0.032481387,
0.016055329,
-0.004195631,
0.018721713,
0.026207546,
0.047110844,
-0.043460608,
-0.057120472,
-0.045029067,
0.054810558,
-0.067700446,
0.014600939,
-0.017523978,
-0.03444909,
-0.011264397,
0.022058254,
0.023170436,
-0.040694416,
-0.0007753184,
-0.037186768,
0.017210286,
-0.074487604,
-0.011977333,
-0.025993664,
0.009275303,
0.006095607,
0.020589605,
0.03008592,
-0.024225581,
-0.03849857,
0.020290172,
0.029886298,
-0.01571312,
-0.022699898,
-0.036416795,
0.006926178,
0.011150327,
-0.027376762,
0.0581471,
-0.014871855,
0.022970814,
0.0285032,
0.035532754,
-0.018479314,
-0.018693194,
-0.016454574,
-0.017866189,
0.009004388,
-0.008027664,
0.03156883,
-0.05791896,
0.02074645,
0.010979222,
0.017181769,
-0.03693011,
0.02794711,
-0.05692085,
-0.049648896,
0.010244898,
-0.01403059,
-0.005678539,
-0.005286424,
0.006487722,
0.04936372,
0.011656512,
0.007140059,
0.05589422,
-0.027462313,
0.027747488,
-0.039439645,
0.02054683,
0.019919446,
-0.015998295,
-0.011071904,
0.060856257,
-0.043945406,
-0.008911706,
-0.02649272,
-0.063365795,
-0.004751722,
0.046169765,
0.024624826,
-0.00459844,
0.026749376,
-0.001154066,
-0.060457014,
-0.0059173726,
0.02861727,
0.009325209,
0.0074787037,
0.015285358,
0.044629823,
0.0073432457,
0.054753523,
0.012169826,
0.014130401,
-0.03336543,
0.01693937,
0.012205472,
-0.035760894,
0.001619257,
0.02378356,
-0.03302322,
-0.034078363,
-0.015299617,
0.0552098,
-0.069297425,
0.005799738,
0.022856744,
-0.0149574075,
0.020361466,
0.036873076,
0.045086104,
-0.008854671,
-0.028517459,
0.029230395,
-0.023370057,
-0.0022279264,
-0.0019873104,
0.023298765,
-0.000029882065,
-0.030456647,
-0.039211508,
-0.032823596,
-0.022699898,
-0.0021958444,
0.06433539,
0.007058071,
0.04962038,
0.013381817,
0.02458205,
0.012312413,
0.020275913,
0.00055386254,
0.03279508,
-0.011193103,
-0.08155993,
-0.06148364,
-0.016711231,
-0.002878481,
-0.010708306,
-0.022457499,
0.020218879,
0.021716045,
0.025679972,
0.0046946867,
-0.06376504,
0.000054138614,
-0.03222473,
0.024453722,
0.006747944,
-0.009453538,
0.034848336,
0.025123881,
0.020675158,
-0.06849894,
0.012112791,
0.06775748,
0.006284535,
-0.033165805,
-0.04163549,
-0.029886298,
-0.039411128,
-0.022486016,
-0.006608921,
0.009731583,
0.011264397,
0.01785193,
-0.00031124134,
-0.028930962,
0.0045164526,
0.008227287,
-0.010893669,
0.0155705325,
-0.010943575,
-0.030941444,
-0.0077852663,
-0.01728158,
-0.01997648,
0.051759187,
-0.016126623,
-0.010501554,
0.024952777,
0.01842228,
0.017224545,
0.014501128,
0.021530682,
0.0401811,
-0.04465834,
-0.0029693805,
0.00376074,
0.017324356,
-0.03410688,
0.012020109,
0.004099385,
-0.005379106,
-0.03085589,
0.031483274,
-0.025794042,
0.029030774,
-0.024624826,
0.035047956,
-0.029458536,
0.028474683,
-0.0057034916,
0.022272136,
0.027091587,
0.0081916405,
-0.03302322,
-0.04243398,
-0.004081561,
0.06193992,
-0.0100024985,
-0.0028481812,
-0.008569497,
-0.013296265,
-0.007685455,
0.0015693514,
-0.010016758,
0.020062033,
0.06576126,
0.016796783,
-0.0095747365,
-0.010929316,
-0.027505089,
-0.0020407806,
-0.06981074,
-0.061084397,
0.008740601,
-0.04748157,
0.018921334,
-0.0014035937,
0.0065625804,
-0.029144844,
0.015912741,
-0.019776858,
0.017196028,
-0.0013643822,
0.0011995157,
-0.009111328,
-0.047937848,
-0.05252916,
0.04679715,
0.028260803,
-0.014101883,
-0.00875486,
0.014408446,
0.005464658,
0.006231065,
-0.028888186,
0.002423984,
-0.011585218,
0.013175067,
0.025565902,
-0.026949,
0.027376762,
-0.011271526,
0.048964478,
-0.02368375,
-0.017880447,
-0.007721102,
0.0041207727,
0.015656086,
-0.016853819,
0.0032082142,
0.05039035,
0.0365879,
-0.012968315,
0.0014490434,
0.0034862594,
0.054183174,
0.013367559,
0.01178484,
0.0075856443,
0.014408446,
0.051274393,
0.046854187,
0.009503444,
0.006352264,
0.039496683,
0.014522516,
-0.017452685,
0.017894706,
0.011285785,
-0.0062880996,
-0.00047722185,
0.022543052,
-0.008690695,
0.0075927735,
0.011592347,
0.028531717,
-0.017908964,
0.0001636412,
0.008091829,
-0.028902445,
0.020717934,
-0.055580527,
-0.04790933,
-0.03353653,
-0.0034238775,
0.027148621,
-0.020817745,
0.015342393,
0.0023847725,
0.019349096,
0.039325576,
0.018707452,
0.0036217172,
0.0058888556,
0.0076284204,
0.007877948,
0.008576626,
0.0020550394,
-0.014543904,
-0.018650418,
-0.044401683,
0.008733472,
0.03231028,
-0.02683493,
-0.051359944,
-0.0077068433,
-0.009346597,
-0.016525868,
-0.07243434,
0.02974371,
-0.03621717,
0.02951557,
0.003238514,
0.027077328,
-0.07625569,
0.034506127,
-0.004049479,
0.019677047,
0.023441352,
0.036017552,
-0.00723987,
0.044401683,
0.0134388525,
-0.024225581,
0.04465834,
0.041236248,
-0.04140735,
0.00057970645,
0.021259766,
-0.023883373,
-0.03245287,
-0.004420206,
-0.071863994,
0.029800745,
0.01077247,
-0.027262691,
-0.034078363,
-0.0032581198,
0.02962964,
-0.054012068,
0.0003549087,
0.06370801,
0.024425203,
-0.0028339224,
0.00740741,
-0.01324636,
-0.026792154,
-0.02468186,
-0.02716288,
0.0133533,
0.011984462,
0.0023544726,
-0.0444302,
-0.04026665,
-0.014387058,
0.016825302,
0.006334441,
0.02883115,
0.01930632,
0.01290415,
0.035047956,
0.048536714,
0.0011950597,
-0.010872281,
0.011321431,
0.05737713,
0.012262507,
0.056293465,
0.05241509,
0.008519591,
-0.045485348,
0.022029737,
-0.011941686,
-0.02626458,
-0.0072077876,
-0.006487722,
-0.013588569,
-0.02804692,
-0.067415275,
-0.0075072213,
0.02997185,
-0.055523492,
0.013645604,
-0.012989703,
0.02232917,
-0.04286174,
-0.044059474,
-0.035361648,
-0.0063914754,
-0.020161843,
-0.016910853,
0.02840339,
-0.031911038,
0.24023108,
-0.0025505302,
0.026407167,
-0.022543052,
0.050989218,
0.064791664,
-0.0013652734,
-0.027448054,
0.03946816,
-0.04847968,
-0.014943149,
-0.044401683,
-0.010416002,
0.022172324,
-0.046426423,
0.024995552,
-0.06319469,
-0.0014436963,
-0.021659011,
-0.057861924,
-0.0754572,
0.051702153,
0.0040530437,
0.121028095,
0.02905929,
0.019905187,
-0.011029127,
-0.034078363,
-0.016996406,
-0.062111028,
0.008234416,
-0.0026075651,
0.0076284204,
-0.02974371,
-0.02513814,
-0.0043168305,
-0.029201878,
-0.02188715,
-0.024496498,
0.037757117,
0.025024071,
-0.02110292,
0.007934983,
0.0010016757,
0.014657974,
0.05187326,
-0.03604607,
0.04668308,
-0.010972093,
-0.03807081,
0.043802816,
-0.03208214,
0.041207727,
-0.054268725,
-0.042947292,
-0.03134069,
-0.043945406,
-0.02626458,
0.011157456,
-0.022799708,
0.022086773,
-0.0012547682,
-0.043717265,
0.030342577,
-0.057776373,
-0.01785193,
-0.039639268,
0.022970814,
0.011207362,
0.009268174,
0.015869966,
-0.05769082,
-0.022956554,
-0.03578941,
-0.0021851503,
0.016739748,
0.016967889,
0.03906892,
0.021117179,
-0.02345561,
-0.019890929,
-0.021117179,
0.017894706,
-0.025993664,
0.031682897,
0.005603681,
-0.058974106,
-0.01850783,
0.027904334,
0.02312766,
0.044173546,
0.03961075,
0.032823596,
0.005407623,
-0.0021120743
] | cd transformers
In the special case that you are adding a model whose architecture exactly matches the model architecture of an
existing model you only have to add a conversion script as described in this section.
In this case, you can just re-use the whole model architecture of the already existing model.
Otherwise, let's start generating a new model. You have two choices here: |
[
0.04938309,
0.004906825,
-0.0212082,
-0.052518096,
0.01755069,
-0.0124127595,
-0.0023060401,
-0.016733445,
0.020752687,
0.06827352,
0.043782942,
-0.021596728,
0.013035742,
-0.06286094,
0.02036416,
0.019975632,
0.00461543,
-0.049195524,
-0.035985615,
-0.008259542,
-0.030787393,
0.0019761273,
-0.06580839,
-0.02312404,
-0.043997303,
0.01882345,
-0.017778447,
-0.04565859,
0.06286094,
0.032314707,
-0.05340233,
0.037593313,
0.0062599694,
-0.02762559,
-0.0028988784,
-0.04078191,
-0.012553433,
-0.049034752,
-0.03352048,
-0.054500923,
0.03140368,
-0.03866511,
0.016130557,
-0.043595377,
-0.03092137,
0.028992133,
0.03617318,
-0.05734119,
0.02269532,
-0.05610862,
-0.0065513644,
0.004200108,
0.007388707,
0.010517017,
-0.036789462,
-0.00082896865,
-0.028081104,
0.040379986,
-0.008721755,
0.020270377,
-0.019131592,
0.020645507,
-0.029447647,
-0.06393275,
-0.029420853,
0.024142247,
-0.015259722,
0.010771569,
0.014362092,
-0.045524616,
-0.04072832,
0.030519444,
0.024919301,
-0.018059794,
0.012580228,
-0.0007938003,
0.023391988,
-0.008520793,
0.000036843052,
0.02445039,
0.017510498,
0.040326394,
-0.038584724,
0.021462753,
-0.020350762,
0.009719867,
0.065433264,
-0.01500517,
-0.028617004,
-0.006089152,
-0.026660973,
0.04413128,
0.013665423,
0.00016652641,
0.030680215,
0.039415367,
0.020779481,
0.020806277,
-0.026379626,
-0.020565122,
0.0127142025,
0.074168414,
-0.045149487,
-0.011193589,
-0.011387853,
-0.013390775,
0.012211797,
0.0061862837,
-0.049195524,
-0.03483343,
0.013384076,
-0.008976308,
0.021234995,
0.015621454,
-0.0041063256,
0.013544845,
-0.004149867,
0.026553793,
-0.068166345,
-0.048766803,
-0.0019744528,
0.022132626,
-0.03628036,
-0.021328777,
-0.018006204,
0.013598436,
0.016987996,
0.03786126,
0.017590882,
0.0097935535,
0.02816149,
-0.0031634783,
0.050294116,
0.054447334,
-0.015849212,
-0.014616644,
-0.045899745,
0.030117521,
0.05476887,
-0.03250227,
-0.0089093195,
-0.0038986648,
0.014080745,
0.067576855,
0.0238609,
0.035637278,
0.024771929,
-0.069720455,
-0.03054624,
-0.0042135054,
-0.008976308,
0.0024986288,
-0.007194443,
0.062914535,
-0.040755115,
0.010530414,
-0.01421472,
-0.009666277,
0.009806951,
-0.0030345279,
-0.051097963,
-0.0070336736,
-0.011421346,
0.05492964,
-0.012446253,
0.039629728,
-0.015031965,
0.032100346,
-0.01717556,
-0.03654831,
-0.03435112,
0.040889088,
-0.017912421,
0.0025003036,
0.046114106,
0.027277255,
0.05074963,
0.013337185,
0.0190914,
-0.03526215,
0.015795622,
0.026634177,
-0.021020636,
-0.005218316,
0.01930576,
-0.017162163,
-0.0008658117,
0.005945129,
0.018796656,
-0.009137077,
0.016720047,
0.07041712,
-0.042389605,
0.0043039382,
-0.032957785,
0.0026007846,
-0.0031986467,
-0.0044747563,
0.029420853,
-0.027786361,
-0.033440094,
0.034056377,
0.004173313,
-0.011903656,
-0.007181046,
-0.03421715,
-0.008520793,
-0.016210943,
-0.009056692,
-0.0057776603,
0.05637657,
0.019118195,
-0.018381333,
0.014710426,
0.04364897,
-0.0079514,
-0.023391988,
-0.009713168,
0.016210943,
0.0050776424,
0.015862608,
0.0064341365,
0.05707324,
0.053991817,
0.016358316,
0.016251136,
-0.009431821,
0.0509104,
-0.0010458403,
0.027973926,
0.0043407814,
-0.0024065212,
0.022038843,
-0.00540923,
-0.03595882,
0.03435112,
0.06398633,
0.0021720654,
0.029474443,
0.008828935,
0.021650318,
0.0069465903,
0.03984409,
0.0073217195,
-0.006611653,
0.0018907185,
0.022789102,
0.014804209,
0.005787709,
0.03542292,
-0.013933373,
0.056537338,
0.037111003,
0.0011940498,
-0.0055231084,
-0.02688873,
0.0011973992,
0.007261431,
0.0032405138,
-0.005563301,
0.019493325,
-0.016318122,
-0.0049135233,
-0.00016390972,
0.04485474,
0.074597135,
-0.0089160185,
0.052169763,
-0.023981478,
-0.050803218,
0.019948838,
-0.03823639,
-0.08981666,
0.0222666,
-0.040487166,
-0.025495391,
0.0053857844,
-0.050508477,
0.010838556,
0.0052484605,
-0.006263319,
0.022923077,
-0.0013154644,
0.00094117253,
0.04841847,
0.031082138,
-0.072828665,
0.022279998,
-0.021918267,
-0.008681563,
0.007904509,
0.0022290046,
-0.00413647,
-0.002667772,
-0.016358316,
0.036199972,
0.018488513,
-0.023767117,
-0.043890122,
0.02110102,
-0.021623522,
0.00068159646,
-0.009143775,
0.0061896327,
0.03376163,
0.016076969,
0.011320865,
-0.032797016,
0.04793616,
0.039951265,
-0.0112471795,
0.013906578,
0.025361417,
0.034485098,
-0.030358676,
0.014321899,
0.036226768,
0.031564448,
-0.013772603,
0.0053690374,
-0.028456233,
0.0035469811,
-0.03727177,
0.023083847,
-0.00959929,
0.06136043,
-0.023070449,
-0.057287596,
-0.027786361,
0.0016026727,
-0.010249067,
-0.013598436,
-0.025950907,
0.011923752,
0.035154972,
0.020779481,
0.020605315,
0.008172459,
0.0015951367,
0.022829294,
0.011515128,
0.005720721,
0.0609853,
0.04911514,
0.015152543,
0.008728454,
0.009036596,
-0.067201726,
-0.01876986,
0.0046891156,
0.019051207,
0.013611834,
-0.0055231084,
-0.0020816324,
-0.014536259,
0.04874001,
0.0033711393,
-0.026192062,
0.020605315,
-0.0041833613,
0.03668228,
0.031242909,
0.003335971,
-0.009565796,
-0.008976308,
-0.0028151441,
0.013055838,
-0.0206723,
0.037378952,
-0.057716317,
-0.0014419031,
0.02052493,
-0.011608911,
0.027277255,
-0.034404714,
-0.07465072,
0.050320912,
0.03054624,
0.009994515,
-0.005050848,
-0.03802203,
0.016251136,
-0.03695023,
0.033949196,
0.041746527,
-0.009679675,
-0.022882884,
0.0008926067,
-0.016974598,
0.021234995,
-0.024463788,
-0.037593313,
0.029528031,
-0.0086078765,
-0.033386502,
-0.02853662,
0.00026606544,
0.08654768,
0.060342222,
-0.0048029944,
0.00943852,
-0.011206986,
-0.01564825,
0.04067473,
-0.022949873,
0.016304726,
-0.058627345,
0.0062097292,
0.05021373,
-0.010302657,
0.0053589894,
0.017778447,
-0.022896282,
0.04782898,
-0.017108575,
-0.0033326217,
-0.025120264,
0.000381828,
-0.026741358,
0.028241875,
-0.0071207574,
-0.028911749,
-0.035664074,
0.025120264,
0.033574067,
-0.07454354,
-0.003346019,
-0.025749944,
0.013109428,
0.035985615,
0.032261115,
-0.030090725,
0.007891112,
-0.0007309996,
-0.027866745,
0.057555545,
0.043836534,
-0.019520119,
0.0074422965,
-0.08065279,
0.00065019616,
-0.010758171,
-0.006899699,
0.0053254957,
0.014442476,
0.009237558,
0.03461907,
-0.006055658,
-0.007542778,
-0.02672796,
0.0038986648,
-0.022681924,
0.005553253,
-0.037941646,
0.034190353,
-0.0005350616,
0.02158333,
-0.018247359,
0.025441803,
0.020712495,
-0.006919795,
0.004062784,
0.045953333,
-0.05417938,
0.01919858,
0.039710112,
-0.00082394463,
0.00036319715,
0.053616688,
0.04062114,
-0.021730702,
0.02816149,
0.038102414,
0.0013188138,
0.009029897,
-0.003340995,
0.0132969925,
0.039067034,
0.025388213,
0.010784966,
-0.07111379,
0.009686373,
0.0037111002,
0.027384436,
0.0051814727,
-0.058198627,
-0.0334133,
-0.014964978,
0.008212651,
-0.0048331385,
0.011568719,
0.024597762,
0.0052518095,
-0.0010634245,
0.0009780156,
-0.0024115453,
-0.046435643,
0.017108575,
0.020230185,
0.030519444,
0.008822236,
-0.010316054,
0.008152363,
-0.005945129,
-0.032475475,
0.01633152,
0.031591244,
0.017108575,
0.025066674,
0.028456233,
-0.03494061,
-0.01076487,
-0.020766083,
-0.008889223,
0.017242549,
0.0019359349,
-0.0025438452,
-0.04268435,
-0.03001034,
0.015487479,
-0.052625276,
-0.05696606,
0.0036374142,
0.031269703,
-0.0019811515,
0.03520856,
0.053214766,
-0.009291148,
-0.011783078,
-0.05340233,
0.0487936,
-0.038316775,
0.0006041423,
-0.02721027,
-0.00029725645,
0.031966373,
0.022534551,
0.025937509,
-0.05149989,
-0.006109248,
-0.0043139863,
-0.010771569,
-0.080438435,
-0.05535836,
-0.0048063435,
-0.019721081,
0.004226903,
0.038959853,
0.024035068,
-0.023633143,
-0.035396125,
0.010423235,
0.018126782,
0.015474082,
-0.026017893,
-0.019332554,
-0.00996772,
-0.0037613406,
0.0006179585,
0.06007427,
-0.01103282,
-0.0073753092,
0.009559098,
-0.005101088,
-0.035771254,
-0.036789462,
-0.032689836,
0.025401609,
0.019948838,
-0.020645507,
-0.012272086,
-0.025964303,
0.04978501,
-0.03151086,
0.020886661,
-0.027598796,
-0.0034331025,
-0.00923086,
-0.03796844,
0.05123194,
-0.02126179,
-0.00011230851,
-0.028027514,
0.026165266,
0.05101758,
0.009163872,
-0.009679675,
0.08708358,
-0.033279326,
0.029474443,
-0.06612993,
0.053107586,
0.020926854,
-0.0071408534,
-0.016505687,
0.054608103,
-0.019332554,
-0.0027230366,
-0.040379986,
-0.086440496,
0.0076968484,
0.08102792,
0.017470306,
-0.004829789,
0.033547275,
-0.014335297,
-0.04635526,
-0.033788428,
0.01882345,
0.05415259,
0.0016411905,
0.024517376,
0.034967408,
0.025682956,
0.025200648,
0.0029574924,
-0.018649284,
-0.033868812,
0.035128176,
0.0016671481,
-0.03861152,
-0.026071483,
0.03151086,
-0.044774357,
-0.02604469,
-0.0150453625,
0.057716317,
-0.026580587,
0.02142256,
-0.006980084,
-0.0025538935,
-0.028241875,
0.05281284,
0.023472374,
-0.032689836,
-0.03946896,
0.030251496,
-0.009532303,
0.0063135596,
-0.002254125,
0.037593313,
-0.0033041518,
-0.029528031,
-0.023566157,
-0.029313672,
-0.037244976,
0.0060657063,
0.045605,
-0.011006025,
0.031939577,
0.009887336,
0.009605989,
0.03703062,
0.01649229,
0.0019225375,
0.045363847,
-0.012312278,
-0.051767837,
-0.035556894,
-0.027237063,
-0.012218496,
0.020926854,
-0.009217462,
-0.01903781,
0.03753972,
0.027036102,
-0.0057944073,
-0.0471859,
0.0021335476,
-0.014080745,
-0.0121984,
-0.011146698,
0.00006342866,
0.043407813,
0.016076969,
0.045792565,
-0.06211069,
-0.007502585,
0.0795274,
-0.053804252,
-0.025481995,
-0.03207355,
-0.0062767165,
-0.021811087,
0.018970823,
-0.021663714,
0.007603066,
0.024597762,
-0.013029043,
-0.033332914,
-0.015246325,
-0.014187925,
0.028027514,
-0.0092107635,
0.037084207,
-0.029420853,
-0.011568719,
-0.014817606,
-0.012560132,
-0.0103696445,
0.0021703907,
0.01882345,
-0.01771146,
0.03461907,
0.02767918,
-0.0014402284,
-0.013558243,
0.00078752026,
0.05685888,
-0.04940988,
-0.029367262,
-0.04734667,
0.057234008,
-0.050562065,
0.021703906,
-0.0070604687,
-0.007348514,
-0.03218073,
0.05243771,
-0.011501731,
0.045846153,
0.02104743,
0.0029876367,
0.011501731,
0.01692101,
-0.010637594,
0.015996583,
0.03410997,
-0.030573035,
-0.018220564,
-0.050294116,
0.008460505,
0.030465854,
-0.02751841,
-0.0021017287,
-0.01363193,
-0.007556175,
0.029983547,
0.00055557647,
-0.01919858,
-0.0006330306,
0.026768152,
0.020498134,
-0.004692465,
-0.011997438,
-0.022614935,
0.008581081,
-0.031162523,
-0.070685074,
0.013424269,
-0.024798723,
-0.0010918941,
-0.03006393,
0.005603493,
-0.0008758598,
0.016840624,
-0.016572675,
-0.013618532,
-0.030599829,
0.0023747021,
-0.018622488,
-0.029688802,
-0.05696606,
0.001309603,
0.018300949,
0.0048063435,
-0.015889404,
0.0045584906,
-0.011937149,
0.01405395,
-0.053991817,
0.04528346,
-0.022146024,
-0.01760428,
0.052652072,
-0.044452816,
0.02773277,
-0.029501237,
0.045524616,
-0.034297533,
-0.006172886,
-0.012439555,
0.06827352,
-0.007958099,
0.00082687533,
0.04024601,
0.020819673,
0.023097245,
-0.0024517376,
-0.012955357,
0.028911749,
0.036467925,
-0.015782224,
-0.010443331,
-0.0057776603,
0.031028548,
0.024249427,
0.034431506,
0.027866745,
0.013852987,
0.030974958,
-0.042282425,
-0.020806277,
0.059056062,
0.0073954053,
0.034431506,
0.023030257,
0.0076432587,
0.014844401,
0.032341503,
0.023070449,
0.04512269,
-0.030090725,
0.00019457737,
0.007154251,
-0.013685519,
0.006380547,
-0.018917233,
-0.083332285,
-0.006913096,
0.012318977,
0.02359295,
-0.002800072,
0.015541069,
0.0075963675,
0.024637954,
0.032368295,
-0.026366228,
-0.005844648,
-0.021650318,
0.03201996,
0.034029584,
0.005791058,
-0.014295104,
-0.05042809,
-0.031028548,
-0.05233053,
-0.026580587,
0.0053321943,
-0.00097382884,
-0.035556894,
0.021342175,
-0.016411904,
-0.04343461,
-0.09292488,
-0.00996772,
-0.06870224,
0.019238772,
0.0010592378,
-0.031376883,
-0.07700868,
0.07550816,
-0.039067034,
0.021878075,
-0.0019007665,
-0.013008947,
0.03703062,
0.03413676,
0.0039957967,
-0.031993166,
-0.002307715,
0.02848303,
-0.04110345,
0.009311244,
0.0021837882,
-0.06393275,
0.0023462325,
-0.060235042,
-0.077651754,
0.03727177,
0.004863283,
-0.037003823,
-0.06334326,
0.017108575,
0.026232254,
-0.038691904,
-0.0002463879,
0.038531136,
0.01336398,
-0.0003535677,
0.013772603,
0.016023379,
-0.023753721,
-0.05254489,
-0.035610486,
-0.028750978,
-0.0150453625,
-0.044961922,
-0.027237063,
-0.025321225,
0.008761948,
0.031752013,
-0.017644472,
0.010858652,
0.006618352,
0.022213012,
0.044827946,
-0.0032890798,
-0.01866268,
-0.002290968,
-0.0011940498,
0.036628693,
0.019801466,
0.066022746,
0.029206492,
-0.00996772,
-0.013518051,
-0.022132626,
0.013544845,
-0.00461543,
-0.0072413343,
-0.0150587605,
-0.0020883312,
-0.033198938,
-0.07813407,
0.02837585,
0.032207526,
0.0070336736,
0.015407095,
-0.023150835,
-0.017845435,
-0.031189319,
-0.03946896,
-0.054822464,
0.023566157,
-0.041639347,
-0.036735874,
0.017858833,
-0.029769186,
0.20428468,
0.007026975,
0.044559997,
0.010503619,
0.029045723,
0.04019242,
0.011521827,
0.031323295,
0.015313312,
-0.04734667,
-0.02678155,
-0.014335297,
-0.010094997,
0.037566517,
-0.031001754,
0.03151086,
-0.05149989,
-0.0060858023,
-0.054983232,
-0.032314707,
-0.03644113,
0.023646541,
0.030144315,
0.12100598,
0.04592654,
0.030412264,
-0.026071483,
-0.015916198,
-0.0013472835,
-0.072024815,
0.00599202,
-0.013685519,
0.011260577,
0.010456728,
-0.022614935,
-0.009264353,
-0.025321225,
-0.05455451,
0.00785092,
0.010456728,
0.010148587,
-0.037191387,
0.018327745,
0.024209235,
0.024236029,
0.024155645,
-0.05584067,
0.030090725,
0.0012401036,
-0.039120622,
0.03362766,
-0.058359396,
0.030948164,
-0.048123725,
-0.031135729,
0.0031768759,
-0.048123725,
-0.06323607,
-0.024410198,
-0.009686373,
0.033975992,
-0.0138931805,
-0.02789354,
0.031618036,
0.01570184,
-0.024946095,
-0.0086212745,
0.029233288,
0.0035034392,
-0.020618713,
0.021114418,
0.0014812582,
-0.022628333,
-0.058198627,
0.0024550871,
0.01426831,
-0.012385964,
0.029126108,
-0.008735153,
-0.017028188,
-0.012359169,
-0.006048959,
0.0032304658,
-0.045685384,
0.045792565,
0.03665549,
-0.06264659,
-0.041291013,
0.0018237311,
0.01198404,
0.028268669,
0.032743424,
0.01686742,
0.014884593,
-0.007938003
] | transformers-cli add-new-model-like to add a new model like an existing one
transformers-cli add-new-model to add a new model from our template (will look like BERT or Bart depending on the type of model you select) |
[
0.005434881,
-0.010047068,
-0.012624359,
-0.029223861,
0.005795265,
-0.042809244,
0.027782327,
0.031684667,
0.007404252,
0.048575386,
0.021200769,
-0.030927494,
0.025175912,
-0.004572144,
-0.011059055,
-0.02181233,
-0.024549792,
-0.029718934,
-0.05658392,
-0.013206798,
0.005616893,
-0.003989705,
-0.047963828,
0.004317327,
0.019351525,
0.040887196,
0.001596246,
-0.031189593,
0.07734786,
0.02590396,
-0.075950004,
-0.027170766,
-0.0034691505,
-0.035091933,
0.025044864,
-0.034247395,
-0.0044592964,
-0.030199446,
-0.06942669,
-0.04918695,
0.009988824,
-0.0063121794,
0.020705696,
-0.04545934,
-0.091035165,
0.04397412,
-0.011262909,
-0.01837594,
0.0143134305,
-0.065233134,
-0.007586264,
0.044731293,
0.015900576,
-0.008408959,
-0.005769783,
-0.014393516,
0.009908739,
-0.009348141,
-0.0046777106,
0.025263278,
0.01594426,
0.023122815,
0.052798066,
-0.043275196,
-0.0022387488,
0.0430131,
-0.02485557,
-0.011874469,
-0.0027920655,
0.0032143337,
-0.056350943,
0.019526258,
-0.01595882,
-0.045139,
-0.014633772,
-0.03098574,
0.060107674,
0.011262909,
-0.027039716,
0.031102227,
0.00346187,
0.029136496,
0.014459041,
0.029151056,
-0.061039574,
0.0037385284,
-0.0009692144,
-0.006814533,
-0.058622453,
0.0050344546,
-0.0051036193,
0.020982355,
0.000767181,
-0.021026038,
0.034975443,
0.017050892,
-0.042751,
-0.0044156136,
-0.0079648495,
0.034043543,
0.03340286,
0.069484934,
0.026573766,
0.019103989,
-0.00285941,
-0.012937419,
0.045080755,
-0.037101343,
0.002271511,
0.006592478,
0.012304017,
-0.015157967,
0.008489044,
-0.020123256,
-0.024739083,
0.013148554,
-0.020530963,
0.046100024,
-0.08224034,
-0.034858957,
0.037043102,
0.026267985,
0.0034363882,
-0.049157824,
-0.032121494,
-0.003673004,
0.012092884,
0.010483896,
-0.04269276,
-0.005525887,
-0.019031184,
-0.03357759,
-0.007437014,
0.03416003,
0.011241067,
0.0148449065,
-0.0264864,
-0.0028812515,
-0.0019402489,
-0.04199383,
-0.010309165,
0.0034564096,
0.0046121865,
0.06214621,
0.034946322,
0.034567736,
-0.013214078,
-0.006789051,
-0.02300633,
0.026136937,
-0.013803797,
-0.017225625,
0.06197148,
0.021550233,
-0.003296239,
0.006967423,
-0.032587446,
0.015900576,
-0.017677015,
0.003476431,
-0.0019639104,
0.017254746,
0.0014278849,
0.04560495,
-0.054690994,
0.07548405,
-0.013920285,
-0.0043246076,
-0.086783364,
-0.008823946,
0.016453894,
0.011918152,
-0.03654803,
-0.023967352,
0.035587005,
0.0020549165,
0.053846456,
0.046478607,
0.030490667,
-0.011932713,
0.017633332,
0.030607153,
0.031102227,
0.030956617,
-0.017444039,
0.023996474,
0.014065894,
0.00993786,
-0.038062368,
0.009289897,
-0.02061833,
0.053496994,
-0.009974263,
0.04743963,
-0.052186508,
0.012413225,
0.005919033,
-0.0021786848,
-0.0030814647,
0.0025681907,
0.010141714,
0.022045305,
-0.05041007,
0.03072364,
-0.05131285,
-0.053031042,
-0.009297178,
0.0156676,
0.0009619339,
-0.03130608,
0.044177976,
0.035761736,
-0.028583178,
0.034858957,
0.019977648,
-0.04318783,
-0.01022908,
0.009581117,
0.00051873445,
-0.017444039,
0.008467203,
0.032907788,
0.046595097,
0.06278689,
0.013752834,
0.000016565944,
0.019016623,
0.026122376,
-0.024375059,
0.027563911,
0.0075061787,
0.007993971,
-0.00856913,
0.063427575,
-0.005085418,
-0.006348582,
0.025772912,
0.063718796,
0.024549792,
0.0067198863,
0.008991397,
-0.02274423,
0.0373052,
-0.027083399,
-0.027054278,
-0.01610443,
-0.005449442,
-0.028816154,
-0.017502284,
-0.008219666,
-0.036344174,
0.055273432,
0.011859908,
-0.019147672,
-0.040858075,
-0.011772542,
0.030432422,
0.012740847,
0.009005958,
0.032470956,
0.018885575,
0.00044865982,
-0.005212826,
0.021404622,
-0.034858957,
0.042197682,
-0.038120613,
0.034829833,
-0.016599502,
-0.07752259,
-0.02453523,
-0.03296603,
-0.021011475,
-0.02784057,
-0.03413091,
-0.006384984,
0.009566556,
-0.030490667,
0.014939552,
-0.036693636,
0.015696723,
0.007003825,
0.004317327,
0.0067198863,
-0.02782601,
-0.0010875223,
-0.042081196,
0.03628593,
-0.046100024,
0.046158265,
0.006417746,
0.012617079,
0.00069119094,
-0.024942936,
0.05460363,
0.036693636,
-0.022613183,
-0.033956178,
-0.060107674,
-0.022598622,
-0.02484101,
-0.039489344,
0.02300633,
0.012384103,
-0.025423449,
0.015187089,
0.009166129,
0.000080199075,
0.039052516,
0.0527107,
-0.004375571,
0.012988383,
0.0008304302,
-0.010738714,
-0.04004266,
0.0033217208,
0.039518464,
0.039256368,
-0.05355524,
-0.029020008,
-0.056088846,
-0.013228639,
0.0008058585,
-0.005733381,
0.03069452,
0.049740266,
0.02090955,
-0.059932943,
0.028408447,
-0.022860719,
-0.03972232,
-0.031946763,
0.010811518,
-0.0024571633,
0.0072440812,
0.02016694,
-0.008154142,
0.023370354,
0.03354847,
-0.020196062,
0.02769496,
-0.012966542,
0.04711929,
0.037013978,
0.031393446,
-0.014277029,
0.014327992,
-0.048371535,
-0.03715959,
-0.014014931,
0.008656495,
0.012420505,
0.028204594,
0.045139,
0.013643626,
0.02168128,
-0.017735258,
-0.01611899,
0.0061010453,
0.02484101,
0.007819239,
0.03625681,
-0.014670175,
-0.030636275,
-0.009166129,
-0.0044520157,
-0.038906906,
-0.00496529,
0.032995153,
-0.049274314,
0.04321695,
-0.00496529,
-0.03745081,
-0.0027465625,
-0.020123256,
-0.0337232,
0.009093324,
0.0047687166,
0.028190034,
0.023312109,
-0.048196804,
0.043508172,
-0.028306521,
0.025015742,
0.06156377,
0.0074515752,
-0.03357759,
0.040392123,
-0.007491618,
-0.00827791,
0.00057106296,
-0.019919403,
0.030898374,
-0.024578912,
-0.021477427,
-0.026209742,
0.03782939,
0.0110808965,
0.04094544,
-0.031102227,
0.014029492,
0.008590971,
-0.0018628938,
-0.0019074867,
0.00300866,
0.011372115,
-0.05134197,
0.014480882,
0.033315495,
0.0068982583,
0.022758791,
0.028976325,
0.008044935,
0.025860278,
-0.02377806,
-0.007877483,
-0.026093254,
-0.009275336,
0.010928006,
0.0304033,
-0.029471397,
-0.009348141,
-0.028554058,
0.007094831,
0.042052075,
-0.06389353,
0.022496695,
-0.016395649,
0.01777894,
0.002499026,
0.013578102,
-0.052477725,
0.03357759,
-0.030024715,
-0.047002804,
0.042547148,
0.028670546,
0.0007781017,
0.0110226525,
-0.031684667,
0.014218785,
0.012769968,
-0.03759642,
-0.0025081267,
-0.014109577,
-0.019395208,
-0.001821941,
-0.009916019,
0.02696691,
-0.008292471,
-0.004153516,
-0.011321153,
0.020793062,
-0.03555788,
0.0050781374,
-0.022846159,
0.012828212,
0.0028248278,
0.012296737,
0.014553687,
0.0051655034,
0.014997796,
0.012522432,
-0.015041479,
-0.052302994,
0.018579794,
0.026704814,
-0.009137007,
0.059234016,
0.015638478,
0.0002996374,
0.01263892,
0.033956178,
0.0038186137,
0.040275637,
-0.036460664,
0.067795865,
0.022656865,
-0.002331575,
-0.022627743,
-0.045430217,
-0.03535403,
0.021273574,
-0.0014024032,
-0.055419043,
-0.048837483,
-0.017982794,
0.004528461,
-0.020429038,
0.02076394,
0.024345938,
0.0075717033,
-0.037072223,
0.0162646,
0.0014624671,
-0.023355791,
-0.06435948,
-0.01549287,
0.03354847,
0.004197199,
0.025190474,
-0.00240984,
-0.017109137,
-0.016133552,
-0.014983236,
0.010898884,
-0.031859398,
0.0049762107,
0.02753479,
0.047701728,
-0.052099142,
0.0012367722,
-0.01067319,
0.02003589,
0.034888078,
0.04164437,
-0.028757911,
-0.009275336,
-0.03555788,
0.045517582,
-0.009464629,
-0.026064131,
-0.021856012,
-0.0030177606,
-0.000009470316,
0.029806301,
0.03765466,
-0.019162234,
-0.03220886,
-0.008314312,
0.014269748,
-0.06698045,
0.002681038,
-0.050788656,
-0.014997796,
0.035121053,
0.026238862,
0.01943889,
-0.027971618,
-0.0014178742,
-0.013505298,
-0.014029492,
-0.013010224,
0.0021823249,
0.0120783225,
0.02045816,
-0.008540007,
0.011190103,
-0.008962275,
-0.009056922,
-0.044527438,
0.03223798,
0.03401442,
0.022656865,
0.009843214,
0.0046704304,
-0.020953232,
-0.003476431,
0.018332258,
0.029267544,
-0.009420946,
0.026136937,
-0.023850864,
0.011925432,
-0.022656865,
-0.020822184,
-0.027199887,
0.014393516,
0.014997796,
-0.044906024,
0.012471468,
0.02363245,
0.025860278,
0.00014651974,
0.022161793,
0.040683344,
-0.0035546962,
-0.0351793,
-0.052419484,
0.0027920655,
-0.006577917,
-0.020662013,
0.0013341487,
-0.006821813,
0.056496553,
-0.021914257,
0.038091492,
0.055360798,
0.001640839,
0.02513223,
-0.074086204,
0.03780027,
0.023137378,
-0.011488603,
-0.0024062,
0.024287693,
-0.065291375,
0.021273574,
-0.0280153,
-0.0064941915,
-0.00948647,
0.033810567,
0.03354847,
-0.0141969435,
0.038936026,
-0.055127822,
-0.031946763,
-0.039198123,
0.05236124,
0.053205773,
-0.01760421,
0.043566413,
0.013403371,
0.054865725,
0.021637598,
-0.028044423,
-0.011816225,
-0.00888947,
0.0011721579,
0.00316337,
-0.0069200997,
0.028655984,
0.017356673,
-0.059932943,
-0.04636212,
-0.044323586,
0.01594426,
-0.03794588,
-0.053060167,
-0.04665334,
0.029558765,
0.0066179596,
0.02348684,
0.04307134,
-0.032820422,
-0.01792455,
0.00084908644,
-0.023748938,
0.0014670175,
0.00035742624,
0.02784057,
-0.024797328,
-0.050177094,
-0.025569059,
-0.0027920655,
-0.07327079,
0.049856752,
0.061039574,
0.04921607,
-0.0065997583,
-0.004779638,
0.035470515,
0.04184822,
0.026457278,
0.053147532,
0.036023833,
-0.020443598,
-0.031131348,
0.017414916,
-0.020429038,
-0.034363884,
0.010891603,
-0.026515521,
-0.011350274,
0.033024274,
-0.0050635766,
-0.019220477,
-0.04292573,
0.02379262,
-0.04109105,
0.008489044,
-0.043158706,
-0.03989705,
0.003025041,
0.005278351,
0.009857775,
-0.042634513,
-0.028845277,
0.032878663,
-0.024112962,
-0.010469335,
-0.02468084,
-0.0009956062,
-0.03267481,
-0.033694077,
-0.030345056,
-0.005886271,
-0.020254306,
-0.0039678635,
-0.0074770567,
0.02572923,
-0.014619212,
-0.008372556,
-0.00084044086,
0.048808362,
0.013534419,
-0.02272967,
-0.0061192466,
0.02213267,
-0.011350274,
0.02693779,
0.0022824316,
-0.026573766,
0.06674747,
0.019366087,
-0.031422567,
-0.00045070745,
0.014422638,
0.020793062,
-0.015711283,
-0.021593915,
-0.03625681,
0.018274015,
-0.024622597,
-0.0064650695,
0.022103548,
0.008780263,
-0.021783207,
0.041557003,
-0.028976325,
0.032325346,
0.031568177,
-0.03145169,
0.013010224,
0.026923228,
0.04097456,
0.0033763244,
-0.030053837,
0.019730112,
0.004564863,
-0.0070220265,
0.025467131,
0.033694077,
0.012617079,
0.0067016855,
-0.009406385,
0.045226365,
-0.0039969855,
0.028859837,
0.030432422,
0.056613043,
0.04516812,
0.0103746895,
0.0037894917,
-0.044935144,
0.009391824,
-0.03450949,
-0.05134197,
-0.024011035,
0.03433476,
-0.016235478,
0.03462598,
-0.01038197,
0.04575056,
-0.014087736,
0.0059517953,
-0.022220036,
-0.03581998,
-0.0033672238,
0.04377027,
0.02814635,
-0.046624217,
-0.0060610026,
0.021856012,
-0.0070839105,
0.005402119,
-0.035412274,
-0.013177675,
0.055011336,
-0.009748568,
-0.03520842,
-0.022307402,
-0.020996915,
-0.022176353,
0.016745113,
-0.032791298,
0.033927053,
-0.02800074,
0.06785411,
-0.041731734,
0.024025597,
-0.032995153,
0.029107373,
0.009690324,
0.0040552295,
-0.0043682903,
0.06272865,
0.000963754,
0.06919372,
0.032791298,
-0.00030123,
-0.008256068,
-0.041003685,
-0.0168616,
0.011241067,
0.07268835,
0.044148855,
0.014022212,
-0.016308283,
0.008925873,
-0.01792455,
-0.018419623,
0.011342994,
0.027724082,
0.024870133,
-0.014670175,
0.0044884183,
-0.008205106,
-0.010047068,
-0.035470515,
0.011182823,
-0.016788796,
-0.027010595,
-0.012551554,
-0.016235478,
-0.0016608604,
-0.00120492,
-0.02663201,
-0.021462865,
0.008751142,
-0.023137378,
0.020210622,
0.037712906,
-0.035033688,
-0.0055076857,
0.044789534,
0.017123697,
0.037421685,
0.00647235,
0.03069452,
0.028641423,
-0.02031255,
0.027068838,
0.017633332,
0.00752802,
-0.04589617,
0.021200769,
-0.03954759,
0.024637157,
0.004648589,
-0.016046187,
0.017458599,
-0.019191355,
-0.02919474,
-0.0689025,
-0.021317257,
-0.030082958,
0.0075207395,
0.0225695,
-0.04097456,
-0.06476718,
0.020079574,
0.0060428013,
0.05192441,
0.041265782,
0.026996033,
-0.021724964,
0.026282547,
0.03975144,
-0.008743861,
0.013068468,
0.013228639,
-0.031946763,
-0.061330795,
0.015507431,
-0.039110757,
-0.00016881622,
-0.020822184,
0.010061628,
0.05460363,
0.014692016,
0.005343875,
-0.09808268,
0.013483455,
-0.01188903,
-0.020894988,
0.02227828,
0.0101999575,
0.029471397,
-0.007287764,
0.021040598,
0.004499339,
0.008933154,
-0.0035019126,
-0.02438962,
0.025001181,
0.010214519,
-0.02574379,
-0.015274455,
0.0052019055,
0.008867629,
0.021724964,
-0.033897933,
-0.02002133,
0.028787032,
-0.021652158,
-0.0044483757,
-0.013170395,
-0.0598747,
0.013316005,
0.027127082,
0.04548846,
-0.00042204055,
0.095752925,
0.04059598,
-0.0074770567,
-0.019497136,
-0.027185326,
0.025947643,
0.039110757,
-0.041032806,
0.004255443,
-0.026530083,
-0.0213755,
-0.07431918,
0.030811006,
0.076182984,
-0.00571882,
-0.022292841,
0.01986116,
0.03145169,
-0.053351384,
-0.07431918,
-0.061039574,
0.046857193,
-0.013789237,
-0.008467203,
0.048196804,
-0.06435948,
0.25301138,
0.042488903,
0.040130027,
-0.02906369,
-0.018099282,
0.095927656,
0.011262909,
-0.011881749,
-0.017866308,
-0.0007203129,
-0.016366526,
-0.053060167,
-0.006603399,
0.029689813,
-0.018696282,
0.037683785,
-0.0584186,
0.0043901317,
-0.04196471,
-0.05600148,
-0.04094544,
-0.008357995,
0.021229891,
0.05116724,
-0.018696282,
0.031859398,
-0.0022915322,
-0.04441095,
0.01295198,
-0.08398766,
-0.009712165,
-0.015114284,
0.04956553,
0.0038149734,
-0.003476431,
0.01188903,
-0.004379211,
-0.033839688,
0.034422126,
0.012289456,
-0.012864615,
-0.031830274,
-0.014837625,
0.019002063,
-0.018477868,
0.015623918,
-0.048255045,
-0.0065706368,
-0.011707018,
-0.045925293,
0.015478308,
0.009042361,
0.032878663,
-0.06703869,
-0.010658628,
-0.01369459,
-0.03308252,
-0.054225042,
-0.0022332885,
0.010724152,
0.024025597,
0.021404622,
-0.031073105,
0.02859774,
0.02045816,
0.031364325,
-0.0044265343,
0.046449486,
-0.02195794,
-0.019031184,
0.0038040527,
0.000038734448,
-0.0384992,
-0.06377704,
0.0035546962,
-0.021127963,
-0.02993735,
0.0022023462,
0.042226806,
-0.02287528,
-0.0026464558,
-0.01897294,
-0.029791739,
-0.059437867,
0.036693636,
0.042809244,
-0.037975002,
-0.0133742485,
0.032791298,
0.029529642,
0.041353147,
0.047789097,
-0.040304758,
0.007921167,
0.012769968
] | Create a branch with a descriptive name from your main branch
git checkout -b add_brand_new_bert
Commit the automatically generated code:
git add .
git commit
Fetch and rebase to current main
git fetch upstream
git rebase upstream/main
Push the changes to your account using:
git push -u origin a-descriptive-name-for-my-changes |
[
-0.02044734,
0.011523467,
-0.051097386,
-0.02949001,
0.0062089753,
-0.037009265,
0.042012785,
0.022096545,
0.012669524,
0.042879317,
-0.01661783,
-0.004538806,
0.031726222,
-0.00870724,
-0.01798751,
-0.022082567,
0.0014290776,
-0.042907268,
-0.04494781,
-0.011041284,
-0.006188011,
0.009252316,
-0.049839515,
0.00006649666,
0.02078277,
0.040000197,
0.0103424685,
-0.04419309,
0.05808554,
0.022431975,
-0.06960202,
0.008840015,
-0.012026614,
-0.026862465,
-0.0105171725,
-0.0357514,
-0.005115329,
-0.009951131,
-0.061048515,
-0.08055945,
0.019399116,
-0.011285869,
-0.01654795,
-0.027742973,
-0.091460966,
0.021691231,
-0.04262774,
-0.021425681,
0.010447291,
-0.038462803,
0.0016492044,
0.057861917,
-0.0048253206,
0.032201417,
0.0009984325,
0.017917627,
-0.00024502215,
-0.019021757,
-0.00844169,
0.040531296,
0.036226593,
0.014954651,
0.011390692,
-0.02654101,
0.021523515,
0.059427265,
-0.015793229,
-0.0587005,
0.0014710065,
-0.012704465,
-0.044276945,
0.02317272,
0.0075332304,
-0.05361312,
0.010153788,
0.014353669,
0.031754173,
-0.010272587,
-0.003763121,
0.029825443,
-0.0007429282,
0.036897454,
0.023787677,
0.024933735,
-0.01904971,
0.010573078,
0.014856816,
-0.014409575,
-0.02711404,
-0.01904971,
0.00089142646,
0.027728997,
-0.024766019,
0.007463349,
0.03331952,
0.038490754,
-0.017470386,
-0.0020772289,
-0.015206224,
0.015304058,
0.012383009,
0.03737265,
0.01847668,
-0.00031992645,
-0.013354363,
0.0026415223,
0.04816236,
0.0030101475,
0.036142733,
-0.041621447,
0.001813426,
-0.022865241,
-0.013235564,
0.0036128757,
-0.018644396,
0.00054201874,
-0.01821113,
0.038211226,
-0.012802299,
-0.027044157,
0.04368994,
0.014800911,
-0.016268423,
-0.032788422,
-0.021467611,
0.0012072037,
-0.0007944658,
0.008986766,
-0.00234802,
0.011572383,
-0.04581434,
-0.03376676,
-0.012131436,
0.03907776,
-0.006125117,
-0.007145388,
-0.012166377,
-0.0315026,
0.009762452,
-0.03130693,
-0.029629774,
-0.031334884,
0.029881349,
0.0362825,
0.02567448,
0.027407542,
-0.03544392,
0.0013600695,
0.014856816,
0.023536105,
0.004723992,
0.0045353123,
0.019986121,
0.01821113,
0.011823957,
0.024430588,
-0.03888209,
0.028581552,
0.023354411,
0.028385883,
-0.007784804,
0.042236406,
-0.016869405,
0.048413932,
-0.04366199,
0.069042966,
-0.007246716,
-0.037121076,
-0.03245299,
-0.016575903,
0.010118848,
0.010615006,
-0.034409672,
-0.021705208,
0.04751945,
0.028385883,
0.009979084,
0.04827417,
-0.0007009992,
0.013081825,
0.009133518,
0.06663904,
0.05607295,
0.032956135,
-0.05433989,
0.008364821,
0.015946968,
-0.020139862,
-0.03354314,
-0.0011408163,
-0.041202158,
0.055178467,
-0.018658372,
0.043438368,
-0.051656436,
-0.016981214,
0.0067820037,
-0.011914804,
0.020894581,
-0.012124448,
-0.0101468,
0.033375427,
-0.018448727,
0.027393565,
-0.012103483,
-0.053221785,
-0.0014675125,
-0.031754173,
-0.028903006,
-0.028441789,
0.055709567,
0.032229368,
-0.034437627,
-0.0006791612,
-0.04220845,
-0.038910042,
-0.006953214,
0.034018334,
-0.026149673,
0.008763146,
0.01102032,
0.042991124,
0.040810823,
0.042907268,
-0.0038609554,
0.020405412,
0.016380234,
0.00094776845,
-0.047184017,
-0.027323684,
0.02669475,
-0.004161446,
0.00060665916,
0.03533211,
0.025800265,
0.0041439757,
0.029266391,
0.06283748,
-0.0069462257,
-0.011928779,
0.040195864,
-0.019524904,
0.032956135,
-0.038043514,
-0.026373295,
-0.021635326,
0.030300638,
-0.00012818896,
0.015513702,
0.024626257,
-0.053473357,
0.044668283,
-0.0031935866,
0.008909897,
-0.05160053,
-0.024123108,
0.0005856947,
0.024402635,
-0.03536006,
0.002449348,
0.017176883,
0.0031865984,
-0.0059958366,
0.023200672,
0.0067191105,
0.021858947,
-0.043326557,
0.022264259,
-0.0013696783,
-0.039441142,
-0.0072327396,
-0.011802993,
0.0039448133,
-0.030356543,
-0.059818603,
0.023088861,
0.00007534104,
-0.030104969,
-0.00031315666,
-0.025367001,
0.022515833,
0.0146331955,
-0.030132921,
-0.0012124447,
0.002260668,
0.011768052,
-0.0067680273,
0.010726817,
-0.034130145,
0.06205481,
0.006820439,
0.015793229,
0.014248847,
-0.0011023814,
0.028371906,
-0.007183823,
-0.043214746,
-0.022264259,
-0.024039252,
-0.026261484,
-0.021425681,
-0.033571094,
0.054283984,
-0.001535647,
-0.010398374,
0.030077016,
-0.024472516,
-0.016645784,
0.02177509,
0.025115427,
0.029378202,
0.026764631,
-0.02600991,
-0.016058778,
-0.029182533,
0.021118203,
0.03407424,
0.036562026,
-0.079105906,
0.006645735,
-0.051293053,
-0.028385883,
0.025325071,
-0.048106454,
-0.024500469,
0.061663475,
0.008413738,
-0.076757886,
0.019245377,
-0.020866629,
-0.060880803,
-0.033710856,
0.022515833,
0.059818603,
0.038993903,
0.026764631,
0.00006425826,
0.029434105,
0.03298409,
-0.019329235,
0.0464293,
-0.0018850546,
0.07642245,
0.0048532733,
-0.011782029,
-0.01991624,
0.009678594,
-0.03653407,
0.0034643775,
-0.010740793,
0.009364127,
0.007882638,
0.005559077,
0.05341745,
0.039245475,
0.023424294,
-0.030440401,
-0.013375328,
-0.023060909,
0.02665282,
0.00042234658,
0.008798086,
-0.022893194,
-0.026443176,
-0.0178757,
-0.01404619,
-0.008476632,
-0.012403974,
0.058365066,
-0.057917822,
0.034549434,
-0.024290824,
-0.003259974,
-0.0074423845,
-0.03032859,
0.006149576,
0.018043414,
0.02658294,
0.012683501,
-0.0076380526,
-0.047826927,
0.01563949,
-0.00471351,
0.039525002,
0.059315454,
-0.003172622,
-0.05422808,
0.038742326,
-0.028930958,
-0.028651433,
0.009608712,
-0.03597502,
0.027365612,
-0.036226593,
-0.033794716,
-0.049504086,
0.020601079,
-0.012019626,
0.060824897,
-0.026023887,
0.041230112,
0.01953888,
-0.0016395957,
-0.0064535607,
0.01858849,
0.0013670577,
-0.03801556,
-0.010335481,
0.015723348,
-0.009440997,
-0.006020295,
0.002947254,
0.0027044157,
0.03298409,
-0.03002111,
0.005489195,
-0.038910042,
-0.029545916,
-0.020028051,
0.017847747,
-0.0683721,
-0.04380175,
-0.06915478,
0.006687664,
0.066583134,
-0.046121817,
0.038378943,
-0.053641073,
0.012466867,
0.053864695,
-0.024849877,
-0.05565366,
0.033822667,
-0.03597502,
-0.06378787,
0.05842097,
0.056128856,
-0.016673736,
-0.030887643,
-0.03234118,
0.004926649,
-0.025087474,
0.003080029,
-0.0036582989,
-0.03074788,
0.00020757002,
-0.018197155,
-0.018057391,
0.0050279773,
0.0026240519,
0.00308527,
-0.011823957,
0.039972242,
-0.017707983,
-0.001429951,
-0.012145412,
0.041174207,
0.021495562,
0.04922456,
0.037736032,
0.028679386,
0.01094345,
0.007659017,
0.016939286,
-0.05081786,
0.01851861,
0.03737265,
0.01965069,
0.058476876,
0.02415106,
-0.02949001,
0.036869504,
0.02782683,
0.007889627,
0.011858898,
-0.030132921,
0.03823918,
0.021942805,
-0.012641571,
-0.0014290776,
-0.011977697,
0.025842195,
-0.0127953105,
0.013221588,
-0.046233628,
-0.040056102,
0.0032267803,
0.012320116,
0.0059189666,
0.025912076,
0.0100140255,
0.023913464,
-0.03259275,
0.00965763,
-0.008742182,
0.003071294,
-0.05475918,
0.006680676,
0.0362825,
-0.015527679,
0.045618672,
-0.001244765,
-0.0023794665,
-0.019958168,
0.0016168843,
0.023228625,
-0.058253255,
-0.026988253,
0.0022536798,
0.024598304,
-0.03536006,
-0.017484363,
-0.021900875,
0.012746394,
0.008644347,
0.041928925,
-0.039049808,
0.0151363425,
-0.028106356,
0.0571072,
-0.017554244,
-0.0046576047,
-0.0074353963,
-0.05213163,
0.026904395,
0.024821924,
0.037149027,
-0.03544392,
-0.010314516,
0.0004005086,
0.007791792,
-0.06149576,
-0.014982603,
-0.051097386,
-0.040671058,
-0.009077612,
0.04022382,
0.006617782,
-0.03619864,
0.027868759,
-0.021495562,
-0.005401843,
-0.017707983,
0.0019427069,
0.011928779,
0.013431232,
0.0072746687,
0.020908559,
-0.005765227,
-0.014968627,
-0.015024532,
0.03457739,
0.008902908,
0.024933735,
0.0061286115,
-0.033571094,
0.03692541,
0.013459185,
0.013305446,
0.022362094,
-0.02968568,
0.05948317,
-0.01703712,
0.027267778,
-0.024584327,
-0.0096646175,
-0.03770808,
0.021635326,
-0.018308964,
-0.029070722,
0.043745846,
0.023773702,
0.030412449,
0.007183823,
0.04891708,
0.013172671,
0.0027952618,
-0.045870245,
-0.033682905,
0.0039203544,
-0.027966594,
0.011292857,
-0.010552113,
-0.015625514,
0.049308416,
-0.042404123,
0.04922456,
0.03843485,
0.024262872,
0.04601001,
-0.05436784,
0.05199187,
0.038350992,
0.0052131633,
-0.016212517,
0.004804356,
-0.036813598,
-0.022823311,
-0.022362094,
0.0064535607,
-0.012578678,
0.04740764,
0.03843485,
-0.021467611,
0.021537492,
-0.026443176,
-0.049084798,
-0.033459283,
0.048525743,
0.044137184,
0.027645139,
0.03426991,
0.02718392,
0.032956135,
0.008742182,
-0.003525524,
0.01617059,
-0.011139118,
0.029126627,
0.002355008,
-0.00035857968,
0.040978536,
0.020894581,
-0.06485007,
-0.074577585,
-0.06758943,
0.018658372,
-0.018630419,
-0.017232789,
-0.025297118,
-0.016142637,
-0.018183177,
0.01885404,
0.021425681,
-0.007596124,
-0.020097932,
-0.014717053,
-0.034130145,
0.016967239,
0.009930167,
0.040838774,
0.0061216233,
-0.031558506,
-0.028190214,
0.011285869,
-0.05319383,
0.031446695,
0.045982055,
-0.010160777,
0.01688338,
0.05263478,
0.029769538,
0.049811564,
0.0076729935,
0.029881349,
0.009762452,
0.025464835,
-0.047267877,
0.00923834,
-0.020125885,
-0.010608018,
0.026708726,
-0.03194984,
-0.004615676,
-0.009797392,
0.0003183978,
-0.03245299,
-0.025073498,
0.043382462,
-0.035583682,
-0.009468949,
-0.0009110806,
-0.019455021,
0.01745641,
-0.021202061,
-0.00013550468,
-0.027589234,
-0.04153759,
0.015178272,
0.0004804356,
-0.047966693,
-0.020349506,
-0.010992367,
-0.018574513,
-0.06591227,
-0.039049808,
0.018840063,
-0.005216657,
-0.008378797,
-0.010747781,
-0.012844228,
-0.0015260382,
-0.011747087,
0.015877087,
0.032956135,
-0.012152401,
-0.032648657,
-0.01874223,
0.022348117,
0.0019409598,
0.021914853,
0.0033281085,
-0.01222927,
0.044388756,
0.020265648,
-0.050230853,
-0.041817117,
0.036562026,
0.03127898,
-0.0017400504,
-0.032257322,
-0.020363482,
0.007966496,
-0.01601685,
0.0049965302,
0.0049196607,
-0.004898696,
-0.022655597,
0.031977795,
-0.03801556,
0.026037863,
0.031754173,
-0.012823263,
-0.00081892434,
0.016254447,
0.049643848,
0.012473855,
-0.013270505,
0.017316647,
0.014926698,
-0.00416494,
0.024444563,
0.06171938,
0.008490607,
-0.0050489414,
-0.024486493,
0.021481587,
-0.009035683,
0.01366883,
0.02733766,
0.09414442,
0.0036582989,
0.025870148,
-0.029965205,
-0.017176883,
0.024165038,
0.012012637,
-0.061439853,
-0.016715664,
0.024374682,
0.0005398349,
0.0325648,
-0.033263616,
0.048190314,
-0.0031656339,
0.018281013,
-0.039133664,
0.0093361745,
-0.031111263,
0.049951326,
0.07491302,
-0.03494077,
-0.023298508,
-0.0111321295,
-0.011097189,
-0.0050035184,
-0.050873764,
-0.0015312793,
0.05224344,
-0.008266986,
-0.02904277,
-0.022627644,
-0.0060063186,
-0.0064081377,
0.014081131,
-0.031865984,
0.032648657,
-0.04198483,
0.054060362,
-0.032313228,
-0.005489195,
-0.038574614,
0.038742326,
-0.008819051,
0.021383753,
-0.007700946,
0.051265102,
-0.006565371,
0.03183803,
0.065409124,
0.016589878,
-0.0019269836,
-0.011516479,
-0.025031568,
0.0069671897,
0.103704214,
0.011572383,
-0.016673736,
0.017582197,
0.008294939,
-0.037121076,
0.0017400504,
0.016212517,
-0.030468354,
-0.004381573,
-0.0120056495,
0.032704562,
-0.014304752,
-0.00056429347,
-0.03125103,
0.0006927008,
-0.003300156,
-0.03376676,
-0.0093361745,
-0.019329235,
-0.0060796943,
0.028581552,
-0.029238438,
0.011125142,
0.022585714,
-0.0028267084,
0.042991124,
0.015443821,
0.01814125,
0.020838676,
0.04368994,
-0.010922485,
0.017889675,
0.02775695,
0.020601079,
0.013871486,
-0.044137184,
0.012599642,
-0.0040321653,
-0.0011504249,
-0.03460534,
0.058756404,
0.022879217,
-0.0022292212,
-0.003125452,
0.0064535607,
0.0021890393,
-0.018602466,
-0.044891905,
-0.057051294,
0.024109133,
-0.025269166,
0.004479407,
0.024332754,
-0.008120235,
-0.05671586,
0.0040531293,
0.011900827,
0.046932444,
-0.0024213954,
0.035276204,
-0.015080437,
-0.023368388,
0.042851362,
0.013018931,
0.01783377,
-0.006554889,
-0.009867274,
-0.028302025,
0.0025576644,
-0.01714893,
0.010873568,
-0.002627546,
-0.011188035,
0.040866725,
0.028958911,
-0.026932348,
-0.113767155,
0.020796748,
-0.036450215,
-0.02775695,
0.018267035,
0.026862465,
0.0018396316,
-0.040838774,
-0.009566783,
0.011991673,
0.005419314,
-0.023228625,
-0.034884866,
0.018350894,
0.043382462,
-0.037736032,
0.01821113,
0.007428408,
0.011174059,
0.020433363,
-0.028455764,
-0.022334142,
0.035583682,
-0.010440303,
0.014549337,
-0.0045073596,
-0.07161461,
0.04550686,
0.0066352524,
0.041146252,
-0.014465479,
0.08715626,
0.047435593,
-0.012131436,
-0.029965205,
-0.00787565,
0.026974276,
-0.016519997,
0.010104871,
0.0029821948,
-0.0003395806,
-0.041900974,
-0.073459476,
-0.0071698464,
0.10241839,
-0.027533328,
-0.027868759,
0.038854137,
0.014605243,
-0.040419485,
-0.08044764,
-0.05263478,
0.0020021063,
-0.013375328,
-0.016128661,
0.035611633,
-0.06278158,
0.23032957,
0.04315884,
0.025772313,
-0.045590717,
-0.0014439274,
0.08665311,
-0.009447984,
0.031670317,
-0.030412449,
-0.03331952,
0.03214551,
-0.026820537,
0.002393443,
0.016911333,
-0.020433363,
0.043438368,
-0.034018334,
0.0047344747,
-0.047184017,
-0.053557213,
-0.051656436,
0.0011949744,
-0.011285869,
0.014199929,
0.012082519,
0.040866725,
-0.020950487,
-0.021285918,
-0.030244732,
-0.058029633,
0.04092263,
0.011215988,
0.042963173,
-0.010300539,
-0.030943548,
0.040950585,
-0.018602466,
-0.04656906,
0.0178757,
0.009874262,
-0.009343162,
0.0157513,
-0.015443821,
0.012480844,
-0.02547881,
0.037428554,
-0.05266273,
-0.013773653,
-0.03418605,
-0.029545916,
0.005066412,
0.003895896,
0.02605184,
-0.059203643,
-0.02124399,
-0.017470386,
-0.00016269297,
-0.055262323,
0.010209694,
-0.011872875,
0.035052583,
0.030999454,
-0.0050349655,
-0.00325648,
0.012215294,
0.009378104,
0.015220201,
0.06887525,
-0.03639431,
-0.035080533,
-0.032117557,
-0.015932992,
-0.033906527,
-0.029713633,
0.023773702,
-0.0030468353,
-0.03085969,
-0.008287951,
0.031167168,
-0.053473357,
-0.00950389,
0.022571739,
-0.025772313,
-0.06954611,
0.018378846,
0.032788422,
-0.015150319,
-0.0202936,
0.015234177,
0.0234802,
0.05146077,
0.035695493,
-0.05646429,
-0.0016832717,
-0.011705158
] | git add .
git commit
Fetch and rebase to current main
git fetch upstream
git rebase upstream/main
Push the changes to your account using:
git push -u origin a-descriptive-name-for-my-changes
Once you are satisfied, go to the webpage of your fork on GitHub. Click on “Pull request”. Make sure to add the
GitHub handle of some members of the Hugging Face team as reviewers, so that the Hugging Face team gets notified for
future changes. |
[
0.015078345,
-0.014177143,
-0.024534257,
-0.023659956,
0.0040083383,
-0.040782824,
0.023996226,
-0.015697083,
0.007505546,
0.073226154,
0.021763394,
0.04296185,
0.044495244,
-0.007176001,
-0.010794266,
0.031367265,
0.020337608,
-0.039599154,
-0.041186348,
0.02660568,
-0.039034218,
0.015454968,
-0.0454099,
-0.0437689,
-0.021238811,
0.054260522,
0.018145127,
0.006980965,
0.080328174,
0.024157636,
-0.014876584,
-0.01934225,
-0.028381186,
0.008648864,
-0.008810273,
-0.04613624,
0.012832062,
-0.007962873,
-0.03650547,
-0.026686385,
0.03384221,
-0.02691505,
-0.018992528,
-0.014002282,
-0.07290333,
0.01666554,
-0.031528674,
-0.0062445337,
0.0077207587,
-0.041455362,
-0.0045161056,
0.05264643,
0.008366397,
0.012388186,
0.004099131,
0.0013669374,
-0.000023552035,
-0.026968852,
-0.0370704,
0.034568552,
0.01802407,
0.010821168,
-0.013484426,
-0.018589005,
0.0034534927,
0.05087092,
0.0063655907,
-0.0052928897,
0.024359398,
-0.06429482,
-0.057461813,
-0.015522222,
0.0026750276,
0.015549123,
-0.0011416365,
0.017243924,
0.026430821,
-0.0036048142,
0.030936837,
0.032255016,
-0.0073441365,
0.028757809,
0.007081846,
0.0016056892,
-0.03736632,
-0.0060864864,
0.015562574,
-0.044818062,
0.010431095,
-0.04398411,
0.0106059555,
0.03298136,
-0.036424764,
-0.023444742,
0.030990642,
0.05251192,
-0.0023269881,
0.008198262,
0.0023522086,
-0.0044959295,
0.029914577,
0.047723435,
0.029188234,
0.007828365,
0.0073777633,
-0.021252263,
0.022247622,
-0.030264298,
0.028757809,
-0.02778935,
0.0018915186,
-0.035241093,
0.010088099,
-0.015266657,
0.020310707,
0.006799379,
0.026430821,
0.023942422,
-0.04414552,
-0.05740801,
0.041966494,
0.009112916,
-0.015845042,
0.0138005195,
-0.027870055,
-0.022261072,
-0.0015636554,
0.042370018,
0.0046640644,
0.0193288,
0.002358934,
-0.029564856,
-0.022274524,
0.007001141,
0.013134705,
0.035294898,
-0.028219776,
0.0036888816,
0.01482278,
-0.02894612,
-0.021938253,
0.00015489435,
0.040083382,
0.034407143,
0.0031575751,
0.018050972,
-0.007471919,
0.008938056,
-0.018104775,
-0.0009785456,
-0.0029490876,
0.0034047335,
0.025973493,
-0.010491624,
-0.045382995,
0.04750822,
-0.03720491,
0.016544484,
0.02087564,
0.030345002,
-0.041509166,
0.0488264,
-0.01565673,
0.019947534,
-0.010612681,
0.09286432,
-0.021776844,
-0.06650075,
-0.020122396,
-0.021158107,
0.0018578917,
-0.031555574,
-0.008016677,
-0.03518729,
0.022852907,
0.0075526237,
0.016194763,
0.021763394,
0.0049599824,
0.043472983,
-0.010767365,
0.04158987,
0.06768442,
0.07150445,
-0.032846853,
0.009879612,
0.006745576,
0.011924134,
-0.003315622,
-0.0044488516,
-0.022287974,
0.0589683,
-0.0009365119,
0.017391883,
-0.013935028,
-0.031528674,
-0.051785577,
0.020297255,
0.015871942,
-0.013854323,
-0.027332025,
-0.016773146,
-0.031905297,
0.06746921,
-0.040460005,
-0.035617717,
-0.0046741525,
0.018952176,
-0.04177818,
-0.043338474,
0.04191269,
0.0138005195,
-0.02726477,
-0.0068800836,
-0.056439552,
0.007492095,
-0.024870528,
0.009233974,
0.0071961777,
-0.00521891,
0.009879612,
0.013175057,
0.02945725,
0.017876113,
0.016867302,
0.015011092,
0.035294898,
0.017808858,
0.019759225,
-0.00985271,
-0.011930859,
0.0038166642,
0.012112444,
0.036586173,
0.026054198,
0.008877527,
0.025448913,
0.050897826,
0.00866904,
-0.037097305,
0.0420741,
0.006473197,
0.03333108,
-0.0016351128,
-0.018225832,
0.006123476,
-0.008695941,
-0.016046803,
0.017257376,
0.0521891,
-0.021010147,
0.0009188577,
0.01287914,
-0.024964683,
-0.02961866,
-0.004041965,
0.012919492,
0.055148277,
-0.014109888,
0.015051444,
0.011910683,
0.05167797,
0.010404193,
0.004388323,
0.03160938,
0.007270157,
-0.0042639035,
0.021924803,
0.020969795,
-0.047104698,
-0.0142712975,
-0.035940535,
-0.06547849,
-0.0006742213,
-0.03637096,
0.0404062,
0.005814108,
-0.029806972,
0.011910683,
-0.022476286,
-0.015011092,
-0.016584836,
-0.011648392,
0.018266184,
-0.018212382,
0.0003427852,
-0.02018965,
-0.027601039,
0.0046842406,
0.051973887,
0.012576497,
0.033062063,
0.02222072,
0.01043782,
0.038119566,
0.01697491,
-0.02556997,
-0.011339024,
-0.04530229,
-0.030533314,
-0.024453552,
0.0056190714,
0.026013846,
-0.02287981,
0.012939668,
0.0014350321,
-0.02830048,
-0.003258456,
0.056816176,
-0.021440573,
-0.0029490876,
0.022422481,
0.032766145,
-0.015522222,
-0.04059451,
0.00698769,
0.057838436,
0.024359398,
-0.018387243,
0.029995281,
-0.03602124,
-0.03820027,
0.044656653,
-0.01616786,
-0.005830921,
0.07123543,
0.022826007,
-0.0605824,
0.0244132,
-0.0007368516,
-0.05740801,
-0.03685519,
-0.026955402,
0.059613943,
0.013054,
0.008272242,
0.01682695,
0.014378904,
-0.021467475,
-0.0007238211,
0.049902465,
-0.029188234,
0.039141826,
0.002278229,
-0.026296312,
-0.0036418037,
0.008938056,
-0.027601039,
0.02508574,
0.0018797491,
0.0018612543,
0.014782428,
0.0021252262,
0.046028633,
0.030883035,
0.0040722294,
-0.020472117,
-0.005208822,
-0.008305868,
0.0070145917,
-0.0055282786,
0.04306946,
-0.004613624,
-0.038334776,
-0.021992056,
-0.025771732,
-0.032766145,
0.03163628,
0.08893669,
-0.03989507,
0.010558877,
-0.0053904075,
0.0027960849,
-0.012563046,
-0.012583222,
0.0027120174,
0.05248502,
0.005972155,
0.015723985,
-0.026067648,
-0.016221663,
-0.004872552,
-0.01296657,
0.032550935,
0.01498419,
0.048073158,
-0.03717801,
0.03989507,
-0.040083382,
-0.043499883,
0.0015888757,
-0.05458334,
0.03333108,
-0.030614018,
-0.04869189,
-0.040298592,
0.05568631,
-0.0052054594,
0.045060176,
0.0051348424,
0.087268785,
-0.008648864,
0.0014232626,
0.00095752877,
0.006735488,
-0.02372721,
-0.03986817,
0.037823647,
-0.011796351,
0.036774486,
0.010639582,
0.019772675,
0.018831119,
0.02945725,
-0.015562574,
-0.019422954,
-0.052216,
-0.005097853,
0.0015678587,
0.038819008,
-0.04444144,
-0.031905297,
-0.055955324,
0.021265713,
0.040460005,
-0.024130734,
0.033062063,
-0.062250298,
-0.01213262,
0.022530088,
-0.031178953,
-0.07457123,
0.027627941,
-0.080220565,
-0.048880205,
0.044522144,
0.053426575,
-0.023014316,
0.042343117,
-0.043042555,
0.041858885,
-0.013329742,
-0.018306538,
0.000047235422,
-0.01985338,
0.02053937,
-0.017566744,
0.00766023,
-0.0043513337,
0.025179897,
-0.0067590266,
0.010094825,
0.016652089,
0.01986683,
0.031582475,
-0.018763864,
0.02811217,
-0.014943838,
0.03954535,
0.025220249,
-0.012690829,
0.0065875286,
0.02795076,
-0.024951233,
-0.057838436,
0.013948479,
0.050709512,
0.017445687,
0.017701251,
0.023538899,
-0.0139215775,
0.025260601,
-0.010094825,
-0.021588532,
0.007707308,
-0.034729965,
0.014432708,
-0.020579722,
0.01194431,
0.0050137853,
-0.02897302,
0.015091796,
-0.017795406,
-0.01868316,
-0.042719737,
-0.043580588,
0.00089027476,
-0.0017166582,
-0.021117754,
0.04632455,
0.00057291996,
-0.00029949044,
-0.017095966,
-0.015401165,
0.0018831119,
0.02457461,
-0.040002678,
-0.0015485232,
-0.0004733,
-0.018602455,
-0.026040748,
-0.0109624015,
-0.031959098,
0.0026212244,
-0.020001339,
0.00022298902,
-0.046001732,
-0.04140156,
0.011977936,
-0.0018679798,
-0.019974437,
0.030425707,
-0.016046803,
-0.011466806,
0.04777724,
0.0014392355,
-0.0038973691,
-0.049579646,
-0.011392827,
0.05264643,
-0.08118902,
-0.024197988,
-0.040029578,
-0.018319989,
0.025704477,
0.04750822,
0.021655787,
-0.014257847,
-0.037931252,
-0.011897231,
0.015710533,
-0.069137104,
-0.03012979,
-0.05703139,
-0.0404331,
-0.041831985,
0.06757682,
0.019665068,
-0.047562025,
0.05622434,
-0.03887281,
0.024372848,
-0.015428066,
-0.01203174,
0.019517109,
0.035617717,
-0.005881362,
0.037124205,
0.0025539706,
-0.013719815,
-0.016692441,
-0.01330284,
0.041858885,
0.035483208,
-0.01815858,
-0.043042555,
0.02542201,
0.00959042,
0.008689216,
-0.009825809,
-0.034918275,
0.046566665,
-0.020768033,
0.043150164,
-0.033088967,
-0.022610793,
-0.02910753,
-0.012858964,
-0.014109888,
-0.008426925,
0.022664597,
0.010377292,
-0.005585444,
-0.0037359595,
0.017768506,
0.00883045,
0.029833872,
-0.041159444,
0.0022715037,
-0.00066791626,
-0.011850154,
0.015562574,
-0.0454368,
-0.008897703,
0.04438764,
-0.030452609,
0.026457721,
0.057300404,
0.034380242,
0.03938394,
-0.08441722,
0.050198384,
0.043849606,
0.014029183,
-0.012872415,
0.012199875,
0.0034803944,
-0.012670653,
0.00089027476,
0.0041293954,
-0.07467884,
0.027237868,
0.008151184,
-0.011090184,
0.037447024,
0.0070414934,
-0.05151656,
0.0034534927,
0.0074853697,
0.040648315,
0.019234642,
0.039626054,
0.020055141,
0.032766145,
0.022395581,
-0.04984866,
-0.003964623,
-0.0052256356,
0.07188107,
0.022409031,
0.007808189,
0.027157163,
0.040298592,
-0.07182727,
-0.045732718,
-0.10367876,
0.03906112,
0.016463779,
-0.008366397,
0.01802407,
0.0117896255,
-0.042289313,
0.023538899,
0.0066177933,
-0.035590813,
0.0012769853,
0.005867911,
-0.020297255,
0.008736294,
0.017526392,
0.02575828,
-0.00024232455,
-0.033869114,
-0.06886809,
0.004680878,
-0.025448913,
0.03128656,
0.080274366,
-0.02729167,
0.016450327,
0.07941352,
0.0049095415,
0.013524778,
0.008541257,
0.021090852,
-0.02087564,
-0.005097853,
-0.032120507,
0.018736962,
0.0387114,
-0.022583893,
0.020633526,
-0.052431215,
-0.009018761,
0.04258523,
0.015616378,
-0.0070885713,
-0.030694723,
0.029537955,
-0.028085269,
-0.0176609,
0.0036989697,
-0.03723181,
-0.011164163,
0.0056358846,
-0.014257847,
0.013592033,
-0.022826007,
-0.005020511,
-0.014419257,
-0.0030213858,
-0.02626941,
-0.0106059555,
0.0015174183,
-0.077799425,
-0.0605824,
0.005867911,
-0.016060254,
0.030883035,
-0.014836231,
0.0105118,
0.031743884,
-0.0030533313,
0.046862584,
0.007848541,
-0.00023160594,
-0.037554633,
-0.011776174,
0.003056694,
-0.023781013,
0.02222072,
-0.016019901,
-0.008803548,
0.066554554,
0.0054206722,
-0.0064664716,
-0.049606547,
0.027009204,
-0.030022183,
-0.014029183,
-0.026390469,
-0.026457721,
-0.019073233,
-0.034783766,
0.0113592,
-0.0009087696,
-0.04102494,
-0.009059113,
0.019651618,
-0.024197988,
0.04893401,
-0.008985134,
0.005104578,
0.002979352,
0.009805633,
0.04557131,
-0.030102888,
0.027547237,
0.020283805,
0.027762448,
-0.009240699,
0.024076931,
0.03967986,
-0.020055141,
-0.04054071,
-0.036424764,
0.01480933,
-0.028139072,
-0.0015846723,
-0.0064933733,
0.06526328,
-0.004001613,
-0.018306538,
-0.019745773,
-0.036801387,
0.020324158,
0.008016677,
-0.045221586,
-0.05014458,
0.01919429,
-0.020230003,
0.0021840734,
-0.004727956,
0.014540314,
-0.00875647,
-0.009193622,
-0.04124015,
-0.013356644,
-0.02491088,
0.050090775,
0.017217023,
-0.04562511,
-0.02710336,
0.039034218,
0.019153938,
0.01580469,
-0.039626054,
0.0050238734,
0.040271692,
-0.008837175,
-0.014567215,
-0.022516638,
-0.000977705,
-0.0034047335,
-0.0012626938,
0.023256432,
0.016221663,
-0.011722371,
0.01735153,
0.016571384,
0.011951035,
-0.06338017,
0.005171832,
-0.0050642258,
0.0032735881,
0.013457525,
0.035590813,
0.002128589,
-0.005904901,
0.0029339555,
-0.0052928897,
-0.000442195,
-0.03516039,
-0.009173445,
0.04293495,
0.08312594,
0.01815858,
0.023337137,
0.017042162,
-0.0053466926,
-0.028354285,
0.003920908,
0.001155928,
-0.042343117,
-0.025126092,
-0.032201212,
0.0083462205,
0.027022656,
-0.014594117,
-0.030990642,
-0.04188579,
0.010215882,
-0.022516638,
-0.015091796,
-0.03413813,
-0.025946591,
0.06763062,
-0.015185952,
0.031905297,
0.014217495,
-0.04766963,
0.010794266,
0.041159444,
0.025637222,
0.04559821,
0.02795076,
-0.021749942,
0.008642138,
0.07381798,
0.01903288,
0.021628885,
-0.011312122,
0.01580469,
-0.030721625,
-0.00032597172,
-0.043903407,
0.009166719,
0.008655589,
-0.036801387,
-0.006732125,
0.0063655907,
-0.004738044,
-0.038146466,
0.004156297,
-0.039491545,
0.04694329,
-0.010296587,
0.0053164284,
0.035563912,
-0.017257376,
-0.04748132,
0.0024530895,
0.022032408,
0.0044488516,
-0.02811217,
0.07371038,
0.0074651935,
-0.014459609,
0.06886809,
-0.022153467,
0.015064895,
-0.0073441365,
0.005376957,
-0.04177818,
0.031716984,
-0.042988755,
0.005074314,
0.013753442,
0.0054845633,
-0.0031071345,
0.020418312,
-0.04495257,
-0.060474794,
0.03615575,
-0.022678047,
-0.02426524,
-0.01618131,
0.027977662,
0.017270826,
-0.030345002,
-0.023323685,
0.028865416,
-0.0064933733,
-0.011937584,
-0.02913443,
0.017445687,
0.031770788,
-0.08135043,
-0.0072634313,
-0.0404062,
0.013531504,
0.038119566,
-0.04869189,
-0.033626996,
0.05084402,
-0.018319989,
0.033035163,
-0.017149769,
-0.044199325,
0.050198384,
0.035644617,
0.047400616,
0.027735548,
0.06816865,
0.037850548,
-0.024278693,
-0.0104848975,
-0.02207276,
0.0048994534,
-0.032012902,
-0.0006851501,
-0.017243924,
0.013787069,
-0.022113115,
-0.080435775,
-0.050521202,
0.09474743,
-0.04142846,
-0.004388323,
-0.015468419,
0.008204987,
-0.053130656,
-0.06499426,
-0.054072212,
0.02726477,
-0.029887676,
0.027345475,
0.057354208,
-0.0757549,
0.208864,
0.04527539,
-0.012004838,
0.002883515,
0.016423427,
0.06273453,
-0.024305593,
0.030936837,
-0.016423427,
-0.0019335523,
0.020821838,
-0.0052155475,
0.0020932807,
0.004701054,
-0.033411786,
0.025637222,
-0.041213248,
-0.013935028,
-0.019624716,
-0.054099113,
-0.049902465,
0.06160466,
-0.018938726,
0.06042099,
-0.0020546096,
0.0235658,
0.0007851904,
-0.008393299,
-0.015307009,
-0.012468891,
0.050386693,
0.027654843,
0.014217495,
-0.043688197,
-0.021642337,
-0.0049767955,
-0.018777316,
-0.013060726,
-0.007956148,
0.015764337,
0.005780481,
0.031259656,
0.0077880127,
-0.0020798298,
-0.027399277,
0.041643675,
-0.015737435,
0.036290254,
-0.04054071,
-0.030721625,
0.022826007,
0.017755054,
0.027977662,
-0.03128656,
-0.05267333,
-0.03214741,
-0.012475616,
-0.052915443,
0.036586173,
0.028488792,
-0.0043378826,
0.034945175,
0.018548653,
-0.019759225,
0.012932943,
0.012253678,
-0.016275467,
0.014836231,
-0.02442665,
-0.02087564,
-0.0073239603,
-0.035241093,
-0.037097305,
-0.048718795,
0.0026531701,
-0.002296724,
-0.05912971,
0.013020374,
0.024224889,
-0.080597185,
0.011298671,
0.010780815,
-0.008581609,
-0.011049831,
-0.009153269,
0.06144325,
-0.013908126,
0.014244396,
0.0437958,
0.022624245,
0.040675215,
0.037769843,
-0.016383072,
0.014849682,
-0.007525722
] | Change the PR into a draft by clicking on “Convert to draft” on the right of the GitHub pull request web page.
In the following, whenever you have made some progress, don't forget to commit your work and push it to your account so
that it shows in the pull request. Additionally, you should make sure to update your work with the current main from
time to time by doing: |
[
0.030026423,
0.0037755996,
0.014151067,
-0.057971805,
0.00934238,
0.013690265,
0.003920529,
0.013036224,
-0.02106309,
0.045009904,
0.030412901,
-0.037131686,
0.04896388,
-0.055058353,
0.016737502,
0.059815012,
-0.05580158,
-0.03157234,
-0.055682663,
0.0047975387,
0.005994136,
0.024229242,
-0.07830653,
-0.027499447,
-0.007833626,
0.022861702,
-0.018937457,
-0.013749723,
0.08627394,
0.04527747,
0.021033362,
-0.019264478,
0.01559293,
-0.04239374,
-0.029907506,
-0.031691253,
-0.029357517,
0.003935394,
-0.048131466,
-0.029045362,
0.01690101,
0.0075028897,
0.0069120233,
-0.007465728,
-0.014009853,
0.00070560235,
-0.011096398,
-0.0033017916,
0.02705351,
-0.058090724,
0.006090756,
0.0010748939,
0.0068934425,
-0.014916592,
-0.03296961,
-0.032939877,
-0.026444063,
0.004202956,
-0.047209863,
0.0045745703,
0.020691475,
0.019249612,
0.024021138,
-0.047031485,
-0.0013155141,
0.021731995,
0.018982051,
0.031750713,
-0.01709425,
-0.012753798,
-0.010085608,
0.021048225,
-0.028762935,
-0.035407394,
-0.0034634438,
0.023352234,
0.03024939,
0.018179365,
-0.009877504,
0.037101958,
-0.0075066057,
0.0036734059,
0.004392479,
0.008829552,
-0.042304553,
-0.03757762,
0.04542611,
-0.014723352,
-0.029060226,
0.007967407,
-0.0079005165,
0.02686027,
-0.026800813,
0.0044519375,
0.002573428,
0.01594968,
-0.032256108,
0.050717898,
0.02229685,
-0.014403764,
0.029149413,
0.11731116,
-0.0000010197615,
-0.009661968,
-0.025373815,
0.020617153,
0.029208872,
0.01832801,
-0.062193345,
0.008859281,
0.028049435,
0.02581975,
0.004017149,
0.020884715,
0.009587645,
0.027960248,
-0.014188228,
0.0029654808,
-0.06159876,
0.0047901063,
0.0005992278,
0.0133112185,
-0.009639671,
-0.058982596,
0.008740365,
-0.019591497,
-0.023515742,
0.040907286,
-0.025938667,
-0.019130696,
0.022906296,
-0.0058900844,
0.0033259466,
0.051253024,
0.008658609,
-0.018223958,
-0.036715478,
0.024823826,
0.014760514,
-0.029476434,
0.03030885,
0.035823602,
-0.018090177,
0.05645562,
-0.01777802,
0.035496585,
-0.0020141487,
-0.053690813,
-0.02845078,
-0.0014669468,
-0.053215146,
0.0032980756,
-0.00088444166,
0.047150403,
0.0022389751,
-0.01936853,
-0.0050539523,
0.014158499,
0.017703697,
-0.0005379115,
0.02155362,
0.034783084,
-0.05244219,
0.0332669,
-0.0033166562,
0.019784737,
-0.027261613,
-0.008435641,
-0.012850417,
-0.049409818,
-0.022623869,
-0.011854491,
0.008955901,
0.017317219,
0.06356088,
0.021821182,
0.054047562,
0.014931456,
0.014604436,
-0.0068637133,
-0.024377888,
-0.0023764726,
0.036804665,
0.049023338,
0.009959259,
-0.022698192,
-0.009074817,
-0.004656325,
-0.02686027,
0.009030224,
0.027484583,
0.0056894124,
-0.030085882,
0.032137193,
-0.035377666,
-0.012136918,
-0.0045597055,
0.015518607,
-0.02412519,
-0.040312704,
-0.0120328665,
0.025448136,
-0.058447473,
0.028762935,
-0.013036224,
0.025284626,
0.0019361097,
0.038291123,
-0.02040905,
-0.007380257,
0.011468013,
0.02757377,
-0.010479519,
0.009030224,
0.032999337,
-0.002547415,
-0.030888569,
-0.006804255,
0.017703697,
-0.011497742,
0.027633227,
0.00053140824,
0.025299491,
0.028539967,
0.008859281,
0.0063211564,
-0.026815677,
0.050480064,
0.034723625,
0.022519818,
0.010070743,
0.055593476,
-0.01947258,
0.07515524,
0.020795528,
-0.014567275,
0.022341443,
0.044355866,
0.025671106,
0.026221095,
0.01419566,
0.0103383055,
0.0071907337,
0.02689,
-0.015295639,
0.00735796,
-0.016529398,
0.022564411,
-0.0073691085,
0.010486951,
-0.04242347,
0.067901336,
0.021627944,
0.01077681,
-0.055652935,
0.0053289467,
-0.0023244466,
0.02754404,
0.010219389,
-0.013719995,
-0.020022571,
0.009178869,
-0.031066943,
0.0055036056,
0.024080597,
0.042869408,
-0.009550484,
0.030041287,
-0.0053512435,
-0.04688284,
-0.027618363,
-0.042691033,
-0.06885267,
-0.015384826,
-0.017733427,
-0.028733205,
0.029164279,
-0.007833626,
0.022876566,
-0.03323717,
0.01578617,
0.009453864,
0.00030100747,
0.038410038,
0.062014967,
-0.002361608,
-0.03968839,
-0.013073386,
-0.04658555,
0.0025659958,
-0.021033362,
0.00048542098,
0.01849152,
-0.012627449,
0.009186301,
0.009862639,
0.016142918,
-0.02565624,
-0.032285836,
0.026102178,
-0.038201936,
0.019576633,
0.020290133,
0.015578065,
-0.03249394,
0.030502088,
0.004392479,
-0.050063856,
0.038528956,
0.039985683,
-0.041055933,
0.06058797,
0.015265909,
-0.005849207,
-0.031245317,
0.0014762372,
0.041888345,
-0.005124559,
-0.04411803,
-0.052590836,
-0.04548557,
-0.020037435,
-0.0010739649,
-0.0045820023,
-0.022445494,
0.039182995,
-0.037488434,
-0.05922043,
0.008257266,
-0.06290685,
-0.049826026,
-0.04379101,
0.01172071,
0.013497026,
0.0007985059,
0.011178154,
-0.025091387,
0.0034039856,
-0.03249394,
-0.0068599973,
0.016529398,
0.00075530575,
0.0311264,
0.046199072,
0.009416702,
0.004280995,
0.026964322,
-0.037428975,
0.0016416055,
0.020780664,
0.035764147,
-0.0015737859,
0.017882073,
-0.006120485,
0.0033259466,
0.01966582,
-0.027781874,
0.031334504,
0.043493718,
-0.04272076,
-0.022460358,
0.014924024,
0.006376899,
-0.015020643,
-0.03894516,
-0.027321072,
-0.0084951,
0.051520586,
0.039242454,
-0.03665602,
0.0115051735,
0.016232107,
-0.035823602,
-0.03600198,
0.0186253,
0.0008988417,
0.0019249612,
0.07491741,
0.045455843,
-0.047209863,
-0.003023081,
0.024437346,
-0.0059495424,
0.06605813,
0.040312704,
0.0023820468,
-0.012463938,
-0.012530829,
-0.010263983,
0.0032609142,
-0.0029896358,
-0.0070755333,
-0.0107619455,
-0.017465865,
-0.008844417,
-0.036715478,
0.027008915,
0.055950224,
0.017763156,
0.049142256,
0.008168079,
-0.018298281,
-0.015340232,
0.038885705,
-0.016157784,
-0.0193388,
-0.04697203,
0.034396604,
0.008532261,
-0.031602066,
-0.039569475,
-0.00024340727,
-0.02604272,
0.012449074,
-0.026131907,
0.017406406,
-0.021538757,
0.016484804,
-0.00093693216,
0.050777357,
0.0032479076,
-0.026637303,
-0.039153267,
0.024511669,
0.052501645,
-0.08514424,
0.0087255,
-0.057288036,
0.050717898,
0.033475004,
-0.036418185,
-0.024987334,
-0.03033858,
-0.017064521,
-0.022742786,
0.018372603,
0.03487227,
-0.042274825,
0.006852565,
-0.03252367,
-0.01748073,
-0.005551915,
-0.024913013,
0.008472802,
0.02477923,
0.016648313,
-0.0026663316,
-0.012582855,
-0.009847775,
-0.010174795,
-0.002413634,
-0.039301913,
0.011170722,
-0.04762607,
0.023263045,
-0.01559293,
0.02497247,
-0.005176585,
0.043285616,
0.0012476945,
-0.0071349917,
-0.01149031,
-0.0019008063,
-0.02751431,
-0.009320083,
0.0193388,
0.011958543,
-0.0077370065,
0.05380973,
-0.005202598,
-0.0066333124,
0.00027615577,
0.028985903,
-0.033475004,
0.005250908,
-0.020364456,
0.02894131,
-0.019710414,
-0.014871998,
0.018536113,
-0.06457167,
0.036507376,
-0.029045362,
-0.044058573,
-0.003786748,
-0.0841929,
-0.03454525,
0.002573428,
-0.03927218,
0.03291015,
0.015503742,
-0.008970765,
0.011698414,
-0.030398037,
-0.009446432,
-0.016529398,
-0.07081479,
-0.01868476,
0.040580265,
-0.015845627,
0.0658203,
-0.036507376,
-0.056812372,
0.026191365,
0.0007195379,
0.049142256,
-0.016573992,
-0.0049276035,
-0.020810392,
-0.00015967795,
-0.008249834,
-0.01953204,
-0.04379101,
0.01797126,
-0.0070197913,
0.0044482215,
0.010769378,
-0.019056374,
-0.05137194,
0.025373815,
-0.009758588,
-0.07545254,
-0.032345295,
0.021018496,
-0.010033582,
0.031215588,
0.038231663,
-0.038796518,
-0.060023118,
0.009022792,
0.025537325,
-0.02940211,
0.002651467,
-0.06546355,
-0.022772515,
-0.022668462,
0.01797126,
-0.017867208,
-0.081219986,
0.0030546682,
-0.01523618,
-0.01097005,
-0.0658203,
-0.024541399,
-0.017688833,
0.003309224,
-0.024556262,
0.012768663,
0.016782096,
-0.025358949,
0.008814688,
0.0066853384,
0.033623647,
0.03285069,
-0.02946157,
0.0018264835,
0.00065775705,
-0.014901727,
0.011638955,
0.063858174,
-0.020869851,
0.06920942,
0.0020940457,
0.070636414,
-0.027231885,
-0.020884715,
0.0068228357,
-0.011363961,
0.04001541,
-0.017034793,
0.010107905,
0.017421272,
-0.019873925,
0.026310282,
-0.02223739,
-0.011475445,
0.00027801385,
-0.021538757,
-0.051461127,
0.026548116,
-0.019650957,
-0.026919728,
-0.028985903,
-0.0043664663,
0.029729132,
0.002969197,
0.0069157393,
0.07081479,
-0.01325176,
0.018015854,
-0.04649636,
0.02344142,
0.017822614,
-0.002337453,
0.03082911,
-0.0091714375,
-0.028896715,
0.0037681675,
0.008740365,
-0.056128602,
-0.04141268,
0.02743999,
0.008316725,
-0.0045262603,
0.013497026,
-0.027112968,
-0.027811604,
-0.027915655,
0.013222031,
0.01832801,
-0.020602288,
-0.0062654144,
0.035407394,
0.02393195,
0.054255664,
-0.001496676,
-0.019546904,
0.040669452,
0.037518166,
0.035496585,
-0.025284626,
0.007383973,
0.016573992,
-0.04988548,
-0.025760293,
-0.011237612,
-0.03365338,
-0.030026423,
-0.022713056,
-0.0069268877,
0.026176501,
-0.06284738,
0.042928867,
0.024987334,
-0.01285785,
-0.017659103,
-0.020334726,
-0.0012467655,
-0.04866659,
0.037131686,
0.021538757,
-0.038766786,
-0.014299712,
-0.040104598,
-0.0050279396,
-0.025938667,
-0.031602066,
0.047447693,
0.016529398,
0.044058573,
0.015251044,
0.013660536,
0.04203699,
-0.035407394,
-0.006287711,
0.010724784,
-0.025864344,
-0.040461347,
-0.04310724,
0.01969555,
-0.0021144846,
0.020661747,
-0.017376678,
0.017555052,
-0.002283569,
0.07099317,
-0.0017122122,
-0.045307197,
0.013913234,
-0.03811275,
-0.02207388,
0.0013944821,
0.0037142835,
-0.005098546,
0.020423913,
0.021167142,
-0.024036003,
0.014745649,
-0.03296961,
0.008294428,
-0.0045782863,
-0.051282752,
0.011936246,
-0.07604712,
-0.053898916,
-0.026637303,
-0.03195882,
0.0004575499,
0.020676611,
0.016559126,
0.015548336,
-0.031750713,
0.02998183,
-0.0072836373,
0.014448358,
0.0025622796,
0.023708982,
-0.009550484,
-0.022579275,
-0.058833953,
0.015184154,
0.03793437,
-0.022192797,
0.0054367147,
0.0010553842,
0.00032702045,
-0.015384826,
-0.024407618,
0.0076552513,
-0.009327515,
-0.035050645,
0.010791675,
0.014492951,
-0.062074427,
0.002681196,
-0.02448194,
-0.03481281,
0.021107683,
0.06124201,
0.02858456,
0.04994494,
0.0047715255,
0.03698304,
0.005039088,
0.013006495,
0.04251266,
0.021434704,
0.0051914495,
0.025923803,
-0.007870788,
0.00014609081,
0.023619795,
0.03356419,
-0.04170997,
0.05580158,
0.0074731605,
0.012486235,
0.0021999558,
0.00023760079,
0.007833626,
0.031661525,
0.006518112,
-0.017688833,
-0.0067039193,
-0.022772515,
0.010724784,
-0.030293984,
-0.05865558,
-0.049082797,
0.038201936,
-0.080328114,
0.031750713,
-0.032999337,
-0.033029065,
-0.026652167,
0.036180355,
-0.017465865,
0.0019918517,
0.02754404,
-0.0067336485,
0.0041063363,
0.004195524,
-0.03493173,
0.025121117,
0.007220463,
-0.023322504,
-0.02894131,
0.0051022624,
0.07551199,
0.032345295,
-0.021702265,
-0.038766786,
-0.032048006,
-0.010925456,
0.061539304,
-0.04114512,
0.011029508,
-0.039926223,
-0.0020568843,
-0.019799601,
-0.014990915,
-0.0073914053,
0.045753133,
0.029045362,
0.0055630635,
0.025061658,
0.016217241,
-0.015295639,
-0.014217957,
0.0169902,
0.009870072,
0.02295089,
-0.035020918,
0.03142369,
0.006432641,
0.063858174,
0.035466854,
0.038855974,
0.011958543,
0.0024043436,
0.033326358,
-0.03799383,
-0.041739702,
0.056306977,
0.037458707,
0.021969829,
0.044653155,
-0.018610436,
-0.015199019,
-0.0031847332,
0.012018002,
0.0075103217,
0.03736952,
0.01676723,
-0.010806539,
-0.033445273,
0.009126844,
-0.009007927,
-0.06237172,
0.011349096,
0.03030885,
0.045247737,
0.028911581,
-0.02549273,
-0.007982272,
0.027811604,
0.06457167,
-0.0017530897,
0.010308577,
-0.0068785776,
-0.0016759798,
-0.008264699,
0.045663945,
0.0034355728,
-0.0009959259,
0.0101227695,
-0.040669452,
-0.047120675,
0.032612856,
0.009357244,
-0.018580707,
0.010078176,
-0.03033858,
0.026340012,
-0.039212726,
-0.012954469,
-0.039212726,
0.009104546,
0.02243063,
-0.031275045,
-0.03365338,
0.04560449,
0.0025121116,
0.031869628,
0.01578617,
0.04896388,
0.025314355,
0.06504734,
0.021613078,
-0.0031197008,
0.00058947294,
-0.0032702044,
-0.008175511,
0.0067708096,
-0.01334838,
-0.03082911,
0.014626733,
-0.040996473,
-0.0733715,
0.021568485,
0.006220821,
-0.0056596836,
-0.044712614,
0.02415492,
-0.0028335578,
-0.04554503,
-0.021717131,
0.10024663,
0.024600856,
-0.016722636,
-0.016217241,
0.0057154256,
-0.051936794,
0.0009034869,
-0.060379867,
0.060439326,
-0.033296626,
-0.021092819,
-0.03665602,
-0.0325534,
0.038528956,
0.021642808,
-0.015474013,
-0.011802466,
0.018937457,
0.029996693,
0.040788367,
0.012768663,
-0.01865503,
-0.017168574,
0.03522902,
0.03555604,
0.023337368,
0.051580045,
0.03118586,
-0.012478803,
0.026102178,
0.011311934,
0.020959038,
0.011668684,
0.0051914495,
-0.0445937,
-0.0029246034,
0.009334947,
-0.051966522,
0.007729574,
0.024244107,
-0.042007264,
-0.0099072335,
-0.02604272,
0.0039465423,
-0.07331204,
-0.015741576,
-0.03222638,
0.0015096825,
-0.033445273,
-0.020067165,
-0.0030621006,
-0.037428975,
0.26423252,
0.024526533,
0.051817875,
0.03424796,
0.06415547,
0.03873706,
0.056723185,
-0.0042215367,
0.0049759136,
-0.05300704,
-0.00603873,
-0.031275045,
-0.023619795,
0.03044263,
-0.012263266,
0.028777799,
-0.06159876,
0.01969555,
0.016811823,
-0.029580487,
-0.06950671,
0.0032776368,
0.030561548,
0.074085,
0.0019844195,
0.0023690402,
-0.045366656,
-0.07848491,
0.030591277,
-0.022609005,
0.011155857,
-0.024036003,
0.036180355,
-0.013340948,
0.010152498,
0.018149635,
-0.0116092255,
-0.0040134327,
-0.035020918,
-0.023292774,
0.014968618,
-0.03799383,
0.031691253,
0.014403764,
-0.01172071,
0.0019974262,
0.0033147982,
0.043285616,
0.035169564,
-0.035704687,
0.07259854,
-0.05716912,
0.03936137,
-0.012129486,
-0.03936137,
0.033415545,
-0.047388237,
-0.016975334,
-0.007848491,
0.019755008,
-0.0032999336,
-0.0011009069,
-0.012813256,
0.036031708,
0.015488878,
0.005325231,
0.00069445395,
0.019309072,
-0.00924576,
-0.011468013,
0.018773947,
0.006536693,
-0.013192303,
-0.023902223,
0.00846537,
0.032761503,
-0.0034058436,
0.035704687,
0.02855483,
-0.03665602,
0.004046878,
0.01181733,
0.03942083,
-0.060528513,
0.030085882,
-0.0066667576,
-0.040491078,
-0.005537051,
-0.018610436,
-0.013363245,
0.021033362,
0.024467075,
0.019026645,
0.0014009853,
0.019725278
] |
The above command will create a model according to the default parameters as defined in BrandNewBertConfig() with
random weights, thus making sure that the init() methods of all components works.
Note that all random initialization should happen in the _init_weights method of your BrandnewBertPreTrainedModel
class. It should initialize all leaf modules depending on the variables of the config. Here is an example with the
BERT _init_weights method:
py
def _init_weights(self, module):
"""Initialize the weights"""
if isinstance(module, nn.Linear):
module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
if module.bias is not None:
module.bias.data.zero_()
elif isinstance(module, nn.Embedding):
module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
if module.padding_idx is not None:
module.weight.data[module.padding_idx].zero_()
elif isinstance(module, nn.LayerNorm):
module.bias.data.zero_()
module.weight.data.fill_(1.0)
You can have some more custom schemes if you need a special initialization for some modules. For instance, in
Wav2Vec2ForPreTraining, the last two linear layers need to have the initialization of the regular PyTorch nn.Linear
but all the other ones should use an initialization as above. This is coded like this:
py
def _init_weights(self, module):
"""Initialize the weights"""
if isinstance(module, Wav2Vec2ForPreTraining):
module.project_hid.reset_parameters()
module.project_q.reset_parameters()
module.project_hid._is_hf_initialized = True
module.project_q._is_hf_initialized = True
elif isinstance(module, nn.Linear):
module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
if module.bias is not None:
module.bias.data.zero_()
The _is_hf_initialized flag is internally used to make sure we only initialize a submodule once. By setting it to
True for module.project_q and module.project_hid, we make sure the custom initialization we did is not overridden later on,
the _init_weights function won't be applied to them.
6. Write a conversion script
Next, you should write a conversion script that lets you convert the checkpoint you used to debug brand_new_bert in
the original repository to a checkpoint compatible with your just created 🤗 Transformers implementation of
brand_new_bert. It is not advised to write the conversion script from scratch, but rather to look through already
existing conversion scripts in 🤗 Transformers for one that has been used to convert a similar model that was written in
the same framework as brand_new_bert. Usually, it is enough to copy an already existing conversion script and
slightly adapt it for your use case. Don't hesitate to ask the Hugging Face team to point you to a similar already
existing conversion script for your model. |
[
0.030632146,
-0.00068478304,
-0.05071527,
-0.023450814,
0.0009428381,
-0.026926149,
0.04231911,
0.015854288,
-0.0103491135,
0.034784093,
-0.032938786,
-0.007592682,
0.022097588,
-0.0281256,
0.009026642,
-0.014216576,
0.00184531,
-0.061633356,
-0.047855042,
0.0077541466,
-0.020698227,
0.021297954,
-0.06575455,
-0.020252278,
-0.01101035,
0.030416861,
-0.0013186279,
-0.035737503,
0.089682065,
0.04321101,
-0.02907901,
0.025111593,
-0.033123314,
-0.012571175,
0.018868295,
-0.033123314,
-0.012678818,
-0.0013330443,
-0.044687256,
-0.05797349,
-0.0055013304,
-0.021420974,
0.037767347,
-0.055420812,
-0.07350485,
0.025173105,
-0.02042143,
-0.017515067,
0.021467106,
-0.047485977,
0.012932547,
0.042226844,
-0.010149205,
0.043949135,
-0.019852461,
-0.01928349,
-0.01717676,
-0.010579778,
-0.0547442,
0.004274968,
0.030078553,
0.027725784,
-0.023650724,
-0.04576369,
0.003679087,
0.026756996,
-0.024142805,
-0.010110761,
-0.0059818802,
-0.012163669,
-0.033799928,
0.031862352,
0.0055205524,
-0.045333117,
-0.017222894,
-0.016500147,
0.02755663,
0.0035310776,
-0.00043874167,
0.06018786,
-0.011663897,
0.030063177,
0.004351856,
0.025465278,
-0.013478452,
-0.02660322,
0.0785487,
-0.0027814205,
-0.0353992,
-0.030632146,
-0.00986472,
0.030293839,
-0.01705374,
0.045702178,
0.037521303,
0.043303274,
-0.008227007,
0.029509583,
0.00061222,
0.0022047611,
0.03256972,
0.06803043,
-0.02125182,
0.022097588,
-0.004805495,
-0.0028544639,
0.025249992,
-0.0019539143,
0.009880098,
-0.014047422,
-0.0023316261,
-0.0025661343,
0.0061625666,
-0.017561201,
-0.029586472,
0.03838245,
0.024465736,
0.03432277,
-0.051976234,
-0.028433152,
0.01024147,
-0.0035349221,
0.008734467,
-0.025680564,
0.012871037,
0.020790493,
0.030524503,
0.033707663,
-0.009534102,
-0.017084496,
-0.01304788,
-0.006166411,
0.023312416,
0.05791198,
0.0010802753,
-0.024327338,
-0.0063048094,
-0.028202489,
0.033553887,
-0.029801756,
-0.01749969,
-0.0033234803,
0.027864182,
0.05428287,
0.016269483,
0.032354437,
-0.011348656,
-0.05077678,
0.013693738,
-0.007688792,
-0.022497404,
0.015369895,
-0.0033292468,
0.015623625,
-0.045794442,
0.008634513,
-0.03635261,
-0.028279377,
0.0151469195,
0.009687877,
0.01946802,
0.033123314,
-0.04379536,
0.05499024,
-0.028971368,
0.045517646,
-0.0053975317,
-0.010710487,
-0.009257305,
-0.028879102,
0.005001559,
-0.0050169365,
-0.023835255,
0.039335858,
0.019068204,
0.019006694,
0.033830684,
0.000103678554,
-0.015639003,
0.011364034,
0.020452186,
-0.004605586,
0.0159158,
0.041919295,
-0.034599565,
0.0069276015,
0.029586472,
0.0069891117,
-0.023758367,
0.0011379411,
-0.0017222894,
0.05708159,
-0.048593163,
0.010133828,
-0.025634432,
-0.008542248,
-0.020513697,
-0.0002551718,
0.0140628,
-0.03226217,
-0.045087077,
0.08820582,
-0.0075311717,
0.034045972,
-0.0018001384,
-0.03137027,
-0.016792322,
-0.016469393,
-0.036383364,
0.0038078742,
0.06612361,
0.00081260916,
-0.058588594,
-0.014870123,
0.015331451,
-0.02743361,
-0.013201656,
0.032108396,
-0.0039751055,
0.0015915799,
-0.0065892944,
0.025757452,
0.038351692,
0.020467564,
0.005078447,
-0.0037944186,
0.02035992,
0.018637631,
-0.005805038,
-0.004536387,
0.022574292,
0.0077925907,
0.018314702,
0.032477457,
0.02157475,
0.000042768905,
0.042042315,
0.031524047,
0.029432695,
-0.007611904,
0.030908942,
-0.026249535,
0.032538965,
0.007346641,
0.0220207,
-0.0088498,
0.009341882,
-0.019098958,
0.0045786756,
0.006097212,
-0.045917466,
0.05511326,
0.04441046,
0.019960104,
-0.03672167,
-0.004517165,
0.0130017465,
0.05326795,
-0.018945184,
-0.022282118,
0.007919456,
0.005516708,
0.019129714,
-0.007854101,
0.02832551,
0.025880473,
-0.025526788,
0.034599565,
-0.02412743,
-0.08020948,
0.006554695,
-0.023343172,
-0.06218695,
0.0076772585,
-0.046655588,
0.007807968,
-0.01889905,
-0.0342305,
-0.010856574,
-0.022943355,
0.0061894776,
0.013440008,
-0.02005237,
0.04118117,
0.023496948,
0.015838912,
-0.040658332,
0.009741699,
-0.04010474,
0.019129714,
0.0024431136,
0.016684677,
-0.007058311,
-0.018791407,
0.020313788,
0.036998466,
-0.03340011,
-0.006262521,
-0.04379536,
-0.0058011934,
-0.04130419,
-0.03730602,
0.017284404,
-0.005224534,
-0.026818506,
0.020544453,
-0.022159098,
-0.01507772,
0.042688172,
0.047055405,
-0.023696857,
0.021713149,
-0.0076772585,
-0.014785547,
-0.0273721,
0.04945431,
0.05154566,
0.061817884,
-0.0264802,
-0.027049169,
-0.048008814,
-0.0062202327,
0.012678818,
-0.03226217,
-0.012924859,
0.060126353,
-0.004497943,
-0.04951582,
-0.009941608,
-0.030524503,
-0.060126353,
-0.038966797,
-0.0017242116,
0.05320644,
0.042534396,
0.013409253,
-0.004071215,
0.024665644,
0.010687421,
0.016761566,
0.035368443,
-0.006612361,
0.050899804,
0.006166411,
0.0005170712,
0.011725407,
0.028602306,
-0.07042933,
-0.013563029,
-0.012924859,
0.01800715,
0.008619135,
0.002767965,
-0.0029178965,
-0.009918542,
0.048900716,
-0.032354437,
-0.0049631153,
0.0021509395,
-0.0015886966,
0.011356345,
0.036106568,
0.011179503,
0.011610076,
-0.06031088,
0.0025065462,
-0.008096298,
-0.015223808,
0.05486722,
-0.029571094,
0.019345,
-0.013855203,
-0.018053284,
-0.014016667,
-0.025157727,
-0.047362957,
0.0264802,
0.045210097,
0.02348157,
-0.021451728,
0.0043249456,
-0.0040750597,
-0.018945184,
0.0458252,
0.041211925,
-0.0071505764,
-0.05142264,
-0.004071215,
-0.0047324514,
0.0057204613,
0.011656208,
-0.028264,
0.0028890634,
-0.026772372,
-0.012240557,
-0.046440303,
0.039305102,
0.03976643,
0.07092141,
0.017776487,
0.045917466,
-0.026680108,
-0.01247122,
0.03055526,
0.0028198643,
0.010810441,
-0.04828561,
0.018822161,
0.025357636,
0.015677446,
0.0013734105,
0.015308385,
0.0056781727,
0.02532688,
-0.01565438,
-0.017607333,
-0.050807536,
-0.028094845,
0.021805413,
0.017653465,
-0.05904992,
-0.02832551,
-0.021851547,
0.012294378,
0.043057233,
-0.05262209,
0.023958275,
-0.050069414,
-0.021820791,
0.028463908,
0.014816302,
-0.03785961,
0.0024065918,
-0.00065066403,
-0.06446283,
0.04167325,
0.058834635,
0.00935726,
0.0034522675,
-0.06403226,
0.0119637605,
0.041857783,
-0.011471678,
0.007096755,
0.012386643,
-0.00038083547,
-0.006289432,
0.040658332,
0.032538965,
-0.010856574,
0.00376943,
-0.0054244427,
-0.010848885,
-0.026080381,
-0.011979138,
-0.007927144,
0.017791864,
-0.002998629,
0.053144928,
0.041273434,
-0.021036534,
0.016254107,
0.019068204,
-0.023758367,
-0.04588671,
0.005943436,
0.057173856,
0.0044133663,
0.047885794,
0.02761814,
-0.038597737,
0.026188025,
0.011248702,
-0.0008078037,
0.009903164,
-0.027864182,
0.03213915,
0.020067746,
0.009080463,
0.018745275,
-0.04708616,
0.033769175,
-0.003805952,
-0.007204398,
-0.025665186,
-0.052468315,
-0.01266344,
0.013878269,
0.015838912,
0.038720757,
0.020867381,
0.008865177,
0.009157351,
-0.01723827,
-0.019191224,
-0.027756538,
-0.028909856,
0.033769175,
0.045333117,
0.012332822,
0.03709073,
-0.015454471,
-0.019498777,
0.0020471408,
-0.0073427963,
0.029232787,
-0.045579158,
-0.024558,
0.014831679,
-0.011233325,
-0.0035349221,
0.0072005535,
0.0023662257,
-0.016607791,
0.014939322,
-0.0026622443,
0.010226093,
-0.016023442,
-0.045671422,
0.04662483,
-0.033553887,
-0.06839949,
-0.0135476515,
-0.0028217866,
0.017269026,
0.04339554,
0.018160926,
-0.032723498,
-0.020898135,
-0.065939076,
0.028433152,
-0.04447197,
-0.0124865975,
-0.051145844,
0.0016588569,
0.007135199,
0.05326795,
0.024050541,
-0.042103823,
0.008311584,
-0.017668843,
0.014685593,
-0.055144016,
-0.010771997,
-0.0019500698,
-0.014170444,
-0.02169777,
0.019821705,
0.019252734,
-0.0036963867,
-0.021420974,
-0.012294378,
0.016899964,
0.035368443,
-0.0012648063,
0.0021797726,
0.025511412,
-0.0029102077,
0.0010648976,
0.040197004,
-0.011356345,
0.07750302,
0.0020894292,
0.045917466,
-0.026065005,
-0.046286527,
-0.059665024,
0.008965131,
0.03256972,
-0.010249159,
0.014439551,
-0.015808156,
0.00846536,
0.00572815,
0.018222436,
-0.006700782,
0.016300239,
-0.044779524,
-0.056281958,
0.015177675,
-0.02246665,
-0.044902544,
0.00095004635,
0.0082039405,
0.06704626,
-0.017069118,
0.022497404,
0.05582063,
-0.012171358,
0.023896765,
-0.07947135,
0.0598188,
0.013178589,
0.017099872,
-0.013786004,
0.013716805,
-0.008050165,
-0.0031197274,
-0.025419146,
-0.034845605,
-0.014393418,
0.023866009,
0.04684012,
-0.021082668,
0.035214666,
0.0052476004,
-0.04588671,
-0.062463745,
0.029863268,
0.028786836,
0.008050165,
0.020559829,
0.012548109,
0.01266344,
0.0006006869,
0.03506089,
-0.01865301,
-0.054682687,
0.08482275,
-0.00054205983,
-0.050499983,
0.0046017417,
0.038044143,
-0.04302648,
-0.06197166,
-0.026680108,
0.0054551978,
-0.03607581,
0.009880098,
-0.009472592,
0.012694195,
-0.03061677,
0.07338183,
0.03499938,
-0.019083582,
-0.018345457,
0.006350942,
-0.021144178,
0.012394332,
0.003971261,
0.056528,
-0.03862849,
0.0007789707,
-0.028233243,
0.031339515,
-0.06747684,
-0.013370809,
0.08660655,
-0.014008978,
0.011979138,
0.03232368,
0.022789579,
0.05560534,
-0.022482026,
0.005320644,
0.008111675,
-0.029155899,
-0.031985372,
-0.026311046,
0.00088373054,
-0.00627021,
0.0135476515,
-0.033830684,
-0.0273721,
0.014785547,
0.01674619,
-0.019544909,
-0.05154566,
0.0060433904,
-0.027141435,
-0.027418232,
0.009341882,
-0.009726321,
-0.0019721752,
0.023250906,
0.012640374,
-0.06716929,
0.00050121313,
0.033922948,
-0.009157351,
-0.053852297,
-0.058250286,
-0.012117536,
-0.043487806,
-0.044564236,
-0.005670484,
-0.032415945,
-0.0046017417,
0.026818506,
0.030278463,
-0.00091448566,
-0.056866303,
0.03487636,
0.0030524503,
0.009195795,
-0.011825362,
0.005758905,
-0.0040635266,
-0.0035349221,
-0.031862352,
-0.006028013,
-0.0042980346,
0.023066375,
0.003940506,
0.03232368,
-0.010702798,
0.0052822,
0.012786461,
0.0020625184,
-0.0071428875,
-0.02094427,
0.010395247,
0.014439551,
-0.047947306,
-0.015062343,
-0.006208699,
-0.02443498,
-0.032508213,
0.043826114,
-0.008580692,
0.019913971,
0.018852917,
0.012563486,
-0.011102615,
0.03518391,
0.028602306,
0.016361749,
0.019329622,
-0.016500147,
0.031585556,
-0.0011129526,
0.010964217,
0.05499024,
-0.043487806,
0.021482484,
0.013086324,
0.024342716,
-0.0018212826,
0.017976396,
-0.0049131378,
0.06987574,
0.044441216,
-0.020805871,
-0.0033388578,
-0.0041903914,
-0.008534559,
0.0026776218,
-0.059265207,
-0.036229588,
0.04155023,
-0.038136408,
0.029986288,
-0.039797187,
0.02094427,
0.013478452,
0.011656208,
-0.007919456,
0.012947925,
-0.009464903,
0.010149205,
0.042688172,
-0.030524503,
-0.03792112,
-0.035675995,
0.00067613315,
0.0057704384,
-0.046101995,
0.003903984,
0.030893566,
0.01800715,
-0.010033873,
-0.013140145,
0.024096673,
-0.030601392,
0.020728983,
-0.041242678,
0.05065376,
-0.04659408,
0.006108745,
-0.0455484,
-0.0061241225,
-0.04142721,
0.047270693,
0.0043095676,
0.019114336,
0.02538839,
0.041334946,
-0.035245422,
0.009557168,
0.018699141,
0.024035163,
0.04745522,
-0.02526537,
0.0018875984,
-0.014654838,
0.059326716,
0.01928349,
0.0041288813,
-0.010341425,
0.017407425,
-0.0012580786,
-0.03207764,
-0.048931472,
0.019837083,
0.02258967,
0.01693072,
-0.0019414199,
0.0030466837,
0.03672167,
-0.011694652,
0.008949754,
0.02068285,
-0.01865301,
-0.01597731,
-0.028556174,
-0.06452434,
0.009349571,
0.00044090414,
-0.04708616,
0.0030140064,
-0.006785359,
0.05059225,
0.02271269,
-0.010449068,
0.0062740543,
0.019898593,
0.019560287,
0.031554803,
0.031016586,
-0.010895018,
0.013816759,
-0.01813017,
0.01723827,
0.017576579,
-0.018560743,
-0.012609619,
0.01164852,
-0.02169777,
0.030370727,
-0.009634056,
0.0017415114,
0.024696399,
-0.01916047,
-0.02952496,
-0.06458585,
-0.01400129,
-0.054836463,
-0.006001102,
-0.014132,
-0.023158642,
-0.06433981,
0.027971825,
0.0029159742,
0.05988031,
0.005409065,
0.036291096,
-0.005735839,
0.010064629,
0.05083829,
0.00922655,
0.013086324,
-0.0045978976,
-0.020206144,
-0.012525042,
0.03487636,
-0.017253648,
-0.0076465034,
-0.044779524,
-0.07252068,
0.01330161,
0.023081753,
-0.0604339,
-0.07928682,
0.021882301,
-0.010379869,
-0.041027393,
0.014923945,
0.04988488,
-0.00979552,
-0.048316367,
0.012394332,
0.009149662,
-0.0039866385,
-0.033338603,
-0.03456881,
0.0026391777,
-0.006650805,
-0.052037742,
-0.018545365,
-0.059418984,
0.037213754,
0.022574292,
-0.035675995,
0.0008251035,
0.020021614,
0.019575665,
0.04271893,
0.015423716,
-0.05797349,
0.026264913,
-0.0033330913,
0.07682641,
0.017837998,
0.096632734,
0.05394456,
-0.010049251,
-0.033769175,
-0.008050165,
0.021590127,
0.0042173024,
-0.0009380326,
-0.002650711,
-0.0042096134,
-0.024988573,
-0.044318195,
-0.0037463638,
0.03552222,
-0.0038424737,
-0.035737503,
-0.044625748,
-0.018745275,
-0.066431165,
-0.048531655,
-0.04920827,
-0.0020432964,
-0.0125173535,
-0.006108745,
0.019237356,
-0.06360169,
0.28343964,
0.05339097,
0.035675995,
0.02100578,
0.01171003,
0.028033335,
0.021559373,
0.009234239,
0.02532688,
-0.043057233,
-0.013117079,
-0.026080381,
0.020390676,
0.024773287,
-0.024112051,
0.042657416,
-0.07928682,
0.028725326,
-0.05308342,
-0.024804043,
-0.04908525,
0.011187192,
0.0033734574,
0.047362957,
0.028310131,
0.022112966,
-0.03138565,
-0.038843777,
0.0003500803,
-0.07891776,
0.04250364,
0.0033465466,
0.03755206,
-0.016500147,
-0.006662338,
0.024404226,
-0.0109257735,
-0.04271893,
0.010933462,
0.0071890205,
0.0019077815,
-0.01374756,
0.0008894971,
-0.00122444,
0.030539881,
0.018760651,
-0.051084332,
0.010472135,
-0.0051015136,
-0.05040772,
0.026003493,
-0.039305102,
0.036629405,
-0.029048255,
-0.021651637,
0.0017559278,
-0.025726696,
-0.060218617,
-0.0051015136,
0.0037213753,
0.009511036,
0.0069698896,
-0.017361293,
0.016946098,
-0.028879102,
-0.0017549667,
-0.0072620637,
0.039920207,
-0.016330995,
-0.0057896604,
-0.023189396,
0.019360378,
-0.010026185,
-0.034415033,
0.016592413,
0.010110761,
-0.00941877,
0.021620883,
0.023681479,
-0.040904373,
0.014777858,
0.0082577625,
-0.017146006,
-0.042165335,
0.01507772,
0.03589128,
-0.041919295,
-0.0082500735,
0.0035387664,
0.030078553,
0.026818506,
0.03130876,
-0.031677824,
0.017961018,
-0.033892196
] |
git fetch upstream
git merge upstream/main
In general, all questions you might have regarding the model or your implementation should be asked in your PR and
discussed/solved in the PR. This way, the Hugging Face team will always be notified when you are committing new code or
if you have a question. It is often very helpful to point the Hugging Face team to your added code so that the Hugging
Face team can efficiently understand your problem or question.
To do so, you can go to the “Files changed” tab where you see all of your changes, go to a line regarding which you
want to ask a question, and click on the “+” symbol to add a comment. Whenever a question or problem has been solved,
you can click on the “Resolve” button of the created comment.
In the same way, the Hugging Face team will open comments when reviewing your code. We recommend asking most questions
on GitHub on your PR. For some very general questions that are not very useful for the public, feel free to ping the
Hugging Face team by Slack or email.
5. Adapt the generated models code for brand_new_bert
At first, we will focus only on the model itself and not care about the tokenizer. All the relevant code should be
found in the generated files src/transformers/models/brand_new_bert/modeling_brand_new_bert.py and
src/transformers/models/brand_new_bert/configuration_brand_new_bert.py.
Now you can finally start coding :). The generated code in
src/transformers/models/brand_new_bert/modeling_brand_new_bert.py will either have the same architecture as BERT if
it's an encoder-only model or BART if it's an encoder-decoder model. At this point, you should remind yourself what
you've learned in the beginning about the theoretical aspects of the model: How is the model different from BERT or
BART?". Implement those changes which often means changing the self-attention layer, the order of the normalization
layer, etc… Again, it is often useful to look at the similar architecture of already existing models in Transformers to
get a better feeling of how your model should be implemented.
Note that at this point, you don't have to be very sure that your code is fully correct or clean. Rather, it is
advised to add a first unclean, copy-pasted version of the original code to
src/transformers/models/brand_new_bert/modeling_brand_new_bert.py until you feel like all the necessary code is
added. From our experience, it is much more efficient to quickly add a first version of the required code and
improve/correct the code iteratively with the conversion script as described in the next section. The only thing that
has to work at this point is that you can instantiate the 🤗 Transformers implementation of brand_new_bert, i.e. the
following command should work:
thon
from transformers import BrandNewBertModel, BrandNewBertConfig
model = BrandNewBertModel(BrandNewBertConfig()) |
[
0.059473258,
-0.031764776,
-0.029622367,
0.0024673403,
-0.017353509,
-0.03336444,
0.009562283,
-0.0045883246,
0.026951497,
0.067357324,
-0.0008649974,
-0.024266345,
0.049132567,
-0.049646746,
0.010897717,
0.033478703,
-0.0027976283,
-0.029122472,
-0.047332942,
0.009076671,
-0.0028761833,
0.008433948,
-0.06421512,
-0.03687799,
0.000097301054,
0.015196817,
0.023523645,
-0.019024586,
0.082896926,
0.036420945,
-0.033278745,
-0.033964314,
0.009312335,
-0.036278117,
0.010840586,
-0.036735162,
-0.0027047906,
-0.02616595,
-0.029765194,
-0.050903626,
0.03924892,
0.008769592,
0.03964884,
-0.04101998,
-0.07021387,
0.041305635,
0.012018912,
-0.004181267,
0.017025005,
-0.016210891,
-0.027937006,
0.041705552,
0.022538137,
0.02889395,
-0.015411058,
-0.007144932,
-0.020181488,
0.000026738262,
-0.02590886,
-0.009119519,
0.05787359,
0.014911163,
-0.00008993652,
-0.028565446,
0.021881131,
0.040505804,
-0.003340372,
-0.024994764,
-0.00865533,
-0.005852346,
-0.034278534,
0.0026762253,
-0.03970597,
-0.029051058,
0.009262346,
0.039477445,
0.01342576,
-0.032650303,
-0.019310242,
0.055359833,
-0.010012189,
0.02480909,
-0.02003866,
0.010533508,
-0.013090116,
-0.039620273,
0.059758913,
0.015768126,
-0.005434576,
-0.04673307,
-0.0042026914,
0.022538137,
0.009619414,
-0.0036849426,
0.026237363,
0.037163645,
0.0014604084,
0.036049593,
0.002852974,
-0.025494661,
0.0036474504,
0.08141152,
-0.016325152,
0.011033404,
-0.014575519,
-0.022095373,
0.025451813,
-0.006741445,
-0.021695456,
-0.029679498,
-0.018453278,
-0.0025369686,
0.003293953,
0.021752587,
-0.013282932,
0.023909278,
-0.01536821,
0.010133592,
-0.01725353,
-0.027622785,
-0.00069449743,
-0.018367581,
0.014954011,
-0.060673006,
0.043448042,
-0.028665425,
0.0082696965,
0.027951289,
0.000923021,
-0.009190932,
0.046847332,
-0.03450706,
0.005131068,
0.051846284,
0.0066378955,
-0.04704729,
-0.022481006,
0.017582033,
0.009505152,
-0.018581823,
-0.032078996,
-0.006184419,
-0.0065414873,
0.0865533,
0.004449068,
-0.019667309,
0.018024797,
-0.04221973,
-0.0060487334,
-0.001272055,
-0.041676987,
-0.02732285,
0.0050489428,
0.007412733,
-0.019138848,
0.008519644,
0.0037027958,
0.02722287,
0.0037027958,
0.015868105,
-0.025451813,
0.00059630367,
-0.06335816,
0.05181772,
-0.0021067017,
0.031650513,
-0.027522808,
-0.024266345,
-0.009890785,
-0.008948126,
0.025923142,
-0.003440351,
-0.0105263665,
0.049932398,
0.083811015,
0.03330731,
0.04767573,
0.008783875,
-0.006152283,
0.023823582,
0.003613529,
-0.022438157,
-0.0010113954,
0.04056293,
-0.010876293,
0.0122974245,
0.004834702,
-0.003472487,
0.030536462,
0.020010095,
0.021252692,
0.05747368,
-0.037420735,
0.030822117,
-0.044562094,
-0.015653864,
-0.047561467,
-0.00912666,
-0.024309194,
-0.052274767,
-0.042733908,
0.04541906,
-0.038477656,
0.009448022,
0.004902545,
-0.022938052,
-0.017182115,
0.03650664,
0.0046347436,
0.00065254193,
0.027394263,
0.011904649,
0.004941822,
-0.033335876,
0.020581404,
0.019895833,
-0.027994137,
0.0024887645,
-0.0075484193,
-0.0017657017,
0.060787268,
0.0006614686,
0.066843145,
-0.0025316128,
0.048018515,
-0.031250596,
-0.017824838,
0.03964884,
0.02659443,
-0.018981738,
0.01154044,
0.034592755,
-0.026094535,
0.04464779,
0.01149045,
-0.018781781,
0.050446577,
0.038334828,
0.0015469975,
0.009340901,
0.028151248,
0.014725488,
-0.0039063245,
-0.0033421572,
0.012104608,
-0.024509152,
-0.028993927,
0.0065164925,
-0.0100978855,
0.03613529,
-0.072613366,
0.018110493,
0.016139477,
-0.017824838,
-0.032964524,
0.013597152,
-0.023623623,
0.06730019,
-0.037849218,
0.021381237,
0.014446975,
0.025209006,
-0.014468398,
-0.020110074,
0.05838777,
0.070956565,
-0.024666263,
0.0126330685,
0.026408754,
-0.030622158,
-0.04704729,
-0.0351355,
-0.079240546,
-0.018267604,
-0.056188233,
-0.008155434,
0.006855707,
-0.017382074,
0.032221824,
-0.008483937,
-0.009055247,
0.036735162,
-0.021724021,
0.024109237,
0.058616295,
0.000755199,
-0.031593382,
0.044190746,
-0.04327665,
-0.014361278,
-0.009962199,
-0.013525738,
0.0032421781,
-0.0009721178,
0.030393634,
0.019638743,
-0.013868524,
-0.038106304,
-0.014204168,
0.007434157,
-0.010983414,
-0.016582241,
0.01379711,
-0.0039277487,
-0.0061237174,
0.0028190524,
0.025837446,
-0.07467008,
0.056188233,
0.053531647,
-0.033021655,
0.027265718,
0.001856754,
0.025694618,
-0.018381864,
0.05024662,
0.028522598,
-0.00009534833,
-0.03950601,
-0.040105887,
-0.0042669633,
0.022952335,
-0.016610807,
-0.021124147,
-0.016168043,
0.061987016,
-0.042962432,
-0.034792714,
0.01988155,
-0.033964314,
-0.029765194,
-0.0514178,
-0.0072734766,
0.03882044,
0.007984042,
0.047104422,
-0.04101998,
0.015353927,
0.0132115185,
0.03073642,
0.014639791,
-0.058159247,
0.04470492,
0.036420945,
0.027394263,
0.014282723,
0.01919598,
-0.07935481,
0.014568377,
-0.017182115,
0.0048061362,
0.019553049,
-0.006252262,
0.02139552,
0.0065057804,
0.0335644,
-0.029565237,
0.029593801,
0.004941822,
0.0049239686,
0.043762263,
0.027494242,
0.011597571,
-0.009112378,
-0.02360934,
-0.0019745864,
-0.0031743352,
-0.020181488,
0.025308985,
-0.05670241,
0.017853403,
0.0017192828,
-0.022952335,
-0.0064843562,
0.0030511466,
-0.0149825765,
0.0031975447,
0.042191163,
0.024994764,
-0.018081928,
-0.0108620105,
0.011604712,
-0.0067307334,
0.03285026,
0.038849007,
0.004138419,
-0.023309404,
0.030193677,
-0.026194515,
-0.012283142,
0.0062558325,
-0.00949801,
-0.013897089,
-0.02449487,
-0.033135917,
-0.023894995,
0.03293596,
0.042733908,
0.050218053,
0.014225592,
0.06495783,
-0.030593593,
-0.009576566,
0.008298262,
-0.014489822,
-0.043419477,
-0.047961384,
0.034906976,
0.021824,
-0.0038991834,
0.023423666,
-0.02041001,
0.00060612307,
0.024594849,
-0.031707644,
-0.001258665,
-0.03179334,
0.0070556654,
-0.014968294,
0.01583954,
-0.007412733,
-0.050132357,
-0.021709738,
0.014854032,
0.061987016,
-0.025109027,
-0.018953172,
-0.042476818,
-0.016867897,
0.02906534,
-0.009962199,
-0.026765823,
0.00035505957,
0.004763288,
-0.062444065,
0.03562111,
0.061987016,
-0.008748168,
0.0229809,
-0.0601017,
-0.017367791,
-0.010740608,
-0.017182115,
0.01609663,
-0.0083911,
0.029708063,
-0.01715355,
0.015411058,
-0.03325018,
0.014825466,
-0.03250748,
-0.05481709,
0.03799204,
-0.033021655,
0.026051687,
0.0102835605,
-0.011033404,
0.006848566,
0.030365068,
0.013582869,
-0.040791456,
0.022338178,
0.05555979,
-0.051760588,
-0.02013864,
0.008819581,
0.02475196,
0.0031796913,
0.0562168,
-0.014061341,
-0.00063245685,
0.026180232,
0.0015550315,
-0.029879456,
0.0024066388,
-0.00807688,
0.035335455,
-0.003995592,
0.011847518,
-0.0021477644,
-0.052760378,
-0.00020397514,
-0.040420108,
0.01705357,
0.023795016,
-0.04824704,
-0.04082002,
0.02082421,
0.0010926283,
0.004841843,
0.026080253,
0.024009258,
0.0025423246,
-0.023052314,
-0.010919142,
-0.029208168,
-0.022652399,
0.032478914,
0.06215841,
0.058502033,
-0.025494661,
-0.070271,
-0.0413342,
0.022109656,
-0.015796691,
0.02747996,
-0.014589801,
0.0253804,
0.02490907,
-0.011861801,
-0.02023862,
0.0019156702,
-0.027037194,
-0.017810555,
-0.008034032,
-0.038934704,
0.028551163,
-0.012126032,
-0.04310526,
0.061929885,
-0.0608444,
-0.07387024,
0.0010845943,
0.008848147,
0.043448042,
0.0025530367,
0.041191373,
-0.03687799,
-0.07061378,
-0.03424997,
0.039134663,
-0.073984504,
0.011183372,
-0.03864905,
-0.063243896,
-0.0020709948,
0.026137384,
0.036249552,
-0.03667803,
0.011940356,
-0.02628021,
0.008698178,
-0.05250329,
0.0014327357,
0.015511037,
0.01458266,
-0.0014023848,
0.029136755,
0.0010444241,
0.013104399,
-0.013347205,
-0.0044776336,
0.028051268,
0.031193467,
-0.026637278,
0.006230838,
0.0051274975,
-0.008898136,
0.00018556381,
0.00023566493,
0.00319933,
0.045504756,
-0.024509152,
0.04956105,
-0.045047708,
-0.056730974,
-0.018139059,
-0.011561864,
0.045847543,
-0.021538347,
0.025637487,
-0.0037849215,
0.0056059686,
-0.016110912,
0.041362766,
-0.0012452749,
-0.006005885,
-0.027708482,
-0.040134452,
0.04339091,
-0.019295959,
-0.01583954,
-0.004092,
-0.026194515,
0.057445113,
-0.03010798,
0.01872465,
0.07272763,
-0.0018299739,
0.023923561,
-0.030593593,
0.049418222,
0.03193617,
0.013418619,
-0.022938052,
0.028993927,
-0.035478283,
0.0032903822,
-0.025508944,
-0.012790179,
-0.028136965,
0.009576566,
0.017324943,
-0.016182326,
0.047704294,
0.016825048,
-0.06512922,
-0.049532484,
0.014204168,
0.022823792,
0.011683268,
0.004184838,
0.019310242,
-0.0070306705,
0.0059059057,
0.008062597,
-0.03424997,
-0.007684105,
0.05161776,
-0.043648,
-0.028951079,
-0.002511974,
0.021495499,
-0.01652511,
-0.058559164,
-0.018139059,
-0.00020520255,
-0.040505804,
0.013354346,
-0.0026726546,
-0.02590886,
-0.035592545,
0.016168043,
0.008990974,
-0.0070199585,
-0.017981948,
0.027037194,
-0.0100978855,
-0.032907393,
0.013911372,
0.01642513,
-0.056159668,
-0.0060880105,
-0.033678662,
-0.023409383,
-0.026922934,
0.010147874,
0.073070414,
-0.023309404,
0.035478283,
0.04721868,
0.0012818744,
0.0066700317,
0.019852985,
-0.0004704372,
0.00061415706,
-0.027665634,
-0.04573328,
-0.059416126,
0.013904231,
-0.020809928,
0.022652399,
-0.028322639,
-0.01505399,
0.016025215,
0.04404792,
-0.022095373,
-0.05550266,
-0.011668985,
-0.038277697,
-0.0413342,
0.027008628,
-0.020567121,
-0.019910116,
0.007469864,
-0.0043776548,
-0.048875477,
0.0036420943,
0.024723394,
-0.0060344506,
0.009183791,
-0.04636172,
0.012347414,
-0.03225039,
-0.014211309,
-0.03890614,
-0.009819372,
0.0006413835,
0.006691456,
0.009190932,
0.018796064,
0.0060737277,
0.0073556025,
-0.007144932,
0.007719812,
-0.011754681,
-0.004231257,
-0.012183162,
0.0036778012,
-0.02916532,
0.021495499,
-0.022138221,
-0.027779896,
0.034449928,
0.0050810785,
0.001028356,
-0.0045383354,
-0.005659529,
0.050646536,
-0.026451603,
0.01069776,
0.0010622775,
0.03193617,
-0.060044568,
0.015611016,
0.004341948,
-0.012761613,
-0.026794389,
0.06707167,
0.0039384607,
0.008455372,
0.015825257,
0.054674264,
-0.00026110603,
0.02590886,
-0.01489688,
0.00040237108,
0.07049952,
0.02396641,
-0.033278745,
-0.025166158,
0.03682086,
0.014782619,
-0.041448463,
0.029565237,
0.0013800681,
-0.004531194,
0.02359506,
0.057845026,
0.023123728,
0.051703457,
-0.028036986,
-0.016853614,
-0.001085487,
0.0022959476,
-0.036906555,
0.013332922,
-0.050903626,
0.0050310893,
0.018353298,
-0.02318086,
0.014361278,
-0.027194304,
-0.003393932,
0.012897299,
0.013904231,
-0.0072520524,
-0.0054381466,
-0.014682639,
-0.00718421,
0.03593533,
-0.036992252,
-0.039163228,
-0.012804461,
0.030822117,
-0.019138848,
0.0054381466,
-0.00288511,
0.029536672,
-0.014639791,
-0.019038869,
-0.010854869,
-0.024252065,
0.021266975,
0.028436901,
-0.038220566,
0.0073341783,
-0.019952964,
0.044133615,
-0.04070576,
0.0016960733,
-0.043190956,
0.038334828,
0.020795645,
0.020338597,
0.020595687,
0.033393007,
0.008741027,
-0.0036063876,
-0.02465198,
0.0069985343,
0.031821907,
-0.010005048,
0.0045383354,
0.010683477,
0.031222032,
0.054788526,
0.04621889,
0.007684105,
0.031564817,
0.029336713,
-0.054874223,
-0.03127916,
0.0057095187,
0.0023959267,
-0.0054167225,
0.0009301623,
-0.0167822,
0.0018871048,
-0.018081928,
-0.000848483,
0.031621948,
-0.012718765,
-0.00372422,
-0.029936587,
0.018296167,
0.018239038,
-0.012254576,
-0.021795435,
0.01149045,
0.018510409,
0.016139477,
0.011419037,
0.019024586,
0.0134900315,
0.027094325,
0.046704505,
0.008491078,
0.010090744,
-0.029736629,
0.018938892,
-0.020567121,
0.023809299,
-0.016196609,
-0.018053362,
-0.029251017,
0.00372422,
-0.0695283,
0.065814786,
-0.002847618,
-0.0031850473,
0.020452859,
-0.046190325,
-0.014568377,
-0.029879456,
0.011511874,
-0.04490488,
0.016582241,
-0.003902754,
-0.013261508,
-0.039848797,
0.007905487,
-0.024080671,
0.039134663,
0.012340273,
0.062044147,
-0.0060344506,
0.08672469,
0.055302702,
-0.01216888,
0.040448673,
0.012340273,
-0.040991414,
0.008169717,
0.010304985,
0.0008136689,
0.00073689927,
-0.031336293,
-0.109234266,
0.035992462,
0.024523435,
-0.040134452,
-0.06644323,
0.016867897,
0.01295443,
-0.043819394,
0.008876712,
0.10112168,
0.023266556,
-0.0044669216,
0.008541068,
-0.010762032,
-0.05575975,
0.013097257,
0.014654074,
0.037620693,
-0.024794808,
-0.06667175,
-0.011690409,
-0.052103374,
0.01646798,
-0.0044562095,
-0.023323687,
0.0029297436,
0.014625508,
0.025009047,
0.05707376,
0.000765911,
-0.030993508,
-0.052160505,
-0.00087169243,
0.061130054,
0.01925311,
0.0896955,
0.066843145,
0.0046240315,
-0.021695456,
-0.034421362,
0.00849822,
0.0040241573,
-0.019395938,
-0.003429639,
0.002270953,
-0.006723592,
-0.04653311,
-0.00435266,
0.033792924,
-0.012254576,
-0.017710576,
-0.01941022,
-0.04436214,
-0.037877783,
-0.014939728,
-0.02985089,
0.025451813,
-0.026194515,
-0.015082556,
0.022366744,
-0.029736629,
0.24269202,
0.023937844,
0.027108608,
-0.016853614,
0.046133194,
0.013804251,
-0.0051060733,
-0.008576775,
0.008948126,
-0.04333378,
0.0031904033,
-0.03607816,
0.009383749,
0.039191794,
-0.043733697,
0.027351415,
-0.061758496,
-0.010997697,
-0.01169755,
-0.048646953,
-0.02412352,
0.045447625,
0.04616176,
0.05733085,
0.04727581,
-0.006466503,
0.003231466,
-0.06152997,
0.029193886,
-0.0546457,
0.030507896,
-0.015196817,
0.022523854,
-0.032021865,
0.010847728,
-0.009819372,
-0.006173707,
-0.019110283,
0.0034260682,
0.038477656,
-0.0022263194,
-0.056531016,
0.03487841,
-0.0011845733,
-0.00011682821,
0.004291958,
-0.022780944,
0.030365068,
0.0073198956,
-0.07586982,
0.020724231,
-0.05747368,
0.043190956,
-0.061987016,
-0.049703877,
0.00629511,
-0.043876525,
-0.061187185,
-0.0058094976,
0.008205424,
0.0035403299,
0.02480909,
-0.028808253,
-0.013804251,
-0.003892042,
0.006138,
-0.04416218,
0.00074850395,
0.008034032,
0.010254995,
0.014225592,
0.0049596755,
-0.03542115,
-0.013225801,
-0.011761823,
0.039534576,
0.018610388,
0.015596733,
-0.006812859,
-0.03210756,
-0.02255242,
0.009140942,
-0.009533717,
0.00603088,
0.003924178,
0.028322639,
-0.04721868,
0.0015960943,
0.014725488,
0.024837656,
0.030593593,
0.07009961,
0.019367373,
0.031507686,
-0.009162366
] | If you are porting a model from TensorFlow to PyTorch, a good starting point might be BERT's conversion script here
If you are porting a model from PyTorch to PyTorch, a good starting point might be BART's conversion script here |
[
0.042276688,
-0.011341119,
0.000056841993,
-0.017588835,
0.015078205,
0.010771177,
0.0033583276,
-0.024298275,
-0.004404423,
0.06700783,
0.047038227,
-0.0014284615,
0.0067094406,
-0.089055195,
-0.021369208,
0.06527636,
-0.044152446,
-0.043142423,
-0.043431003,
-0.01963774,
0.009595221,
0.014818485,
-0.078897245,
-0.05416611,
-0.005583986,
0.029204102,
0.011535909,
0.004898613,
0.06158256,
0.048134826,
-0.00024867314,
0.025207296,
0.0152513515,
-0.06279459,
-0.045883916,
-0.025106294,
0.002027261,
-0.025351584,
-0.016261375,
-0.041555244,
0.050472308,
-0.011788415,
0.0033384878,
-0.013476596,
-0.022018507,
-0.023230536,
0.008044114,
0.005378374,
0.031426154,
-0.04949114,
0.0028821735,
-0.0027342774,
0.024716713,
-0.03514881,
-0.02908867,
-0.0013987019,
-0.002997605,
-0.011074184,
-0.04042979,
0.010763963,
0.0539641,
0.021903077,
0.012228496,
-0.08322592,
0.021138344,
0.04120895,
-0.014255757,
0.020734336,
-0.03119529,
-0.014436118,
-0.031628158,
0.0050356877,
-0.031397294,
-0.042305548,
-0.009487005,
0.013519883,
-0.002200408,
0.020041749,
-0.017502261,
0.008476981,
0.038640607,
0.040198926,
0.016939534,
-0.005154726,
-0.008599627,
-0.019046154,
0.033792492,
0.009645723,
-0.007914254,
-0.0051980126,
-0.027948787,
0.03211874,
0.008116258,
0.040372074,
0.013050944,
0.040343218,
-0.00569581,
0.05846592,
0.011874988,
-0.014501049,
0.020517902,
0.08541911,
-0.006114248,
0.00059383956,
-0.05214606,
0.021412494,
0.015727505,
0.024962004,
-0.025178438,
-0.0067563346,
0.036678273,
0.014493834,
0.0010686407,
0.043690722,
0.034975663,
0.015438927,
0.010511457,
0.003509831,
-0.058783356,
-0.006752727,
-0.02869909,
0.033879068,
-0.028713519,
-0.011571981,
0.008794418,
-0.01502049,
0.0006795112,
0.06671926,
-0.03532196,
-0.007466958,
0.01515035,
-0.029608112,
-0.019969603,
0.03174359,
-0.030329557,
-0.013404452,
-0.01618923,
0.029608112,
0.0303007,
-0.0022635343,
0.022566807,
-0.050328016,
0.006316253,
0.06417976,
-0.016549952,
0.027429348,
0.019695455,
-0.021297062,
-0.024283845,
-0.008145116,
-0.0047290735,
-0.015554359,
-0.030416131,
0.016261375,
-0.029175244,
-0.0049022203,
-0.03015641,
0.033850208,
-0.026953192,
-0.0049022203,
0.014039324,
-0.021037342,
-0.008707844,
0.054108392,
-0.028020931,
0.06389119,
-0.036793705,
-0.010994825,
-0.0000017190687,
-0.0078926105,
-0.02224937,
-0.010453741,
0.012711865,
0.013664172,
0.01950788,
0.014890629,
0.045681912,
0.019782027,
0.03728429,
0.008722273,
-0.03506224,
-0.0067130476,
0.038005732,
0.056705594,
0.014363974,
0.0019785636,
-0.02672233,
-0.010345524,
0.00071197626,
-0.01591508,
0.05145347,
0.0452779,
-0.039044615,
0.011124685,
-0.024543567,
-0.015655361,
-0.011781201,
0.021239348,
-0.029319534,
-0.058956504,
0.008375979,
0.028410513,
-0.037226573,
0.040602937,
-0.042478696,
0.032609325,
0.0039643412,
0.044816177,
-0.05003944,
-0.0033799708,
0.029867832,
-0.023129534,
0.000400853,
0.0021499067,
0.030618135,
0.0041410956,
-0.01803613,
0.013866177,
0.009746725,
0.0016953963,
0.017978415,
0.013065373,
-0.006305431,
0.023389254,
0.014948345,
0.02318725,
-0.0011669376,
0.040314358,
0.011333904,
0.0042673484,
-0.009840513,
0.026231747,
-0.0016926909,
0.036274265,
0.07018219,
-0.009140711,
0.033475056,
0.023504686,
0.00018926665,
-0.0033943998,
0.018786434,
0.037746012,
0.010237307,
0.0072072376,
0.006291002,
0.008303834,
-0.0061358917,
0.02134035,
-0.035899114,
0.040631793,
-0.011514266,
0.054281536,
0.03382135,
0.011838916,
-0.058292773,
-0.024976434,
-0.014804056,
0.0038020164,
-0.04952,
-0.016131515,
-0.009624079,
-0.030214125,
0.02555359,
0.0029525144,
0.030733567,
0.019320304,
-0.009588007,
-0.0017134324,
-0.046836223,
-0.040862657,
-0.03148387,
-0.046230208,
-0.08807403,
-0.01515035,
-0.030646993,
-0.0039643412,
-0.0026224533,
-0.015770793,
0.02289867,
-0.046057064,
-0.0055226632,
0.02289867,
-0.040776085,
0.029319534,
0.03107986,
0.007466958,
-0.072721675,
0.028641375,
-0.024976434,
0.018988438,
-0.007214452,
-0.04793282,
0.042998135,
-0.00058437063,
0.007575175,
-0.023158392,
-0.0020056176,
-0.041670676,
-0.010727891,
0.0025881848,
-0.02936282,
0.0032519144,
-0.022725524,
0.01724254,
-0.02344697,
0.06735413,
0.007355134,
-0.043373287,
0.024861002,
0.04914485,
0.008029685,
0.0339945,
-0.011160757,
0.02895881,
-0.036418553,
0.049202565,
0.053011794,
-0.026505897,
0.007914254,
-0.0421324,
-0.026606899,
-0.022191655,
0.012805653,
-0.04726909,
-0.00941486,
0.024788858,
0.00836155,
-0.05029916,
-0.028944382,
-0.05488755,
-0.0016737529,
-0.020604474,
-0.015770793,
0.037832588,
0.012351142,
0.014666981,
-0.031570442,
-0.02224937,
-0.017574405,
0.0395352,
0.0057030246,
0.0060889977,
0.036158834,
0.0254093,
0.0229131,
0.002647704,
-0.0001419218,
-0.030531561,
-0.0016863781,
0.036937997,
0.003398007,
0.022292657,
0.012971585,
0.015900653,
-0.006622867,
-0.0062332866,
-0.019320304,
0.0152802095,
-0.0060421037,
-0.033936784,
0.013548741,
0.012177995,
-0.024861002,
-0.027948787,
-0.03540853,
-0.031137574,
-0.003165341,
0.03881375,
0.05252121,
-0.03907347,
0.023259394,
-0.024240559,
-0.061293986,
0.016030513,
-0.012228496,
-0.04698051,
0.055464707,
0.03200331,
0.053790957,
-0.050154872,
-0.0044873892,
0.03924662,
0.0015402855,
0.03171473,
0.013202447,
0.02897324,
-0.01553993,
-0.04856769,
-0.03451394,
-0.0054144464,
-0.022869812,
-0.00087700685,
-0.03621655,
-0.029434964,
-0.04556648,
-0.05728275,
0.03183016,
0.08553454,
0.0272562,
0.018483426,
0.0076184613,
0.0070413053,
0.014623694,
0.050356876,
-0.01988303,
0.023533544,
-0.04752881,
0.04097809,
-0.015410069,
-0.03858289,
-0.027039766,
-0.00045856863,
0.016896246,
0.02001289,
-0.003268147,
-0.009919872,
-0.037976876,
-0.0053170514,
-0.009393217,
0.06256373,
-0.035985686,
-0.031974453,
-0.034687087,
0.038496315,
0.03252275,
-0.06695011,
-0.004898613,
-0.023504686,
0.04556648,
0.017228112,
-0.0339945,
-0.03333077,
-0.057600185,
-0.023634546,
-0.00526655,
0.033936784,
0.01895958,
-0.041843824,
0.018108275,
-0.040631793,
0.0031220543,
-0.009061351,
-0.009400431,
0.017285828,
0.012329498,
0.0025611306,
0.0009955944,
0.028929953,
-0.023403682,
-0.0052918005,
-0.016246947,
-0.039708346,
0.0070088403,
-0.041901536,
0.028626947,
0.0089098485,
-0.015511072,
-0.023995267,
0.019262588,
0.0066769756,
0.006269359,
-0.023418112,
0.025871025,
-0.04804825,
-0.017098252,
0.02897324,
0.00901085,
0.02304296,
0.06279459,
0.014767984,
0.0019208479,
0.0002437132,
0.0046677506,
-0.040054638,
0.020719906,
-0.038784895,
0.0033943998,
-0.023158392,
0.022581235,
0.012726294,
-0.03569711,
0.029723544,
0.010309452,
0.011095827,
-0.019075012,
-0.037197717,
-0.047471095,
-0.00655433,
-0.025871025,
0.032349605,
0.01766098,
-0.01139162,
0.020835338,
-0.0519152,
-0.0008003533,
-0.012726294,
-0.021975221,
-0.017430115,
0.035870258,
0.03200331,
0.049866293,
0.02882895,
-0.037601724,
-0.0079431115,
-0.034427367,
0.012949942,
-0.021816503,
0.017891841,
0.0254093,
0.02053233,
-0.024990862,
-0.052232634,
-0.034831375,
-0.015900653,
0.0056308797,
-0.0070954137,
0.0019695454,
-0.021917505,
-0.029117528,
0.014017681,
-0.02487543,
-0.05107832,
-0.026534755,
0.0069799824,
0.04885627,
0.0018649359,
0.024817714,
-0.030964429,
-0.03422536,
-0.015135921,
0.01618923,
-0.058754496,
-0.002950711,
-0.06914331,
-0.025669022,
0.012834511,
0.0152080655,
0.017588835,
-0.053040653,
0.02001289,
-0.049722005,
0.006428077,
-0.021931935,
-0.049981724,
-0.050530024,
0.000741285,
-0.04080494,
0.028987668,
-0.00009502786,
-0.045941632,
0.020027319,
0.029305104,
0.01686739,
0.05171319,
-0.008469767,
-0.01566979,
-0.025654592,
0.0051763696,
-0.015828509,
0.033561632,
-0.022552377,
0.060774546,
-0.0005005026,
0.067758135,
-0.046403356,
-0.0040761656,
-0.009443718,
-0.039679486,
0.031570442,
-0.036793705,
0.01753112,
-0.018512284,
-0.017935129,
0.016290233,
0.0043899943,
-0.046922795,
-0.049260277,
-0.0141908275,
-0.045739625,
0.051828623,
-0.008888205,
0.015828509,
-0.051424615,
0.0008364255,
0.0142124705,
-0.0037875874,
0.015323496,
0.05979338,
0.0015384819,
-0.0044982107,
-0.02461571,
0.009487005,
0.01646338,
0.014255757,
-0.008585198,
0.0031815735,
-0.04911599,
-0.0026224533,
-0.0073515265,
-0.08495739,
-0.025495874,
0.042103544,
0.023230536,
0.006240501,
0.022739952,
-0.023129534,
-0.041814964,
-0.013072588,
0.008722273,
0.009090209,
-0.00038416957,
-0.011571981,
0.03757287,
-0.002671151,
0.018108275,
0.021657785,
-0.034283075,
0.012740723,
0.02582774,
-0.032320745,
-0.029420536,
0.04386387,
0.0463745,
-0.05979338,
-0.038611747,
-0.043892726,
0.005205227,
-0.037313145,
-0.030964429,
0.015164779,
-0.04493161,
-0.037774872,
0.045104753,
0.030185267,
0.019421306,
-0.03208988,
0.020979626,
-0.01685296,
-0.051395755,
0.0064064334,
0.03460051,
-0.0036054226,
-0.012221282,
-0.022566807,
0.027717926,
-0.0151936365,
-0.008137902,
0.03107986,
-0.037197717,
0.023634546,
0.038265456,
-0.008772774,
0.061063122,
-0.01455155,
0.025178438,
0.0001729214,
-0.032493893,
-0.045249045,
-0.032147598,
0.03739972,
0.05344466,
0.037688296,
-0.0001493617,
0.029781258,
-0.007214452,
0.048279114,
0.0025593268,
-0.070009045,
0.005356731,
-0.063256316,
-0.02527944,
-0.04859655,
-0.026044171,
0.008303834,
0.02172993,
0.01369303,
-0.024312703,
-0.008801632,
-0.020113893,
0.0032933974,
0.038265456,
-0.024774428,
-0.020445757,
-0.004909435,
0.00862127,
-0.016261375,
-0.010251736,
0.019204872,
0.011961562,
0.004631678,
-0.017083822,
0.025582448,
0.015323496,
-0.0040942016,
0.01539564,
0.0315993,
-0.009227284,
-0.046691936,
-0.0029146387,
-0.031772446,
0.052463494,
0.0019442949,
-0.027328344,
-0.03278247,
0.027703496,
-0.011196829,
0.010266165,
-0.019277016,
0.048625406,
-0.019724311,
-0.029550396,
-0.012264568,
0.008549126,
-0.047615383,
0.004674965,
-0.032234173,
-0.04242098,
0.023923123,
0.016420092,
0.023908695,
0.05165548,
-0.002968747,
0.045624197,
-0.024139557,
-0.017026108,
0.012885012,
0.0046208566,
0.016925104,
0.026433753,
0.012618077,
-0.055637855,
0.013945536,
0.009696224,
-0.03263818,
0.01579965,
-0.0016818692,
-0.033648204,
-0.011752343,
0.006969161,
0.05609958,
0.02434156,
0.0032194492,
-0.0044729603,
-0.022696666,
-0.020734336,
-0.020301469,
0.0021084237,
-0.084437944,
-0.033128764,
0.027184056,
-0.007979184,
0.022350373,
-0.022624522,
-0.030993287,
-0.009862156,
0.0031328758,
0.004386387,
0.019536735,
0.006478578,
-0.011564767,
0.008967564,
-0.02806422,
-0.055204988,
0.016506666,
0.033532772,
-0.026953192,
-0.042969275,
0.008513054,
0.03119529,
0.0076545337,
-0.003989592,
-0.019695455,
-0.018815292,
0.022537949,
0.03307105,
-0.05413725,
-0.010497028,
-0.05962023,
0.07705035,
-0.0037515152,
-0.016751958,
0.009746725,
0.017891841,
0.03503338,
-0.011348333,
-0.008599627,
0.0210662,
0.038380884,
-0.03791916,
0.030444987,
-0.00470743,
0.028814523,
-0.010266165,
0.022047365,
-0.03183016,
0.041439813,
0.021369208,
0.022436947,
-0.0010623281,
0.013094231,
0.038265456,
-0.04856769,
0.0048264684,
0.05540699,
0.03581254,
0.044412166,
0.038871467,
-0.001882972,
-0.02121049,
0.036129978,
-0.003113036,
0.019406876,
-0.009198426,
0.0038200524,
-0.018714288,
0.01033831,
0.023216108,
-0.029781258,
-0.034398507,
-0.0025412908,
0.047124803,
0.026029743,
0.004974365,
-0.0120697785,
0.016549952,
0.044816177,
0.016564382,
0.0039318763,
0.050097156,
0.018598858,
0.0019406877,
0.01375796,
0.032840185,
-0.025164008,
-0.031137574,
0.018916294,
-0.041266665,
-0.03079128,
0.041006945,
-0.0062332866,
0.011283403,
0.01659324,
-0.036562845,
-0.012820082,
-0.05638816,
0.006330682,
-0.012582004,
0.024312703,
0.027443776,
0.0077988226,
-0.011766772,
0.050328016,
0.029074242,
0.0045126397,
0.030069837,
0.0650455,
0.042016968,
0.08997865,
0.0458262,
0.012632506,
0.025510302,
0.023014102,
-0.007834895,
0.027703496,
-0.011665769,
0.0018369799,
0.04279613,
-0.030329557,
-0.047730815,
0.025928741,
0.022840956,
0.0016466987,
-0.031022144,
0.020835338,
0.03939091,
-0.011817273,
0.00031247595,
0.09257585,
-0.01869986,
-0.020820908,
0.0029056205,
-0.011846131,
-0.019075012,
-0.004242098,
-0.041035805,
0.067584984,
-0.00059789774,
-0.013664172,
-0.027083054,
-0.040574078,
-0.0110308975,
0.0022058187,
0.008614056,
-0.016174803,
-0.014587622,
0.0657958,
0.058408204,
0.018512284,
-0.044787318,
-0.029463822,
0.06296774,
0.07491487,
-0.0000814444,
0.05990881,
0.07468401,
0.0022130331,
-0.031253006,
0.02740049,
-0.0077843936,
0.007279382,
0.032840185,
-0.024139557,
0.023273822,
-0.012040921,
-0.04992401,
0.022018507,
0.017992843,
-0.029420536,
-0.009111853,
-0.015958369,
-0.0027811714,
-0.062102005,
-0.0011434907,
-0.04501818,
0.036793705,
0.004783182,
0.013729102,
-0.028583659,
-0.053127225,
0.24863888,
0.044037014,
-0.004404423,
0.031166432,
0.062332865,
0.048105966,
0.03820774,
-0.01989746,
0.011247331,
-0.011983205,
0.00090135564,
-0.011680198,
-0.036360838,
0.018367995,
0.00017810678,
0.017747553,
-0.06354489,
0.008902634,
-0.03408107,
-0.02869909,
-0.07087478,
0.010828893,
0.0043611364,
0.037168857,
0.059562515,
0.013678601,
0.0018992046,
-0.048481118,
-0.015034919,
-0.038150024,
-0.019046154,
-0.034311935,
0.0069908043,
0.008657343,
-0.049202565,
0.009898229,
-0.0035657429,
-0.040631793,
-0.022177225,
-0.009061351,
-0.025741166,
-0.018656572,
0.030964429,
-0.017415687,
-0.0033348806,
0.03503338,
0.000011434625,
0.005407232,
0.0015502054,
-0.024456993,
0.03950634,
-0.031628158,
-0.012257354,
-0.054570116,
-0.075607456,
0.008816061,
-0.01766098,
-0.023158392,
0.012257354,
-0.008440909,
-0.01779084,
0.007355134,
-0.036707133,
0.017877413,
0.019796457,
0.01304373,
-0.0053242655,
0.025063006,
0.023865407,
-0.0070232693,
0.0011750539,
0.020893054,
-0.03901576,
0.016737528,
0.019926317,
-0.00044729604,
-0.025784452,
0.04579734,
-0.019984033,
-0.034946807,
-0.0049202563,
-0.011059755,
0.034658227,
-0.041266665,
0.032984477,
0.051020604,
-0.035639394,
0.0013112266,
-0.047211375,
0.03266704,
0.011420478,
0.051049463,
0.0044909962,
0.011608054,
-0.021109486
] | Now we can create an instance of this model definition which will fill all weights: dense, intermediate,
layer_norm with random weights. We can print the model to see its architecture
thon
model = SimpleModel()
print(model) |
[
0.053445667,
-0.031836282,
-0.00883298,
-0.031142935,
0.037671972,
0.03859644,
0.02020824,
-0.023400536,
-0.0045248256,
0.035129692,
0.04697441,
0.0076918425,
0.038249765,
-0.05191452,
-0.014350884,
0.047696646,
-0.026795058,
-0.024570562,
-0.042698756,
-0.0077496218,
0.026332825,
0.04428768,
-0.069566034,
-0.03781642,
-0.016539268,
-0.0002825759,
0.01763707,
-0.00393259,
0.020554915,
0.03544748,
-0.016322596,
-0.0073198895,
0.036371943,
-0.029033998,
-0.022692742,
-0.026101708,
-0.037440855,
-0.025523918,
-0.066965975,
-0.043016538,
0.05708575,
-0.0013993375,
-0.0066807084,
-0.036834177,
-0.034263007,
0.016481489,
0.02244718,
0.022967191,
0.03198073,
-0.03908756,
0.013202525,
0.012003608,
0.015874807,
-0.013621422,
-0.0364875,
-0.032529633,
-0.006973215,
-0.021089371,
-0.027849525,
-0.039260898,
0.022331621,
0.01639482,
0.0060884724,
-0.04110983,
0.0059404136,
0.010862471,
-0.004564549,
0.011021364,
-0.009894671,
-0.011266924,
-0.034840796,
-0.004095094,
-0.015831474,
-0.039376456,
-0.021464936,
0.043796558,
0.012530842,
0.037671972,
-0.019558225,
-0.0032175735,
-0.0006766474,
0.04162984,
0.000087007196,
0.0020800475,
-0.029640678,
-0.035996377,
0.02758952,
-0.029265113,
-0.057172418,
-0.010689134,
-0.00065317465,
0.025913926,
0.0051206728,
0.016553711,
0.05457236,
0.0069443258,
-0.019081548,
0.052116748,
0.00021780012,
-0.030969597,
0.054196797,
0.12387839,
0.004788443,
0.0122058345,
-0.043103207,
0.028932884,
-0.014184769,
-0.0023238033,
-0.04931446,
-0.015340351,
0.028759547,
0.039549794,
-0.0018110137,
-0.0045573264,
-0.0042431527,
0.017940411,
-0.0009244656,
0.0041998182,
-0.028297314,
-0.007785734,
-0.00019094186,
-0.012018053,
-0.0043406547,
-0.06546372,
-0.006052361,
0.006879324,
-0.038885333,
0.058356892,
-0.000004150757,
-0.044663243,
-0.008305745,
0.007287389,
-0.038914222,
0.042727645,
0.011440262,
-0.029149557,
-0.017044835,
0.017868187,
0.014069211,
-0.007735177,
0.022317177,
-0.041918736,
-0.02413722,
0.0691038,
-0.006893769,
-0.032991868,
0.014415885,
-0.031865172,
-0.029019553,
-0.014083656,
-0.040040918,
0.021768276,
0.004116761,
0.010458017,
0.0073162783,
-0.017015945,
0.0015907309,
0.025249466,
-0.007966293,
-0.010270235,
0.00095606357,
-0.022981636,
0.0012296115,
0.04749442,
-0.02305386,
0.018084858,
-0.017377064,
-0.029669568,
-0.019428222,
-0.048361108,
0.0070237718,
-0.038018648,
0.006485704,
0.012487508,
0.04027203,
0.018128192,
0.035043024,
-0.023602761,
0.023241643,
-0.004062593,
0.0023996383,
-0.018474868,
-0.00047351778,
0.035620816,
0.019197106,
0.0083996365,
-0.044201013,
0.011035808,
0.0006111945,
0.011115254,
0.045443263,
0.043074317,
-0.027820637,
0.03856755,
-0.04619439,
-0.02117604,
-0.039289787,
0.029814016,
-0.021378268,
-0.037123073,
0.025783923,
0.022230508,
-0.07002827,
0.008370747,
-0.010674689,
0.043681,
-0.003018958,
0.057576872,
-0.017868187,
0.019558225,
0.049921144,
-0.0091796545,
-0.008182965,
0.0015925365,
0.024845013,
0.0049256682,
-0.029987352,
0.019818231,
-0.020367132,
-0.03770086,
0.034985244,
0.04743664,
0.00426482,
0.013924763,
0.014293104,
-0.021017147,
-0.02114715,
0.034783017,
0.046772182,
0.009150765,
0.021652717,
0.051654514,
-0.041832067,
0.04619439,
0.0036202217,
0.010638577,
0.026722834,
0.027733969,
0.010414682,
-0.014697558,
0.031258494,
-0.03850977,
-0.0111441435,
-0.0040698154,
0.008009627,
-0.00798796,
0.005698464,
0.03452301,
-0.05333011,
0.03729641,
-0.03466746,
0.062632546,
0.017145948,
0.0038459213,
-0.051481176,
0.010082453,
0.0020006013,
0.007547395,
-0.022114951,
-0.01155582,
0.011960274,
-0.015138124,
-0.020641584,
-0.005962081,
0.04706108,
0.0691038,
-0.015008121,
0.03408967,
-0.024960572,
-0.038885333,
-0.02631838,
-0.050527822,
-0.072686106,
-0.0154992435,
-0.033858553,
0.01040746,
0.035476368,
-0.0037303632,
0.011129699,
-0.011115254,
0.015990365,
0.038712,
-0.038972,
0.0068684905,
0.00079762243,
0.05512126,
-0.06505927,
0.036111936,
-0.040156472,
0.0012278059,
-0.014726448,
-0.007655731,
0.023487205,
-0.008948538,
0.026896171,
0.0066482075,
0.02883177,
-0.04223652,
-0.0027914527,
-0.010624132,
-0.038827553,
-0.03018958,
0.007103218,
0.035678595,
-0.019312665,
0.03533192,
-0.002764369,
-0.041860957,
0.04047426,
0.052174527,
-0.021407157,
0.03772975,
0.03339632,
0.0037339744,
-0.034754127,
0.042525418,
0.036198605,
0.004499547,
-0.033742994,
-0.05278121,
-0.034783017,
0.0015501049,
0.0043767667,
-0.02659283,
-0.02698284,
0.03325187,
-0.011201923,
-0.03859644,
0.009237434,
-0.064365916,
-0.025610587,
-0.017579291,
0.013390306,
0.029785126,
-0.002275052,
0.035534147,
-0.044229902,
-0.0040517594,
0.014849229,
0.03660306,
-0.0022732464,
-0.03544748,
0.058616895,
0.028022863,
0.036140826,
-0.0026614498,
-0.00048435136,
-0.055612385,
-0.016178148,
0.026361715,
0.02883177,
-0.01152693,
0.023241643,
0.0032013233,
0.0028907605,
-0.013115856,
0.0062726433,
0.025769478,
-0.0052290084,
-0.008067407,
0.021724941,
0.00393259,
-0.04024314,
-0.034840796,
-0.0320674,
0.003914534,
-0.014206436,
0.01600481,
0.02631838,
-0.05330122,
0.023487205,
-0.005987359,
-0.017853742,
-0.00030830567,
-0.02305386,
-0.03293409,
0.021508269,
0.019977124,
0.061939195,
-0.0027246457,
-0.06806378,
0.03654528,
0.0032067401,
-0.008601864,
0.0109852515,
0.034811907,
-0.01297863,
0.0009831475,
-0.011151366,
-0.0075907293,
0.023126084,
-0.008421304,
-0.019110437,
-0.011021364,
-0.017738184,
-0.0045248256,
0.034725238,
0.06534816,
0.049054455,
0.0144014405,
0.03923201,
-0.0059765256,
-0.003654528,
-0.0029359006,
-0.027069509,
-0.020887144,
-0.0345519,
0.046569955,
0.029091777,
-0.012733069,
-0.00559735,
0.017579291,
0.0035714705,
-0.008385192,
0.009215767,
0.0084357485,
-0.033107422,
0.0029359006,
-0.014437553,
0.05272343,
-0.017550401,
-0.06407702,
-0.0411965,
0.02955401,
0.057230197,
-0.035967488,
0.019052658,
-0.024007216,
0.04373878,
0.013570866,
-0.04567438,
-0.022851635,
-0.009172432,
-0.015614802,
-0.005814022,
0.008674087,
0.009389103,
-0.027156176,
0.04041648,
-0.04165873,
-0.004362322,
0.006149863,
-0.0053987345,
0.02656394,
0.022923857,
0.014423108,
-0.028961774,
-0.016524823,
-0.04226541,
0.012299726,
0.002377971,
-0.04362322,
0.034436345,
-0.03466746,
0.027546186,
0.035765264,
-0.0043370435,
-0.005720131,
0.036920846,
0.027575076,
-0.017463733,
-0.0075040604,
0.01824375,
-0.040127587,
-0.0055070706,
0.007937403,
0.012494731,
0.022273842,
0.05457236,
-0.008731866,
-0.0031417385,
0.018547092,
0.042756535,
-0.06725487,
0.02468612,
-0.04108094,
0.0058465227,
-0.028990664,
0.006760155,
0.04240986,
-0.048910007,
0.051741183,
-0.021566048,
-0.016943721,
-0.016019255,
-0.07245499,
-0.043941006,
0.02532169,
0.007814623,
0.017189283,
0.014820339,
-0.020988258,
0.002610893,
-0.026997285,
0.017752629,
-0.004098705,
-0.04243875,
-0.011324704,
0.054861255,
0.022793856,
0.026289491,
-0.0066120955,
-0.07956182,
0.014451997,
-0.013570866,
0.057576872,
0.0035173027,
0.015614802,
0.022981636,
-0.01331086,
-0.02535058,
-0.0067204316,
-0.025061684,
-0.012668068,
0.024859458,
-0.03270297,
0.0053373445,
0.008457416,
-0.025076129,
0.02761841,
-0.016235927,
-0.05454347,
-0.015990365,
0.013924763,
0.015557023,
-0.009027984,
0.007814623,
-0.051307842,
-0.0633259,
-0.0016494128,
0.060494717,
-0.055525716,
-0.004048148,
-0.050470043,
-0.038827553,
0.04356544,
0.017535957,
-0.021248264,
-0.031056266,
0.0031399329,
-0.019283775,
0.009641888,
-0.037383076,
-0.02535058,
-0.013527532,
-0.022620518,
-0.03163406,
0.02631838,
-0.021349378,
-0.010140232,
0.03163406,
0.003950646,
0.0049256682,
0.017853742,
-0.040185362,
0.000103031874,
0.0030984043,
0.006167919,
0.0006436953,
-0.016958166,
0.017478177,
0.022967191,
-0.007496838,
0.03273186,
-0.027546186,
-0.024064995,
0.010992474,
-0.0150659,
0.049978923,
-0.019254886,
0.006792655,
-0.00674571,
-0.015571468,
0.01188805,
0.008912426,
-0.03778753,
-0.023992771,
0.0015690636,
-0.06667708,
0.05587239,
-0.008305745,
0.009295213,
-0.03853866,
-0.030882929,
0.03276075,
-0.029669568,
-0.0029232614,
0.055092372,
0.016741494,
0.008154076,
-0.022548294,
0.04350766,
0.023602761,
0.011794159,
-0.0026397826,
0.03284742,
-0.05324344,
-0.008276856,
0.018027078,
-0.069392696,
-0.023429425,
0.036083046,
-0.010306347,
-0.000014303712,
0.061823636,
-0.015297017,
-0.018503757,
-0.035794154,
0.040734265,
-0.014271437,
-0.027878415,
0.0031110435,
0.012639178,
-0.035014134,
0.021046037,
0.008897982,
-0.072975,
0.0475522,
0.02114715,
-0.01349142,
-0.0012350283,
0.03018958,
0.028643988,
-0.02640505,
-0.0011528736,
-0.008233522,
0.019847121,
-0.01333975,
-0.025538363,
-0.022086062,
0.0017523317,
-0.059974704,
0.033078536,
-0.0015194097,
0.011079143,
-0.030594034,
0.025061684,
-0.0046873293,
-0.057490204,
0.031316273,
0.014228104,
-0.07291722,
-0.011772492,
-0.02465723,
-0.020699363,
-0.01999157,
-0.031056266,
0.052867875,
-0.040849824,
-0.0022244954,
0.031085156,
-0.0126464,
0.05439902,
-0.02761841,
0.012718624,
0.013014742,
-0.008558529,
-0.037469745,
0.009822447,
0.042005405,
-0.012451396,
0.019558225,
-0.0019193494,
0.028745102,
-0.01769485,
0.052463423,
-0.040069807,
-0.06898825,
0.019731563,
-0.029814016,
-0.020424912,
0.018489312,
-0.008334635,
-0.0035606371,
0.008955761,
0.01863376,
-0.02341498,
-0.00635209,
0.015831474,
-0.03723863,
0.04353655,
-0.051250063,
0.018590426,
-0.041832067,
0.005853745,
-0.051510066,
0.001513993,
0.0000058047117,
0.003623833,
0.011165811,
-0.011129699,
0.011931384,
-0.014025876,
-0.014329216,
0.0461655,
0.00393259,
0.026780613,
-0.0035317475,
-0.0007041828,
-0.051163394,
0.019644894,
0.019688228,
-0.018171526,
0.01633704,
0.004889556,
-0.035909712,
0.042583197,
0.0028420095,
0.02631838,
-0.005037615,
-0.011794159,
0.02637616,
0.024585007,
-0.061823636,
-0.02012157,
-0.03541859,
-0.030536255,
0.02465723,
0.020944923,
0.034378566,
0.035129692,
0.016885942,
0.0417454,
0.014423108,
0.0045609376,
0.012357505,
0.021031592,
0.010082453,
0.03983869,
-0.020612694,
0.01503701,
0.0051315064,
-0.0053192885,
-0.03978091,
0.054687917,
-0.0062509766,
-0.038191985,
-0.00635209,
0.049892254,
0.027762858,
0.03862533,
-0.011591932,
-0.033569656,
-0.016192593,
-0.026578385,
-0.027878415,
0.012299726,
-0.05073005,
0.013173635,
0.021522714,
-0.058559116,
0.003892867,
-0.022028282,
-0.01860487,
0.031865172,
0.034840796,
-0.008262412,
-0.008428526,
0.006525427,
-0.039260898,
0.014834784,
-0.014993676,
-0.012863072,
-0.009432438,
-0.018041523,
-0.029900685,
-0.01666927,
-0.017940411,
0.050007813,
-0.02825398,
-0.027401738,
-0.029814016,
-0.043016538,
-0.010096897,
0.028022863,
-0.022750521,
0.010826359,
-0.028687323,
0.033482987,
-0.028268425,
0.033049647,
-0.011064698,
0.036256384,
0.0373253,
0.008002405,
-0.013318082,
0.03281853,
0.00030446876,
-0.022736076,
-0.0020854643,
0.015874807,
0.043998785,
-0.009988562,
0.028398428,
0.0031164603,
0.035649706,
0.03209629,
-0.00012842308,
0.007085162,
-0.0021667161,
0.009634665,
-0.03651639,
0.016192593,
0.034320787,
0.05775021,
0.013729759,
0.06546372,
-0.030940708,
-0.03143183,
0.030940708,
0.029842906,
0.007821846,
0.01581703,
-0.00089738163,
-0.0320674,
0.0050484487,
-0.020699363,
-0.0048967786,
-0.030420696,
0.037036404,
0.0266795,
0.045905493,
0.0019590727,
-0.015557023,
0.020323798,
0.037989758,
0.03533192,
-0.025711698,
0.0074823936,
-0.00083057454,
0.035678595,
-0.011678601,
0.026665054,
-0.029250668,
0.025263911,
-0.010797469,
-0.07389947,
-0.008536862,
0.04680107,
-0.0028528431,
-0.0018796263,
-0.00036743897,
-0.049950033,
-0.001128498,
-0.06020582,
-0.0029214558,
-0.051683404,
-0.0010454406,
0.01896599,
-0.0035859153,
0.0015907309,
0.032269627,
0.029135112,
0.0059548584,
-0.011700268,
0.02601504,
0.020381577,
0.08025517,
0.019442666,
-0.03146072,
0.04607883,
-0.029958462,
-0.029640678,
0.026275046,
0.0041998182,
0.024931682,
0.012314171,
0.008637975,
-0.046512175,
0.017247062,
0.044374347,
0.021219375,
-0.07002827,
0.028470652,
0.012776404,
-0.03010291,
0.0037050848,
0.07476615,
0.02656394,
0.010234123,
0.01666927,
-0.02410833,
-0.057432424,
-0.013729759,
-0.031374052,
0.07638397,
-0.011591932,
-0.031807393,
-0.03460968,
-0.02214384,
-0.00024375558,
0.024512783,
0.028687323,
-0.0021215763,
0.015932586,
0.06118807,
0.054832365,
0.03198073,
-0.021927169,
-0.039492015,
0.05133673,
0.054861255,
-0.01333975,
0.086841986,
0.08967316,
-0.011079143,
-0.005034004,
-0.007012938,
0.022346066,
0.04032981,
-0.011043031,
-0.012696957,
-0.022317177,
0.016163703,
-0.06378812,
0.0023382478,
0.05208786,
-0.057345755,
-0.028109532,
-0.0077785114,
-0.015831474,
-0.045269925,
0.003412578,
-0.041947626,
0.026289491,
-0.0044092676,
-0.0073740575,
0.016207037,
-0.06453925,
0.24775678,
0.016293706,
0.009728556,
0.008327412,
0.06546372,
0.052983433,
0.026202822,
0.0012205835,
-0.0024628341,
-0.055987947,
0.034927465,
-0.05061449,
-0.02949623,
0.047869984,
0.0005376165,
0.014358106,
-0.06482815,
0.010248568,
-0.010746912,
-0.042843204,
-0.034840796,
-0.008637975,
0.0252928,
0.056854635,
0.026491717,
-0.050498933,
-0.0008206438,
-0.062459208,
0.017348174,
-0.002713812,
-0.029958462,
-0.023227198,
0.029756237,
0.027127286,
-0.014069211,
0.013765871,
-0.016900387,
-0.026072819,
-0.0353897,
0.00471983,
-0.052232306,
-0.03781642,
0.045385484,
-0.009576886,
-0.024007216,
0.009793557,
-0.01297863,
0.017651515,
0.0024628341,
-0.02728618,
0.06927714,
-0.0754595,
0.0013866983,
-0.04804332,
-0.06898825,
0.021652717,
-0.0051351176,
-0.03772975,
-0.031345163,
0.025870591,
-0.015860362,
0.032616302,
-0.04740775,
0.0117291575,
0.028773991,
0.007872403,
-0.038769774,
0.033771884,
0.0017956661,
-0.00514234,
0.03411856,
-0.012075832,
-0.013036409,
0.00562624,
0.012574176,
-0.017781518,
-0.03018958,
0.04171651,
-0.027185066,
-0.02314053,
-0.018344864,
-0.020901589,
-0.00087074906,
-0.042149853,
0.002065603,
0.03330965,
-0.035476368,
-0.0011564848,
0.041456506,
0.018258195,
0.015860362,
0.06656152,
0.00980078,
-0.012530842,
0.016510379
] | In the following, we'll quickly explain how PyTorch models store layer weights and define layer names. In PyTorch, the
name of a layer is defined by the name of the class attribute you give the layer. Let's define a dummy model in
PyTorch, called SimpleModel as follows:
thon
from torch import nn
class SimpleModel(nn.Module):
def init(self):
super().init()
self.dense = nn.Linear(10, 10)
self.intermediate = nn.Linear(10, 10)
self.layer_norm = nn.LayerNorm(10) |
[
0.03436819,
-0.007426825,
-0.0029856386,
-0.0044411863,
0.025407353,
0.03490176,
0.03267332,
-0.043250564,
0.0006409707,
0.03684772,
0.033897396,
0.015528459,
0.03352076,
-0.07777569,
-0.012381965,
0.029016798,
-0.009266857,
-0.009196238,
-0.04186956,
-0.023147527,
0.0058810413,
0.022158852,
-0.058221914,
-0.04095935,
-0.01534014,
0.0033053884,
-0.012225033,
-0.0017596043,
0.041084897,
0.04390968,
0.011683616,
0.0042293277,
0.020416902,
-0.049559247,
-0.021782216,
-0.0069128713,
-0.0051003024,
-0.028702933,
-0.033991553,
-0.036314152,
0.043595817,
0.020369824,
-0.017953064,
-0.027604407,
-0.009871047,
-0.0031052995,
-0.0062184455,
0.028389068,
0.027933965,
-0.043972455,
0.0056574126,
0.0131117,
0.047801603,
-0.040080532,
-0.03323828,
0.003789917,
-0.014068988,
-0.018674953,
-0.03374046,
-0.025846763,
0.010098599,
0.013025388,
0.024936555,
-0.041210443,
0.017811825,
0.031041225,
0.012852762,
0.008466502,
-0.020605221,
-0.004562809,
-0.024073428,
0.0017341028,
-0.025579978,
-0.035498105,
-0.0208877,
0.014218074,
-0.013778663,
0.014484859,
-0.030664587,
0.0069403346,
0.0009700383,
0.026443107,
0.017089937,
-0.017325334,
-0.00063116243,
-0.05398474,
0.028169362,
-0.02137419,
-0.010231991,
0.009510103,
-0.0011397215,
0.025846763,
-0.02699237,
0.0051238425,
0.048429333,
0.027447473,
0.011503143,
0.042528674,
-0.022786582,
-0.044286318,
0.06380871,
0.12027298,
0.0027875116,
0.011691462,
-0.05131689,
0.052635122,
0.0010288879,
0.008544968,
-0.04406661,
-0.0036192532,
0.02485809,
0.040394396,
-0.005551483,
0.018910352,
0.027557326,
0.033709075,
0.012821375,
-0.008568509,
-0.019789174,
0.0044019534,
0.00716004,
0.030036857,
-0.015065509,
-0.05558545,
0.012640904,
0.008898066,
-0.013464798,
0.06029342,
-0.015285214,
-0.02699237,
0.00077926734,
-0.0017772593,
-0.041649856,
0.020150118,
0.01044385,
-0.036502473,
-0.021782216,
-0.0038448435,
0.011722849,
-0.0022774811,
0.019396843,
-0.045824256,
-0.027855499,
0.070242934,
-0.022284398,
-0.0041665547,
0.0046373517,
-0.01160515,
-0.026866823,
-0.022253012,
-0.036910497,
0.018502329,
0.00036388697,
-0.009188391,
0.0143907,
-0.007874083,
0.0026619656,
0.026286174,
-0.039390028,
-0.013425565,
0.03562365,
-0.015300907,
0.0031464943,
0.048335172,
-0.0130332345,
0.045416232,
-0.026976677,
-0.029675914,
0.0019812714,
-0.045730095,
0.021688055,
-0.021295724,
0.013998369,
-0.010459543,
0.029142344,
-0.0008763693,
0.04880597,
-0.0078113093,
0.028263522,
0.02021289,
-0.02824783,
0.0027365084,
0.0069638747,
0.02587815,
-0.0016830998,
0.0024756084,
-0.013213706,
-0.016838845,
-0.010938187,
0.0017488153,
0.06459337,
0.0512855,
-0.0129704615,
0.028263522,
-0.031025533,
-0.023006286,
-0.027227769,
0.054549698,
-0.031135384,
-0.03716159,
0.008850986,
0.020558143,
-0.043407496,
0.037820704,
-0.035874743,
0.046608917,
0.023916496,
0.061611652,
-0.012562437,
0.000394783,
0.042026494,
0.007513138,
-0.0032720403,
0.005371011,
0.027698565,
0.032736097,
-0.02708653,
0.010436003,
-0.010098599,
-0.020055959,
0.010365384,
0.019114364,
-0.0030542966,
0.015936483,
0.007732843,
-0.036565244,
-0.005261158,
0.044129387,
0.03722436,
-0.011887628,
0.028263522,
0.074009314,
-0.0006051705,
0.047958538,
0.014116067,
0.012421198,
0.037381295,
0.028671546,
0.0264588,
0.0016114995,
0.016273888,
-0.009259011,
-0.005786882,
-0.003313235,
-0.0036859494,
0.027274849,
0.0036761411,
0.03562365,
-0.042246196,
0.046043962,
-0.0106949415,
0.049308155,
0.029456208,
0.0045667323,
-0.073004946,
-0.006779479,
0.011299131,
0.008042784,
-0.034274034,
0.0057044923,
-0.0132843265,
0.0046922783,
0.00823895,
0.02016581,
0.043595817,
0.048586264,
-0.015198901,
0.003244577,
-0.020479675,
-0.06647656,
-0.04463157,
-0.06129779,
-0.09252733,
-0.024732543,
-0.056621205,
0.011730696,
0.025375966,
-0.029487595,
0.023241686,
-0.022755196,
0.0022088233,
0.031323705,
-0.023257378,
0.020291356,
0.021923454,
0.03684772,
-0.04500821,
0.013864976,
-0.03600029,
0.027698565,
-0.014469165,
-0.02485809,
0.009863201,
-0.011338364,
0.02311614,
-0.0045157294,
0.011354058,
-0.070305705,
-0.0051042256,
-0.017089937,
-0.02708653,
-0.013558958,
-0.003466244,
0.02132711,
-0.066664875,
0.03731852,
0.016446514,
-0.05363949,
0.0071011903,
0.059979558,
-0.00655585,
0.064467825,
0.014163148,
-0.003136686,
-0.035309788,
0.025658445,
0.039327256,
0.0027267002,
-0.007980011,
-0.06622547,
-0.03747545,
-0.0010896992,
-0.0039076163,
-0.03662802,
0.00719535,
0.022613956,
0.008411576,
-0.03832289,
-0.0029915236,
-0.095603205,
-0.02262965,
-0.018188464,
-0.0007885852,
0.03684772,
-0.023539858,
0.024654077,
-0.0517563,
-0.0036722177,
-0.0009700383,
0.026286174,
-0.0013084237,
-0.019412536,
0.024434373,
0.040143304,
0.013582498,
-0.013668811,
-0.013064621,
-0.014963503,
0.0034642823,
0.04158708,
0.011259899,
-0.002261788,
0.009823967,
0.0025579978,
0.008678361,
0.011040193,
-0.0052650813,
0.015128282,
-0.0059281206,
-0.021295724,
0.008450809,
-0.010553703,
-0.006316528,
-0.013543265,
-0.036314152,
-0.00935317,
-0.025579978,
0.03304996,
0.028436149,
-0.052760668,
0.031857274,
-0.017137017,
-0.02219024,
-0.026945291,
0.0067873257,
-0.028232135,
0.03267332,
0.021389883,
0.08304862,
-0.024983635,
-0.04616951,
0.030429188,
0.008780367,
0.028671546,
-0.0018959393,
0.06647656,
-0.0042214813,
-0.021923454,
-0.025501512,
-0.019145751,
0.0016654449,
-0.016980084,
-0.034525122,
-0.00443334,
-0.029675914,
-0.011314825,
0.03436819,
0.061862744,
0.028765706,
0.020966167,
0.032861643,
-0.0074229017,
0.0008587144,
0.025328886,
-0.023006286,
0.0010122139,
-0.03590613,
0.0417754,
-0.014673178,
-0.011730696,
-0.008113404,
0.0016046336,
0.004664815,
-0.00049629866,
-0.0069991844,
0.011722849,
-0.052666508,
0.022378558,
-0.01991472,
0.05828469,
-0.015089049,
-0.026678504,
-0.037192974,
0.014500552,
0.047832992,
-0.032171138,
0.008082017,
-0.005724109,
0.050595,
0.019663628,
-0.06459337,
-0.019600855,
-0.030272257,
-0.056840908,
-0.0015595156,
0.02248841,
0.01691731,
-0.0088196,
0.022723809,
-0.024826704,
-0.022755196,
0.0031523793,
-0.026615731,
0.018674953,
0.017529348,
-0.00040336527,
-0.013872823,
-0.006387148,
-0.04569871,
-0.010687095,
-0.0034309342,
-0.04613812,
0.011730696,
-0.043187793,
0.021452656,
0.03800902,
-0.01211518,
-0.03653386,
0.03261055,
-0.0022539413,
-0.014641792,
0.02262965,
-0.00301114,
-0.029550368,
-0.01657206,
0.019647934,
0.014626098,
0.025046408,
0.042371742,
-0.025062101,
-0.009667035,
0.007336589,
0.04051994,
-0.055177424,
0.01628958,
-0.046263665,
0.012083793,
-0.04871181,
0.0059281206,
0.04268561,
-0.06873638,
0.04321918,
-0.025360273,
-0.044819888,
-0.024355905,
-0.0499045,
-0.03421126,
-0.02219024,
-0.020181505,
0.028075203,
0.01661914,
-0.029895619,
-0.0029444438,
-0.06377732,
0.03235946,
-0.009808274,
-0.05787666,
-0.035058696,
0.051944617,
0.01807861,
0.040457167,
-0.01749796,
-0.05398474,
0.024214666,
-0.016305275,
0.028122284,
0.005892811,
0.018000145,
0.029722994,
-0.009502255,
-0.030523349,
-0.03439958,
-0.03687911,
-0.030350722,
-0.0060536666,
-0.005363164,
0.0101535255,
-0.021876374,
-0.011981787,
0.030837214,
-0.00037369525,
-0.042246196,
-0.032485005,
0.010200605,
0.04265422,
-0.026552958,
0.0009337477,
-0.0499045,
-0.055114653,
0.0013682542,
0.028797092,
-0.033175506,
0.0075327544,
-0.05834746,
-0.04855488,
0.01958516,
0.04026885,
-0.00981612,
-0.034242645,
0.029424822,
-0.029832846,
0.009549336,
-0.022645343,
-0.026019389,
-0.036941882,
-0.021107405,
-0.028922638,
0.016211115,
0.00073218765,
-0.031512022,
0.02306906,
0.0072895093,
0.031025533,
0.047079716,
-0.011401137,
0.0016477901,
-0.009180545,
0.014822263,
-0.01687023,
-0.00018868667,
-0.019130057,
0.03126093,
-0.019757787,
0.06760647,
-0.037820704,
-0.02708653,
0.011299131,
-0.01807861,
0.050186977,
-0.030350722,
-0.023759563,
0.013747277,
-0.036282767,
-0.015889404,
0.012578131,
-0.015426453,
-0.035341173,
-0.0016036528,
-0.04704833,
0.044349093,
-0.0119896345,
-0.006806942,
-0.022425637,
-0.010326151,
0.036282767,
-0.01759212,
0.035655037,
0.055616837,
0.016046336,
-0.008709747,
-0.035843357,
0.022472717,
0.014335773,
0.00028934408,
0.018439556,
0.010569396,
-0.045353457,
0.0023539858,
0.037820704,
-0.065597735,
-0.020228583,
0.022504104,
0.018627875,
0.015669698,
0.044819888,
-0.002567806,
-0.042277586,
-0.007983935,
0.028090896,
-0.0037192975,
0.009478716,
0.0021440887,
0.0016526942,
-0.00025526033,
0.046985555,
-0.002528573,
-0.039515574,
0.04259145,
0.009298244,
-0.019177137,
-0.021342805,
0.021436963,
0.02485809,
-0.025328886,
-0.007819156,
-0.0064106877,
0.0070541105,
-0.016854538,
-0.03430542,
-0.0011701271,
0.0034015095,
-0.046828624,
0.014845803,
-0.016776072,
-0.00040189404,
-0.02926789,
-0.0055044033,
-0.0022049,
-0.034807604,
0.01160515,
0.043030858,
-0.04268561,
0.0072816624,
-0.02146835,
-0.00151734,
-0.01599141,
-0.0048766737,
0.04152431,
-0.04516514,
0.020919086,
0.025815377,
0.0022970978,
0.057782505,
-0.015269521,
0.015473533,
0.017325334,
0.013190167,
-0.046608917,
-0.03662802,
0.022268705,
0.030115325,
0.01209164,
-0.0018263006,
0.030743053,
-0.0028993257,
0.022409944,
-0.021248644,
-0.07570418,
0.018565102,
-0.023053367,
-0.039923597,
0.010075059,
-0.032390844,
-0.031119691,
0.004260714,
0.003136686,
-0.025517205,
-0.0044568796,
0.00023748283,
0.021217259,
0.06217661,
-0.038228728,
0.010357537,
-0.022551183,
-0.01485365,
-0.053325623,
-0.023994962,
0.014735951,
-0.0044804197,
0.018973125,
-0.018329702,
0.025579978,
-0.010067212,
-0.007073727,
0.026552958,
0.015293061,
0.012821375,
-0.016681911,
-0.005739802,
-0.03954696,
0.016744684,
0.037444066,
-0.01982056,
0.027855499,
0.020134425,
-0.016062029,
0.023461392,
-0.022504104,
0.05950876,
-0.024450066,
0.0044058766,
-0.00025624115,
0.028906945,
-0.053043146,
-0.0016232693,
-0.03465067,
-0.024198974,
0.03314412,
0.004904137,
0.0052807746,
0.044819888,
0.033332437,
0.045416232,
-0.032641936,
0.035498105,
0.00050561654,
0.0145554785,
-0.00014038091,
0.031480636,
0.010781255,
-0.023053367,
0.062207997,
-0.0023814489,
-0.040551327,
0.0487432,
0.0076465304,
-0.023602631,
-0.007568064,
0.015826631,
0.029974084,
0.04507098,
-0.025313193,
-0.037036043,
-0.023257378,
-0.025564285,
-0.01204456,
0.026945291,
-0.05423583,
0.00981612,
0.028310603,
-0.04908845,
-0.0037997253,
-0.017874599,
-0.025454432,
0.0287814,
0.036910497,
0.000852339,
-0.007983935,
-0.0022637497,
-0.01861218,
0.038228728,
-0.016634833,
-0.025360273,
0.009627801,
-0.00714827,
-0.034242645,
-0.01986764,
0.0006041897,
0.05238403,
0.009463022,
-0.016713299,
-0.013653117,
-0.042528674,
0.01490073,
0.03926448,
-0.020134425,
-0.0039115394,
-0.036941882,
0.044945434,
-0.02253549,
-0.0060497434,
-0.0026070392,
0.010326151,
0.03235946,
-0.0038232652,
-0.024779623,
0.0130960075,
0.008835293,
-0.03257916,
0.002069546,
0.017968757,
0.02379095,
-0.023414312,
0.008929453,
-0.025658445,
0.025595672,
0.037663773,
0.014092528,
0.0007199273,
-0.0010063289,
0.017968757,
-0.05819053,
0.012217186,
0.030554734,
0.021389883,
0.06154888,
0.06547219,
-0.02098186,
-0.037192974,
0.05596209,
-0.0037016426,
0.014359313,
-0.0075994506,
-0.017529348,
-0.016603446,
0.006630393,
-0.009321784,
-0.02107602,
-0.032767482,
0.025862457,
-0.0037918787,
0.057092,
0.0050022197,
-0.014288694,
0.025171954,
0.037381295,
0.025077796,
-0.011322672,
0.02917373,
-0.0064224578,
0.04149292,
-0.031810194,
0.027243461,
-0.02074646,
0.0062655252,
0.0038605367,
-0.0666021,
-0.0045667323,
0.042371742,
0.010663555,
0.010624322,
0.002915019,
-0.047895763,
0.011393291,
-0.0452593,
-0.008529275,
-0.026584346,
0.00096268207,
0.012429045,
-0.030790133,
-0.012640904,
0.045290686,
0.016603446,
0.014014062,
0.004358797,
0.07162394,
0.046985555,
0.06616269,
0.030429188,
-0.027933965,
0.02466977,
-0.009659188,
-0.029440515,
0.026725585,
-0.012554591,
0.010851874,
0.020589529,
-0.026443107,
-0.04042578,
-0.015214594,
0.01889466,
0.019082978,
-0.05944599,
0.027070835,
0.010271224,
-0.029989779,
-0.0010543894,
0.07018016,
0.011911168,
0.009259011,
0.015912944,
-0.030852906,
-0.025030715,
-0.0012172068,
-0.023178913,
0.072942175,
-0.01842386,
-0.02922081,
-0.029393435,
-0.04516514,
-0.0038232652,
0.035215627,
0.041618466,
-0.012193646,
-0.0016978122,
0.04792715,
0.050469454,
0.01759212,
-0.030805826,
-0.035435334,
0.039766666,
0.05712339,
-0.0045314226,
0.07011739,
0.09510102,
-0.008270336,
-0.004562809,
-0.0018959393,
0.009737655,
0.021342805,
0.02743178,
-0.014406392,
0.001704678,
0.015442147,
-0.055114653,
0.002660004,
0.04908845,
-0.04748774,
0.0074817515,
-0.013315713,
-0.034242645,
-0.041838173,
0.011911168,
-0.046891395,
0.03455651,
0.013456952,
0.010624322,
0.007881929,
-0.07796401,
0.29402852,
0.028859865,
0.030319337,
0.0017036971,
0.048837356,
0.028090896,
0.03267332,
-0.017011471,
-0.017513653,
-0.03126093,
0.014437779,
-0.042811155,
-0.033332437,
0.03785209,
-0.0070541105,
0.010349691,
-0.09717253,
0.0061674425,
-0.004170478,
-0.055114653,
-0.027149303,
-0.0081918705,
0.018047225,
0.020872006,
0.05470663,
-0.03989221,
0.0046177353,
-0.06653933,
0.016838845,
-0.006132133,
0.003124916,
-0.052007392,
0.016069876,
0.02074646,
-0.03188866,
-0.0016723108,
-0.020558143,
-0.01991472,
-0.052509576,
-0.0020558143,
-0.046985555,
-0.03866814,
0.03439958,
-0.009141311,
-0.028671546,
0.008874526,
0.0037624538,
0.04588703,
0.007791693,
-0.03901339,
0.06622547,
-0.051881846,
0.012319192,
-0.0499045,
-0.09045582,
0.039295867,
-0.029283583,
-0.017372414,
-0.008882373,
0.019977493,
-0.0067716325,
0.022394251,
-0.029738687,
-0.006897178,
0.017356722,
0.030758748,
-0.034525122,
0.053043146,
0.007987859,
-0.012460431,
0.025611365,
-0.012170106,
-0.03383462,
0.033175506,
0.020542448,
0.008215411,
-0.022786582,
0.023947882,
-0.0308686,
-0.033897396,
0.011369751,
0.007438595,
0.013519725,
-0.056181792,
0.019569468,
0.04230897,
-0.04908845,
-0.01490073,
-0.017984452,
0.005374934,
0.01216226,
0.040833805,
0.0073954384,
-0.002301021,
-0.0049394467
] |
This will print out the following:
SimpleModel(
(dense): Linear(in_features=10, out_features=10, bias=True)
(intermediate): Linear(in_features=10, out_features=10, bias=True)
(layer_norm): LayerNorm((10,), eps=1e-05, elementwise_affine=True)
)
We can see that the layer names are defined by the name of the class attribute in PyTorch. You can print out the weight
values of a specific layer:
python
print(model.dense.weight.data)
to see that the weights were randomly initialized
tensor([[-0.0818, 0.2207, -0.0749, -0.0030, 0.0045, -0.1569, -0.1598, 0.0212,
-0.2077, 0.2157],
[ 0.1044, 0.0201, 0.0990, 0.2482, 0.3116, 0.2509, 0.2866, -0.2190,
0.2166, -0.0212],
[-0.2000, 0.1107, -0.1999, -0.3119, 0.1559, 0.0993, 0.1776, -0.1950,
-0.1023, -0.0447],
[-0.0888, -0.1092, 0.2281, 0.0336, 0.1817, -0.0115, 0.2096, 0.1415,
-0.1876, -0.2467],
[ 0.2208, -0.2352, -0.1426, -0.2636, -0.2889, -0.2061, -0.2849, -0.0465,
0.2577, 0.0402],
[ 0.1502, 0.2465, 0.2566, 0.0693, 0.2352, -0.0530, 0.1859, -0.0604,
0.2132, 0.1680],
[ 0.1733, -0.2407, -0.1721, 0.1484, 0.0358, -0.0633, -0.0721, -0.0090,
0.2707, -0.2509],
[-0.1173, 0.1561, 0.2945, 0.0595, -0.1996, 0.2988, -0.0802, 0.0407,
0.1829, -0.1568],
[-0.1164, -0.2228, -0.0403, 0.0428, 0.1339, 0.0047, 0.1967, 0.2923,
0.0333, -0.0536],
[-0.1492, -0.1616, 0.1057, 0.1950, -0.2807, -0.2710, -0.1586, 0.0739,
0.2220, 0.2358]]).
In the conversion script, you should fill those randomly initialized weights with the exact weights of the
corresponding layer in the checkpoint. E.g.
thon
retrieve matching layer weights, e.g. by
recursive algorithm
layer_name = "dense"
pretrained_weight = array_of_dense_layer
model_pointer = getattr(model, "dense")
model_pointer.weight.data = torch.from_numpy(pretrained_weight) |
[
0.030688604,
-0.027487068,
-0.022064645,
0.016699908,
0.0014006722,
0.0026318938,
0.022280965,
-0.014147331,
0.020305242,
0.039572146,
0.018286254,
0.0072323,
0.057685345,
-0.03472658,
-0.027184218,
0.01564715,
-0.00283199,
0.0077009937,
-0.033515185,
-0.008400428,
0.0086239595,
-0.010087725,
-0.08156708,
-0.00046598943,
-0.0539358,
-0.006168727,
0.019728389,
-0.011717335,
0.04531184,
0.036745563,
0.017954564,
0.02678042,
0.0036846513,
-0.027443804,
0.002413771,
-0.006410284,
-0.025857456,
0.023146246,
-0.049840137,
-0.029203206,
0.029650267,
-0.0016692696,
0.008184108,
-0.06339619,
-0.019165955,
0.013721902,
-0.008667223,
-0.02395384,
-0.018271834,
-0.025828613,
0.01057084,
-0.0100805145,
0.0067491853,
-0.026088197,
-0.013015256,
0.00087384286,
-0.024833541,
-0.048253793,
-0.02297319,
-0.045513738,
0.042687155,
-0.0028842674,
-0.016786436,
-0.048542216,
0.009950722,
-0.010441047,
-0.019310169,
0.029938694,
-0.029217627,
0.009900248,
-0.045282997,
-0.0056892172,
-0.021083994,
-0.03928372,
-0.019872602,
0.026939057,
-0.010520365,
-0.010224728,
-0.027155377,
0.032851804,
0.0031330353,
0.018358361,
-0.002891478,
0.0031546673,
-0.035245746,
-0.030602075,
-0.009943511,
0.0023200326,
-0.036832094,
-0.021487791,
-0.026073776,
0.03138083,
-0.03746663,
0.030284807,
0.001981131,
0.04932097,
-0.018819844,
0.043437064,
0.02168969,
-0.049147915,
0.032534536,
0.100084074,
-0.008833068,
0.025352709,
-0.048398003,
-0.007145772,
0.029621424,
-0.011263064,
-0.011558701,
-0.03885108,
-0.007091692,
0.042802528,
-0.032361478,
0.04262947,
-0.038678024,
0.04306211,
0.00073954416,
-0.025136389,
-0.031092402,
-0.011053954,
0.038908765,
-0.03452468,
-0.0069655054,
-0.0101598315,
0.054426122,
-0.0058406414,
-0.00066248013,
0.06143489,
0.00079272286,
-0.01359932,
-0.013303683,
-0.028107185,
-0.02698232,
0.04545605,
-0.055897098,
-0.018387204,
-0.05289746,
0.021386841,
0.03515922,
-0.012863832,
0.0036359795,
-0.008104791,
0.0052673933,
0.079375036,
-0.011118851,
-0.041158494,
0.02363657,
-0.025597872,
-0.043235168,
-0.025597872,
-0.020593667,
0.035015006,
0.010217517,
0.019497646,
-0.041360393,
-0.0037964168,
0.010953005,
0.02891478,
0.0006056961,
-0.0007445015,
0.018603524,
0.0049789664,
-0.0356207,
0.061665636,
-0.00063003215,
0.046523232,
-0.018646788,
-0.016469166,
0.004899649,
-0.041302707,
0.02773223,
0.00744862,
-0.021357998,
-0.011248643,
0.022901082,
0.07297196,
0.015589464,
0.0004637361,
0.009748823,
0.0023434672,
-0.0072683534,
-0.0056675854,
0.04995551,
0.046234805,
0.056098998,
-0.016137475,
-0.015416409,
-0.0029203207,
0.018964058,
0.046436705,
0.0038685235,
0.047878835,
-0.046927027,
0.056502797,
-0.036601353,
0.019252485,
-0.019079428,
0.014983769,
0.019295748,
-0.050993845,
-0.0030248752,
0.032534536,
-0.03841844,
0.039081823,
0.0025309445,
0.0013592109,
-0.0058550625,
0.05782956,
-0.0075495695,
0.058233358,
0.010210306,
-0.0067491853,
-0.0021740166,
-0.055291403,
0.031005872,
-0.011090008,
0.006183148,
0.013368579,
0.015127982,
0.0010897123,
-0.0009274722,
0.04317748,
0.021098414,
-0.0005606295,
0.007924524,
-0.028410032,
0.0011843522,
0.025395973,
0.00334575,
0.0016954084,
0.0005709948,
0.016671065,
0.007347671,
0.030775132,
0.034813106,
-0.032303795,
0.019439962,
0.021992538,
-0.0048203315,
0.0034412914,
0.048542216,
0.0405528,
0.035043847,
0.029707953,
0.0035007794,
-0.0009905655,
0.010116568,
0.018603524,
-0.0582622,
0.019728389,
-0.056070156,
0.02039177,
0.022136752,
-0.0024299952,
-0.04389855,
-0.016339375,
0.006680684,
0.031669255,
-0.053041674,
-0.023059716,
-0.003513398,
0.01716139,
-0.0076144654,
-0.019108271,
0.05999276,
0.029909851,
-0.0116163865,
0.023881733,
-0.0019414724,
-0.03919719,
-0.05958896,
-0.071414456,
-0.051859125,
-0.02481912,
-0.057021964,
-0.034063198,
0.04909023,
0.011097218,
0.03302486,
0.012164397,
0.00285903,
0.012366296,
-0.0046256436,
0.030775132,
0.007145772,
0.030948188,
-0.033918984,
0.04963824,
-0.027112111,
-0.0077082044,
-0.012005762,
-0.0031041927,
-0.0024245873,
-0.0061326735,
0.030688604,
0.009006125,
0.054656863,
-0.023896154,
-0.0235212,
0.014760238,
0.02037735,
0.007621676,
0.00030870675,
-0.013015256,
-0.031150086,
0.04081238,
0.012979203,
-0.050330464,
-0.00291311,
0.07654845,
-0.042456415,
0.028078342,
-0.0011086402,
0.044302344,
-0.02092536,
0.030313648,
0.050099723,
-0.0043552434,
-0.02320393,
-0.057656504,
-0.02308856,
0.033688243,
0.025323866,
-0.063915364,
-0.02871288,
0.017002756,
-0.0014475416,
-0.035476487,
-0.0013664216,
-0.07129908,
-0.06483833,
-0.010541997,
-0.019814916,
0.056300897,
0.033803612,
0.01057084,
-0.04998435,
-0.0005353921,
-0.00039298143,
0.026679473,
0.0057973773,
-0.020636933,
0.03657251,
0.02396826,
0.017103706,
0.004650881,
0.04147576,
-0.039514463,
-0.001364619,
0.010606893,
0.038245384,
0.014039171,
-0.0042182407,
-0.00089006685,
-0.010743896,
0.0057360865,
-0.0112991175,
0.010066093,
0.017954564,
0.009453186,
0.015661571,
-0.0025706033,
0.021675268,
-0.012705198,
-0.024126897,
-0.012214872,
0.010938584,
0.04098544,
0.044936884,
0.011349591,
0.012041816,
-0.016627802,
-0.023477936,
0.004899649,
-0.017118126,
-0.019122692,
0.039514463,
0.027588017,
0.016368216,
-0.03420741,
-0.049580555,
0.040956594,
0.023564463,
0.070549175,
0.01759403,
-0.016584536,
-0.024674907,
0.008472535,
-0.0151135605,
0.010614104,
0.013080152,
-0.0003402534,
-0.013794009,
-0.009763245,
-0.011162114,
-0.0211561,
0.009799298,
0.047417354,
0.009669506,
0.020867674,
0.051859125,
0.009986775,
-0.0030825606,
0.02590072,
-0.041533448,
-0.08733562,
-0.05269556,
0.047821153,
-0.01337579,
-0.012380717,
-0.0027580806,
0.013620952,
-0.0012690776,
-0.012222082,
-0.04372549,
0.0069691106,
-0.046898186,
-0.04046627,
0.017738244,
0.046523232,
0.0076577296,
-0.034611207,
-0.034466993,
0.0177094,
0.060454242,
-0.070606865,
0.015949998,
-0.020636933,
0.010556418,
-0.00895565,
-0.037062835,
-0.010231938,
-0.018617945,
-0.033197917,
-0.025857456,
0.039543305,
0.033428658,
-0.009719981,
0.005469292,
-0.038995292,
0.01155149,
0.020853253,
-0.0017846404,
0.0031546673,
0.0066842893,
0.018935215,
0.0035818995,
0.014825134,
-0.03856265,
-0.0051412066,
0.020088922,
-0.04522531,
0.05852178,
-0.04326401,
0.018473731,
-0.020334084,
0.034409307,
-0.03856265,
0.040293213,
0.001794555,
-0.040610485,
0.0028698458,
0.0008283255,
-0.012640301,
-0.02029082,
0.012258136,
0.003551254,
-0.007297196,
-0.008775383,
0.021285892,
-0.0012600643,
0.008919597,
0.017291183,
-0.050099723,
0.008544642,
0.001894603,
0.017247919,
-0.0022839792,
-0.001862155,
0.030198278,
-0.045831006,
0.056618165,
-0.031092402,
-0.02644873,
-0.019887023,
-0.049147915,
-0.03267875,
0.0023128218,
-0.025482502,
0.03412088,
0.03971636,
-0.011090008,
0.013217155,
0.014255491,
-0.009914668,
-0.029909851,
-0.052724406,
0.028539825,
0.06183869,
0.02288666,
0.007686572,
-0.018185304,
-0.02362215,
0.029376263,
-0.012395139,
0.003875734,
-0.013130627,
-0.060684983,
-0.02060809,
-0.0049032546,
-0.048311476,
-0.01706044,
0.0035260168,
-0.0063922573,
0.0258863,
-0.035216905,
-0.024934491,
-0.03507269,
-0.039658673,
0.053474315,
-0.0075351484,
-0.037178203,
-0.07447178,
-0.0068970043,
-0.006760001,
0.010073303,
-0.00053674413,
-0.048484534,
-0.04433119,
-0.026304517,
0.04228336,
-0.04369665,
0.011190957,
-0.038043484,
-0.037812743,
0.025482502,
0.01165244,
0.054570336,
-0.03215958,
0.01326763,
-0.03267875,
0.032967176,
-0.060396556,
-0.0014790883,
-0.009525293,
-0.016108632,
-0.02924647,
0.04436003,
0.0075063054,
-0.047849994,
0.03983173,
-0.010693421,
0.015387566,
0.007816364,
-0.042225674,
-0.030775132,
0.043783177,
-0.009748823,
0.033717085,
-0.0030176647,
-0.046898186,
0.028684039,
-0.036428295,
0.053243574,
-0.017204653,
-0.015200089,
0.0063814414,
-0.031438515,
0.026766,
-0.018661208,
0.043610122,
-0.039427932,
-0.016238425,
-0.008011052,
0.015906734,
-0.025972826,
-0.009936301,
-0.015531779,
-0.088950805,
0.0256844,
-0.050705418,
0.006695105,
-0.009734402,
-0.0068933987,
0.035361115,
-0.0038649181,
0.042023774,
0.072337426,
0.014183384,
0.0076000444,
-0.027386118,
0.0042578997,
0.010974637,
-0.0035170035,
0.011587543,
0.0058586677,
-0.028986886,
-0.010102146,
-0.004467009,
-0.05211871,
-0.0168297,
0.003491766,
0.0057288758,
0.019540912,
0.048628747,
0.018747738,
-0.015257774,
-0.044936884,
0.031092402,
-0.008061527,
0.010967426,
-0.026073776,
0.015661571,
-0.025814192,
0.021487791,
-0.0015584057,
-0.042139146,
0.019800495,
0.047100086,
0.008472535,
-0.05459918,
0.0012853016,
0.008133634,
-0.018733315,
-0.057368077,
-0.023074139,
-0.018949635,
0.00028437073,
-0.009770456,
-0.0139742745,
0.012863832,
-0.036860935,
0.017103706,
0.013224365,
0.021127257,
-0.017738244,
0.007859629,
-0.004146134,
-0.034063198,
0.03259222,
0.06708806,
-0.049234442,
-0.018762158,
-0.030803975,
-0.0007814562,
0.0067059216,
-0.045484893,
0.07856744,
-0.033284444,
0.0059091426,
0.001735067,
-0.020449456,
0.056704696,
-0.01716139,
-0.02611704,
0.024271108,
-0.02104073,
-0.04955171,
-0.015459673,
0.012712408,
0.006056961,
0.045600265,
-0.013411843,
0.024357637,
-0.0044309557,
0.028410032,
-0.043408222,
-0.0846244,
-0.02277129,
-0.057050806,
-0.02666505,
0.009972354,
-0.004434561,
-0.02653526,
-0.009489239,
0.015315459,
-0.026059356,
-0.017406553,
0.011032322,
-0.027688965,
0.008587906,
-0.031178929,
0.034149725,
-0.05203218,
-0.02070904,
-0.029304156,
-0.011371223,
0.004542721,
-0.018329518,
0.028410032,
0.024098054,
0.017420974,
-0.0018711684,
-0.0025129179,
-0.004185793,
-0.024372058,
-0.02168969,
-0.05803146,
0.048974857,
0.0014529496,
0.02988101,
0.046696287,
-0.039456777,
0.010693421,
-0.041619975,
-0.021603161,
-0.006377836,
-0.021559898,
0.029159943,
0.0013664216,
-0.03948562,
0.034063198,
0.05935822,
-0.016108632,
0.0024552324,
-0.01802667,
-0.01154428,
-0.0035494515,
-0.021978116,
0.05794493,
0.05255135,
-0.030890502,
0.039514463,
0.012784515,
0.034668893,
-0.007737047,
0.0399471,
-0.012286979,
0.0029635846,
-0.0076577296,
-0.009323394,
0.039889418,
0.03492848,
-0.045167625,
0.053012833,
0.008775383,
-0.013238787,
-0.0003247054,
0.02946279,
0.010376152,
0.054339595,
-0.01564715,
-0.019598596,
-0.0042038197,
-0.02168969,
-0.006302124,
0.02417016,
-0.07101066,
0.0069006095,
-0.006020908,
-0.022828976,
-0.015401987,
-0.041937247,
0.00873212,
0.014738605,
0.0511669,
-0.007380119,
-0.020954201,
-0.0018071737,
0.010433837,
0.031438515,
-0.03628408,
-0.00046463744,
-0.0036684275,
-0.021632005,
-0.06160795,
-0.061723318,
0.0156183075,
0.072049,
-0.023131823,
0.0007233202,
-0.042456415,
0.0072899857,
0.01315947,
-0.003785601,
0.023679834,
0.03564954,
-0.04274484,
0.019454382,
-0.0088547,
0.020016816,
-0.0049176756,
0.045831006,
0.0088547,
0.010318466,
-0.008068738,
0.033197917,
0.008104791,
-0.038793396,
-0.0060930145,
0.04274484,
0.05105153,
-0.0092584975,
0.02934742,
0.02212233,
0.052378293,
0.018286254,
0.014233859,
-0.038649183,
0.04998435,
0.0012636696,
-0.039629832,
-0.004946518,
0.032621063,
0.014334808,
0.019439962,
0.04911907,
-0.033399817,
0.013714691,
0.018531417,
-0.0039262087,
-0.00020527872,
-0.011335171,
0.030284807,
0.0077298363,
-0.016094211,
0.017565187,
0.0046328544,
-0.029159943,
-0.001545787,
0.0034286727,
0.05408001,
0.016584536,
0.0020334085,
0.018545838,
-0.0017260537,
0.048426848,
-0.019540912,
0.017017176,
-0.025727663,
-0.010008408,
-0.007145772,
0.02018987,
0.008126423,
0.015906734,
-0.024703749,
-0.06956853,
-0.026996741,
0.032188423,
-0.031207772,
-0.042023774,
0.004423745,
-0.016584536,
-0.010311255,
-0.039427932,
0.02578535,
-0.08127865,
-0.0008148055,
0.020896517,
-0.03495732,
-0.0468405,
0.011183746,
0.0022533338,
0.007974999,
-0.008515799,
0.05958896,
0.008126423,
0.068991676,
0.025857456,
0.038822237,
0.015257774,
-0.011702915,
-0.030054064,
-0.024516271,
0.0107150525,
0.019266905,
0.013981486,
-0.012885464,
-0.0712414,
0.012135554,
0.02654968,
0.02709769,
-0.03293833,
0.052839775,
0.04274484,
-0.06541518,
0.03293833,
0.07003001,
0.027241904,
0.01187597,
0.023910576,
-0.020218713,
-0.032361478,
0.014486233,
0.004748225,
0.06506907,
-0.0265641,
-0.068126395,
-0.014551128,
-0.009554136,
-0.024011524,
0.058319885,
-0.038216542,
-0.011998552,
0.020968623,
0.012149976,
0.032448005,
0.04885949,
-0.03515922,
-0.032851804,
0.033861298,
0.044417717,
-0.017190233,
0.045888692,
0.056906592,
-0.0014259096,
0.04438887,
0.014882819,
0.021848325,
0.0045679584,
-0.019987972,
-0.027443804,
-0.019497646,
-0.053791586,
-0.025395973,
0.0029203207,
0.04176419,
-0.037610844,
-0.022165595,
-0.047849994,
-0.03564954,
-0.04810958,
0.0065436815,
-0.023708677,
0.017103706,
-0.017954564,
0.000104780025,
0.027847601,
-0.028006235,
0.24781625,
0.058233358,
0.033947825,
-0.023578884,
0.048051894,
0.05687775,
0.048946016,
0.019584175,
-0.03538996,
-0.07170288,
0.008140844,
-0.02944837,
-0.0039550513,
0.015661571,
-0.014709763,
-0.0010248162,
-0.032332636,
-0.0026697498,
-0.0025814192,
-0.051743753,
-0.020867674,
0.024674907,
0.00437327,
0.031121245,
0.037149362,
0.0022280964,
-0.0060713827,
-0.07349113,
-0.034870792,
-0.0032015366,
-0.030948188,
-0.020002393,
0.027011164,
-0.01457276,
0.032822963,
0.01920922,
0.013123416,
-0.0033601713,
-0.01812762,
-0.018214148,
0.011904813,
-0.007098903,
0.024674907,
0.011284696,
0.010022828,
0.012077869,
-0.0070087695,
0.013000835,
0.016930649,
-0.081855506,
0.03475542,
-0.035043847,
0.024098054,
-0.06656889,
-0.036082182,
-0.015517358,
-0.018949635,
-0.023002032,
0.024473008,
0.021314735,
0.007852417,
0.026391046,
-0.018545838,
0.026376624,
0.03766853,
-0.014738605,
0.009597399,
0.011248643,
0.016541272,
-0.013433475,
0.012416771,
0.008645591,
-0.021487791,
0.017666137,
-0.015329881,
0.048801802,
0.008061527,
0.043581277,
0.0038144435,
-0.02212233,
-0.02320393,
0.01704602,
0.0029095046,
-0.03625524,
0.017781507,
0.048051894,
-0.0026192751,
-0.023679834,
-0.010657367,
0.017882457,
0.024977755,
0.06489601,
-0.00024043072,
0.0156183075,
0.018863108
] | Some layers were not added, i.e. an activation layer was not added, or the residual connection was forgotten
The word embedding matrix was not tied
The wrong positional embeddings are used because the original implementation uses on offset
Dropout is applied during the forward pass. To fix this make sure model.training is False and that no dropout
layer is falsely activated during the forward pass, i.e. pass self.training to PyTorch's functional dropout |
[
0.034377195,
-0.0415492,
-0.0062376754,
0.007678885,
-0.010606696,
0.0027519157,
0.022696212,
-0.012059254,
0.009623194,
0.04642132,
0.036858648,
-0.028945236,
0.055469543,
-0.06379148,
-0.016628757,
0.054773524,
-0.020865384,
0.00048063957,
-0.04481745,
-0.021455485,
0.0073876167,
-0.015690647,
-0.0685123,
-0.015266985,
-0.012649355,
0.0008109167,
0.007807497,
-0.030564232,
0.0719016,
0.038462512,
-0.020169366,
-0.021016693,
0.023558667,
-0.02062329,
-0.010546173,
-0.03337856,
-0.01983649,
-0.008949873,
-0.034740336,
-0.021016693,
0.02826435,
-0.0043614553,
0.014071651,
-0.048418585,
-0.06554666,
0.016749805,
-0.026539437,
0.013390765,
0.035738967,
-0.06469934,
-0.0111816665,
0.017748438,
-0.0016454754,
-0.008685084,
-0.040762395,
-0.006805081,
-0.018626025,
-0.024254685,
-0.036677077,
-0.034800857,
0.056286603,
0.03691917,
0.018852986,
-0.040943965,
0.00832951,
0.024315208,
-0.0045922003,
0.008972569,
-0.0007830193,
-0.023573799,
0.007005564,
0.018595763,
-0.02414877,
-0.055893205,
-0.0066348594,
0.028506441,
0.013874951,
-0.013844689,
-0.016159702,
0.04384908,
-0.0024606476,
0.026630221,
0.020593029,
-0.0034252366,
-0.022923173,
-0.020865384,
0.03988481,
-0.0097820675,
-0.015887348,
0.01132541,
-0.007905847,
0.024648085,
-0.025313841,
0.01124219,
0.025389496,
0.018822724,
-0.033802226,
0.016432058,
0.024042854,
-0.043213587,
0.023528406,
0.09828973,
-0.0077091465,
0.014767668,
-0.032682545,
-0.0074519226,
0.01665902,
-0.0074140956,
-0.049508,
0.008397598,
0.04045978,
0.008231159,
0.020941038,
0.012694748,
0.035920538,
0.03704022,
-0.017294513,
0.003185035,
-0.033620656,
-0.03537583,
-0.006714296,
-0.01461636,
-0.008125244,
-0.042457048,
0.029081412,
-0.034407455,
0.024602693,
0.04027821,
-0.0028521572,
-0.024965832,
0.02826435,
0.023679715,
0.0078453235,
0.034861382,
-0.0044257613,
-0.020184498,
-0.022605427,
0.008594299,
-0.0048872507,
-0.011431325,
0.014306178,
0.014147305,
0.010432692,
0.06645451,
-0.0065024644,
-0.034377195,
0.04067161,
-0.04100449,
-0.048418585,
-0.02248438,
-0.050082974,
0.030549102,
0.014699579,
0.015100546,
0.03425615,
0.008042024,
0.0012653138,
0.036949433,
-0.0005650411,
0.008087417,
0.01507785,
0.025434887,
-0.030201092,
0.060371924,
0.019443087,
0.014109478,
-0.02042659,
-0.019654918,
-0.014101913,
-0.04360699,
0.0031888178,
-0.008866653,
-0.009850156,
0.00421393,
0.061794218,
0.028990628,
0.04124658,
-0.0028048735,
0.018414194,
0.017128075,
-0.03725205,
-0.029126804,
0.038674343,
0.026282214,
0.010296514,
-0.029641252,
-0.02134957,
-0.012490482,
-0.011310278,
-0.006245241,
0.023059351,
0.044454314,
-0.02022989,
0.05885884,
-0.0026554568,
-0.022454118,
-0.05586294,
0.0035746533,
0.0012577483,
-0.019791096,
-0.006612163,
0.035678446,
-0.037796758,
0.030594492,
-0.021667317,
-0.01292171,
0.039551932,
0.006252806,
-0.0050309934,
0.02510201,
0.013874951,
-0.018943772,
0.011870119,
-0.0025344102,
-0.0073233107,
0.025071748,
0.012165169,
0.041125536,
-0.0056513567,
-0.02604012,
0.0100468565,
0.032833852,
0.039279576,
-0.010084683,
0.03900722,
0.008669953,
-0.009539974,
0.019140473,
0.014449921,
-0.007054739,
0.0038488992,
0.058132563,
0.028597226,
0.043183327,
0.026191428,
0.009577801,
0.0397335,
0.03915853,
0.008480818,
0.006850473,
0.038855914,
0.0070660873,
0.029762298,
0.012308912,
-0.0013334025,
-0.035920538,
-0.018671418,
0.011870119,
-0.022771865,
0.027038753,
-0.032864116,
0.042759664,
-0.0065894667,
-0.029958999,
-0.052171025,
-0.009872852,
-0.008458122,
0.022620557,
-0.020108843,
-0.0066310763,
0.0000388318,
0.0027462416,
-0.038129635,
-0.01535777,
0.030428054,
0.045271378,
-0.006203631,
0.024890179,
0.02321066,
-0.039642718,
-0.040368997,
-0.028037386,
-0.052413117,
-0.031018157,
-0.048237015,
-0.014934108,
0.034891643,
-0.022227157,
0.054047246,
-0.007973935,
0.017839223,
0.010531042,
-0.0012681509,
0.02545002,
0.03797833,
0.023634322,
-0.06354939,
0.011340541,
-0.028506441,
0.0075464905,
0.016749805,
-0.012581266,
0.025858551,
-0.024194162,
0.012097081,
-0.0006359668,
-0.001072396,
-0.04944748,
-0.018701678,
0.024859916,
-0.03171417,
0.00024020157,
-0.0009683717,
-0.004516546,
-0.02192454,
0.026917707,
0.01818723,
-0.064154625,
0.029081412,
0.06814916,
0.0009683717,
0.024088247,
0.006445724,
0.024799393,
-0.04829754,
0.048963293,
0.04554373,
-0.0040172297,
-0.030881979,
-0.082916826,
-0.033681177,
0.01945822,
-0.01068235,
-0.02062329,
-0.009048223,
0.03988481,
-0.039037485,
-0.024239553,
0.017506344,
-0.058162823,
-0.025026357,
-0.0142532205,
-0.02941429,
0.044151697,
0.01762739,
0.012997364,
-0.008934742,
0.0074065304,
-0.00744814,
0.04215443,
0.008367336,
-0.0019026991,
0.021455485,
0.030049784,
0.016235357,
0.008503514,
0.025903942,
-0.058919366,
0.0021485747,
0.00004707691,
0.017491214,
-0.0029278114,
0.013670685,
0.018958902,
0.009275185,
0.021410093,
-0.007883151,
0.01367825,
0.02360406,
0.0014809278,
0.018610893,
-0.008458122,
-0.018580632,
0.0064495066,
-0.051444747,
-0.0040172297,
-0.007361138,
0.03637446,
0.04442405,
0.0016076483,
0.01594787,
-0.0037146134,
-0.0035387177,
-0.024557302,
0.0018762201,
-0.012679617,
0.023664583,
0.04666341,
0.047873877,
-0.029898476,
-0.043546464,
0.020895645,
0.003926445,
0.010031725,
0.026660483,
0.004126928,
-0.014813061,
0.034861382,
-0.015032457,
0.007421661,
0.01236187,
-0.0063889837,
-0.016568234,
-0.034135103,
-0.012089515,
-0.01632614,
0.014404529,
0.06127977,
0.034831118,
0.017551737,
0.024012592,
0.00278596,
-0.013716077,
0.01507785,
-0.035829753,
-0.00862456,
-0.05374463,
0.03259176,
-0.004785118,
-0.027870947,
-0.011824726,
0.0045770695,
-0.0032758198,
0.010190599,
-0.007754539,
-0.012641789,
-0.03328778,
0.018626025,
-0.0051255613,
0.028566966,
-0.023195527,
-0.035678446,
-0.062459975,
0.0022696212,
0.06391253,
-0.04642132,
0.025888812,
-0.036828388,
0.003357148,
0.029716907,
-0.03244045,
-0.031139202,
-0.023331705,
-0.012815794,
-0.03988481,
0.030034654,
0.05041585,
-0.029550467,
0.03561792,
-0.051747363,
-0.0028805274,
0.03150234,
-0.06542561,
-0.023770498,
0.020002928,
0.03359039,
-0.006574336,
0.008851523,
-0.029822823,
0.024617825,
0.008367336,
-0.043395158,
0.033469345,
-0.06833073,
-0.009350839,
-0.029247852,
0.0062263273,
-0.01594787,
0.058041777,
-0.01703729,
-0.030655017,
-0.032258883,
0.017960269,
-0.056316867,
-0.0337417,
-0.01367825,
0.03731257,
-0.012225692,
0.042608354,
-0.02661509,
-0.0065440745,
0.056165557,
0.008208463,
-0.015040023,
0.020487113,
-0.020850252,
0.041458413,
-0.0056967493,
-0.02228768,
0.017143205,
-0.061733697,
0.045271378,
-0.043939866,
-0.02227255,
-0.018414194,
-0.09471886,
-0.034740336,
0.026085513,
-0.0030110308,
0.009335709,
0.031351034,
0.020759469,
-0.0014705254,
0.020910777,
0.018656285,
-0.023346836,
-0.054622214,
-0.018141838,
0.07014643,
-0.01443479,
0.022771865,
-0.02771964,
-0.0633073,
0.04067161,
0.013980866,
0.016507711,
-0.0055038314,
-0.05138422,
0.023967199,
0.00045581558,
-0.044333268,
-0.016477449,
-0.024118507,
0.021894278,
0.00036881343,
-0.029671514,
0.016734673,
-0.013065453,
-0.02381589,
0.057769425,
-0.021864017,
-0.08685084,
-0.021122608,
-0.008299248,
0.0011007662,
0.0027935253,
0.017203728,
-0.029989261,
-0.06839125,
0.006801298,
0.014866019,
-0.060190354,
-0.013368068,
-0.03991507,
-0.061158724,
0.0006042866,
0.021591663,
0.020381197,
-0.049750097,
0.015297246,
-0.023286313,
0.024829656,
-0.064517766,
-0.014934108,
-0.0015783324,
0.024133638,
-0.04981062,
0.028430788,
0.0039226618,
-0.027855817,
0.024405994,
0.011446456,
0.037403356,
0.040338732,
-0.038523037,
-0.017960269,
0.0044900673,
0.011991165,
-0.036404725,
0.01779383,
-0.016976766,
0.028748535,
0.021455485,
0.07038852,
-0.041186057,
-0.020653553,
0.0054924833,
-0.026630221,
0.043122802,
-0.025404627,
0.013965735,
0.0243606,
-0.0019688962,
0.006786167,
0.027129538,
0.013398331,
0.013905212,
-0.023361968,
-0.08739555,
0.012006296,
-0.02454217,
-0.020108843,
-0.01873194,
-0.0453319,
0.04623975,
-0.012498047,
0.000005182745,
0.057043146,
-0.0029732038,
-0.00074471947,
-0.05619582,
0.02080486,
0.02190941,
-0.02886958,
0.01535777,
0.019775966,
-0.04741995,
0.01443479,
0.011106012,
-0.039521668,
0.00674834,
-0.010107379,
-0.037948065,
0.022817258,
0.051989455,
-0.029505076,
-0.03876513,
-0.01967005,
0.02134957,
0.030760933,
0.00088420656,
-0.013844689,
0.0017324775,
-0.016492581,
0.017960269,
-0.004660289,
0.0013088149,
0.01685572,
0.025238188,
0.03425615,
-0.034044318,
0.013194065,
0.0013835232,
-0.038855914,
-0.04457536,
-0.028778797,
-0.009623194,
-0.06730183,
-0.009343274,
-0.011976034,
0.025737504,
-0.048267275,
0.0046262443,
0.01572091,
-0.00016584784,
-0.0275532,
-0.04856989,
-0.023150137,
-0.055227447,
0.009887983,
0.040732134,
-0.049508,
-0.017914876,
-0.06475986,
-0.02885445,
-0.040429518,
-0.027205192,
0.06239945,
0.025722373,
0.03782702,
0.02287778,
0.028612357,
0.045059547,
0.018822724,
0.009963637,
0.008004197,
-0.014775233,
-0.027568331,
-0.033650916,
0.028506441,
-0.032833852,
0.024814524,
-0.051565792,
0.0061014984,
0.0054924833,
0.030261615,
0.00890448,
-0.06681765,
0.028778797,
-0.03262202,
-0.022892913,
0.024572432,
-0.006464638,
-0.04157946,
0.016265618,
-0.014192698,
-0.011930642,
-0.0047889007,
0.017884614,
0.001614268,
0.012641789,
-0.031381294,
-0.027129538,
-0.056256343,
-0.03219836,
-0.05301835,
-0.046209488,
0.015478816,
0.012770401,
0.03280359,
-0.03053397,
-0.015274551,
0.009683717,
0.0071417415,
0.024859916,
0.010508346,
-0.0043576728,
0.0045505906,
-0.011718811,
-0.058556225,
0.028461048,
0.052715734,
-0.025177663,
0.032168098,
-0.005719445,
-0.002759481,
0.009131443,
0.0043955,
0.029701775,
-0.023483014,
-0.033953533,
0.03352987,
0.012846055,
-0.05323018,
0.013943039,
-0.008034459,
-0.031199725,
-0.020184498,
0.029020889,
-0.007890716,
0.019427957,
-0.0057686204,
0.05398672,
-0.015675517,
0.040701874,
0.027976863,
0.034558766,
0.01703729,
0.033983793,
-0.03331804,
0.03349961,
0.025147403,
0.03915853,
-0.010606696,
0.071538456,
0.008798565,
-0.0077923657,
-0.0005778077,
0.010099814,
0.012059254,
0.01665902,
-0.011711245,
-0.0303524,
0.005761055,
-0.04197286,
-0.018641155,
0.024980964,
-0.03234967,
-0.03141156,
0.0060107135,
-0.046935767,
0.0131184105,
-0.026736137,
-0.018898379,
-0.011711245,
0.030458316,
-0.029958999,
0.00852621,
0.0045392425,
0.0055151796,
0.008390033,
-0.028173564,
-0.026826922,
0.0030053568,
0.0015092981,
-0.019745704,
-0.017173467,
-0.021773232,
0.053290706,
0.037584927,
-0.0018204253,
-0.031744435,
-0.00984259,
0.0065667704,
0.026070382,
-0.0030280529,
0.02734137,
-0.024481647,
0.024829656,
-0.037766498,
-0.002413364,
-0.0026686962,
0.007145524,
0.04288071,
-0.008775868,
0.010493215,
0.030034654,
-0.003852682,
-0.036646817,
-0.028990628,
0.024844786,
0.04569504,
-0.014563402,
0.01986675,
-0.002430386,
0.06215736,
0.03822042,
0.056105036,
-0.018459585,
0.0038545732,
0.012021427,
-0.014064086,
-0.014245655,
0.008253856,
0.00974424,
0.015902478,
0.023891546,
-0.006736992,
-0.04642132,
0.023952069,
0.012573701,
0.019064818,
0.019715443,
0.021379832,
0.008367336,
-0.032168098,
0.008662388,
-0.010357038,
-0.052715734,
0.017642522,
0.0060258443,
0.05901015,
0.02322579,
-0.029157067,
0.008132809,
0.026146036,
0.03749414,
-0.008231159,
0.02791634,
-0.0065289433,
0.0042706705,
-0.019382564,
0.03746388,
0.000011865272,
0.014918976,
-0.0065062474,
-0.048025183,
0.0043198457,
0.023997461,
-0.019957535,
0.01152211,
-0.0048418585,
-0.031320773,
0.0068920827,
-0.048448846,
0.01460123,
-0.058374655,
0.005167171,
0.0185655,
-0.030049784,
-0.043213587,
0.020260151,
0.0070774355,
0.030670147,
-0.0039491407,
0.07771183,
0.015963003,
0.033257514,
0.021621924,
-0.026267081,
0.02322579,
0.009736675,
-0.027432155,
-0.01132541,
-0.025162533,
-0.005798882,
0.035890277,
-0.021803495,
-0.09272159,
0.016038656,
0.009577801,
0.015183765,
-0.086669266,
0.059675906,
0.021803495,
-0.06724131,
0.0051823016,
0.084672,
0.066212416,
0.014934108,
0.0036295026,
-0.005662705,
-0.052231546,
0.019291779,
-0.017778698,
0.034891643,
-0.01443479,
-0.03425615,
-0.005904798,
-0.01570578,
0.009396232,
0.014994631,
-0.0069450405,
0.03840199,
0.033923272,
0.004864555,
0.015062719,
0.04173077,
-0.019291779,
-0.011907945,
0.04327411,
0.045967393,
-0.0037259613,
0.03147208,
0.049508,
-0.0038602473,
0.032107573,
0.00012813903,
-0.0040512737,
0.042184692,
0.009971202,
-0.037373096,
-0.023725107,
-0.005458439,
-0.034346934,
-0.015040023,
0.043062277,
-0.079285435,
-0.036586292,
-0.0066802516,
-0.029610991,
-0.052019715,
-0.03840199,
-0.039098006,
-0.010833658,
-0.0122483885,
-0.006464638,
0.03168391,
-0.045089807,
0.27308083,
0.020638421,
0.014404529,
0.0039377925,
0.07123584,
0.06385201,
0.017400429,
-0.0241639,
-0.0013598814,
-0.059100933,
-0.007262788,
-0.046572626,
-0.014275917,
0.015448554,
-0.013738774,
-0.0020483332,
-0.067786016,
-0.0065327263,
0.03449824,
-0.06530456,
-0.037645448,
0.036616556,
0.011287582,
0.061733697,
0.035073213,
-0.003998316,
-0.012157604,
-0.08061694,
-0.020184498,
-0.012611528,
0.010674785,
-0.019533873,
0.024481647,
-0.03704022,
0.01779383,
0.028627489,
-0.0035935668,
-0.0050688204,
-0.02847618,
-0.01985162,
0.025434887,
-0.0151232425,
0.017415559,
-0.02133444,
-0.010114945,
0.003557631,
-0.006093933,
0.05395646,
0.030639885,
-0.04366751,
0.05976669,
-0.0521105,
0.034952167,
-0.04309254,
-0.04248731,
0.008768303,
-0.0487212,
-0.01761226,
-0.015471251,
0.017778698,
0.036495507,
0.030700408,
-0.028718272,
0.03613237,
-0.035769228,
0.03619289,
-0.023013959,
0.03746388,
-0.005114213,
-0.02193967,
0.028582096,
-0.017007029,
-0.005303348,
0.015675517,
-0.0034138884,
0.028914973,
-0.004709464,
0.053895935,
0.022075849,
-0.024209293,
-0.005303348,
0.028672881,
0.010319211,
-0.035648182,
0.039612453,
0.04027821,
-0.02641839,
-0.004652723,
0.0040172297,
-0.004111797,
0.0345285,
0.052382857,
0.020683814,
0.018247753,
-0.024133638
] |
While doing so, you must verify that each randomly initialized weight of your PyTorch model and its corresponding
pretrained checkpoint weight exactly match in both shape and name. To do so, it is necessary to add assert
statements for the shape and print out the names of the checkpoints weights. E.g. you should add statements like:
python
assert (
model_pointer.weight.shape == pretrained_weight.shape
), f"Pointer shape of random weight {model_pointer.shape} and array shape of checkpoint weight {pretrained_weight.shape} mismatched"
Besides, you should also print out the names of both weights to make sure they match, e.g.
python
logger.info(f"Initialize PyTorch weight {layer_name} from {pretrained_weight.name}")
If either the shape or the name doesn't match, you probably assigned the wrong checkpoint weight to a randomly
initialized layer of the 🤗 Transformers implementation.
An incorrect shape is most likely due to an incorrect setting of the config parameters in BrandNewBertConfig() that
do not exactly match those that were used for the checkpoint you want to convert. However, it could also be that
PyTorch's implementation of a layer requires the weight to be transposed beforehand.
Finally, you should also check that all required weights are initialized and print out all checkpoint weights that
were not used for initialization to make sure the model is correctly converted. It is completely normal, that the
conversion trials fail with either a wrong shape statement or a wrong name assignment. This is most likely because either
you used incorrect parameters in BrandNewBertConfig(), have a wrong architecture in the 🤗 Transformers
implementation, you have a bug in the init() functions of one of the components of the 🤗 Transformers
implementation or you need to transpose one of the checkpoint weights.
This step should be iterated with the previous step until all weights of the checkpoint are correctly loaded in the
Transformers model. Having correctly loaded the checkpoint into the 🤗 Transformers implementation, you can then save
the model under a folder of your choice /path/to/converted/checkpoint/folder that should then contain both a
pytorch_model.bin file and a config.json file:
python
model.save_pretrained("/path/to/converted/checkpoint/folder")
7. Implement the forward pass
Having managed to correctly load the pretrained weights into the 🤗 Transformers implementation, you should now make
sure that the forward pass is correctly implemented. In Get familiar with the original repository, you have already created a script that runs a forward
pass of the model using the original repository. Now you should write an analogous script using the 🤗 Transformers
implementation instead of the original one. It should look as follows:
python
model = BrandNewBertModel.from_pretrained("/path/to/converted/checkpoint/folder")
input_ids = [0, 4, 4, 3, 2, 4, 1, 7, 19]
output = model(input_ids).last_hidden_states
It is very likely that the 🤗 Transformers implementation and the original model implementation don't give the exact
same output the very first time or that the forward pass throws an error. Don't be disappointed - it's expected! First,
you should make sure that the forward pass doesn't throw any errors. It often happens that the wrong dimensions are
used leading to a Dimensionality mismatch error or that the wrong data type object is used, e.g. torch.long
instead of torch.float32. Don't hesitate to ask the Hugging Face team for help, if you don't manage to solve
certain errors.
The final part to make sure the 🤗 Transformers implementation works correctly is to ensure that the outputs are
equivalent to a precision of 1e-3. First, you should ensure that the output shapes are identical, i.e.
outputs.shape should yield the same value for the script of the 🤗 Transformers implementation and the original
implementation. Next, you should make sure that the output values are identical as well. This one of the most difficult
parts of adding a new model. Common mistakes why the outputs are not identical are: |
[
0.052884843,
-0.01532894,
-0.005690185,
0.0074181124,
-0.008232462,
-0.022582814,
0.021556322,
0.0037227427,
-0.034490116,
0.023130275,
-0.020420339,
-0.030822119,
0.049545325,
-0.05559478,
-0.0091768345,
0.003558504,
-0.0028142976,
-0.014658299,
-0.028522778,
0.009717453,
-0.026661407,
0.020461397,
-0.03657047,
-0.019790757,
-0.028413286,
0.015219448,
-0.034462743,
-0.003832235,
0.03848659,
0.027290989,
-0.015520552,
0.026661407,
-0.03402477,
-0.022172216,
0.0057312446,
-0.0332857,
0.020803561,
-0.0017253612,
-0.053432304,
-0.047601834,
0.009498469,
-0.0116198845,
0.017505102,
-0.012783241,
-0.04428969,
-0.01372077,
0.0027612622,
0.00032997425,
-0.0052727447,
-0.019215921,
0.019311728,
0.019927623,
-0.006963034,
0.004304421,
-0.028522778,
0.010518117,
-0.060932536,
0.033340447,
-0.064764775,
-0.027633153,
0.032355014,
0.0021077292,
0.0024875312,
-0.016177507,
0.009662707,
-0.0033053027,
0.01568479,
-0.0008870598,
-0.026716152,
-0.015698478,
-0.02863227,
0.021830054,
-0.02470423,
-0.051242456,
-0.01946228,
-0.02152895,
0.052008905,
0.026045512,
-0.035283934,
0.006039192,
0.033039343,
-0.002184716,
0.020584578,
-0.02967245,
-0.03339519,
-0.02044771,
0.04420757,
-0.016656537,
-0.03410689,
0.009430036,
-0.030603135,
0.01090134,
-0.029973553,
0.001693711,
-0.0073975823,
0.047957685,
0.03876032,
0.00530354,
0.011811496,
-0.010004871,
0.016013268,
0.08343323,
-0.0077329027,
0.022911292,
-0.048751503,
0.025511736,
0.005611487,
-0.012057854,
-0.06410782,
-0.018381042,
0.013960285,
0.047245983,
-0.013145935,
0.022254337,
-0.04793031,
0.042838912,
-0.04256518,
0.016013268,
-0.062410686,
0.000077949204,
0.038897187,
0.011387213,
0.0021504997,
-0.042154584,
-0.024211513,
-0.015151015,
-0.013145935,
0.054116633,
0.0072949333,
-0.045466732,
0.000021345142,
-0.020365592,
0.025224319,
0.027975315,
0.0041880854,
-0.05055813,
-0.00933423,
0.0020392966,
0.031396955,
-0.032628745,
-0.0077055297,
0.04070381,
-0.012105756,
0.04738285,
0.026045512,
0.012228936,
-0.008615686,
-0.032272894,
-0.015575298,
-0.010422311,
-0.017943071,
0.021118352,
0.011811496,
0.042400945,
-0.043194763,
-0.024389438,
-0.027961629,
-0.013823419,
0.024923215,
0.0008122114,
-0.04297578,
0.03646098,
-0.018449474,
0.031944416,
-0.02104992,
0.056881316,
0.028687017,
-0.012352115,
0.013036442,
-0.033696294,
0.0048005586,
0.010600236,
-0.016930267,
0.05293959,
0.041196525,
0.026237123,
0.029754568,
-0.004684223,
0.0055327895,
-0.023540873,
-0.013816576,
-0.025429618,
0.02835854,
0.01691658,
-0.013460726,
-0.03101373,
0.014562493,
-0.009779043,
0.0066585084,
-0.0101348935,
-0.0050845547,
0.021433143,
-0.044234943,
0.018613713,
-0.039526768,
-0.010566019,
-0.037309546,
0.037911754,
0.009286326,
-0.020242414,
-0.013104876,
0.047711328,
-0.057209793,
0.013536002,
0.018203117,
0.010709728,
-0.002925501,
0.0048895213,
-0.023171335,
0.013885009,
0.05918066,
-0.009108402,
-0.051324576,
-0.014357195,
0.030876866,
-0.04385172,
0.0008400122,
0.0042530964,
0.022268023,
0.0005744076,
0.050530758,
-0.01372077,
0.05116034,
0.019065369,
0.05715505,
0.00091443287,
-0.001248898,
0.04333163,
0.035201818,
0.0047731856,
0.037227426,
0.03698107,
-0.018558966,
0.034325875,
0.0103607215,
0.015725851,
0.040676437,
0.0004884389,
0.017231371,
0.040019482,
0.06175373,
-0.0020546939,
-0.011873085,
-0.0037809105,
-0.0033429407,
-0.0107918475,
-0.024074648,
-0.0040135817,
-0.02430732,
-0.008786768,
-0.0021795838,
0.041141782,
0.06043982,
0.002877598,
-0.048860997,
-0.013351233,
0.014357195,
0.016410178,
-0.012064697,
0.033422563,
-0.008615686,
0.012673749,
-0.0030503906,
-0.059235405,
0.029124986,
0.061698984,
-0.017176624,
0.033230953,
0.00050084235,
-0.019872876,
-0.011243504,
-0.029918807,
-0.06958244,
-0.031068478,
-0.016752342,
0.022336455,
0.010846593,
-0.0672831,
0.015794283,
-0.0052453717,
-0.02013292,
0.070075154,
0.026702465,
0.050640248,
0.023718799,
0.001154803,
-0.08989328,
0.033614177,
-0.05548529,
0.0007514773,
-0.032957222,
0.0143435085,
-0.019339101,
-0.0077192164,
0.029918807,
0.05239213,
0.006901445,
-0.012762711,
-0.015315253,
0.012037324,
-0.026264496,
0.008013478,
-0.005224842,
0.039362527,
0.0015525684,
0.015547925,
0.025963392,
0.013577062,
0.066133425,
0.035530295,
-0.04511088,
0.0024806878,
0.03128746,
0.025648601,
-0.04089542,
0.014945717,
0.046479538,
-0.0069801426,
-0.0119757345,
-0.024649484,
-0.057483524,
0.021912172,
-0.015233134,
-0.0065592807,
0.0015363157,
0.047163863,
-0.03558504,
-0.0556769,
0.009265797,
-0.04880625,
-0.023718799,
0.0075070746,
-0.022226963,
0.033614177,
0.018066252,
-0.006189744,
-0.028221674,
0.011291407,
-0.0006975865,
0.034572236,
0.059563883,
-0.015109955,
0.054144006,
0.028604897,
0.021255217,
-0.0034798062,
0.009792729,
-0.06257492,
-0.006863807,
-0.004643163,
0.037364293,
0.029398717,
0.009115245,
0.016861834,
-0.0055327895,
0.03629674,
-0.0074317986,
-0.009895379,
0.063450865,
-0.020981487,
-0.0018647929,
0.035201818,
0.03919829,
0.008088754,
-0.0332857,
-0.0070212022,
-0.013173308,
0.005813364,
0.036187246,
-0.034572236,
0.009649021,
-0.023020783,
-0.016519671,
-0.022254337,
0.005091398,
-0.05154356,
0.055430543,
0.01818943,
0.01584903,
-0.023116589,
-0.019339101,
0.029453464,
-0.03443537,
0.05003804,
0.01171569,
0.027277302,
-0.02716781,
0.007212814,
-0.021501577,
0.018175744,
0.00405122,
-0.013529158,
-0.0020871994,
0.01990025,
-0.022870231,
-0.042400945,
0.028495405,
0.04316739,
0.029289225,
-0.005676498,
0.06481952,
-0.012427391,
-0.025005333,
0.014480374,
-0.032820355,
0.0019058526,
-0.07034889,
0.031506445,
0.011147698,
0.016232252,
-0.0008468555,
0.012495823,
0.008376171,
0.03128746,
-0.048997864,
-0.021159412,
-0.04694488,
-0.0059091696,
-0.023198709,
0.0019931043,
-0.03966363,
-0.019352786,
-0.02399253,
0.0061384193,
0.009621647,
-0.04650691,
0.018682146,
-0.028495405,
0.007589194,
0.0398005,
0.013577062,
-0.0019931043,
0.0075960374,
-0.033532057,
-0.059290152,
0.007048575,
0.06700937,
-0.009217894,
-0.0047081746,
-0.059947107,
-0.017340863,
0.021679502,
-0.04730073,
-0.016341746,
-0.004567887,
0.0014593288,
0.035858773,
0.038021248,
0.019996054,
0.016533356,
-0.010442841,
-0.055348422,
-0.00071597786,
-0.029918807,
0.012892733,
-0.036050383,
0.027181495,
-0.027181495,
0.04043008,
0.022418575,
-0.01731349,
0.0260592,
0.034216385,
-0.043961212,
-0.0010906473,
0.011722533,
0.019010624,
-0.024868468,
0.025224319,
-0.00033040196,
0.010949243,
-0.019831816,
0.03276561,
-0.025128514,
0.011400899,
-0.007609724,
0.029234478,
0.0037980187,
0.045056134,
0.0016124471,
-0.027660524,
0.04439918,
-0.011941518,
0.010750788,
-0.019434907,
-0.032081284,
-0.061698984,
-0.014904657,
-0.000014047429,
0.078506075,
0.028413286,
0.0104839,
0.011763593,
0.015109955,
-0.021898486,
0.0007125562,
-0.010518117,
-0.018120997,
0.022021664,
0.045740463,
0.01814837,
-0.07188178,
-0.037911754,
0.008403544,
0.012317899,
-0.0003175708,
-0.004578152,
0.008047693,
0.015041523,
-0.0031872562,
0.0020410074,
0.017464042,
0.008903103,
-0.0023335575,
0.0121262865,
-0.039088797,
0.004444708,
-0.03074,
-0.06848752,
0.02430732,
-0.002090621,
-0.048860997,
-0.010826064,
-0.013488099,
0.016492298,
0.058249973,
0.028906,
-0.02792057,
-0.04253781,
-0.04543936,
0.018066252,
-0.034325875,
0.02967245,
-0.01576691,
0.0037911753,
0.022131158,
0.04626055,
0.023499813,
-0.01712188,
-0.030603135,
-0.055978004,
0.04713649,
-0.015315253,
-0.026483482,
0.006986986,
-0.023896722,
-0.048669387,
0.03594089,
-0.01497309,
0.001484991,
-0.027975315,
0.021747934,
0.00044866235,
0.041962974,
-0.022569127,
0.014507747,
0.00843776,
0.006901445,
0.011811496,
0.020871995,
-0.018846385,
0.014904657,
-0.041962974,
0.021884799,
-0.032081284,
-0.029289225,
-0.03243713,
0.0037022128,
0.027455227,
-0.023445066,
0.0051153493,
-0.021542635,
0.0077808057,
0.0036029853,
0.010675512,
-0.0006308646,
-0.03134221,
-0.010271759,
-0.044974014,
0.05020228,
-0.03188967,
-0.010846593,
-0.018093623,
-0.008608842,
0.03397003,
-0.016369117,
0.014836225,
0.077411145,
-0.03462698,
0.0020461397,
-0.03506495,
0.047519714,
0.019120116,
-0.008766238,
-0.016259626,
0.055375796,
0.008779924,
0.028221674,
-0.016930267,
-0.034052145,
-0.015958522,
0.006651665,
0.030329403,
-0.018969564,
0.046205804,
0.03919829,
-0.05003804,
-0.071553305,
0.03487334,
0.0459047,
0.024211513,
0.03205391,
0.03903405,
0.0015089426,
0.009409506,
0.019311728,
-0.013960285,
-0.009717453,
0.05408926,
-0.00150381,
-0.05989236,
0.0022411733,
0.04653428,
-0.012879048,
-0.044536047,
0.018271549,
0.03665259,
0.006028927,
0.0047629206,
-0.0021727404,
-0.019352786,
-0.057100303,
0.054499857,
0.036269367,
-0.050859235,
-0.020940427,
0.022870231,
0.0027989002,
0.030849492,
-0.0010290578,
0.02378723,
-0.056771826,
-0.021036234,
-0.04872413,
-0.013447039,
-0.013193837,
-0.048039805,
0.1018827,
-0.003387422,
0.024854781,
-0.0045131412,
-0.012571099,
0.074947566,
0.016040642,
-0.0016304107,
0.053049084,
-0.04667115,
-0.05250162,
-0.020023428,
-0.006614027,
0.0074044256,
0.018490534,
-0.006726941,
-0.015944835,
0.030192537,
0.041962974,
-0.0011471043,
-0.033887908,
0.00066508097,
-0.04653428,
-0.021816367,
0.048642013,
0.000030955136,
0.007069105,
0.00883467,
0.010702885,
-0.03848659,
-0.052446876,
0.012256308,
-0.022651246,
0.0016295552,
-0.062903404,
0.025977079,
-0.0040614847,
0.0103607215,
-0.04097754,
-0.044891898,
0.02295235,
0.053322814,
-0.019612832,
-0.005601222,
0.008211932,
0.033230953,
-0.02069407,
0.028659644,
-0.05699081,
-0.005943386,
-0.023157649,
-0.02458105,
-0.023705112,
-0.007965574,
0.04070381,
-0.029809315,
0.029973553,
-0.010997146,
0.0063539827,
-0.0016928556,
-0.012619003,
0.063669845,
-0.07565927,
-0.01946228,
-0.022144845,
0.0398005,
-0.07538554,
-0.009525841,
0.0045884172,
-0.021912172,
0.02474529,
0.033176206,
-0.025744408,
0.0096079605,
-0.010566019,
0.027496286,
-0.012714809,
0.05003804,
0.033148833,
0.022131158,
0.03919829,
-0.015616358,
0.0048758346,
0.015192075,
0.0066756164,
-0.027674211,
-0.0010264915,
0.022131158,
0.03410689,
0.036241993,
0.04220933,
0.024936901,
-0.06525749,
0.027619466,
0.029699821,
0.039143544,
0.04103229,
-0.015712164,
-0.0051085064,
0.01839473,
-0.047601834,
-0.03459961,
0.012879048,
-0.016861834,
-0.0031769914,
-0.019079056,
-0.038459215,
-0.008971536,
0.018408414,
0.004715018,
0.037145305,
0.027072003,
0.009936438,
0.004506298,
0.03240976,
-0.03093161,
-0.01914749,
0.04809455,
-0.005690185,
-0.011879928,
-0.03407952,
0.019133803,
0.052474245,
-0.01006646,
-0.056936063,
-0.030411523,
-0.042866286,
-0.0033343867,
0.002988801,
0.049901176,
-0.046205804,
0.021556322,
-0.02942609,
-0.0118251825,
-0.006713255,
0.050010666,
0.039909992,
-0.01334439,
0.0026928294,
0.035858773,
0.0023968578,
0.007637097,
0.014316135,
0.0038732947,
0.0038664513,
-0.023280827,
0.033942655,
-0.008314582,
0.037911754,
-0.023321887,
0.008992066,
0.0073565226,
0.018216804,
0.04817667,
-0.023404008,
-0.046397418,
0.022870231,
0.0053993454,
-0.000912722,
0.034325875,
-0.0015534238,
0.042346198,
0.037857007,
-0.025224319,
0.029207105,
-0.023965156,
0.007335993,
0.005690185,
-0.041196525,
0.016423864,
0.0059296996,
-0.038513962,
-0.017532475,
0.006162371,
0.049107354,
0.0065627024,
-0.0233082,
-0.0073291496,
-0.00588864,
0.018736891,
0.03178018,
0.0027578406,
-0.0073702093,
0.033449937,
-0.018819012,
0.0419356,
-0.027017256,
0.009183678,
0.0039759437,
-0.04798506,
-0.049271595,
0.031205343,
0.018819012,
0.009375289,
0.041442886,
-0.033367816,
-0.0085746255,
-0.059071165,
-0.00565939,
-0.05786675,
-0.02228171,
0.0034746737,
-0.013221211,
-0.030767374,
0.026989885,
-0.005327491,
0.010196483,
-0.0030144635,
0.015999582,
0.013843949,
0.03733692,
0.044426553,
0.04308527,
0.018011505,
-0.0014490639,
-0.05961863,
-0.026743526,
0.019530712,
-0.021775307,
0.06202746,
-0.013638651,
-0.09087872,
0.058633197,
0.017641967,
-0.007048575,
-0.041552376,
-0.010258072,
0.006124733,
-0.009183678,
-0.01990025,
0.07330518,
0.0030503906,
0.011790966,
-0.0064463667,
0.0006569546,
-0.03268349,
-0.018435787,
-0.04023847,
0.017641967,
0.0027184917,
-0.040676437,
-0.017464042,
-0.039827872,
-0.0011898747,
-0.0024344958,
-0.0153015675,
-0.032355014,
0.0001232859,
0.045056134,
0.074016884,
0.0120510105,
-0.0347091,
-0.0037603807,
-0.027386794,
0.07127957,
0.005690185,
0.08343323,
0.0064326804,
-0.0405122,
-0.025552796,
-0.051844664,
0.026825646,
0.00543014,
-0.06996566,
-0.025785467,
-0.023212396,
-0.013823419,
-0.037857007,
0.026428735,
0.030603135,
-0.008020321,
-0.020338219,
-0.031670686,
-0.03197179,
-0.038678203,
-0.031862296,
-0.05143407,
-0.012954324,
-0.015602672,
-0.04062169,
0.029562956,
-0.093178056,
0.21580958,
0.029097613,
0.019311728,
0.0015525684,
0.047163863,
-0.020324532,
0.028988121,
0.025265379,
0.016533356,
-0.0068193255,
-0.03999211,
0.004454973,
-0.0012839698,
0.0076439404,
0.0023198707,
-0.0010957797,
-0.062301192,
0.020146606,
-0.032546625,
-0.022144845,
-0.01290642,
-0.014247702,
0.016820775,
0.06284866,
0.016423864,
-0.025949705,
-0.008930476,
-0.0636151,
0.028331166,
-0.041908227,
0.010032244,
-0.00051281805,
0.0074454853,
0.038787693,
-0.0050777113,
0.012064697,
-0.0084993495,
-0.023335574,
0.0059125912,
-0.0010435997,
-0.022569127,
-0.06788531,
0.03629674,
0.024444185,
0.008506193,
-0.0069596125,
-0.03769277,
-0.023061844,
0.0075207613,
-0.035283934,
0.031999163,
-0.048860997,
0.035804026,
-0.050503384,
-0.019982368,
-0.0017775411,
-0.058468957,
-0.068542264,
-0.014247702,
-0.01898325,
-0.019339101,
0.0050777113,
-0.041333392,
0.034216385,
0.01493203,
-0.045548853,
-0.0150004625,
0.016026955,
0.039773125,
-0.028413286,
0.047081746,
0.04105966,
-0.036159877,
-0.013686554,
-0.049517952,
-0.015055209,
-0.009820103,
0.059563883,
-0.004383119,
-0.030630507,
0.010333348,
0.017258745,
-0.0140424045,
-0.036625218,
0.04935371,
0.05901642,
-0.0444813,
0.00066465326,
-0.008034007,
0.029097613,
0.038732946,
0.0022565706,
0.06471003,
0.03514707,
0.018449474
] | pytest tests/models/brand_new_bert/test_modeling_brand_new_bert.py
Having fixed all common tests, it is now crucial to ensure that all the nice work you have done is well tested, so that
a) The community can easily understand your work by looking at specific tests of brand_new_bert
b) Future changes to your model will not break any important feature of the model. |
[
0.026692461,
0.0042853854,
-0.017480541,
-0.0021463775,
-0.008231772,
-0.038233154,
0.007362167,
-0.011083783,
-0.0065257247,
0.053384922,
0.015240202,
0.0040606144,
0.06662061,
-0.041593663,
-0.025793377,
-0.01415688,
-0.0025959192,
-0.037820462,
-0.04486574,
-0.0043811896,
0.012963015,
-0.007922252,
-0.05972272,
-0.03929437,
-0.0480199,
-0.008416011,
-0.004897057,
-0.036965594,
0.083364196,
0.04401087,
0.014333748,
-0.008091751,
0.019588228,
-0.014716964,
0.02860854,
-0.032809176,
-0.0020653126,
-0.0008350606,
-0.020575745,
-0.06054811,
0.0057298145,
0.0013541523,
0.018453319,
-0.071278155,
-0.014326379,
0.022462348,
-0.002326931,
0.0013946848,
0.013206209,
-0.03543273,
-0.016669892,
0.016890977,
-0.017672148,
0.010398416,
-0.023331953,
-0.0024724794,
-0.008644466,
-0.008452858,
-0.058926813,
-0.019750359,
0.046369124,
0.054151352,
0.015623418,
-0.06007646,
0.023096127,
0.01541707,
-0.017524758,
0.006020911,
-0.016139286,
-0.023582516,
-0.04056193,
0.02163696,
-0.026147116,
-0.044895217,
-0.049818065,
-0.0014610105,
0.02035466,
0.00524711,
-0.023199301,
0.06107872,
-0.013648381,
0.011842845,
0.0012012344,
-0.012653494,
-0.024260513,
-0.043126527,
0.06432132,
0.0041785273,
-0.01986827,
-0.012542951,
-0.048196767,
0.011363825,
-0.020767353,
0.037260376,
0.027119894,
0.056332737,
-0.03516743,
0.0079590995,
0.02271291,
-0.023995211,
0.04645756,
0.08790383,
-0.020148313,
0.035521165,
-0.033015523,
0.005976694,
0.03451891,
-0.027960021,
-0.0623168,
0.003942702,
-0.01877758,
0.017215237,
0.014142141,
0.024334209,
-0.010442633,
0.041888446,
-0.0071926676,
0.012498734,
-0.06609,
-0.013338861,
0.025690204,
-0.024967989,
-0.0038358436,
-0.017981669,
0.038410023,
-0.005022339,
0.020089356,
0.051557276,
-0.0054681962,
-0.02734098,
0.025719682,
0.016787805,
0.005947216,
0.015991895,
-0.0049449587,
-0.0057998253,
-0.0311584,
0.026810374,
0.035226382,
0.0044585695,
-0.01050159,
0.021592742,
0.0061425087,
0.08701949,
0.011695454,
-0.026898809,
0.019544011,
-0.011997606,
-0.023331953,
-0.029802406,
-0.017893234,
0.018114321,
0.0122997565,
0.00580351,
-0.031246835,
-0.021651698,
-0.017775321,
-0.039677583,
-0.0120713,
-0.018350145,
-0.0008861868,
0.024894293,
-0.052677445,
0.089259826,
-0.016124547,
0.06502879,
0.0021058451,
-0.027046198,
0.011783889,
-0.017745843,
0.014002119,
0.0020174107,
-0.03611073,
0.020782093,
0.020045139,
0.016271936,
0.05023076,
0.019647185,
0.02001566,
-0.020339921,
-0.019647185,
-0.01606559,
0.02449634,
0.012904058,
0.024717426,
-0.02797476,
0.027768413,
-0.04233062,
-0.004480678,
0.011179587,
0.015461287,
0.022860302,
-0.054269265,
0.015520244,
-0.03944176,
0.0055529457,
-0.018644927,
0.02288978,
0.02386256,
-0.05453457,
-0.037820462,
0.05739395,
-0.027473632,
0.055920042,
-0.009816223,
-0.019632446,
0.008710792,
0.023022432,
-0.04324444,
0.049788587,
0.014164249,
0.01923449,
0.0025774953,
-0.021843307,
0.0032554928,
-0.020089356,
-0.007325319,
0.019028144,
0.0473419,
0.004499102,
0.02941919,
0.031040488,
0.042507485,
-0.010125743,
0.025262771,
-0.0070710704,
-0.010391046,
0.007988578,
0.019956704,
0.020531528,
0.0025111695,
0.018394362,
0.027429415,
0.02750311,
-0.00079544936,
0.010663719,
0.037908897,
0.022565521,
0.012528212,
-0.0089908345,
0.012218691,
0.021327438,
0.030274056,
0.034253605,
0.0019252914,
-0.00763484,
-0.0025480173,
0.004992861,
-0.040768277,
0.02020727,
-0.0263682,
0.03434204,
0.042094793,
0.015387592,
-0.046074342,
-0.026353462,
-0.022373913,
0.036464468,
-0.0040790383,
-0.022256,
0.010088895,
-0.0045433193,
0.015004376,
-0.038822718,
0.038822718,
0.027473632,
0.01842384,
0.03864585,
-0.02384782,
-0.0499065,
-0.060194373,
-0.051704668,
-0.09338677,
-0.008511814,
-0.07434388,
-0.02336143,
0.017878495,
-0.02688407,
0.023538299,
0.008003317,
-0.004182212,
0.027621023,
-0.01081111,
0.044747826,
0.04371609,
0.01829119,
-0.045867994,
0.048697896,
-0.01050159,
0.01636037,
-0.0040127127,
-0.010037309,
-0.016773066,
-0.041711576,
0.014702225,
0.027031459,
-0.009823592,
-0.016463544,
-0.032367002,
0.02956658,
-0.0061830413,
-0.011334347,
0.015859243,
0.022830823,
-0.022005435,
0.013014602,
0.019411359,
-0.035373773,
0.0550357,
0.069922164,
-0.005501359,
0.026412418,
0.0053281747,
0.012122887,
-0.026795635,
0.042831745,
0.020104095,
0.0473419,
-0.03254387,
-0.048108336,
-0.011533325,
0.02179909,
0.0021334807,
-0.018895492,
0.019485055,
0.06485192,
-0.026913548,
-0.019529272,
0.0047165034,
-0.04277279,
-0.038675327,
-0.00063239835,
-0.029374972,
0.042831745,
0.06614896,
-0.016463544,
-0.07033486,
-0.007679057,
-0.011105891,
0.016596196,
0.018512275,
-0.0165225,
0.019602967,
0.0031633736,
0.024570035,
0.012985123,
0.014989637,
-0.05185206,
0.022491826,
0.008003317,
0.023199301,
0.020723136,
0.02940445,
-0.01668463,
0.008777118,
0.056214824,
-0.008386533,
0.026132377,
0.019883009,
0.014650638,
0.023833081,
0.038586892,
0.013648381,
0.005132882,
-0.053384922,
-0.015387592,
0.005527152,
0.02465847,
0.042831745,
-0.00015487541,
-0.019042883,
0.001069504,
-0.037319332,
0.01764267,
0.0034747364,
-0.051586755,
0.009204551,
0.023906777,
0.0683893,
-0.024776382,
-0.017451063,
0.0097720055,
-0.01383262,
0.026662983,
0.0020155683,
0.019956704,
-0.03177744,
-0.012631386,
-0.0018184332,
-0.0016940722,
-0.008143337,
-0.007362167,
-0.008312837,
0.024260513,
-0.020104095,
-0.011238543,
0.010730045,
0.047430336,
0.022786606,
0.01972088,
0.03944176,
-0.007936991,
0.010722675,
0.020074617,
-0.03381143,
0.008032795,
-0.06697435,
0.026265027,
-0.00858551,
-0.003592649,
0.028814888,
0.007266363,
-0.017126802,
0.025542812,
-0.008688684,
-0.024997467,
-0.02241813,
0.013862098,
0.028210586,
0.009086639,
-0.0016240616,
0.0015457603,
-0.05087928,
0.016050851,
0.04610382,
-0.09545024,
0.0066031045,
-0.011717563,
0.0006029202,
0.025645986,
0.0039684954,
-0.014665377,
-0.0040458753,
-0.041387316,
-0.059693243,
0.054799873,
0.03787942,
-0.002835429,
0.0114522595,
-0.046074342,
-0.0064815073,
0.019794574,
-0.057010733,
-0.014856986,
0.013324122,
0.014650638,
0.023420386,
0.024525817,
0.0074211233,
0.01462116,
-0.017834278,
-0.016316153,
0.014031597,
-0.029684493,
0.0054129246,
-0.06396758,
0.02370043,
-0.018364884,
0.035049517,
-0.023611994,
-0.053208053,
-0.0055382065,
-0.011466999,
-0.06432132,
-0.06762286,
-0.0005038921,
0.052087884,
-0.010273133,
-0.0023490398,
-0.0037345125,
-0.0073695364,
0.03322187,
0.01938188,
-0.018040625,
0.012314496,
0.004418037,
-0.0037289853,
-0.0062677907,
-0.011268022,
0.04657547,
-0.0534144,
0.036169685,
0.008069643,
-0.011997606,
0.0039353324,
-0.04200636,
-0.016743587,
0.01921975,
-0.025675464,
0.027650502,
0.057305515,
0.006518355,
0.008290729,
0.021961218,
-0.013567316,
-0.013898945,
-0.02862328,
-0.0036663443,
0.056244303,
0.043804526,
0.045720603,
-0.0515278,
-0.012447147,
-0.010980609,
0.02082631,
0.005180784,
-0.009270877,
-0.035196908,
0.017347889,
0.010789001,
-0.025351206,
0.01462853,
0.02781263,
-0.028652757,
-0.009440376,
-0.0070563313,
-0.011997606,
-0.026530331,
-0.023243519,
0.04115149,
-0.024393165,
-0.07558197,
-0.055831607,
0.01749528,
-0.035226382,
0.03257335,
0.050613977,
-0.040326104,
-0.035963338,
-0.009315094,
0.012159735,
-0.031836398,
0.020752614,
-0.039353326,
-0.0038247893,
-0.013788403,
0.032219615,
0.040768277,
-0.054652482,
-0.021371655,
-0.068919905,
0.0073179496,
-0.043922435,
-0.019116577,
-0.0067025935,
0.013604164,
-0.026427157,
0.035078995,
0.017465802,
-0.041741055,
-0.030126665,
0.0021168992,
0.021961218,
0.04359818,
-0.029949795,
-0.012388191,
0.015918199,
0.007255309,
-0.0015420755,
0.030745706,
-0.03525586,
0.01858597,
-0.03401778,
0.05453457,
-0.036140207,
-0.01112063,
-0.030185621,
-0.011128,
0.035963338,
-0.030170882,
0.034047257,
-0.055861086,
0.0023877297,
-0.0004057851,
0.017421585,
-0.0047865137,
-0.0022624477,
-0.070629634,
-0.054947264,
0.029537102,
-0.034548387,
0.0049375896,
-0.0140463365,
-0.037289854,
0.038852196,
0.0019824053,
0.04241905,
0.08395376,
-0.010693197,
0.029964535,
-0.06626687,
0.021754872,
-0.013088297,
-0.016596196,
0.0008134126,
0.01876284,
-0.018571232,
0.009145595,
-0.0032941827,
-0.019602967,
0.0070231683,
-0.0008709871,
0.010766893,
-0.0102878725,
0.040650364,
-0.033781953,
-0.060666025,
-0.043539222,
0.03381143,
0.05724656,
0.02001566,
0.034224126,
0.0054608267,
0.015623418,
0.04595643,
0.007760122,
-0.015461287,
-0.04784303,
0.0588089,
-0.023906777,
-0.047282945,
0.0050112847,
0.024805859,
-0.011017457,
-0.037584636,
-0.030863618,
0.005947216,
-0.027296763,
-0.013641012,
-0.03127631,
0.019293446,
-0.05677491,
0.04197688,
0.024289992,
-0.015564461,
-0.010088895,
0.009285616,
-0.020723136,
-0.029890839,
0.046339646,
0.05689282,
-0.06915573,
-0.023965733,
-0.024260513,
-0.0071410807,
-0.007469025,
-0.04041454,
0.06986321,
-0.0047938833,
0.03275022,
0.025675464,
-0.003386302,
0.053797618,
0.0053981855,
-0.02115057,
0.008231772,
-0.027827369,
-0.090438955,
-0.061550368,
-0.01608033,
-0.006978951,
0.028210586,
-0.024879554,
0.0029330754,
0.013766294,
0.01938188,
0.013007232,
-0.06886095,
0.007277417,
-0.04563217,
-0.010884806,
0.005512413,
0.020944223,
0.006245682,
0.005512413,
-0.015947677,
-0.051557276,
-0.011791258,
0.037112985,
-0.04787251,
-0.019263968,
-0.0461333,
0.037614115,
-0.036729768,
-0.029448668,
-0.0061609326,
-0.029492885,
0.020546267,
0.02179909,
0.000106570405,
0.0029865047,
-0.023980472,
0.030568836,
-0.017406845,
0.01858597,
-0.026176594,
-0.020531528,
-0.010361568,
-0.0013633643,
-0.03434204,
-0.0043332875,
0.026957763,
-0.02048731,
0.029610798,
-0.011975497,
0.0003376169,
0.0120713,
-0.028667497,
0.011813367,
-0.027871586,
0.003012298,
0.021843307,
0.03720142,
-0.0302151,
-0.011555433,
-0.013582055,
-0.0003486712,
-0.011142739,
0.021666437,
-0.017288933,
0.03640551,
-0.043686613,
0.036317077,
-0.032190137,
0.0346663,
0.002671457,
0.0052434253,
-0.0031044171,
-0.015225463,
0.019455576,
0.010066787,
0.018836536,
-0.0017613192,
-0.0012058404,
0.019986182,
0.013545208,
0.009005574,
-0.0014416656,
0.019485055,
-0.010840588,
0.023744646,
0.014459031,
-0.020929484,
0.008393902,
-0.012940906,
-0.033103958,
0.014569573,
-0.06184515,
-0.01431164,
0.02258026,
-0.054151352,
0.036965594,
-0.05232371,
-0.0011026668,
0.013722077,
0.04628069,
-0.015402331,
0.01905762,
0.021062136,
0.001554051,
0.047135554,
-0.030244578,
-0.0126166465,
-0.019927226,
0.007553775,
-0.002737783,
-0.028240064,
-0.013567316,
0.04448252,
0.00009931602,
-0.008533923,
-0.054564048,
0.022108609,
0.01112063,
0.009337203,
-0.0014600893,
0.016964672,
-0.017937452,
0.02207913,
-0.05739395,
0.016610935,
-0.0009373129,
0.0070673856,
0.031394225,
0.0074800793,
0.007568514,
0.04527843,
0.033929344,
-0.018910231,
-0.0022200728,
-0.020900005,
0.043450788,
-0.015195984,
0.015461287,
-0.041534707,
0.05482935,
-0.0010427894,
0.03005297,
-0.0004394086,
0.040473495,
0.012196583,
-0.04129888,
-0.02829902,
0.05117406,
-0.004642808,
0.013766294,
0.031423703,
-0.028490627,
0.008187555,
-0.0023950993,
-0.016905716,
0.005685597,
-0.0042706463,
-0.011304869,
0.0026217126,
-0.024894293,
0.017524758,
0.0009847543,
-0.057806645,
-0.029920317,
-0.01731841,
0.058248814,
0.01876284,
-0.009550919,
0.015711851,
0.018453319,
0.020841049,
0.026176594,
0.023317214,
-0.0074727098,
0.030303534,
-0.027296763,
0.007914882,
0.008968726,
-0.009315094,
0.008158077,
-0.06945051,
-0.052706923,
0.023641473,
-0.017716365,
-0.018188016,
0.024334209,
-0.009278246,
-0.0063193776,
-0.067917645,
0.028225325,
-0.029330755,
-0.03254387,
-0.007656948,
-0.041033577,
-0.057128645,
0.008644466,
0.0068573537,
0.04020819,
0.01574133,
0.06844825,
0.013891576,
0.04292018,
0.010118374,
0.012764037,
0.016802544,
0.02734098,
-0.031895354,
-0.017937452,
-0.004513841,
-0.034253605,
0.024348948,
-0.04233062,
-0.08418959,
-0.005070241,
0.0050112847,
-0.042065315,
-0.048668418,
0.017303672,
0.007833817,
-0.04672286,
0.004764405,
0.078470826,
0.044217218,
-0.0028335867,
0.0068942015,
0.03148266,
-0.027252546,
0.002162959,
-0.026810374,
0.015638156,
-0.030568836,
-0.02367095,
-0.019750359,
-0.04719451,
-0.004222744,
-0.005560315,
-0.014097923,
-0.0037584635,
0.0257639,
0.007929621,
0.039677583,
0.048255723,
0.007188983,
0.019249229,
-0.0015043067,
0.04404035,
-0.018394362,
0.07794022,
0.028859105,
-0.021194788,
0.0030952054,
-0.025940768,
0.021666437,
-0.013478882,
-0.007583253,
-0.01608033,
-0.011010087,
-0.033781953,
-0.040650364,
-0.017981669,
0.020605223,
-0.008452858,
-0.010980609,
-0.047754597,
-0.019514533,
-0.07015799,
-0.036228642,
-0.04816729,
0.020074617,
-0.05807195,
-0.010111004,
-0.0043996135,
-0.029890839,
0.25893602,
0.07098337,
0.031541616,
0.016154025,
0.06361384,
0.049965456,
0.028579062,
-0.011864954,
0.018718623,
0.0051586754,
-0.015829764,
0.010575285,
0.019367142,
0.043981392,
-0.019529272,
0.03325135,
-0.07316476,
-0.0021224264,
-0.0241426,
-0.03643499,
-0.022919258,
0.020104095,
0.01415688,
0.035078995,
0.056362215,
0.013176731,
-0.01510755,
-0.048403114,
-0.0187481,
-0.05789508,
0.031394225,
-0.0046501774,
0.022860302,
-0.018335406,
0.011260652,
0.025498597,
0.014097923,
-0.01877758,
-0.0018525172,
0.021710655,
0.020767353,
-0.022536043,
0.020089356,
-0.009322464,
-0.013884206,
0.04527843,
-0.013663121,
0.034577865,
0.038203675,
-0.05739395,
0.015137028,
-0.038557414,
0.052795358,
-0.062257845,
-0.0048417854,
-0.0053355442,
-0.056686476,
-0.025498597,
0.000041914238,
-0.008224403,
0.026294505,
0.018983927,
-0.013228318,
0.0063746492,
-0.03484317,
0.0009884391,
-0.017686887,
0.00874764,
-0.020266226,
-0.015711851,
0.023022432,
0.008121229,
-0.02592603,
0.02258026,
0.017672148,
0.06426236,
-0.013294644,
0.062434714,
0.002369306,
-0.03307448,
0.021828568,
-0.012262909,
-0.0067320717,
-0.03944176,
0.037614115,
0.05866151,
-0.008887661,
-0.0026585602,
0.0056376955,
0.038085766,
0.031423703,
0.0035078994,
0.018232234,
0.042831745,
0.005232371
] |
The best way to fix the problem is usually to look at the forward pass of the original implementation and the 🤗
Transformers implementation side-by-side and check if there are any differences. Ideally, you should debug/print out
intermediate outputs of both implementations of the forward pass to find the exact position in the network where the 🤗
Transformers implementation shows a different output than the original implementation. First, make sure that the
hard-coded input_ids in both scripts are identical. Next, verify that the outputs of the first transformation of
the input_ids (usually the word embeddings) are identical. And then work your way up to the very last layer of the
network. At some point, you will notice a difference between the two implementations, which should point you to the bug
in the 🤗 Transformers implementation. From our experience, a simple and efficient way is to add many print statements
in both the original implementation and 🤗 Transformers implementation, at the same positions in the network
respectively, and to successively remove print statements showing the same values for intermediate presentations.
When you're confident that both implementations yield the same output, verify the outputs with
torch.allclose(original_output, output, atol=1e-3), you're done with the most difficult part! Congratulations - the
work left to be done should be a cakewalk 😊.
8. Adding all necessary model tests
At this point, you have successfully added a new model. However, it is very much possible that the model does not yet
fully comply with the required design. To make sure, the implementation is fully compatible with 🤗 Transformers, all
common tests should pass. The Cookiecutter should have automatically added a test file for your model, probably under
the same tests/models/brand_new_bert/test_modeling_brand_new_bert.py. Run this test file to verify that all common
tests pass: |
[
0.031569246,
0.0034754483,
-0.021956906,
-0.0063173883,
-0.012585228,
0.006763322,
0.00589269,
0.009753906,
-0.0046398295,
0.046462003,
-0.0059068464,
-0.010277701,
0.05136019,
-0.036467433,
-0.014963539,
0.024986422,
0.004147887,
-0.016846368,
-0.05821199,
0.005846681,
-0.012790499,
0.0040417127,
-0.07559631,
-0.043036103,
-0.05705115,
0.008876196,
-0.009576948,
-0.029105995,
0.075483054,
0.040884297,
-0.0058431416,
-0.0055423137,
-0.017978897,
-0.02761955,
0.017865645,
-0.031909004,
0.010766104,
0.01612438,
-0.026614431,
-0.037458397,
-0.0031374593,
0.0026632128,
0.0034170523,
-0.026430396,
-0.047821037,
0.033749364,
-0.005552931,
-0.0137106795,
-0.0069473577,
-0.04116743,
0.01099261,
0.023981301,
-0.0070676887,
0.010100743,
-0.009421226,
-0.008416106,
-0.040063214,
0.0100441165,
-0.036835507,
-0.01817709,
0.058721628,
0.03292828,
0.028907802,
-0.028157502,
0.017228598,
0.02594907,
-0.025821662,
-0.0011440313,
-0.03476864,
-0.029219247,
-0.027846057,
-0.017044561,
-0.02010239,
-0.018743355,
-0.038760804,
-0.004002782,
0.02089516,
0.0052839555,
-0.00831701,
0.037854783,
0.0018615945,
0.030125272,
0.011006766,
-0.00078790396,
-0.04549935,
-0.022877086,
0.024972264,
-0.013271824,
-0.04459333,
0.0027056825,
-0.02870961,
0.04037466,
-0.01843191,
0.025354493,
-0.0011068701,
0.04677345,
-0.0163792,
0.008352402,
0.028086718,
0.011353604,
0.019918354,
0.06613969,
-0.033579484,
0.029247561,
-0.026218046,
0.04399875,
0.014807817,
-0.030663222,
-0.04830236,
0.0027800049,
-0.0009980411,
0.041252367,
0.01211806,
0.028369851,
-0.037996348,
0.033692736,
-0.01099261,
0.009024841,
-0.07316137,
-0.009633575,
0.027350575,
-0.029559007,
-0.013576191,
-0.031993944,
0.004116035,
-0.02256564,
-0.026274674,
0.037713215,
0.0023553064,
-0.044225257,
-0.0071632457,
0.020300582,
0.030918041,
0.021716243,
0.015487334,
-0.047368024,
-0.026656901,
-0.016987935,
0.041818634,
-0.022806304,
0.0055847834,
0.03677888,
-0.01316565,
0.083297506,
0.05317224,
-0.00367718,
0.009966255,
-0.064837284,
-0.032645147,
0.0003709475,
-0.016237635,
0.010390953,
0.008642612,
0.020597871,
-0.03907225,
-0.019168053,
-0.017851489,
-0.030521657,
0.0007405678,
0.004919423,
-0.014737033,
0.031144548,
-0.045697544,
0.07440715,
0.0009723823,
0.027265636,
0.0036347103,
-0.010525442,
0.0057829763,
-0.056428257,
0.0071561676,
0.012585228,
-0.017525887,
0.0062501444,
0.042696342,
-0.006844722,
0.05741922,
-0.004200975,
0.012514445,
-0.006179361,
-0.018403595,
-0.02849726,
0.016520767,
0.01483613,
0.0012758647,
-0.023726482,
0.02014486,
-0.01612438,
-0.016294261,
-0.0030348238,
0.025043048,
-0.00038753726,
-0.04162044,
0.016662333,
-0.05317224,
0.006051952,
-0.03870418,
0.01763914,
0.00739683,
-0.041733693,
-0.00084806955,
0.05733428,
-0.054757778,
0.008154209,
-0.027279792,
-0.0038612161,
0.014991852,
0.038477674,
-0.04968971,
0.02620389,
0.048585493,
0.023245158,
-0.027888527,
-0.011452699,
-0.0038329028,
-0.034995146,
0.023344254,
0.015246672,
0.04091261,
-0.01663402,
0.046943326,
-0.012762186,
0.05586199,
0.013186884,
0.060703553,
0.0009794607,
-0.028384008,
0.030974668,
0.025680095,
0.021532208,
0.027308105,
0.03171081,
0.010787339,
0.079786666,
0.008812491,
0.0066889995,
0.012939144,
-0.008281618,
0.036382493,
0.04872706,
0.062062588,
0.044083692,
0.02849726,
0.047736097,
-0.026727684,
-0.029842138,
-0.034089122,
0.0058997683,
-0.039015625,
-0.004062948,
-0.02616142,
0.025835818,
0.044763207,
0.012309175,
-0.05056742,
-0.032871652,
0.002519877,
0.040799357,
0.012932066,
0.0036170145,
0.0056307926,
0.029983705,
-0.010921827,
-0.057645727,
0.027987624,
0.03423069,
-0.013547878,
0.020357208,
0.00081046607,
-0.044196945,
-0.022409918,
-0.012479054,
-0.06698909,
-0.017780704,
-0.062005963,
-0.02085269,
0.020427993,
-0.0473114,
-0.020965943,
-0.028865334,
0.007347282,
0.03292828,
0.00039815472,
0.07055656,
0.014213239,
0.009973333,
-0.05934452,
0.029105995,
-0.04609393,
-0.013356764,
-0.024306903,
-0.0002709664,
-0.019366246,
-0.050001156,
0.041393936,
0.018120464,
0.00781445,
-0.047990914,
-0.0117712235,
0.024731603,
0.023797266,
0.017242754,
0.037713215,
0.03224876,
-0.020357208,
-0.0081896,
0.024958108,
-0.02374064,
0.056569822,
0.058155365,
-0.019720161,
0.015331611,
0.014552997,
-0.008975293,
-0.039581887,
0.027322263,
0.035589725,
0.0025375728,
-0.02875208,
-0.025142144,
-0.027860213,
0.031824064,
-0.019465342,
-0.013130258,
-0.0064200237,
0.044168632,
-0.03502346,
-0.021348171,
0.008302853,
-0.017483417,
-0.000013942328,
-0.016265947,
-0.025793348,
0.050539106,
0.030776475,
-0.017398477,
-0.06755535,
-0.0010378567,
0.014482214,
0.024434313,
0.032956593,
-0.037175264,
0.02686925,
0.031229487,
0.013781462,
-0.0117570665,
0.039638516,
-0.07225535,
-0.014765346,
0.0005153892,
0.01141023,
-0.003747963,
-0.0019235297,
0.0058785332,
0.020866847,
0.061326444,
-0.022169255,
0.011318211,
0.044819836,
-0.0017412633,
0.015770467,
0.010589146,
0.002670291,
0.031937316,
-0.09864327,
-0.00614397,
0.013562035,
0.017440947,
0.051558383,
-0.04733971,
-0.00029087416,
-0.028681297,
-0.016563237,
0.0018669033,
0.008614299,
-0.052974045,
0.023103591,
0.04329092,
0.028185815,
0.0022473622,
-0.04204514,
-0.005662645,
-0.03176744,
0.05320055,
0.02181534,
0.023202688,
-0.033324666,
0.021206606,
-0.008366558,
-0.0148786,
0.021871965,
-0.0005299882,
0.012684325,
0.031993944,
-0.024830699,
-0.04459333,
0.017398477,
0.040884297,
0.044848148,
0.016195165,
0.038902372,
-0.006522659,
0.00539013,
0.022933712,
-0.01768161,
0.011020923,
-0.055635486,
0.035589725,
-0.030974668,
0.02273552,
0.001266132,
0.014666251,
-0.027095756,
0.014524684,
-0.020541245,
-0.028327381,
-0.025382806,
0.02528371,
0.0060165604,
0.04213008,
-0.023372566,
-0.009208877,
-0.02340088,
0.021008413,
0.042696342,
-0.06285536,
0.005853759,
-0.010100743,
-0.010419266,
0.054729465,
0.008090504,
-0.057560787,
-0.018191246,
-0.0035002225,
-0.06959391,
0.03983671,
0.06625295,
0.0005357393,
-0.004784935,
-0.03451382,
-0.01663402,
-0.00096530403,
-0.043658994,
-0.050029468,
0.025496058,
0.018587632,
0.025920758,
0.02774696,
0.00051671633,
0.012387036,
-0.013746071,
-0.03765659,
0.03573129,
-0.028398165,
-0.010879356,
-0.046603568,
0.0111270975,
-0.017200284,
0.06415777,
0.0036010882,
-0.030266838,
0.035702977,
0.024420157,
-0.05130356,
-0.044791523,
0.01813462,
0.04275297,
-0.016648177,
0.020399678,
-0.024108712,
-0.005938699,
0.015331611,
0.019083114,
0.021871965,
0.03598611,
0.02436353,
0.024887325,
0.030181898,
0.011056314,
0.019507812,
-0.07922041,
0.03519334,
0.0063704755,
-0.01584125,
-0.03298491,
-0.031824064,
-0.04136562,
0.0007423374,
0.028355695,
0.05311561,
0.05436139,
-0.006211214,
0.008968214,
0.00059103855,
-0.018545162,
-0.0083240885,
-0.01751173,
-0.008472732,
0.03289997,
0.03969514,
0.011042158,
-0.03740177,
-0.030012019,
-0.014354805,
-0.002879101,
0.0102493875,
-0.031512618,
0.008996528,
0.01763914,
-0.021518052,
-0.015459021,
0.011042158,
-0.009223033,
-0.010199839,
-0.008246227,
-0.020215642,
0.0056343316,
-0.025057204,
-0.057532474,
0.026515335,
-0.023160217,
-0.06415777,
-0.043574054,
0.030125272,
0.0033498085,
0.032418642,
0.06676258,
-0.084203534,
-0.05390838,
-0.029870452,
0.0202298,
-0.009973333,
0.02102257,
-0.0312578,
-0.02010239,
0.023910519,
0.0297572,
0.020951787,
-0.022636423,
-0.039128877,
-0.035476472,
0.017497573,
-0.045782484,
0.0035462314,
0.008678003,
0.00635278,
-0.020003293,
0.020527087,
0.023981301,
-0.036099363,
-0.020626184,
0.0050503714,
0.021971062,
0.030748162,
-0.03757165,
-0.014057516,
0.016181009,
-0.013731914,
-0.0015952733,
0.045810796,
-0.027435515,
0.015827093,
-0.01567137,
0.047056578,
-0.04663188,
-0.03915719,
-0.024434313,
-0.01303824,
0.016435826,
-0.02594907,
0.008239148,
-0.023046965,
0.022707207,
-0.00040213627,
0.03878912,
-0.032531895,
0.0035320749,
-0.045754172,
-0.044310197,
0.021532208,
-0.0038187462,
-0.006766861,
-0.021461425,
-0.034796953,
0.027492141,
0.026543649,
0.030238524,
0.05362525,
-0.028015936,
-0.0040523303,
-0.024122868,
0.040572852,
-0.018403595,
0.011573031,
0.020583715,
0.020456305,
-0.0023323018,
0.038222853,
-0.03038009,
-0.028851176,
-0.0027145303,
0.011388995,
0.023075279,
-0.018375283,
0.0163792,
-0.0056909584,
-0.07072644,
-0.04266803,
0.030068645,
0.041393936,
0.017186128,
0.01721444,
0.03819454,
0.016039442,
0.04048791,
0.007849841,
0.002436707,
-0.02027227,
0.039213818,
0.0102493875,
-0.057985485,
0.015345768,
0.016209321,
-0.016534923,
-0.019875884,
0.028638827,
0.005471531,
-0.02156052,
-0.0152183585,
-0.038336106,
0.0028330921,
-0.025750877,
0.028822863,
0.034485508,
-0.024703288,
-0.028553888,
-0.0057723587,
0.009923785,
-0.01554396,
-0.009053154,
0.047452964,
-0.062005963,
-0.008585986,
-0.03881743,
-0.028115032,
-0.038590927,
-0.027095756,
0.07242523,
0.005970551,
0.042469837,
0.022834616,
-0.0010175065,
0.061326444,
0.021291545,
-0.009952098,
0.04547104,
-0.037798155,
-0.07718185,
-0.05594693,
-0.025793348,
0.0022102012,
0.011905711,
-0.035702977,
-0.00059457775,
0.023967145,
0.0111200195,
0.01446098,
-0.07423727,
0.0016740194,
-0.037146952,
-0.0017333003,
0.014425588,
-0.005521079,
-0.013243511,
0.009329207,
-0.0016395127,
-0.041308995,
-0.03400418,
0.025934914,
0.010652851,
-0.005064528,
-0.06953728,
0.0037373458,
-0.032730088,
-0.015812935,
-0.034457196,
-0.022919556,
0.03816623,
0.025807504,
-0.037175264,
-0.012769264,
0.015062636,
0.026175577,
-0.0682915,
0.01571384,
-0.03740177,
-0.0018527467,
-0.010263544,
-0.0007781713,
-0.02507136,
-0.010914749,
0.042328272,
-0.036099363,
0.022905398,
-0.006168744,
0.030663222,
-0.000994502,
-0.010277701,
0.04748128,
-0.026373768,
0.0015519187,
-0.027987624,
0.013470016,
-0.029219247,
-0.0017872723,
-0.022579797,
-0.046150558,
0.000008073693,
0.03298491,
-0.0013475325,
0.00026986044,
-0.006749165,
0.016011128,
-0.022537326,
0.06013729,
0.020442149,
0.027520455,
0.01817709,
-0.0019925432,
0.010334327,
0.034485508,
0.012656012,
-0.017157814,
-0.008720473,
0.044848148,
0.018913234,
0.013908871,
-0.0037550414,
0.016733116,
-0.008911587,
0.04968971,
0.020512931,
0.02177287,
0.04742465,
-0.010093665,
-0.000288441,
-0.0040558693,
-0.0672156,
-0.024830699,
0.02331594,
-0.027732804,
0.011537639,
-0.012033121,
-0.028426478,
0.007488848,
0.043687306,
-0.035787918,
0.027973466,
0.053596936,
0.04170538,
0.014383119,
0.012217157,
-0.032277077,
-0.007934782,
0.025425276,
-0.014567154,
-0.022424074,
-0.009208877,
0.0434608,
0.021801183,
-0.0007392406,
-0.06461078,
-0.018063838,
-0.00906731,
0.024052085,
0.011134176,
0.025227083,
-0.020003293,
0.026133107,
-0.075483054,
0.012309175,
0.0027357654,
0.01470872,
0.032503583,
0.004561968,
0.0045124204,
0.04150719,
0.0051388503,
0.011707518,
0.024080398,
-0.0026278212,
0.053540308,
-0.0061616655,
0.006558051,
-0.04031803,
0.04371562,
-0.005970551,
0.01299577,
0.009895472,
0.033579484,
0.03239033,
-0.047084894,
-0.02545359,
0.030691536,
0.038336106,
0.00029109535,
0.05546561,
-0.012755108,
0.032362018,
0.014652094,
-0.025821662,
0.006731469,
-0.0024508636,
0.0026685214,
-0.045442726,
-0.019168053,
0.008805413,
-0.020937629,
-0.06846138,
-0.016025286,
0.025184613,
0.040657792,
0.0047707786,
-0.009074389,
-0.001220123,
0.012217157,
0.043234296,
0.0117712235,
0.008812491,
-0.009909629,
0.021673774,
-0.02536865,
0.00564141,
0.02076775,
-0.016959623,
0.00718802,
-0.027053287,
-0.05328549,
0.021164136,
0.00806219,
-0.025779191,
0.02620389,
-0.015770467,
-0.031937316,
-0.065460175,
0.035080086,
-0.038137913,
-0.021263232,
0.0025251857,
-0.036750566,
-0.04864212,
0.02436353,
0.0076587275,
0.031002982,
0.007892312,
0.027591238,
0.042724658,
0.049038507,
0.02519877,
-0.00016346463,
0.016534923,
0.020668654,
-0.049633082,
-0.0038045896,
0.0021376484,
-0.036580686,
0.051048744,
-0.021277389,
-0.06478066,
0.0100299595,
0.01742679,
-0.009046075,
-0.064724036,
-0.013625739,
0.006607599,
-0.048245735,
-0.011155411,
0.081315584,
0.0605903,
-0.0021305701,
-0.014305257,
0.012514445,
-0.012861283,
-0.031144548,
-0.026727684,
0.02703913,
-0.014765346,
-0.04028972,
-0.027775273,
-0.059231266,
-0.01650661,
-0.011311133,
-0.038392734,
-0.0059776297,
0.043064415,
0.019635221,
0.04249815,
0.010659929,
-0.014567154,
0.014694564,
-0.02181534,
0.04572586,
0.0005941353,
0.07695535,
0.017709922,
-0.012379957,
-0.0065049636,
0.008508124,
0.018644258,
-0.0031286112,
-0.02958732,
0.0024225502,
-0.012351644,
-0.018856607,
-0.05249272,
-0.011318211,
0.021447267,
-0.012563993,
-0.0075030047,
-0.023528289,
-0.022296665,
-0.07576619,
-0.05203971,
-0.041875258,
0.0015758079,
-0.013109023,
-0.027477985,
0.054842718,
-0.06766861,
0.23647206,
0.041337308,
0.009576948,
-0.004827405,
0.0571644,
0.034910206,
0.038336106,
-0.0190548,
0.019989137,
-0.0128542045,
-0.045952365,
0.00651912,
0.020173173,
0.025538528,
-0.021249074,
0.021716243,
-0.0391855,
0.009888394,
-0.036637314,
-0.052889105,
-0.030210212,
0.016945465,
0.0111200195,
0.06262885,
0.02335841,
0.01642167,
-0.017908115,
-0.032192137,
-0.013342607,
-0.064554155,
0.030068645,
-0.01729938,
0.020045763,
0.013385077,
-0.0033462693,
0.009102702,
-0.007793215,
0.0010051195,
-0.005917464,
0.013562035,
0.021999376,
-0.03556141,
0.051728263,
-0.021999376,
0.0043319236,
0.022792146,
-0.053087298,
0.015345768,
0.033324666,
-0.04697164,
0.03423069,
-0.04776441,
0.07163246,
-0.041139115,
-0.03581623,
0.0059811687,
-0.04459333,
-0.048812,
-0.018375283,
-0.027279792,
-0.0023199148,
0.0013024083,
-0.0202298,
0.012181765,
-0.0015536882,
-0.0085364375,
-0.024434313,
0.022211725,
0.0031498463,
-0.022324977,
0.022296665,
0.012429506,
-0.020965943,
-0.0032666384,
-0.023301784,
0.056428257,
-0.008508124,
0.0762192,
-0.00004075556,
-0.027336419,
0.040261406,
-0.018276187,
0.018545162,
-0.047651157,
0.048075855,
0.039298758,
-0.011919867,
-0.009874237,
-0.019493656,
0.038902372,
0.050029468,
-0.022296665,
0.008472732,
0.008295774,
0.017964741
] | At first, integration tests should be added. Those integration tests essentially do the same as the debugging scripts
you used earlier to implement the model to 🤗 Transformers. A template of those model tests has already added by the
Cookiecutter, called BrandNewBertModelIntegrationTests and only has to be filled out by you. To ensure that those
tests are passing, run
RUN_SLOW=1 pytest -sv tests/models/brand_new_bert/test_modeling_brand_new_bert.py::BrandNewBertModelIntegrationTests |
[
0.04680081,
0.0063873203,
-0.023358544,
-0.00867922,
-0.005829171,
0.0056407955,
-0.00044150476,
0.0077931583,
-0.008881549,
0.043703083,
0.009055971,
-0.03320988,
0.048754334,
-0.054140475,
0.032400563,
0.012830455,
-0.00088562584,
-0.044093788,
-0.048000835,
-0.002717489,
-0.019423593,
0.020972457,
-0.04914504,
-0.037563443,
-0.02468415,
0.0056966105,
0.021111995,
-0.03957278,
0.077861816,
0.03817741,
-0.025074854,
-0.007848973,
-0.01780496,
-0.0400193,
-0.0002265301,
-0.023721341,
0.0067431405,
-0.015614225,
-0.030586578,
-0.052298583,
-0.0034256408,
-0.025339974,
0.021935264,
-0.024488797,
-0.068317465,
0.012802548,
0.03220521,
-0.027670247,
0.020637568,
-0.049982265,
0.021600375,
0.007133845,
0.010346691,
-0.0023477152,
-0.004409379,
0.013758378,
-0.05076367,
0.0016857851,
-0.059387077,
0.016228188,
0.068317465,
-0.009286208,
-0.010862979,
-0.06898724,
0.024823686,
0.02570277,
-0.010479252,
-0.05319162,
-0.027167913,
-0.024879502,
-0.030167965,
0.010618789,
-0.04035419,
-0.023274822,
-0.02461438,
-0.011867648,
0.019144518,
0.03879137,
-0.045433346,
0.058382407,
0.020205002,
0.010946701,
-0.0022517832,
-0.032679636,
-0.052940454,
-0.032595914,
0.073898956,
-0.0062373173,
-0.028884223,
-0.0017040994,
0.0046814764,
0.030865652,
0.010604835,
-0.0078071123,
0.007409431,
0.03960069,
-0.01228626,
0.037535537,
0.011672296,
-0.0022448064,
0.01204207,
0.0628476,
0.007088495,
0.01780496,
0.0013831635,
0.044707753,
0.01660494,
0.006233829,
-0.014567695,
-0.03145171,
0.009146671,
0.02203294,
0.010242038,
0.00008830095,
-0.037786704,
0.055982366,
0.008644336,
-0.012209514,
-0.066698834,
0.024028324,
-0.0075838524,
-0.014100244,
-0.015837485,
-0.0624569,
0.022618998,
-0.0011075774,
-0.00016962504,
0.05355442,
-0.019702667,
-0.012837432,
0.0010569951,
-0.0362797,
-0.007960604,
0.088968985,
0.008651313,
-0.013988615,
-0.014414203,
0.0073885005,
0.020581752,
-0.034688976,
-0.026470227,
0.04163793,
-0.033879656,
0.06563835,
0.0072140787,
0.010465298,
0.00042362654,
-0.07535014,
-0.010876933,
0.014414203,
-0.02708419,
0.021795727,
-0.0065198806,
0.011525782,
-0.055563755,
-0.04200073,
-0.05101484,
0.004412867,
0.00032464226,
-0.004507055,
-0.011825787,
0.031200541,
-0.04395425,
0.063126676,
-0.021907357,
0.02655395,
0.010723442,
-0.016507262,
0.0041372813,
-0.025842309,
0.004475659,
0.011825787,
0.0011642644,
0.03519131,
0.04166584,
0.045712423,
0.03619598,
0.018279387,
0.0059896386,
-0.0007883858,
0.026051614,
0.0050512506,
0.015237474,
0.033014525,
0.0039209984,
-0.0011825786,
-0.015083983,
0.011721133,
0.014456064,
-0.017609607,
-0.0029128413,
0.05606609,
-0.049256667,
-0.0031954043,
-0.002748885,
0.024837641,
-0.012586265,
0.020511985,
0.011365313,
-0.058661483,
-0.05416838,
0.05670796,
-0.018558461,
0.044121698,
-0.022228293,
0.007932696,
-0.00025792597,
0.02109804,
-0.016311912,
0.006624534,
0.043256566,
0.027349312,
-0.019953834,
-0.03706111,
0.038763463,
-0.022995748,
-0.0040849545,
0.00794665,
0.023539944,
-0.0033174995,
0.0035616898,
-0.018391017,
0.037396,
0.017581701,
0.02868887,
-0.003941929,
0.0029983078,
0.051489267,
-0.014679325,
-0.013269998,
-0.004402402,
0.036558773,
0.0012270561,
0.0699361,
0.037200645,
0.01840497,
0.02296784,
0.048084557,
0.008525729,
0.0024471355,
0.026888838,
-0.004796595,
0.02176782,
0.03960069,
-0.0306703,
-0.004733803,
0.011442059,
-0.01041646,
0.007751297,
0.020358494,
-0.02655395,
0.053498603,
0.038316943,
0.004297749,
-0.034437805,
0.02187945,
0.030809836,
0.01742821,
-0.003505875,
-0.041805375,
-0.012502543,
0.028451657,
0.016214235,
-0.02296784,
0.008107117,
0.02670744,
-0.037926238,
0.040549543,
-0.03946115,
-0.075796664,
-0.031926136,
-0.061842933,
-0.08282934,
-0.013263021,
-0.031033097,
-0.02072129,
0.011407175,
-0.052159045,
0.025967892,
0.009669935,
-0.006537323,
0.029749354,
-0.0016884014,
0.07194544,
0.026679533,
-0.005312883,
-0.074233845,
0.031340078,
-0.0538614,
-0.009732727,
0.019925928,
0.014456064,
-0.02180968,
-0.015083983,
0.035749458,
0.050875302,
0.0038651833,
-0.0001911007,
-0.04518218,
0.022270154,
-0.03340523,
-0.0016892735,
0.015921207,
0.025409743,
-0.0215027,
-0.008665266,
0.024126,
-0.014693278,
0.052689288,
0.046214756,
-0.03541457,
0.026386505,
-0.0008158572,
0.00032551438,
-0.030865652,
0.033684306,
0.043898437,
0.009579236,
-0.015237474,
-0.02472601,
-0.027098145,
0.000022116117,
0.0027942345,
-0.025633004,
0.021070134,
0.03987976,
-0.0040430934,
-0.05553585,
0.0069559347,
0.0009654237,
-0.029609816,
-0.00048881664,
-0.014860723,
0.001974453,
0.022925979,
-0.0051628803,
-0.057601,
-0.03597272,
-0.010932748,
0.013256044,
0.033321507,
-0.02677721,
0.024935316,
0.06374064,
0.026944654,
0.0023651572,
-0.014721186,
-0.05001017,
-0.02341436,
0.0017721237,
0.024419028,
0.028912129,
0.012342075,
0.026693486,
0.036754128,
0.039098352,
-0.043898437,
-0.019353824,
0.05933126,
-0.0134374425,
0.0105420435,
0.04903341,
0.025577188,
-0.024544612,
-0.056261443,
-0.00819084,
-0.00796758,
-0.01604679,
0.030028429,
-0.06781513,
0.0057698674,
-0.028256305,
-0.013388605,
0.012258353,
-0.024126,
-0.06943376,
0.023093425,
0.03228893,
0.05361023,
-0.06418716,
-0.030195873,
0.02203294,
-0.025367882,
0.036977384,
-0.0056931223,
0.0134374425,
-0.040968154,
-0.029191203,
-0.007151287,
0.011909509,
0.0019796856,
-0.014204898,
0.0030192384,
0.012265329,
-0.028256305,
-0.034661066,
0.039182074,
0.02924702,
0.03770298,
0.010081571,
0.048084557,
0.00830247,
-0.02775397,
0.023665527,
-0.031898227,
-0.019325918,
-0.07903393,
0.03287499,
0.024042279,
-0.0056966105,
-0.0027680714,
-0.0033977334,
-0.0023895763,
0.02748885,
-0.005846613,
-0.0134513965,
-0.028493518,
-0.025019038,
0.030977283,
-0.006146618,
-0.004203561,
-0.022005033,
-0.05132182,
0.026986515,
0.0039872783,
-0.04395425,
0.00585359,
-0.041191414,
0.004936132,
0.03200986,
0.0039035561,
-0.014330481,
0.01642354,
-0.009600166,
-0.034465715,
0.034940142,
0.057824258,
0.0024314376,
0.0150421215,
-0.057824258,
-0.004210538,
-0.002621557,
-0.012474635,
-0.0001831427,
-0.010521113,
-0.003089007,
0.017651469,
0.019618945,
0.013974661,
-0.020093372,
0.022158524,
-0.020191047,
0.016507262,
-0.0493683,
0.022144571,
-0.048056647,
0.017581701,
-0.008239678,
0.023567852,
0.025423696,
-0.016088651,
-0.0002483328,
0.027209774,
-0.036865756,
-0.023023656,
0.030056335,
0.026651625,
-0.0047128727,
0.031758692,
0.035358753,
-0.016228188,
-0.022465507,
0.015949113,
-0.0076396675,
0.025967892,
-0.010109478,
-0.0014058384,
0.024977177,
0.014414203,
-0.000677192,
-0.04035419,
0.031730782,
-0.009809473,
0.01735844,
-0.067089535,
-0.033377323,
-0.039963484,
0.023274822,
-0.011218799,
0.028940037,
0.011783926,
-0.0023232962,
0.019479407,
-0.006997796,
-0.011979277,
-0.027098145,
-0.0052605565,
0.0063838316,
0.039740223,
0.01500026,
0.05121019,
-0.046856627,
0.002401786,
-0.008455961,
-0.030809836,
0.010758326,
0.006198945,
0.00627569,
0.015237474,
-0.0025587652,
0.004716361,
-0.000773996,
-0.012300214,
-0.0037605304,
0.01731658,
-0.020511985,
0.003596574,
-0.014253736,
-0.061508045,
0.04694035,
-0.040270466,
-0.08344331,
-0.037340183,
0.013639771,
0.0015113634,
0.04596359,
0.035777364,
-0.04186119,
-0.002855282,
-0.067145355,
0.010318784,
-0.031619154,
0.021935264,
-0.0370332,
0.050875302,
0.015907252,
0.0136816325,
0.0546149,
-0.027879553,
-0.040410005,
-0.012223468,
0.01417699,
-0.047219425,
-0.047749665,
0.009209462,
-0.02457252,
-0.035554107,
0.06563835,
0.012363005,
-0.030279595,
-0.044037975,
0.00015872369,
0.0097397035,
0.04989854,
-0.030837744,
-0.004416356,
-0.00821177,
-0.0145118795,
0.05333116,
0.034688976,
-0.03421455,
0.029023759,
-0.020470122,
0.033684306,
-0.038316943,
-0.02127944,
0.0013125228,
-0.0381495,
-0.0029372603,
-0.016856106,
0.04353564,
-0.036586683,
0.0102838995,
-0.008218748,
-0.018711952,
-0.035330847,
-0.019772436,
-0.037089016,
-0.028563287,
0.035442475,
-0.01813985,
-0.019660806,
-0.0017389837,
-0.022242246,
0.04163793,
-0.008811781,
0.041498393,
0.059610337,
0.012111838,
0.0017625305,
-0.027056284,
0.049731094,
0.018167756,
0.03923789,
-0.021935264,
0.026874885,
-0.031758692,
-0.00020461838,
-0.042810045,
-0.04624266,
-0.011658342,
0.0157119,
0.038568113,
-0.031702876,
0.034521528,
0.02000965,
-0.027237682,
-0.0501218,
0.0288005,
0.033237785,
-0.013570003,
0.036447145,
0.034354083,
0.010207154,
-0.007835019,
-0.003530294,
-0.026651625,
0.0072838473,
0.0725594,
0.020177094,
-0.07596411,
-0.019814298,
0.014497926,
-0.037730888,
-0.045684513,
-0.020246863,
-0.004224492,
-0.015614225,
0.0039175097,
-0.007235009,
0.014790954,
-0.016856106,
0.060447562,
0.032121487,
-0.050959025,
0.00028452527,
0.02595394,
-0.03044704,
-0.00017354952,
0.030028429,
0.0370332,
-0.017777054,
-0.017874729,
-0.018251479,
0.02270272,
-0.042670507,
-0.018209618,
0.09254114,
-0.02408414,
0.0066559296,
-0.0022919003,
0.022312015,
0.031033097,
-0.024070185,
0.00433961,
0.059442893,
-0.03223312,
-0.050707858,
-0.03960069,
-0.028214443,
0.011658342,
0.018837536,
-0.029637724,
0.020274771,
0.0519916,
0.026735349,
-0.0081768865,
-0.05933126,
-0.0022116662,
-0.024670195,
-0.016897967,
0.0046117078,
0.008783873,
0.03725646,
0.0009008877,
0.029051667,
-0.05849404,
-0.011714157,
0.041693747,
-0.021265486,
0.0074164076,
-0.05681959,
0.002508183,
-0.029079575,
-0.03549829,
-0.007200125,
-0.04331238,
-0.0014328737,
0.019632898,
-0.030056335,
0.025479512,
0.027740017,
0.052800916,
0.01773519,
-0.013807217,
-0.09242951,
-0.022758534,
-0.026316736,
0.010116454,
-0.026470227,
0.0026320224,
-0.012383936,
-0.040633265,
0.025912078,
0.015125844,
-0.006624534,
-0.003443083,
-0.012139746,
0.03725646,
-0.031395894,
0.004015186,
-0.004465194,
0.022214338,
-0.039544873,
0.0065582534,
-0.0077443207,
-0.044484492,
-0.0067710476,
0.022744581,
-0.007814089,
0.08015023,
0.009865288,
0.0009628074,
-0.012321144,
0.012760687,
0.056987036,
0.006931516,
0.04537753,
-0.031172633,
-0.007751297,
-0.033740122,
0.023470175,
-0.0075210608,
-0.0097676115,
0.0013692098,
0.0155584095,
0.026205106,
-0.006104757,
0.038289037,
-0.020023603,
0.04878224,
0.027767925,
0.011358337,
0.013960707,
-0.03946115,
0.022605043,
0.014016522,
-0.097787745,
-0.014030476,
0.014679325,
-0.0278656,
0.0059896386,
-0.029414464,
-0.009830403,
0.022912025,
0.031061005,
-0.009349,
0.0050861347,
-0.019577084,
0.0008498694,
0.008407122,
-0.0077931583,
-0.035916902,
-0.021293392,
0.023958554,
-0.0076466445,
-0.02461438,
-0.0059303353,
0.03485642,
0.010946701,
-0.03881928,
-0.02708419,
0.002314575,
-0.009076902,
0.025270207,
-0.04384262,
0.025926031,
-0.03362849,
0.04696826,
-0.026330689,
0.014902584,
-0.01773519,
0.040103022,
0.010430413,
0.0023477152,
-0.012635103,
0.023609713,
-0.0016229933,
0.013793263,
0.023274822,
0.0067291865,
0.023805065,
0.008225724,
0.029833077,
0.0016378191,
0.013988615,
0.028074905,
0.04135886,
0.04878224,
-0.020177094,
0.025646957,
-0.043898437,
-0.04080071,
0.013835124,
0.03647505,
0.0065756957,
0.056233533,
0.01101647,
0.04320075,
0.00761176,
0.016507262,
0.026693486,
-0.023051564,
0.011065308,
-0.018377064,
-0.018474739,
0.011637411,
-0.012125792,
-0.057098664,
-0.0058082403,
0.020149186,
0.056400977,
0.0040605357,
0.021949219,
-0.024056232,
0.010123432,
0.027600478,
0.043451916,
-0.005225672,
-0.0056059114,
0.0007264661,
-0.03661459,
0.028381888,
0.016172374,
-0.005330325,
-0.012342075,
-0.041721653,
-0.05681959,
0.007869904,
0.0077722277,
-0.012495566,
0.012746733,
-0.00026882734,
0.003242498,
-0.06720117,
0.013904893,
-0.071052395,
-0.006314063,
0.011462989,
-0.028298166,
-0.052242767,
0.017009597,
-0.012188584,
0.008609451,
0.030140057,
0.020707335,
-0.0075280378,
0.03187032,
0.04364727,
0.016284004,
0.01368861,
0.020037558,
0.0019639875,
-0.0022378296,
0.02966563,
-0.059052188,
0.04942411,
-0.00062442943,
-0.07802926,
0.04802874,
0.014721186,
-0.015181659,
-0.028967945,
0.025381835,
0.032344747,
-0.036307607,
0.0017206694,
0.07657807,
0.011267638,
0.00409542,
0.0075908294,
-0.011623458,
-0.045879867,
-0.02779583,
-0.048391536,
0.044456586,
0.0052779987,
-0.03153543,
-0.030474948,
-0.06898724,
-0.003966348,
0.020163141,
-0.03597272,
-0.028507471,
0.055870738,
-0.010346691,
0.051824156,
0.0044372864,
0.00015043866,
-0.02648418,
0.0097676115,
0.05352651,
0.014525834,
0.083052605,
0.05042878,
-0.027544664,
-0.0018645673,
-0.023721341,
0.031284265,
0.018893352,
-0.026079522,
-0.014609556,
-0.012335097,
-0.009690866,
-0.03923789,
-0.00527451,
0.04761013,
-0.012104861,
0.017232858,
-0.056903314,
-0.016897967,
-0.044149604,
-0.024153907,
-0.04724733,
0.036977384,
-0.003966348,
-0.012949062,
0.008944341,
-0.06413135,
0.23062725,
0.044037975,
0.023442267,
0.008825734,
0.016130513,
0.0699361,
0.06122897,
0.018977074,
0.0071582636,
-0.035247125,
-0.028074905,
-0.00498497,
-0.010095524,
0.011560665,
-0.0026337667,
0.009411791,
-0.06078245,
-0.026414411,
-0.024516705,
-0.011044377,
-0.058605667,
-0.0035616898,
0.015446779,
0.043451916,
0.011030424,
0.01101647,
-0.002508183,
-0.03541457,
0.024698103,
-0.034800604,
0.020581752,
-0.009697842,
0.015614225,
0.00994901,
-0.030865652,
0.011337406,
-0.011581596,
-0.059833597,
-0.016870061,
0.04013093,
0.01880963,
-0.017707285,
0.025828356,
0.017860776,
-0.010716465,
0.036782034,
-0.030167965,
-0.013339766,
0.02154456,
-0.04208445,
0.031088911,
-0.036726218,
0.024879502,
-0.03407501,
-0.0066454643,
0.022046894,
-0.0396565,
-0.08673639,
0.005330325,
-0.011030424,
0.029609816,
-0.0016343307,
-0.030837744,
0.036893662,
-0.005724518,
-0.018056128,
-0.0026424876,
0.022312015,
0.032540098,
0.012914178,
0.015697947,
0.016507262,
-0.010402506,
-0.018474739,
0.013563026,
0.007353616,
-0.030084243,
0.05098693,
0.010597859,
-0.016730523,
-0.037396,
-0.011867648,
-0.018656138,
-0.023470175,
0.029330742,
0.032484286,
-0.044931013,
-0.025186483,
-0.012928131,
0.009118763,
0.0344099,
0.030698208,
0.021586422,
0.0047128727,
0.033572678
] | It helps to transfer the knowledge you have acquired during the model addition to the community by showing how the
special features of brand_new_bert should work.
Future contributors can quickly test changes to the model by running those special tests. |
[
0.038002577,
-0.004530531,
0.011124262,
-0.0046085212,
0.008323698,
0.020206593,
0.004789317,
-0.0061612385,
-0.0302319,
0.03247235,
-0.03632933,
-0.019922992,
0.02991994,
-0.031025983,
0.014243876,
-0.007962107,
0.009961496,
-0.048722707,
-0.037747335,
0.014775628,
0.00428238,
0.026842864,
-0.060293637,
-0.037690613,
-0.038144376,
0.027112285,
-0.018604247,
-0.01912891,
0.06710007,
0.04373132,
0.007912477,
-0.03020354,
-0.021185018,
-0.047900263,
0.03216039,
-0.012116866,
0.015768234,
0.026601803,
-0.044667207,
-0.057202384,
0.022744825,
-0.021142477,
0.0070758527,
0.008380419,
-0.03493968,
-0.024148652,
-0.0070687626,
0.027041385,
-0.0012239169,
-0.04911975,
0.010301817,
0.009855146,
-0.038286176,
-0.009918956,
-0.027154826,
-0.017753443,
-0.039647464,
0.018150484,
-0.04361788,
0.0027704304,
0.07594843,
-0.0108123,
0.03227383,
-0.043391,
0.023241127,
0.027707849,
-0.024928555,
-0.027878009,
-0.033776917,
-0.028331771,
0.010323088,
0.029976659,
0.003449301,
-0.020844696,
-0.05218264,
0.0136483135,
0.058592033,
0.042086434,
-0.017086979,
0.025495758,
-0.0035113387,
0.035478525,
0.036045726,
-0.030912543,
-0.04721962,
-0.04316412,
0.020305853,
-0.030855823,
-0.06744039,
-0.008210258,
-0.008387509,
0.03462772,
-0.0037364473,
0.009897686,
-0.004729052,
0.027112285,
-0.01093283,
-0.011882895,
0.025297238,
-0.012882589,
0.013875194,
0.054933574,
-0.016151095,
0.024673315,
-0.034117237,
0.0657955,
0.035393443,
-0.014038265,
-0.06692991,
0.0063952096,
0.010514518,
0.046765856,
-0.0058811824,
0.02837431,
-0.036386047,
0.02186566,
-0.014052445,
-0.019639391,
-0.06035036,
0.022333603,
0.024191191,
-0.025439037,
0.036102448,
-0.0302319,
-0.012598989,
-0.029437816,
-0.031508107,
0.037548814,
-0.02170968,
-0.05864875,
0.009068152,
0.044100005,
0.033351514,
0.014988329,
0.065568626,
-0.008394599,
-0.01293222,
-0.0065901857,
0.037463732,
-0.07577827,
0.0057429266,
0.028601192,
-0.03692489,
0.06488798,
-0.006717806,
0.003128477,
0.0216246,
-0.025509939,
-0.024843475,
0.013931914,
-0.047162898,
0.018561706,
-0.0063952096,
0.009855146,
-0.041008748,
-0.02363817,
-0.015172671,
-0.018504985,
-0.0102309175,
0.010925741,
-0.029154215,
0.013534873,
-0.037945855,
0.044440325,
-0.010869021,
0.028544473,
-0.002559502,
-0.017427301,
-0.00073337526,
-0.05391261,
-0.009103602,
-0.013258361,
-0.0137333935,
0.022759005,
0.009443924,
-0.01976701,
0.048013702,
-0.031394664,
0.008196078,
0.0026623073,
-0.03235891,
-0.0009030929,
0.022291062,
0.027041385,
-0.010514518,
-0.025368137,
0.042313315,
-0.0054593254,
-0.029352736,
-0.011372413,
0.03247235,
0.009692075,
-0.018760227,
0.009337573,
-0.056465022,
-0.01969611,
-0.048864506,
0.042681996,
-0.011223522,
-0.046085212,
-0.01758328,
0.027963089,
-0.05396933,
0.015172671,
0.005048103,
-0.013180371,
0.009777155,
0.015980935,
-0.011804905,
0.009231223,
0.06335653,
0.0002570137,
-0.04946007,
0.003557424,
0.017895242,
-0.019738652,
0.009642445,
-0.008125178,
0.02342547,
-0.015668973,
0.07311242,
-0.0061683287,
0.04568817,
0.038030937,
0.08434303,
-0.0022989432,
-0.014789809,
0.05334541,
0.055302255,
0.052608043,
0.028431032,
0.04985711,
-0.007012042,
0.0477301,
0.012733699,
0.0042894697,
-0.02616222,
-0.02827505,
0.011138442,
0.060293637,
0.040044505,
0.028941514,
0.028487751,
0.03474116,
-0.004140579,
-0.013960275,
-0.03896682,
0.008366238,
-0.020816335,
-0.0016005749,
-0.025353957,
0.023212768,
0.04112219,
0.0037435372,
-0.026899584,
-0.0010661636,
0.031706627,
0.027948909,
-0.006274679,
0.030600581,
-0.012060146,
0.006072613,
-0.031224504,
-0.044809006,
0.010245098,
0.048042063,
-0.011258972,
0.04798534,
0.022617204,
-0.032784313,
-0.0037187221,
-0.025637558,
-0.069142,
-0.032784313,
-0.04307904,
-0.0058067366,
0.016647397,
-0.054961935,
0.01305275,
-0.023241127,
0.003132022,
0.02153952,
0.013300901,
0.06789415,
-0.0011804905,
0.023070967,
-0.052409522,
0.033238072,
-0.067724,
-0.014945789,
-0.028898973,
0.024219552,
-0.028544473,
-0.035535246,
0.03031698,
0.015711512,
0.028473571,
-0.0093446635,
-0.0071644783,
0.0095999045,
-0.03423068,
-0.0010307136,
0.002724345,
0.025141256,
-0.03406052,
-0.0136908535,
0.014662188,
-0.03213203,
0.0694256,
0.039420582,
-0.0646611,
0.007036858,
0.024474794,
0.009968586,
-0.033011194,
0.020008072,
0.015399551,
-0.006877332,
-0.01969611,
-0.025325596,
-0.028544473,
0.009493554,
-0.031082705,
-0.025169617,
-0.020802157,
0.038541418,
-0.007196383,
-0.022532124,
0.019937173,
-0.030430421,
-0.007146753,
-0.015442091,
-0.019724471,
0.033096272,
0.024091931,
-0.006285314,
-0.036187526,
0.0072389236,
-0.005466415,
0.019738652,
0.019908812,
-0.01080521,
0.035478525,
0.054848492,
0.038116015,
0.011592204,
0.035989005,
-0.049970552,
-0.033833638,
0.0020029342,
0.021823121,
-0.01936997,
0.025424857,
0.0035662865,
0.021369359,
0.042114794,
-0.045744892,
0.022291062,
0.06500142,
0.0054876856,
0.0078273965,
0.016973538,
0.008408779,
0.013818474,
-0.047162898,
-0.026360743,
0.026289841,
0.025552478,
0.04089531,
-0.03649949,
0.011209342,
-0.026658524,
-0.030742383,
-0.008089728,
0.012336657,
-0.020631995,
0.026474182,
0.0387683,
0.027636947,
-0.024247913,
-0.0085009495,
-0.012691159,
-0.037293572,
0.05595454,
0.047900263,
0.03031698,
-0.016732477,
-0.0062321387,
-0.006069068,
-0.019894632,
-0.0015358784,
0.010358538,
0.0032986377,
0.013166191,
-0.0020064793,
-0.06097428,
0.030714022,
0.025056176,
0.017058618,
0.046227016,
0.064434215,
-0.074984185,
-0.017866883,
0.020943956,
0.0057074763,
0.0085860295,
-0.054848492,
0.057571065,
-0.020164054,
0.034145597,
-0.030345341,
0.007777766,
-0.020660356,
0.015498811,
-0.03176335,
-0.016307075,
-0.061484765,
-0.011811995,
0.012478458,
0.014591288,
-0.022844085,
-0.021057397,
-0.009833875,
0.013783024,
0.017625822,
-0.05022579,
-0.0026516723,
-0.006636271,
0.0050126533,
0.055926178,
0.022900807,
-0.03247235,
0.0074516246,
-0.0068454267,
-0.053657368,
0.048240583,
0.05167216,
-0.00059689215,
0.020107333,
-0.03224547,
-0.023935951,
0.026956305,
-0.04146251,
-0.04571653,
0.016633216,
0.009621174,
0.0083733285,
-0.010954101,
0.028615372,
-0.0012549357,
-0.009564455,
-0.035223283,
0.023099327,
-0.05195576,
0.008061367,
-0.018093763,
0.024800934,
-0.015541352,
0.04928991,
0.03882502,
-0.012209036,
0.017058618,
0.016718298,
-0.03230219,
-0.02789219,
0.0028448757,
0.032954473,
0.0042043896,
0.04526277,
-0.005196994,
0.018122124,
0.033947077,
0.05357229,
-0.020589456,
0.017909423,
0.0085009495,
0.022815725,
-0.0076288753,
0.06261917,
-0.008997251,
-0.06284605,
0.03647113,
0.008196078,
-0.011500034,
-0.02627566,
-0.035591964,
-0.10283384,
-0.022574665,
0.00034962725,
0.05864875,
0.0020259768,
0.02407775,
0.048354022,
-0.019185629,
-0.046312094,
-0.011485853,
-0.036442768,
-0.004530531,
0.03493968,
0.04245512,
-0.017172059,
-0.06284605,
-0.030827463,
0.005374245,
-0.01738476,
-0.0017955508,
-0.031394664,
-0.0030877092,
0.015583892,
-0.031820066,
0.01932743,
0.024162833,
-0.0006576005,
0.022943346,
-0.009699165,
-0.010869021,
0.029522896,
-0.009521914,
-0.050310872,
0.024616593,
-0.040044505,
-0.05413949,
-0.037690613,
0.044809006,
-0.00863566,
0.04951679,
0.033975437,
-0.06057724,
-0.06006676,
-0.04685094,
0.030657303,
-0.016321255,
0.0015899398,
-0.035053123,
-0.023538908,
-0.0057535614,
0.014818168,
0.026233122,
-0.04072515,
-0.009365933,
-0.025226336,
0.03176335,
-0.0688584,
0.0047148718,
0.021085758,
-0.008961801,
-0.013201641,
0.030714022,
-0.018547526,
-0.026672704,
-0.007324004,
0.022801546,
-0.003085937,
0.031621546,
-0.035109844,
-0.0101032965,
-0.018632606,
0.02820415,
0.009422653,
0.020050613,
-0.0024106111,
0.04344772,
-0.017966144,
0.04526277,
0.0052643493,
-0.045574732,
-0.012825869,
-0.021369359,
0.011804905,
-0.004133489,
0.006292404,
-0.0011025001,
0.028345952,
0.004966568,
0.018902028,
-0.027480967,
-0.015215211,
-0.027594408,
-0.026247302,
0.057117306,
-0.005168634,
-0.0011388365,
0.009181593,
-0.016576497,
0.022447044,
0.019185629,
0.026261482,
0.048354022,
-0.03476952,
-0.02131264,
-0.03859814,
0.02172386,
0.021837302,
-0.014676368,
0.031678267,
0.010209647,
-0.008486769,
0.044383604,
-0.0014366179,
-0.04373132,
-0.024148652,
0.022291062,
0.036215886,
0.003233055,
0.042086434,
-0.0006881763,
-0.07765004,
-0.056691904,
0.026885405,
0.02376579,
0.02790637,
0.015995113,
0.0084158685,
0.034882963,
0.042398397,
0.00269244,
-0.0011344053,
0.009649535,
0.030940903,
-0.010592509,
-0.044440325,
0.031820066,
0.015456271,
-0.026601803,
-0.035280004,
0.021298459,
-0.0039597834,
0.007157388,
-0.0012593671,
-0.015654793,
0.018490806,
-0.04373132,
0.02389341,
0.01955431,
-0.022035822,
-0.016023474,
-0.0064200247,
0.018618425,
-0.030799102,
-0.0052288994,
0.033805277,
-0.04095203,
0.026927944,
-0.038541418,
-0.015598072,
-0.044667207,
-0.014307686,
0.06919872,
0.0052891644,
0.032926112,
0.029607978,
-0.013917734,
0.042511836,
0.0175691,
-0.006334944,
0.029636336,
-0.0035769215,
-0.03885338,
-0.03689653,
-0.0175691,
0.019171448,
0.0022138627,
-0.030146819,
-0.012258667,
0.025765179,
-0.004604976,
0.00068064313,
-0.04322084,
-0.011826174,
-0.00862857,
-0.009422653,
0.0147472685,
0.00007588551,
-0.020433474,
0.00433201,
0.026686883,
-0.031366304,
-0.048864506,
-0.015853314,
0.018987108,
-0.024318812,
-0.074643865,
0.0064022997,
-0.048183862,
-0.036187526,
-0.051190037,
-0.027027205,
0.030714022,
0.033691835,
-0.052636404,
-0.009564455,
0.001248732,
0.014328957,
-0.03882502,
0.021738041,
-0.0477301,
0.0048460374,
-0.007550885,
-0.0068347915,
-0.010627959,
0.013144921,
0.06891512,
-0.005193449,
0.014045355,
-0.015654793,
0.024730034,
0.0017326268,
-0.0070297676,
0.04523441,
-0.044156723,
-0.018689327,
-0.02376579,
0.027126465,
-0.06256245,
-0.008061367,
-0.014506207,
-0.044043284,
0.00027496033,
0.042370036,
-0.025041996,
0.0032560977,
0.020617815,
0.018604247,
-0.023836691,
0.03479788,
0.018249745,
0.0026711698,
0.009053972,
0.030940903,
-0.003553879,
0.008763281,
0.00075287285,
0.005803192,
-0.008727831,
0.04126399,
0.007777766,
0.051076595,
0.01955431,
0.007316914,
-0.037974216,
0.04792862,
0.022730645,
0.022730645,
0.015215211,
-0.011003731,
-0.019043827,
-0.017625822,
-0.061995246,
-0.01949759,
0.02817579,
-0.026460003,
0.020121513,
-0.031252865,
-0.03476952,
-0.008266978,
0.052636404,
-0.016321255,
0.030884182,
0.031167785,
0.03269923,
0.0118332645,
0.017866883,
-0.016590677,
-0.0059662624,
0.016902639,
0.0048247674,
-0.015881674,
-0.00883418,
0.031394664,
0.022872446,
0.014690548,
-0.079521805,
-0.035620324,
-0.015725693,
0.006246319,
-0.022673925,
0.05813827,
-0.013981544,
0.029579617,
-0.054961935,
-0.0023113508,
0.013804294,
0.035365082,
0.037974216,
0.010259277,
0.014371497,
0.039732546,
0.0018611336,
-0.0109895505,
0.03020354,
0.0101458365,
0.024758395,
-0.016250355,
0.014002815,
-0.042738717,
0.06698663,
0.0059024524,
0.03011846,
0.025141256,
0.0135632325,
0.029976659,
-0.056663543,
-0.024999456,
0.028516112,
0.0258928,
-0.02820415,
0.04951679,
0.002360981,
0.007983377,
0.00866402,
-0.011634744,
0.02161042,
0.016335435,
0.024347173,
-0.008919261,
-0.042710356,
0.013761753,
-0.001659954,
-0.09029866,
-0.006717806,
0.02186566,
0.03681145,
0.002291853,
-0.049233187,
-0.018462446,
0.022276884,
0.042370036,
0.016179455,
0.012627348,
-0.006895057,
0.0300901,
-0.038399618,
0.038286176,
0.03247235,
-0.0034085333,
-0.01966775,
0.012088506,
-0.031281225,
0.040611707,
0.009628264,
-0.03956238,
0.04055499,
-0.027523506,
-0.005962718,
-0.06812104,
-0.0023414833,
-0.04143415,
-0.026389102,
0.003672637,
-0.017157879,
-0.050395954,
0.018448265,
0.0044950806,
0.018873667,
0.005874092,
0.03176335,
0.050310872,
0.052834924,
0.037690613,
-0.0017202192,
-0.00541324,
0.0016457739,
-0.03476952,
-0.016604858,
0.010649229,
-0.036187526,
0.055188816,
-0.004257565,
-0.066192545,
0.03845634,
0.034003798,
0.013478152,
-0.06948232,
0.008401689,
0.01722878,
-0.029239295,
-0.0055514956,
0.061654925,
0.03669801,
0.020050613,
-0.008004647,
-0.010004036,
-0.026431642,
-0.010039486,
-0.01758328,
0.017172059,
-0.028487751,
-0.056294862,
-0.056947142,
-0.060293637,
-0.02158206,
0.0039952337,
-0.029352736,
-0.03454264,
0.03613081,
0.035591964,
0.037860774,
0.013421432,
0.0024425164,
0.0018221384,
-0.015924213,
0.060293637,
0.011847445,
0.06329981,
-0.00022976137,
-0.016080195,
0.0037364473,
-0.016051834,
0.010457799,
-0.011797815,
-0.040810227,
-0.007508345,
0.017824342,
-0.017781802,
-0.040101226,
-0.003467026,
0.017540742,
-0.016264535,
-0.016945178,
-0.033436596,
-0.030884182,
-0.050197434,
-0.039505664,
-0.03910862,
-0.0055302256,
-0.038229458,
-0.025013635,
0.044553768,
-0.07861429,
0.2359563,
0.0474465,
0.044553768,
0.007295644,
0.06744039,
0.022163443,
0.0137333935,
-0.014414037,
-0.011719824,
-0.0033252253,
-0.027098106,
-0.029891578,
0.016094374,
-0.000018819052,
0.0111171715,
-0.007522525,
-0.034145597,
0.023070967,
-0.013471062,
-0.044695567,
-0.018547526,
0.01710116,
0.015470452,
0.06035036,
-0.00542742,
0.02373743,
0.012230307,
-0.022900807,
0.02187984,
-0.04035647,
0.02370907,
-0.019908812,
0.034882963,
0.02817579,
-0.00866402,
0.0013719214,
-0.03264251,
-0.00048876915,
-0.0009864008,
-0.013251271,
0.0074658045,
-0.053061806,
0.009550274,
-0.022376144,
0.010379808,
-0.0049913833,
-0.035591964,
0.00011621007,
0.029012414,
-0.06596567,
0.054735053,
-0.03250071,
0.05830843,
-0.040101226,
-0.04982875,
0.03264251,
-0.056465022,
-0.05022579,
-0.011188072,
0.002616222,
0.0032649601,
-0.009458104,
-0.017058618,
0.008288248,
-0.004785772,
-0.011975066,
-0.018902028,
0.029026594,
-0.011762365,
-0.020490196,
0.030742383,
0.002511644,
-0.020178234,
0.005792557,
0.0027597952,
0.014130435,
0.007777766,
0.059442837,
-0.0055054105,
-0.011882895,
0.016945178,
-0.0026392648,
0.020305853,
-0.033379875,
0.023850871,
0.030600581,
-0.059556276,
-0.01084066,
-0.034882963,
0.029834857,
0.026417462,
0.004987838,
0.06256245,
-0.018434085,
0.005657846
] | RUN_SLOW=1 pytest -sv tests/models/brand_new_bert/test_modeling_brand_new_bert.py::BrandNewBertModelIntegrationTests
In case you are using Windows, you should replace RUN_SLOW=1 with SET RUN_SLOW=1
Second, all features that are special to brand_new_bert should be tested additionally in a separate test under
BrandNewBertModelTester/`BrandNewBertModelTest. This part is often forgotten but is extremely useful in two
ways: |
[
0.038966957,
0.0161556,
-0.012116701,
-0.0153639475,
0.004244144,
-0.017665608,
0.026359139,
0.009133339,
-0.0263738,
0.03377723,
-0.010306159,
-0.0065201484,
0.019952606,
-0.016829973,
-0.01148631,
0.0063552205,
-0.009140669,
-0.057995968,
-0.049287777,
-0.0038153315,
-0.0071578696,
-0.011178444,
-0.054800034,
-0.018266678,
-0.018750466,
0.015818415,
-0.020495037,
-0.0108998995,
0.0793413,
0.026109915,
-0.011083153,
0.028294293,
-0.0040902114,
-0.020407075,
-0.0033846863,
-0.04257338,
-0.011984759,
-0.024365343,
-0.04870137,
-0.00017179987,
-0.012490537,
0.005618543,
0.028602159,
-0.06286317,
-0.06485697,
0.009829701,
0.011764855,
-0.0062416038,
-0.00008899233,
-0.011728204,
-0.0018820103,
0.009580477,
0.014638265,
0.025787389,
-0.030082844,
-0.03178343,
-0.013831951,
0.017768228,
-0.06931368,
-0.00918465,
0.020920184,
0.041312598,
-0.024423985,
-0.035008688,
-0.026344478,
0.039377443,
-0.007407094,
0.027458658,
-0.034041114,
-0.03958269,
-0.033073537,
0.05002079,
-0.042133573,
-0.03169547,
-0.018515902,
-0.0032820646,
0.025450204,
-0.028807402,
-0.02876342,
0.067613095,
-0.0057798056,
0.021110767,
0.005277692,
0.004940506,
0.001178318,
-0.018295998,
0.050783124,
-0.02476117,
-0.015319967,
-0.040491626,
-0.017533666,
0.018823767,
-0.018779786,
-0.005241041,
0.03972929,
0.04421533,
-0.03207664,
0.04348232,
-0.010577374,
-0.027634582,
0.017343082,
0.08884115,
-0.05345129,
0.034099754,
0.022107664,
0.013311512,
0.027209433,
0.006886655,
-0.027869144,
0.01781221,
-0.002979697,
-0.02128669,
0.018413281,
-0.0004929511,
-0.031197023,
0.041605804,
-0.0013203393,
0.01094388,
-0.08027956,
-0.029408472,
0.040081136,
-0.02480515,
-0.014616274,
-0.044537853,
0.022576792,
-0.035888303,
0.017460363,
0.032545768,
0.004819559,
-0.022767376,
0.0378821,
0.032135278,
0.018911729,
0.031050421,
0.010027614,
-0.010174217,
-0.01949814,
-0.020055229,
0.025215639,
-0.036562677,
-0.022093004,
0.011119803,
-0.009030717,
0.06960689,
0.018486582,
-0.008766833,
0.011889467,
-0.013260201,
-0.026857587,
-0.0071578696,
-0.06268725,
0.025743408,
0.020758921,
0.026461761,
-0.022650095,
-0.010496743,
-0.005633203,
0.0028257642,
0.00022139277,
-0.0050357976,
-0.020363094,
0.01438171,
-0.034803446,
0.040638227,
0.008994066,
0.017445704,
-0.0114056785,
-0.02528894,
0.016170261,
-0.048349522,
-0.0020524357,
0.010159557,
-0.011325047,
0.03163683,
0.04096075,
0.034099754,
0.077288866,
0.009778391,
-0.020568337,
-0.017606966,
0.0141764665,
-0.009052708,
-0.019776683,
0.012336604,
-0.012417236,
0.0057761404,
0.006084006,
0.011933448,
-0.018794447,
0.0027433003,
0.026623024,
0.032604408,
-0.015818415,
-0.0016172094,
-0.07242166,
0.021154748,
-0.01090723,
-0.01094388,
-0.007945858,
-0.023500388,
-0.026769625,
0.033484023,
0.0046876166,
0.013692678,
0.013912582,
-0.011654903,
0.014491662,
0.02185844,
-0.036826562,
0.013582726,
0.03324946,
0.03389451,
-0.020084549,
0.013128258,
0.010877909,
-0.03389451,
0.00516774,
0.009609797,
0.033132177,
0.01778289,
0.01835464,
0.014161807,
0.045622714,
0.016448807,
0.006509153,
-0.01321622,
0.019820664,
0.026667004,
0.006483498,
0.0048891953,
0.022268927,
0.031138383,
0.031724792,
0.031197023,
-0.0012268801,
0.012563839,
0.03442228,
0.0493171,
0.022400869,
0.02071494,
0.0020762587,
0.009507176,
0.011149124,
-0.001753733,
-0.012380585,
0.011625582,
-0.00746207,
-0.012842383,
-0.036416072,
-0.00036192505,
-0.04993283,
0.04711806,
0.035448495,
-0.0039912546,
-0.07535371,
-0.031988677,
0.00042537646,
0.026623024,
0.017636286,
-0.024394665,
0.034275677,
0.011317717,
0.030258767,
0.010379461,
0.013941903,
0.018882409,
0.0034854757,
0.05817189,
-0.032340523,
-0.040110458,
-0.014828848,
-0.062335405,
-0.06649892,
0.0067693726,
-0.025538165,
-0.044010084,
-0.005673519,
-0.033718586,
-0.002215531,
0.0073118024,
0.009815041,
-0.006223278,
0.0010427106,
0.019600762,
0.034275677,
0.019322217,
-0.030933138,
0.0046399706,
-0.03451024,
0.020348433,
-0.003928948,
0.031402268,
-0.029936241,
0.00028404244,
-0.017694928,
0.0345982,
-0.0073118024,
-0.023236504,
-0.017885512,
0.04820292,
-0.02468787,
0.012593159,
-0.0058531067,
0.036562677,
-0.020275133,
0.008546929,
0.0023053251,
-0.035301894,
0.050753802,
0.043951444,
-0.028323613,
0.007989839,
0.01787085,
-0.005589222,
-0.017079197,
0.026960209,
0.02996556,
0.04664893,
-0.046179805,
-0.043922123,
-0.02244485,
0.031138383,
-0.0036320782,
-0.038175303,
0.0141764665,
0.055415764,
-0.04310115,
-0.018208036,
-0.030669253,
-0.032663047,
-0.022122325,
-0.03269237,
-0.00864955,
0.035448495,
0.022694075,
-0.013897922,
-0.033806548,
-0.010621355,
-0.019175613,
-0.007297142,
0.015407928,
-0.015246665,
0.012211992,
0.043423675,
0.006831679,
0.017489685,
0.0042661345,
-0.050313994,
0.00056212913,
-0.015290646,
0.01148631,
0.022400869,
0.02471719,
0.020436395,
-0.0014999274,
0.025244959,
-0.03154887,
0.00919198,
0.025816709,
0.017137839,
0.051926624,
0.048496123,
0.013450784,
-0.019014351,
-0.05691111,
-0.0056661884,
-0.016243562,
0.018501243,
0.022356888,
-0.022210287,
0.016536769,
0.018603863,
-0.032135278,
0.016800653,
-0.02874876,
-0.057262957,
0.053656533,
0.023837576,
0.037207726,
-0.0025398892,
-0.009228631,
-0.0019076657,
-0.02704817,
0.045006983,
0.055914212,
0.04087279,
-0.009477855,
-0.0065164836,
0.0014467839,
0.03439296,
0.011303057,
0.008327025,
-0.00042812526,
0.0022924973,
-0.003417672,
-0.03846851,
0.01949814,
0.044039406,
0.042250857,
0.0357417,
0.03676792,
0.010526063,
-0.012453887,
0.014528313,
-0.01899969,
-0.00087320147,
-0.04295455,
0.027414678,
0.038644433,
0.0055525717,
-0.019923287,
-0.0016465299,
-0.0018930055,
0.014139816,
-0.030200126,
0.019967267,
-0.03512597,
-0.018486582,
0.007997169,
0.0065054884,
-0.05166274,
-0.01091456,
-0.057556164,
0.004823224,
0.04653165,
-0.04887729,
0.0039252834,
-0.02245951,
0.0052557015,
0.022606114,
0.015657153,
-0.011031842,
0.021301351,
0.009631787,
-0.03327878,
0.04137124,
0.064681046,
-0.005515921,
0.011904127,
-0.07582284,
-0.008246394,
0.004302785,
-0.02185844,
0.00073026394,
0.018457262,
0.0073777735,
-0.026960209,
0.021873102,
0.010445432,
0.009646448,
0.0016547763,
-0.01952746,
0.025450204,
-0.02181446,
0.0027029845,
-0.044186007,
0.00054563634,
0.011845486,
0.051545456,
0.0070442525,
-0.038292587,
0.008392996,
0.02533292,
-0.026798947,
-0.054712072,
-0.014169137,
0.047528546,
-0.01832532,
0.0077992557,
-0.0070442525,
0.005757815,
0.019366197,
0.03785278,
0.008297704,
0.00088602916,
-0.019586101,
-0.0009222217,
0.007813916,
0.007289812,
0.029423133,
-0.049756907,
0.04436193,
0.02583137,
-0.018134736,
-0.010423441,
-0.059286073,
-0.009551156,
-0.0058237864,
-0.030346729,
0.021726498,
0.028528856,
0.021462614,
-0.010262178,
-0.022708734,
-0.006893985,
-0.055562366,
-0.03324946,
0.0045006983,
0.061631713,
0.023646992,
0.05752684,
-0.06450512,
-0.025919331,
0.019937947,
-0.012197332,
0.020846883,
0.0006088587,
-0.0153639475,
0.009800381,
-0.006149977,
0.00064276054,
0.050343316,
-0.0033223804,
-0.021506594,
0.017548325,
-0.00316295,
-0.020421736,
-0.014784867,
-0.04878933,
0.015004771,
-0.028587498,
-0.086788714,
-0.046297085,
0.026579043,
0.0035807674,
0.029423133,
0.068961844,
-0.01721114,
-0.027136132,
-0.02298728,
0.02590467,
-0.034011792,
0.015965018,
-0.05362721,
-0.02647642,
0.0031409597,
0.0069452957,
-0.0006542139,
-0.05802529,
-0.029100606,
-0.040169097,
0.003851982,
-0.04705942,
-0.008884114,
0.01210204,
-0.015774434,
-0.02071494,
0.0160823,
0.0040059146,
-0.021667857,
-0.03509665,
-0.020289794,
0.024321362,
0.052073225,
-0.046912815,
0.017914832,
0.00051631586,
-0.019366197,
-0.018515902,
0.038849678,
0.013348162,
0.04242678,
-0.001305679,
0.05811325,
-0.04606252,
-0.043863483,
-0.04984487,
0.01782687,
0.021389313,
-0.04181105,
-0.026549723,
-0.024482626,
0.053099446,
0.0028129364,
0.028543517,
0.00014557176,
0.014293749,
-0.06321502,
-0.040638227,
-0.0056075477,
-0.013714668,
-0.005589222,
0.007410759,
-0.015012101,
0.05353925,
-0.02131601,
-0.004661961,
0.08456035,
-0.00860557,
0.023500388,
-0.050167393,
0.055415764,
-0.0036833892,
-0.005636868,
0.010284169,
0.0033517007,
-0.044479214,
0.020275133,
-0.025523504,
-0.043394357,
-0.017357742,
0.03222324,
0.052102547,
-0.049639624,
0.031314306,
-0.015246665,
-0.036914524,
-0.065326095,
0.035477817,
0.025582146,
-0.0052373763,
0.028396914,
0.021154748,
0.053597894,
0.029496433,
-0.03149023,
0.0051017688,
-0.023925537,
0.058875583,
-0.0120434,
0.0015090901,
0.020040568,
0.008913435,
-0.049580984,
-0.03269237,
0.012285294,
0.023177864,
-0.03603491,
-0.008349015,
0.009001397,
0.024189422,
-0.036885202,
0.04140056,
0.039289482,
-0.027180113,
-0.022532811,
-0.016932596,
-0.011926117,
0.026652344,
0.03556578,
0.06743717,
-0.044801738,
0.003362696,
-0.04899457,
0.036357433,
-0.021462614,
-0.026901567,
0.0563247,
0.018721147,
0.0345982,
-0.011640242,
-0.0077332845,
0.06256997,
-0.015451909,
-0.055855572,
0.016947255,
-0.01380263,
-0.07893081,
-0.0149388,
-0.009800381,
-0.010533393,
0.00055342464,
-0.023339126,
-0.01037213,
-0.00079531886,
0.050401956,
0.02761992,
-0.07506051,
0.0470301,
-0.0031574524,
-0.012659131,
0.006553134,
-0.0020322779,
-0.00806314,
0.017064538,
0.020758921,
-0.049668945,
0.009118679,
0.0011948108,
-0.027180113,
-0.015407928,
-0.058904905,
0.017108519,
-0.032047316,
-0.0310211,
-0.0029485438,
-0.042397458,
0.002987027,
0.012314614,
0.002336478,
-0.032663047,
-0.021975722,
0.012600489,
-0.033542663,
0.00859824,
-0.027634582,
-0.02984828,
0.017387062,
-0.014000543,
0.015004771,
0.022782037,
0.048613407,
-0.034891408,
0.0028752426,
-0.018867748,
0.016287543,
-0.0026956545,
0.0038813027,
0.020084549,
-0.06022433,
0.02174116,
-0.0006679579,
0.035536457,
-0.045534752,
-0.018515902,
0.0010280504,
0.023353787,
-0.00088053156,
0.051955946,
0.01435239,
0.035155293,
-0.010804608,
-0.0030163475,
-0.009433874,
0.028455555,
0.011794175,
0.013377483,
0.009932322,
-0.029159248,
0.018252017,
-0.0066960715,
0.010071595,
0.017548325,
-0.01835464,
0.000947419,
0.04870137,
0.0008557924,
-0.039934535,
0.015158704,
-0.019058332,
0.008444307,
0.033659946,
-0.019014351,
0.011347038,
0.019175613,
-0.0061279866,
0.011559611,
-0.038087342,
-0.08045548,
0.035301894,
-0.059051506,
0.02470253,
-0.05682315,
-0.021623876,
0.01035014,
0.011273736,
0.00601437,
-0.026153896,
0.019996587,
0.020377755,
-0.015129384,
-0.04137124,
-0.042368136,
-0.010144897,
0.02178514,
-0.011119803,
-0.005046793,
0.032956254,
0.028880702,
0.02473185,
-0.043746203,
-0.04644369,
-0.008246394,
-0.012776412,
0.06966553,
-0.046912815,
0.020568337,
-0.04937574,
0.026065934,
-0.08549861,
0.0029357162,
0.012681121,
0.042397458,
0.01790017,
0.02234223,
0.020539017,
0.048613407,
0.017123178,
0.007245831,
-0.013355493,
-0.00545728,
0.02298728,
-0.027150793,
-0.013524085,
-0.0036980493,
0.048056316,
0.054125663,
0.038673755,
-0.0131869,
0.023778934,
0.009697759,
-0.026901567,
-0.03958269,
0.028001087,
0.02185844,
0.001505425,
0.010855919,
0.018706486,
-0.015173364,
0.01548123,
0.016375504,
0.03336674,
-0.0017500679,
0.014110495,
0.016947255,
-0.03442228,
-0.012439227,
0.025655447,
-0.045094945,
0.014095835,
0.008737512,
0.04034502,
0.04034502,
0.013978553,
-0.018002793,
0.0038922979,
0.049786225,
0.03726637,
0.010782618,
-0.035448495,
0.0092213005,
-0.0051420843,
0.021961061,
-0.02984828,
-0.0063295653,
-0.015437249,
-0.0183693,
-0.057614803,
0.025699427,
-0.019879306,
-0.05582625,
0.02352971,
-0.0060803406,
-0.02306058,
-0.061045304,
0.029540414,
-0.032369845,
-0.011317717,
-0.004082881,
-0.016140942,
-0.046736892,
0.0310211,
-0.021198729,
0.030053522,
0.0045739994,
0.020231152,
0.027385356,
0.0483202,
0.013927243,
0.0076233326,
0.026652344,
0.023925537,
-0.027297394,
-0.049580984,
0.009455864,
-0.02177048,
-0.006432187,
-0.062159482,
-0.07306671,
0.036679957,
0.029071286,
-0.02471719,
-0.049170494,
0.013758649,
0.015100063,
-0.012446556,
0.033513345,
0.07101428,
0.0081291115,
-0.015525211,
0.018237358,
0.054360226,
-0.047352623,
-0.03964133,
-0.04436193,
0.009016057,
-0.040990073,
-0.050724484,
-0.022400869,
-0.056471303,
0.005636868,
-0.004379751,
-0.019014351,
0.023866896,
0.023661653,
-0.0074694,
0.05635402,
0.024350684,
-0.005680849,
-0.0030291753,
0.03043469,
0.029994883,
-0.0075500314,
0.086260945,
0.013509425,
0.008070471,
0.013736659,
-0.012981656,
0.025919331,
-0.017123178,
-0.018618524,
-0.027414678,
-0.015290646,
-0.030112164,
-0.088254735,
-0.040169097,
0.03981725,
0.010247518,
-0.024409324,
-0.037588894,
-0.006263594,
-0.07939994,
-0.047235344,
-0.050695162,
0.0072128456,
-0.04295455,
-0.0333081,
0.033659946,
-0.0458866,
0.256144,
0.060693458,
0.031255662,
-0.008810814,
0.014887489,
0.044010084,
0.024042819,
-0.02295796,
-0.0051970603,
-0.02764924,
0.0082244035,
-0.03275101,
0.00055617344,
0.031959355,
-0.03665064,
0.057028394,
-0.046883497,
0.0021788804,
-0.031842075,
-0.02930585,
-0.04368756,
0.039377443,
0.015319967,
0.06362551,
0.03961201,
0.0009840697,
-0.015642492,
-0.020832222,
-0.022620773,
-0.04192833,
0.035946947,
-0.00489286,
0.01899969,
-0.0010637848,
0.019116974,
0.037530255,
0.018515902,
-0.0077699353,
-0.025010396,
0.035829663,
0.010636015,
-0.06538474,
0.00801916,
0.0066484255,
-0.009954313,
0.016434146,
-0.04072619,
0.057028394,
0.033806548,
-0.06720261,
0.023251165,
-0.03550714,
0.036562677,
-0.07253894,
-0.0014330399,
0.03685588,
-0.07406361,
-0.031930037,
-0.032663047,
-0.014051855,
0.013663358,
-0.0064505124,
0.0021165744,
0.020509697,
-0.01894105,
0.034011792,
-0.017973473,
0.05459479,
-0.01320156,
0.010672666,
0.030200126,
-0.010570044,
-0.0105993645,
-0.03723705,
0.026564382,
0.04990351,
0.014469672,
0.05749752,
0.008898775,
-0.016228903,
0.0065128184,
-0.00022975368,
-0.016536769,
-0.06151443,
0.029452452,
0.06608843,
-0.03219392,
0.0009684931,
0.029701676,
0.028895363,
0.024922434,
0.024042819,
0.0153639475,
-0.034715485,
0.011654903
] |
9. Implement the tokenizer
Next, we should add the tokenizer of brand_new_bert. Usually, the tokenizer is equivalent to or very similar to an
already existing tokenizer of 🤗 Transformers.
It is very important to find/extract the original tokenizer file and to manage to load this file into the 🤗
Transformers' implementation of the tokenizer.
To ensure that the tokenizer works correctly, it is recommended to first create a script in the original repository
that inputs a string and returns the `input_ids``. It could look similar to this (in pseudo-code):
python
input_str = "This is a long example input string containing special characters .$?-, numbers 2872 234 12 and words."
model = BrandNewBertModel.load_pretrained_checkpoint("/path/to/checkpoint/")
input_ids = model.tokenize(input_str)
You might have to take a deeper look again into the original repository to find the correct tokenizer function or you
might even have to do changes to your clone of the original repository to only output the input_ids. Having written
a functional tokenization script that uses the original repository, an analogous script for 🤗 Transformers should be
created. It should look similar to this:
thon
from transformers import BrandNewBertTokenizer
input_str = "This is a long example input string containing special characters .$?-, numbers 2872 234 12 and words."
tokenizer = BrandNewBertTokenizer.from_pretrained("/path/to/tokenizer/folder/")
input_ids = tokenizer(input_str).input_ids |
[
0.02623461,
0.024346797,
0.0000112223515,
0.0029309797,
-0.019672211,
-0.039524212,
0.026279557,
0.0023298012,
-0.022488948,
0.051270608,
-0.034999456,
-0.00077535183,
0.031373657,
-0.044408556,
0.013649188,
0.013049883,
-0.010120776,
-0.036677513,
-0.041112375,
-0.015716793,
0.00024534078,
-0.01558195,
-0.06352641,
-0.02714855,
-0.016690666,
0.010015897,
-0.005071625,
-0.015686829,
0.07665121,
0.024376761,
-0.008697425,
0.026489314,
0.004142701,
-0.024286866,
0.011401792,
-0.031883065,
-0.013791524,
0.006408826,
-0.055915225,
-0.045667097,
-0.013746575,
-0.00028209508,
0.03167331,
-0.04476814,
-0.03904477,
0.0068770335,
-0.018788235,
-0.007910836,
0.00004711339,
-0.042310987,
-0.0044123884,
0.005457428,
0.0017604607,
0.039913762,
-0.038295638,
-0.018743288,
-0.036917236,
0.021035632,
-0.0666428,
-0.011686462,
0.053068522,
0.04108241,
-0.008075645,
-0.05444693,
-0.002410333,
0.028227301,
-0.01224082,
0.006322676,
-0.02782277,
-0.02816737,
-0.027418237,
-0.000077605415,
-0.028931485,
-0.047225293,
-0.023672577,
-0.03230258,
0.022968393,
-0.025021015,
-0.0129674785,
0.05708387,
0.009558926,
0.008794812,
0.013536818,
0.014106159,
-0.020780927,
-0.02203947,
0.06592363,
-0.018953044,
-0.012368172,
-0.023432855,
-0.023882333,
0.027118586,
-0.025979904,
0.028991416,
0.02295341,
0.051360503,
-0.019447472,
0.03191303,
0.010720082,
-0.0057683177,
0.041352097,
0.08006725,
-0.018773252,
0.021604972,
-0.0036632563,
0.018608443,
0.015109996,
-0.016555822,
-0.036917236,
-0.00011506202,
-0.0109523125,
0.00037362968,
0.009581401,
0.0029122513,
-0.03275206,
0.03787612,
-0.011274439,
0.021095563,
-0.07533273,
-0.01739485,
0.012607895,
-0.020271517,
-0.0054387,
-0.04132213,
0.0103155505,
-0.025260737,
0.008862234,
0.027043672,
0.009851088,
-0.029560756,
0.0011471086,
0.012682808,
0.0173499,
0.062028144,
0.0075737266,
-0.033081677,
-0.013319571,
-0.009176869,
0.03466984,
-0.010353006,
-0.045427375,
0.036737442,
0.00722538,
0.08072648,
0.024451675,
0.0021331538,
0.006584872,
-0.04503783,
-0.009723736,
0.0054499367,
-0.04692564,
0.02651928,
0.033201538,
0.021500094,
-0.051929843,
-0.021335285,
-0.012592912,
-0.022024486,
-0.009154395,
-0.010480359,
0.005281382,
0.030459715,
-0.028197335,
0.06478495,
-0.011873745,
0.025260737,
0.016016446,
-0.009866071,
0.016705647,
-0.04800439,
0.0133570265,
0.0056859134,
-0.0074725933,
0.017200075,
0.033021748,
0.028526954,
0.060889464,
0.012937513,
0.0076598767,
-0.0020694777,
-0.026654122,
-0.0074950675,
0.010210671,
0.03649772,
-0.010562764,
-0.022144347,
0.02533565,
-0.02839211,
-0.007202906,
-0.014188563,
-0.0046596024,
0.012937513,
-0.051839948,
0.010869908,
-0.04833401,
0.021904625,
-0.004828157,
0.002895396,
-0.0031332453,
-0.048543766,
-0.03389074,
0.064844884,
-0.026908828,
0.03059456,
0.00007391828,
-0.023327976,
0.023103237,
-0.020331448,
-0.03484963,
0.015626898,
0.02867678,
0.022833548,
-0.021724833,
-0.027103603,
0.008008223,
-0.015791707,
0.010547781,
-0.009386626,
0.016405994,
0.013364518,
0.007038097,
-0.0033860775,
0.03535904,
0.014600586,
0.02680395,
-0.003734424,
-0.023223098,
0.009251783,
0.046206474,
-0.0030751876,
0.00867495,
0.0384155,
0.027043672,
0.05474658,
0.019866986,
0.0066785133,
0.03535904,
0.016121324,
0.01678056,
0.002839211,
0.041651748,
0.0120310625,
0.029216155,
0.008937147,
0.0048468853,
-0.0013390738,
-0.009371644,
-0.012517999,
-0.010914856,
0.012061028,
-0.024181986,
0.055465747,
0.043209944,
0.014750413,
-0.070058845,
-0.041112375,
0.002208067,
0.04323991,
0.02749315,
-0.026699072,
0.013596749,
0.013506853,
0.029096294,
-0.017215058,
0.022968393,
0.03592838,
-0.01637603,
0.019852003,
-0.023522751,
-0.048753522,
-0.029830445,
-0.043719355,
-0.0795878,
-0.009094465,
-0.029336017,
-0.050131924,
0.00047054866,
-0.027043672,
-0.026759002,
-0.018428652,
0.0018859403,
0.019507403,
-0.014128633,
0.048094288,
0.04614654,
0.009723736,
-0.06041002,
0.025021015,
-0.032662164,
0.019402524,
0.0014889003,
0.0035845975,
-0.019926917,
-0.029500825,
0.0134094665,
0.031553447,
-0.016855475,
-0.013649188,
-0.011611549,
0.051360503,
-0.011858762,
-0.005026677,
0.022653757,
0.018413668,
-0.032692127,
0.014495708,
0.0026481822,
-0.03508935,
0.04425873,
0.053188384,
-0.011102139,
-0.0057495898,
0.010158232,
0.001756715,
-0.01728997,
0.034340218,
0.0340106,
0.03173324,
-0.03206286,
-0.023118218,
-0.017499728,
0.03083428,
0.008375298,
-0.013933859,
0.01388891,
0.052858766,
-0.0130199175,
-0.05073123,
-0.03383081,
-0.031703275,
-0.03592838,
-0.006352641,
-0.014742921,
0.031193864,
0.033231504,
-0.023193132,
-0.06856058,
-0.010345516,
-0.0012238948,
0.011918693,
0.03060954,
-0.01706523,
0.0024908646,
0.029395947,
0.01558195,
-0.013252148,
0.03299178,
-0.0674219,
0.005757081,
-0.018383704,
0.015626898,
0.005625983,
0.026639141,
-0.004153938,
0.004640874,
0.043779284,
-0.03706706,
0.0063900976,
0.04464828,
-0.011469214,
0.030459715,
0.049562585,
0.025065962,
0.019027958,
-0.075632386,
-0.021664903,
-0.0047157872,
0.010735064,
0.045397412,
-0.014353373,
0.009933493,
-0.007753518,
-0.023822404,
0.005846977,
-0.01224082,
-0.07521287,
0.03389074,
0.053128455,
0.049113106,
-0.0032980544,
-0.001562877,
-0.0061803404,
-0.019687194,
0.044977896,
0.027583048,
0.040872652,
-0.028077474,
-0.01496017,
-0.0035752333,
0.011034717,
-0.0014383338,
-0.013581767,
-0.02533565,
0.0111995265,
-0.008465194,
-0.03541897,
0.03152348,
0.05570547,
0.04584689,
0.0070006405,
0.029770514,
0.00054593006,
-0.011783849,
0.020840857,
-0.030669471,
-0.0026144714,
-0.06472502,
0.028242283,
-0.0010525307,
0.00017850415,
-0.0011246346,
-0.0038580308,
-0.032841954,
0.026953775,
-0.019237714,
0.0057795546,
-0.020421343,
0.009813632,
-0.01977709,
0.011304405,
-0.03206286,
-0.019567333,
-0.05552568,
0.0089895865,
0.054776546,
-0.06352641,
0.0022511422,
-0.024017178,
-0.004423626,
0.03299178,
-0.01643596,
-0.015117488,
-0.0073602237,
-0.020106709,
-0.058132656,
0.03496949,
0.05474658,
0.0033336382,
0.02941093,
-0.05555564,
-0.018114015,
-0.00075709174,
-0.055166095,
-0.023028323,
0.032452404,
0.0044348626,
-0.0025545408,
0.033501193,
0.02963567,
-0.0015010736,
0.017035266,
-0.017245023,
0.013274622,
-0.0347897,
-0.0044947932,
-0.057323594,
0.00016855475,
0.010914856,
0.06166856,
-0.0152298575,
-0.031583413,
0.014825326,
0.014465743,
-0.03161338,
-0.04698557,
-0.007004386,
0.0536079,
-0.011409284,
0.030444732,
-0.014615569,
0.0005229879,
0.01790426,
0.035389006,
0.0340106,
0.008173032,
0.0075624892,
0.020031795,
-0.0023166912,
-0.009603875,
0.01932761,
-0.04494793,
0.061159153,
0.022144347,
-0.009985932,
-0.04012352,
-0.052978627,
-0.019237714,
-0.0051165726,
-0.01246556,
0.03541897,
0.04614654,
0.0007683287,
0.027897682,
0.003590216,
-0.015080031,
-0.038775083,
-0.046446197,
0.0136042405,
0.04171168,
0.01649589,
0.047794633,
-0.04560717,
-0.028032526,
0.020391379,
-0.01773945,
0.037936054,
-0.01865339,
0.0062103057,
-0.0011611549,
-0.008570072,
0.013926367,
0.028422074,
0.027223464,
-0.014855292,
-0.026204644,
-0.008435229,
-0.021245388,
0.0028186098,
-0.06544419,
0.039644074,
-0.03293185,
-0.067361966,
-0.03083428,
0.024122056,
0.003071442,
0.030309888,
0.05876193,
-0.02499105,
-0.03775626,
-0.011783849,
0.015836654,
-0.015342227,
0.02397223,
-0.05609502,
-0.0016705648,
0.03718692,
0.03140362,
0.0065773805,
-0.051929843,
-0.024556553,
-0.04821415,
0.026729036,
-0.045487307,
-0.0260698,
-0.02073598,
0.010720082,
-0.016795544,
0.008472685,
0.011626531,
-0.029965287,
-0.006427554,
0.007038097,
0.025919974,
0.0680212,
-0.021904625,
0.009071991,
0.018368721,
-0.020406362,
-0.013724102,
0.046955604,
-0.019117853,
0.021245388,
-0.018608443,
0.040962547,
-0.058072727,
-0.054476894,
-0.040662896,
0.0059143985,
0.017829346,
-0.043030154,
-0.012555456,
-0.028661797,
0.011364335,
0.026219627,
0.041921437,
-0.014098668,
0.0019964373,
-0.06148877,
-0.049832273,
0.013446922,
-0.03054961,
-0.020676048,
-0.009641332,
-0.030684454,
0.0333214,
-0.006985658,
0.014315916,
0.09067496,
-0.01761959,
0.013282114,
-0.053278282,
0.053518005,
-0.0010572128,
0.002299836,
-0.0007664559,
0.0028242283,
-0.046955604,
0.020616118,
-0.037666366,
-0.05651453,
-0.011881237,
0.03314161,
0.022518914,
-0.033201538,
0.021005666,
-0.03275206,
-0.049053177,
-0.05678422,
0.053308245,
0.026773984,
0.005925636,
0.037906088,
0.013971316,
0.022024486,
0.022698706,
-0.02108058,
0.013933859,
-0.028212318,
0.070598215,
0.021305319,
-0.034999456,
0.014570621,
0.01167148,
-0.055735435,
-0.045547236,
0.001844738,
0.01184378,
-0.0435096,
-0.016405994,
-0.01586662,
0.025695235,
-0.06280724,
0.05237932,
0.046625987,
-0.027852735,
-0.019342594,
-0.006596109,
-0.014975152,
0.004528504,
0.015671846,
0.05444693,
-0.04560717,
-0.004517267,
-0.019956881,
0.015259823,
-0.02260881,
-0.021679886,
0.050131924,
0.019792072,
0.038685188,
0.015282297,
0.013446922,
0.07856898,
0.00430751,
-0.030234976,
0.03122383,
-0.029800478,
-0.06562398,
-0.04992217,
-0.0023447836,
-0.0035508866,
0.0033092913,
-0.046236437,
-0.00044503133,
0.00040195623,
0.044528417,
0.013956333,
-0.074253984,
0.02340289,
-0.016615752,
-0.010637677,
0.0134094665,
0.033800844,
0.00001376823,
0.036018275,
0.0073152757,
-0.039074734,
-0.0075475066,
-0.0016509001,
-0.019881967,
-0.037156958,
-0.04806432,
0.007918327,
-0.038625255,
-0.030429749,
0.0024440438,
-0.051270608,
0.032782026,
0.04527755,
-0.011236982,
-0.043060116,
-0.023777455,
0.011574092,
-0.03541897,
0.018893113,
-0.0015366575,
-0.009049517,
0.021934591,
-0.01790426,
-0.01529728,
0.0020451308,
0.03553883,
-0.029950304,
0.0220994,
0.006420063,
0.014428286,
-0.021679886,
-0.007746027,
0.039733972,
-0.04171168,
0.011821306,
-0.014540656,
0.030429749,
-0.044678245,
-0.019522386,
-0.027897682,
-0.030804316,
0.0020264026,
0.06592363,
-0.021634938,
0.02578513,
-0.009558926,
0.016016446,
-0.025650285,
0.047285225,
0.026818933,
0.004202632,
0.010869908,
-0.0057833004,
0.037606437,
-0.012308242,
0.0138514545,
0.00048225385,
-0.021395216,
0.018054085,
0.027807787,
0.014121141,
0.008465194,
0.025770146,
0.011251966,
0.043779284,
0.03637786,
-0.008525124,
0.055166095,
0.018623427,
-0.024781292,
-0.01093733,
-0.06904002,
-0.055855297,
0.029171208,
-0.042370915,
0.03466984,
-0.04545734,
-0.013784032,
0.0037400424,
0.04464828,
0.010158232,
0.029560756,
0.026699072,
0.014270968,
0.017574642,
-0.02397223,
-0.04159182,
-0.018968027,
0.018713322,
-0.009881053,
-0.037097026,
0.008772338,
0.02487119,
0.03898484,
-0.033231504,
-0.029560756,
0.0057833004,
-0.021410197,
0.041621786,
-0.03054961,
0.041172303,
-0.056934047,
0.019762106,
-0.040812723,
0.018323774,
0.008270419,
0.025934957,
0.016675683,
0.01859346,
0.0054611736,
0.04743505,
0.009214326,
-0.017949207,
0.033111643,
0.0025713963,
0.033770878,
-0.02022657,
0.016196238,
-0.030714419,
0.047195327,
0.015851637,
0.01382898,
-0.0013990044,
0.04228102,
0.026893845,
-0.016301116,
-0.047614843,
0.042071264,
0.026968759,
-0.004363695,
0.0153721925,
-0.011236982,
0.027283395,
0.016046412,
0.021065596,
0.013858945,
0.0033898233,
0.0034591178,
-0.014548147,
-0.028062493,
0.007487576,
-0.00033476844,
-0.07071808,
-0.018158965,
0.033651017,
0.041921437,
0.0056035086,
0.004685822,
0.015065048,
0.035329074,
0.040153485,
0.016690666,
0.0011733283,
-0.021350266,
0.036827337,
-0.012959987,
0.0021631191,
-0.0137990145,
-0.014915222,
-0.00022286683,
-0.03446008,
-0.07515294,
0.035179246,
-0.0027755348,
-0.04449845,
0.039644074,
-0.016750596,
-0.016585786,
-0.06460516,
0.017155128,
-0.04102248,
-0.015462088,
-0.00036356322,
-0.03631793,
-0.05690408,
0.034729768,
-0.0014111778,
0.03224265,
0.008637494,
0.03688727,
0.029890373,
0.051480364,
0.02737329,
0.010570255,
0.045367446,
0.012233329,
-0.054896407,
-0.018323774,
-0.012053537,
-0.009057008,
0.018173946,
-0.03676741,
-0.067541756,
0.035568796,
-0.009791158,
-0.043779284,
-0.06136891,
0.0016050157,
-0.0036070715,
-0.02533565,
0.01733492,
0.067541756,
0.01603143,
-0.00804568,
-0.00541248,
0.02647433,
-0.02629454,
-0.022908462,
-0.019941898,
0.014413304,
0.01281016,
-0.041561853,
-0.010787504,
-0.05843231,
0.011117121,
-0.005348804,
-0.009109448,
0.0012304496,
0.04063293,
0.009618857,
0.052439254,
0.036347892,
-0.016211221,
-0.01802412,
0.014518182,
0.054926373,
0.0011752011,
0.088877045,
0.04108241,
0.01060022,
-0.0043150014,
-0.02329801,
0.04255071,
0.008165541,
0.0026257082,
-0.011386809,
-0.006817103,
-0.012772704,
-0.04114234,
-0.027642978,
0.0326322,
-0.0006756236,
-0.015596932,
-0.04833401,
-0.014720447,
-0.078688845,
-0.045427375,
-0.042191125,
0.009034534,
-0.017844329,
-0.030804316,
0.02170985,
-0.050311718,
0.26824924,
0.04668592,
0.0170053,
0.0033392566,
0.032602232,
0.03643779,
0.023283029,
-0.023837386,
0.023163168,
-0.021904625,
-0.010630186,
-0.028541936,
0.0076636225,
0.031014072,
-0.010023389,
0.030744385,
-0.07323516,
-0.0053413124,
-0.034220356,
-0.0354789,
-0.04198137,
0.014825326,
0.02743322,
0.048663627,
0.03922456,
0.011274439,
-0.015447105,
-0.032092825,
-0.020541204,
-0.06724211,
0.046326336,
-0.022204278,
0.013821489,
-0.008982095,
0.010008406,
0.034939524,
-0.006199069,
-0.007266582,
-0.017319936,
0.020840857,
0.021545041,
-0.027163533,
0.031373657,
0.012877583,
-0.0010103921,
0.019567333,
-0.043090083,
0.04641623,
0.024466658,
-0.07569232,
0.012989952,
-0.04572703,
0.045756996,
-0.030984107,
-0.02924612,
0.0036651292,
-0.058252517,
-0.047135398,
-0.002320437,
-0.016106343,
0.025665268,
-0.0037606435,
-0.013701628,
0.013072357,
-0.030190026,
0.015911568,
-0.020151656,
0.027223464,
0.003447881,
-0.015686829,
0.009244291,
0.009993424,
-0.008929656,
-0.008472685,
0.005468665,
0.050341684,
-0.008532615,
0.047734704,
0.00788087,
-0.024841223,
0.028691763,
-0.005446191,
-0.0036707476,
-0.034759734,
0.021185458,
0.04947269,
-0.036827337,
-0.001535721,
0.017649554,
0.016166274,
0.023897316,
0.003779372,
0.014248494,
0.016286133,
-0.010974786
] |
When both input_ids yield the same values, as a final step a tokenizer test file should also be added.
Analogous to the modeling test files of brand_new_bert, the tokenization test files of brand_new_bert should
contain a couple of hard-coded integration tests.
10. Run End-to-end integration tests
Having added the tokenizer, you should also add a couple of end-to-end integration tests using both the model and the
tokenizer to tests/models/brand_new_bert/test_modeling_brand_new_bert.py in 🤗 Transformers.
Such a test should show on a meaningful
text-to-text sample that the 🤗 Transformers implementation works as expected. A meaningful text-to-text sample can
include e.g. a source-to-target-translation pair, an article-to-summary pair, a question-to-answer pair, etc… If none
of the ported checkpoints has been fine-tuned on a downstream task it is enough to simply rely on the model tests. In a
final step to ensure that the model is fully functional, it is advised that you also run all tests on GPU. It can
happen that you forgot to add some .to(self.device) statements to internal tensors of the model, which in such a
test would show in an error. In case you have no access to a GPU, the Hugging Face team can take care of running those
tests for you.
11. Add Docstring
Now, all the necessary functionality for brand_new_bert is added - you're almost done! The only thing left to add is
a nice docstring and a doc page. The Cookiecutter should have added a template file called
docs/source/model_doc/brand_new_bert.md that you should fill out. Users of your model will usually first look at
this page before using your model. Hence, the documentation must be understandable and concise. It is very useful for
the community to add some Tips to show how the model should be used. Don't hesitate to ping the Hugging Face team
regarding the docstrings.
Next, make sure that the docstring added to src/transformers/models/brand_new_bert/modeling_brand_new_bert.py is
correct and included all necessary inputs and outputs. We have a detailed guide about writing documentation and our docstring format here. It is always to good to remind oneself that documentation should
be treated at least as carefully as the code in 🤗 Transformers since the documentation is usually the first contact
point of the community with the model.
Code refactor
Great, now you have added all the necessary code for brand_new_bert. At this point, you should correct some potential
incorrect code style by running: |
[
0.008526336,
-0.013202282,
-0.007112985,
0.0017848507,
-0.010289722,
-0.029825665,
0.06562175,
-0.018928334,
0.032652367,
0.020685116,
-0.0067563453,
0.017462147,
0.055952843,
-0.04541215,
-0.004008897,
0.009404727,
-0.021002129,
0.009272638,
-0.07365275,
0.05233361,
0.006363381,
-0.017118717,
-0.07280738,
-0.029904919,
-0.041106053,
0.046072595,
0.022098467,
-0.012918291,
0.048635118,
0.04456678,
-0.03912472,
0.032308936,
-0.012660718,
-0.029482234,
0.0011466964,
-0.03946815,
0.04646886,
-0.011300202,
-0.06345549,
-0.029904919,
0.0046660393,
-0.0132419085,
0.01578462,
-0.03381475,
-0.06514623,
-0.043087386,
-0.020143552,
0.012185197,
0.032784455,
-0.015124175,
0.0037546258,
0.03891338,
0.012383331,
-0.01600917,
-0.02715747,
0.027844332,
-0.007898914,
0.011584193,
-0.04670662,
0.0034706348,
0.021002129,
0.039626658,
-0.035663992,
-0.05907014,
0.027976422,
-0.001140092,
-0.01192102,
0.027500901,
-0.011630424,
-0.0043853503,
0.011656842,
0.021913541,
0.014041046,
0.020949293,
-0.027183888,
0.0004457999,
0.043615744,
0.004646226,
-0.016326183,
0.0643537,
0.019588778,
0.032361772,
0.038411442,
0.00942454,
-0.011874788,
-0.0374604,
0.035531905,
0.032414608,
0.011531358,
-0.04765766,
-0.0035663992,
0.025070466,
-0.03296938,
0.0024205283,
0.027236724,
0.027421648,
-0.0027111238,
0.022389062,
0.009728345,
0.03666787,
0.0018327329,
0.064248025,
-0.027923586,
0.031859834,
-0.01577141,
0.012211615,
0.02394771,
-0.02845194,
-0.04942765,
-0.013056984,
0.015507232,
-0.011940833,
-0.014978877,
0.00073268043,
-0.021385187,
0.03259953,
-0.007991376,
0.03606026,
-0.0740226,
-0.021041756,
0.03619235,
0.0031123438,
-0.02064549,
-0.024383605,
0.0035036572,
-0.009312265,
0.018611321,
0.06324415,
-0.0045207413,
-0.008031003,
-0.01969445,
-0.017145135,
0.03133148,
0.022019213,
0.0047188746,
0.037222642,
-0.0138032865,
-0.0008627054,
-0.00043052714,
-0.040841877,
0.012389936,
0.034211017,
0.011458709,
0.076188855,
0.0017237597,
0.01446373,
0.03001059,
-0.0044811144,
-0.012205011,
0.006746439,
-0.010540691,
-0.007661154,
-0.005111839,
0.0043457234,
-0.009952895,
0.0077470117,
-0.031516403,
-0.030803123,
0.019919,
0.0140806725,
-0.0082357405,
0.05700955,
-0.002146444,
0.015256263,
-0.029455816,
0.03973233,
-0.023419356,
-0.038596366,
0.0031948993,
-0.00056756934,
0.006647372,
0.006498772,
0.015216637,
-0.018003711,
0.062927134,
0.02919164,
0.025849791,
-0.025559194,
-0.0060397633,
0.005910977,
-0.012905082,
0.017898042,
0.019417062,
0.037328314,
-0.035399817,
-0.007971562,
0.04792184,
-0.016577153,
-0.04567633,
-0.008248949,
-0.001938404,
0.03524131,
-0.030618198,
0.01132662,
-0.016577153,
-0.02668195,
-0.014714699,
-0.00468255,
0.0039428524,
-0.07719273,
-0.047155723,
0.017699908,
-0.009411331,
0.0014554542,
-0.0129579175,
-0.06609727,
-0.0026764506,
0.019047214,
-0.035981007,
-0.00688183,
0.007601714,
-0.0018674063,
-0.004966541,
-0.0084999185,
0.0004590088,
0.005914279,
-0.016471481,
0.016352601,
0.014569402,
0.028161345,
-0.013882539,
0.017092299,
0.036377273,
0.020262431,
0.015071339,
0.009530212,
-0.013961793,
0.06784084,
0.055530157,
-0.027580155,
-0.020856831,
0.034501612,
-0.0018129196,
0.01626014,
0.037513237,
0.015943125,
0.039573822,
0.054156434,
-0.028082091,
0.036694285,
0.0011045932,
0.015031712,
-0.019047214,
0.05690388,
-0.0055081057,
-0.012594673,
0.0026913106,
-0.028187763,
0.0056864256,
0.00918678,
-0.037301894,
0.080362864,
0.0557415,
0.02773866,
-0.038358606,
-0.052888382,
0.05447345,
0.06667846,
-0.033392064,
0.0035994216,
0.015494023,
0.017620655,
0.028557612,
-0.020315267,
-0.0093584955,
-0.008070629,
0.020579444,
0.0107454285,
-0.006961083,
-0.035082802,
-0.01505813,
-0.009100922,
-0.108841226,
0.013922166,
-0.020420939,
0.032361772,
0.011227554,
-0.08194793,
0.025176138,
-0.012792806,
0.002788726,
-0.019245347,
-0.02015676,
0.05349599,
0.04588767,
0.0020027973,
-0.027051799,
-0.0030132772,
-0.0193246,
0.04068337,
-0.043457236,
-0.032044757,
0.010540691,
0.0019615197,
0.025902625,
-0.022270182,
-0.009140549,
0.027500901,
-0.04137023,
-0.03333923,
-0.030644616,
-0.02003788,
-0.04218918,
-0.036984883,
-0.0069544786,
0.026021507,
0.013776869,
-0.029719993,
0.046997216,
0.016062006,
-0.03785667,
0.013175864,
-0.0018112685,
-0.004646226,
-0.056534033,
0.041211724,
0.019496316,
-0.013697615,
-0.03891338,
0.016194094,
-0.0493484,
-0.014516566,
0.0024535507,
-0.0107322205,
-0.015546859,
0.043827083,
0.03923039,
-0.076928556,
0.008064025,
-0.04720856,
-0.023881666,
-0.030195514,
0.0047353855,
0.03806801,
0.028795373,
0.033022214,
-0.00053578545,
0.03275804,
-0.009470771,
0.036694285,
0.029561488,
-0.0054189456,
0.03201834,
0.03772458,
0.017092299,
0.031516403,
-0.016616778,
-0.054737624,
0.014120299,
-0.03727548,
0.013023962,
0.0668898,
0.025796955,
0.029693576,
-0.0030380439,
0.069584414,
-0.03664145,
-0.03370908,
0.020962503,
0.018069757,
0.02361749,
0.047182143,
0.025427107,
0.0004179374,
-0.0013984909,
-0.031833414,
-0.016326183,
0.03489788,
0.03785667,
-0.011947437,
0.0012680531,
0.0017485264,
-0.028082091,
0.017131925,
-0.029984172,
-0.037143387,
0.054156434,
0.0075620874,
0.021041756,
-0.023577861,
-0.051699582,
-0.032625947,
-0.021926751,
0.03524131,
0.020420939,
-0.0132419085,
-0.033497736,
0.0016717496,
-0.041660827,
-0.026866874,
-0.02513651,
0.0076941764,
-0.008988647,
-0.05632269,
-0.07994018,
-0.06678413,
0.013063588,
0.029614324,
0.044989467,
0.023908084,
-0.023670323,
0.011788931,
0.021134218,
0.010382185,
-0.031965505,
0.038596366,
-0.044725288,
0.014239179,
0.026893292,
-0.0007677665,
-0.037433982,
-0.0021183752,
-0.031120136,
0.012885269,
0.0075092516,
-0.017026255,
-0.044381857,
0.028980296,
0.0034838438,
0.018109383,
-0.051858086,
-0.020064298,
-0.0055114077,
-0.0011293598,
0.047525574,
-0.037988756,
-0.018056547,
0.039520986,
-0.013373997,
0.06266296,
-0.017514983,
-0.051910922,
0.0076083187,
-0.027500901,
-0.08548791,
0.0017617352,
0.07650587,
-0.01707909,
0.038120847,
-0.0076677585,
0.026391355,
0.03394684,
-0.016220512,
-0.02633852,
-0.039045468,
0.025955461,
0.034448776,
0.0787778,
-0.033973254,
-0.025044048,
0.035505485,
-0.05584717,
0.01957557,
-0.0045669726,
0.0011483475,
-0.024872333,
0.043113805,
0.014516566,
0.08960909,
0.009444354,
0.030406857,
0.007284701,
0.019020796,
-0.033735495,
-0.07338857,
0.03439594,
0.017237596,
-0.026985755,
0.033154305,
-0.00064475875,
-0.04279679,
0.013710824,
-0.029852083,
-0.009675509,
0.044989467,
-0.04945407,
0.0101840515,
-0.01850565,
-0.022468315,
-0.033999674,
-0.009754762,
0.027315976,
0.026404563,
-0.06630861,
-0.03616593,
-0.036350854,
0.0035267726,
0.008565962,
-0.03296938,
0.041687246,
-0.01410709,
0.024145843,
-0.0005721099,
-0.04469887,
-0.029244473,
0.0032279217,
-0.015071339,
-0.026536653,
-0.00009029512,
0.022970254,
-0.02547994,
0.0045174393,
-0.025123302,
-0.024568528,
-0.0016610174,
0.01945669,
-0.017686699,
0.021147426,
0.0132485125,
-0.0042598657,
0.0020391217,
0.017898042,
-0.027897168,
-0.008466896,
0.051884506,
0.00043424213,
0.004755199,
0.004550461,
-0.06578025,
0.012627696,
-0.016880957,
-0.05764358,
-0.025757328,
0.021292724,
0.00030050217,
0.06873904,
-0.01612805,
-0.038464278,
-0.024119426,
-0.028874625,
-0.03735473,
-0.038147263,
-0.05394509,
-0.038464278,
-0.03296938,
0.015044921,
0.049506906,
0.023974128,
-0.022573987,
-0.034554448,
-0.04137023,
0.0059539056,
-0.032097593,
-0.010752033,
0.030063424,
0.0035432838,
-0.03827935,
0.053760167,
0.0028217484,
0.02157011,
-0.0120399,
0.02656307,
0.018941542,
-0.008420665,
-0.019047214,
-0.032335352,
-0.007363954,
0.009279243,
-0.009015065,
0.045729164,
-0.017224388,
0.023155177,
-0.018096175,
0.032942962,
-0.034686536,
0.021279516,
-0.018228263,
0.028742537,
0.010217073,
-0.060813714,
0.0057458654,
-0.03973233,
0.029904919,
0.010157634,
0.002491526,
0.007806452,
-0.04662737,
-0.02905955,
-0.01386933,
0.030776706,
-0.0029587904,
0.01410709,
-0.023274057,
-0.016867748,
0.036298018,
0.02015676,
0.012350309,
0.07719273,
0.03275804,
0.023591071,
-0.0645122,
0.022336226,
0.017964086,
-0.043932755,
-0.008876371,
0.02821418,
-0.027342394,
0.0077139894,
0.0043292125,
-0.030327603,
-0.01672245,
0.0067893676,
0.033497736,
-0.0027854238,
0.043113805,
-0.0076413406,
-0.042294852,
-0.021147426,
0.03640369,
0.02005109,
-0.00045075323,
0.023762787,
0.01287206,
0.020143552,
0.03590175,
-0.009853829,
-0.025942253,
-0.019985044,
0.072596036,
0.0205134,
-0.043510072,
-0.008935812,
0.040498447,
-0.07069396,
-0.0445932,
-0.006320452,
0.0029753016,
-0.009999127,
-0.047129307,
0.002207535,
0.000484601,
0.0071195895,
0.007984771,
0.048186015,
-0.045042302,
0.003622537,
-0.026034715,
-0.0065945364,
-0.015124175,
-0.0050424924,
0.061870422,
-0.05452628,
-0.00061668985,
-0.03709055,
-0.0016890863,
-0.021860708,
0.03381475,
0.055318814,
0.04601976,
0.010401998,
0.06023252,
0.00019514066,
0.053654496,
-0.015837455,
0.040630534,
0.031437147,
-0.047948256,
-0.036007423,
-0.029112386,
0.013393811,
-0.0050953277,
-0.0028795372,
-0.054843295,
0.009649091,
0.012819224,
0.0045207413,
0.023075923,
-0.038332187,
0.008876371,
-0.02726314,
-0.050669286,
0.015071339,
-0.028134927,
-0.005818514,
-0.012673927,
0.0067761587,
-0.002759006,
-0.03973233,
0.023789205,
0.0061355275,
-0.02503084,
-0.019245347,
0.011643633,
-0.009926478,
-0.07354708,
-0.045966923,
-0.017026255,
-0.03188625,
0.019641614,
-0.040709786,
-0.05420927,
-0.010236887,
0.02005109,
-0.045570657,
0.016273348,
-0.01400142,
-0.021253098,
0.014569402,
0.003397986,
-0.036033843,
0.0049731457,
0.013459855,
-0.023274057,
0.009840621,
-0.011062442,
-0.0018063152,
-0.014199553,
0.011584193,
0.029297309,
-0.03785667,
-0.009153758,
-0.018915124,
-0.051620327,
-0.006482261,
0.0057854922,
-0.000685211,
-0.035294145,
0.009543421,
-0.023419356,
-0.014410895,
0.024053382,
-0.027976422,
0.018545276,
0.0075092516,
0.011808745,
0.05029944,
0.007363954,
0.029482234,
0.019403854,
0.027844332,
0.056639705,
0.03381475,
0.008585776,
-0.0010484554,
0.007780034,
-0.056639705,
-0.0017468752,
-0.021371977,
-0.0064954697,
-0.047102887,
0.027897168,
0.027474483,
-0.017686699,
0.036905628,
-0.0036654659,
-0.02050019,
0.039547406,
-0.0533639,
-0.057432238,
0.002653335,
-0.045834836,
0.030565362,
0.013486273,
-0.01156438,
-0.017633863,
0.013697615,
0.009246221,
-0.0059968345,
0.030089842,
0.06060237,
0.012581464,
-0.02608755,
0.012363518,
0.038939796,
0.018822663,
-0.018809455,
-0.033656243,
0.0015049875,
0.0077404073,
0.026417773,
0.0032543393,
-0.00942454,
0.011696469,
-0.03640369,
-0.0053429944,
0.0111483,
0.06667846,
-0.029614324,
0.04401201,
-0.017501775,
0.033973254,
0.0034805415,
0.04876721,
0.042162765,
-0.011551171,
0.0030925304,
0.041898586,
0.018228263,
-0.0066969055,
0.041792914,
-0.013301348,
0.007661154,
-0.017620655,
-0.010870913,
0.02845194,
0.043536488,
0.016418645,
0.03199192,
-0.00848671,
0.007780034,
0.025942253,
0.0005333088,
0.027817914,
0.018796245,
0.0135258995,
0.011894602,
-0.022072049,
-0.021504067,
-0.014252388,
-0.03608668,
0.031225808,
0.021464441,
-0.05095988,
-0.020962503,
-0.049242727,
-0.067206815,
0.050510783,
0.005167977,
0.016088424,
-0.025849791,
0.008004585,
0.03487146,
0.08374434,
-0.018611321,
0.04092113,
-0.0021233284,
0.023260849,
-0.030538945,
0.0038536927,
0.016788494,
0.011478522,
-0.0021299329,
-0.007231865,
0.02607434,
-0.006439332,
-0.018215055,
-0.025889417,
-0.032414608,
0.054579116,
0.039098304,
-0.0017865018,
0.02905955,
-0.013671197,
0.028399106,
-0.027791496,
0.0049203103,
-0.056639705,
0.010540691,
0.021966377,
0.011637028,
-0.054948967,
0.03709055,
0.008440479,
0.017343268,
0.016880957,
0.06990143,
0.0113068065,
0.038411442,
0.04707647,
-0.014199553,
0.026602697,
-0.007885705,
-0.035690412,
-0.045649912,
0.03141073,
-0.002458504,
0.02574412,
-0.032678783,
-0.011154904,
0.032124013,
0.009239616,
-0.044725288,
-0.015401562,
-0.0004404338,
0.045623492,
-0.06002118,
0.02562524,
0.042242017,
0.015903499,
0.018003711,
-0.018743409,
-0.026034715,
0.014344851,
0.007885705,
-0.014437312,
0.01838677,
-0.0063600787,
-0.040604115,
-0.00041153937,
-0.044646036,
-0.018241473,
-0.0346337,
-0.0117427,
-0.010091589,
0.023881666,
0.026946127,
-0.014899624,
-0.020328475,
-0.059809837,
0.043853503,
-0.0028134927,
0.058330443,
-0.0034970527,
0.044804543,
0.021556903,
-0.034501612,
0.0018162219,
-0.026113968,
-0.016471481,
-0.015626112,
-0.0005461049,
0.03592817,
0.017990503,
-0.014041046,
-0.037196223,
-0.012924896,
0.036932047,
-0.027038591,
-0.017898042,
-0.055952843,
-0.029006714,
-0.01755461,
-0.05061645,
-0.044989467,
0.034924295,
0.01162382,
-0.03141073,
0.03827935,
-0.029984172,
0.19929567,
0.030169096,
0.017699908,
0.042057093,
0.03830577,
0.03130506,
0.0027936795,
-0.026774412,
0.008083838,
-0.009913269,
0.005547732,
-0.010626549,
0.004659435,
0.012191802,
-0.017409312,
-0.004930217,
-0.04765766,
-0.0046264124,
0.020566236,
-0.040868293,
-0.072490364,
0.04184575,
0.04435544,
0.03666787,
0.030908793,
-0.013492878,
-0.0060925987,
-0.044091262,
-0.013935375,
-0.05505464,
0.047129307,
-0.027950004,
0.031172972,
-0.022600405,
-0.017581027,
0.046442445,
0.04092113,
-0.00038759827,
0.0032691993,
-0.01804334,
-0.000097673525,
-0.05122406,
-0.02016997,
-0.021385187,
0.0032890127,
0.017039463,
-0.015388353,
-0.020605862,
-0.0011301853,
-0.027012173,
0.01755461,
-0.025704492,
0.016062006,
-0.005577452,
-0.03439594,
-0.012376727,
0.016947001,
0.0034673326,
0.019007588,
0.022917418,
-0.016577153,
0.008856558,
0.00019586302,
-0.025717702,
-0.06261012,
-0.024396813,
-0.018664157,
0.026985755,
-0.009325474,
-0.06033819,
-0.022798538,
0.010335954,
0.04456678,
-0.021926751,
0.005167977,
0.058858797,
-0.04493663,
0.044064846,
-0.0017320152,
-0.032124013,
0.019192511,
-0.034765787,
-0.004725479,
0.0017980597,
0.0060892967,
0.06176475,
-0.067735165,
-0.0075488784,
-0.04554424,
0.042057093,
0.043721415,
0.038490694,
-0.0020539819,
0.056481197,
-0.005587359
] | make style
and verify that your coding style passes the quality check: |
[
0.042109743,
-0.0010987825,
-0.025796691,
-0.0064156223,
-0.01682004,
-0.04372017,
0.012465916,
0.008954285,
-0.00666166,
0.026915045,
0.0026113559,
0.00299346,
0.03334185,
-0.05147409,
0.010684005,
0.02666155,
0.022724947,
-0.039992325,
-0.057766695,
0.0027660613,
-0.007746463,
-0.011929106,
-0.08392126,
-0.024141528,
-0.022232872,
0.011779992,
0.024290642,
-0.0250213,
0.09030333,
0.030777093,
-0.025483552,
-0.0022982168,
-0.012503194,
-0.0054463823,
-0.033997953,
-0.028212335,
0.0013243171,
-0.0005433335,
-0.053502038,
-0.031015676,
0.007604805,
-0.031015676,
0.048372522,
-0.061315604,
-0.05317399,
0.01304746,
0.017744545,
-0.024216084,
0.029300867,
-0.07282719,
-0.0024063243,
0.036980227,
0.005401648,
0.030806916,
-0.029047372,
0.012957991,
-0.021323277,
0.024902008,
-0.041274704,
-0.0063820714,
0.056066796,
0.037069697,
0.008208716,
-0.056663252,
0.012465916,
0.026035273,
-0.01261503,
-0.0044808704,
-0.030449042,
-0.030985853,
-0.025379172,
-0.02470816,
-0.032447167,
-0.03718899,
-0.008372741,
-0.032208584,
0.026363324,
-0.009237601,
0.0101546515,
0.031463016,
0.012756688,
0.04992331,
0.015097775,
0.0033382857,
-0.020160189,
-0.047746245,
0.09256986,
0.0037595322,
-0.0067921346,
-0.035757493,
-0.0052972683,
0.026288766,
0.0013112697,
0.009729677,
0.035727672,
0.046344575,
-0.029151753,
0.021114517,
0.0055358508,
-0.0020391315,
0.024007326,
0.06149454,
0.0017185368,
0.019623378,
-0.02666155,
-0.011533954,
0.012339168,
-0.03721881,
0.0027567418,
-0.032298055,
0.009133222,
0.016447254,
0.005714787,
-0.013360598,
-0.0041080858,
0.01963829,
-0.010728739,
0.027123803,
-0.051414445,
-0.004246016,
0.01219751,
-0.01682004,
-0.016372697,
-0.030299928,
0.016134115,
-0.02482745,
0.010967322,
0.033848837,
-0.012868523,
0.0028611214,
-0.010579625,
-0.012749231,
0.012398814,
0.07091853,
0.01823662,
-0.03137355,
-0.011451941,
0.0007548887,
0.030806916,
-0.047507662,
-0.033192735,
0.043869287,
0.009588019,
0.066862635,
0.01661128,
0.012063308,
0.009692398,
-0.06161383,
-0.007168647,
-0.0039440608,
-0.023530161,
0.03742757,
0.0052078003,
0.010184474,
-0.045330603,
-0.02275477,
-0.009438905,
-0.024111705,
-0.015254344,
0.010989688,
-0.01197384,
0.030806916,
-0.020249657,
0.054933533,
0.0003522814,
0.024931831,
0.018370822,
0.003138846,
0.006926337,
-0.06698193,
-0.002341087,
0.0007767898,
0.0011304691,
0.0027213271,
0.021546947,
0.02382839,
0.06083844,
0.038888883,
0.017669987,
0.016581457,
-0.0027157355,
-0.0238433,
0.0100428155,
0.051116217,
-0.033073444,
-0.022501275,
0.0014147174,
0.0037371651,
0.015045584,
-0.005871357,
0.004656079,
0.042020276,
-0.003647697,
0.025945805,
-0.034594405,
-0.0002148171,
-0.027556235,
0.020771556,
0.02007072,
-0.03375937,
-0.03364008,
0.035220686,
-0.01078093,
0.066743344,
-0.029285954,
-0.018997101,
-0.004700813,
-0.01520961,
-0.018952366,
-0.01321894,
0.053114343,
0.022844238,
-0.017520875,
-0.055082645,
-0.0011332651,
-0.033073444,
0.028868435,
0.012085675,
0.0060652047,
-0.023530161,
0.014575876,
-0.024454666,
0.024663426,
-0.0041602757,
0.023783654,
0.009282336,
-0.018326089,
0.029643828,
-0.0016346603,
-0.0041155415,
0.0023336313,
0.029256132,
0.036383774,
0.0653715,
0.03185071,
0.0045628827,
0.04109577,
0.030717447,
0.031463016,
-0.013904864,
0.05230913,
-0.0101919295,
0.043928932,
0.026885223,
-0.004518149,
-0.0057557933,
-0.0158508,
-0.010318676,
-0.00058946555,
0.0009552604,
-0.051175863,
0.034832988,
0.020682087,
0.0014128535,
-0.059705175,
0.00029589774,
0.012115498,
0.047090143,
0.0009347573,
-0.007407229,
0.010430512,
0.041572932,
0.0037129342,
-0.016670926,
0.03742757,
0.04425698,
-0.0102292085,
0.024618693,
-0.0060689324,
-0.0720518,
-0.028197423,
-0.039216936,
-0.07431833,
-0.010050272,
-0.02610983,
0.0024547863,
0.010184474,
-0.051086396,
0.00091332215,
-0.03378919,
-0.0075712544,
0.0049356674,
-0.007150008,
0.053024873,
0.02072682,
0.005547034,
-0.04097648,
0.027064158,
0.0013746431,
0.01811733,
0.020741733,
-0.021964466,
-0.019787405,
-0.01802786,
0.0006248801,
0.024454666,
-0.008059602,
-0.011019511,
-0.043421946,
0.03859066,
-0.023559984,
-0.0048238323,
0.008417475,
0.0067213057,
-0.03010608,
-0.0024491944,
-0.002288897,
-0.02524497,
0.035727672,
0.04679192,
-0.0026094918,
0.015224521,
0.011407208,
0.02600545,
-0.03492246,
0.03647324,
0.04133435,
0.0176849,
-0.04586741,
-0.029748207,
-0.04649369,
0.016521811,
-0.0023746376,
0.004581522,
0.002872305,
0.056036975,
-0.016641103,
-0.053114343,
-0.0066504763,
-0.03238752,
-0.024678336,
-0.005651414,
-0.047865536,
0.0336699,
0.03310327,
-0.0026728653,
-0.02610983,
-0.004972946,
-0.022605656,
0.02180044,
0.04855146,
-0.036294304,
0.02956927,
0.040171262,
-0.021233808,
-0.0034650324,
0.034475114,
-0.072409675,
-0.0005093169,
0.0012506922,
0.02481254,
0.021770617,
0.015187243,
-0.010124829,
0.03972392,
0.055529986,
-0.044913083,
0.005860173,
0.012078219,
0.004920756,
0.011541409,
0.036383774,
0.007000894,
0.0062404135,
-0.077718124,
-0.008350374,
-0.0010046543,
-0.019608468,
0.047567308,
-0.04509202,
0.030627979,
-0.00012686325,
-0.0010223617,
-0.008857361,
-0.02523006,
-0.07181322,
0.02622912,
0.024499401,
0.038232785,
-0.0029599094,
-0.035339974,
-0.00047460134,
-0.00955074,
0.035459265,
0.0146206105,
0.019817227,
-0.04652351,
0.010437967,
-0.023067908,
0.0013634595,
0.019369885,
-0.026393147,
-0.00061742443,
-0.011034423,
-0.03441547,
-0.025841424,
0.042199213,
0.037129343,
0.05827368,
0.0016467758,
0.045181487,
-0.008186349,
-0.014404395,
0.040260732,
0.0063410653,
0.0044547752,
-0.059913933,
0.029897321,
0.0043802187,
0.0073923175,
-0.007287938,
0.0026654096,
-0.0014911382,
0.028316714,
-0.015448192,
-0.012831245,
-0.049028624,
0.006538641,
-0.026840487,
0.0078881215,
-0.040648427,
-0.03787491,
-0.04488326,
0.0275115,
0.039932683,
-0.045330603,
0.009610386,
-0.035787318,
-0.006296331,
0.042914957,
-0.00932707,
-0.049684726,
0.017312115,
-0.0046188007,
-0.06292603,
0.036175013,
0.041900985,
-0.039038,
0.0067585837,
-0.07032208,
0.0011910467,
0.03677147,
-0.033610255,
-0.013017637,
0.030985853,
0.009908614,
-0.0035395892,
0.030031523,
0.0077613746,
0.00051257876,
0.011668157,
-0.008715703,
-0.016149027,
-0.01986196,
-0.01332332,
-0.02103996,
0.03355061,
-0.006587103,
0.027153626,
0.010147195,
-0.018505026,
0.00415282,
0.056901835,
-0.029092107,
-0.027556235,
-0.005595496,
0.073304355,
-0.02048824,
0.03375937,
0.012137865,
-0.011302828,
0.024022236,
0.0360259,
0.003185444,
0.0042534717,
-0.012249701,
0.034862813,
0.010587081,
0.0005978532,
0.03152266,
-0.066087246,
0.036204837,
0.001423105,
-0.023172287,
-0.03948534,
-0.049565434,
-0.01887781,
0.02470816,
-0.020816289,
0.02956927,
0.035996076,
-0.0125702955,
0.01057217,
0.023381047,
0.0017269244,
-0.04586741,
-0.0459867,
0.04285531,
0.04372017,
0.0034575767,
0.049475964,
-0.002460378,
-0.007903033,
-0.007433324,
-0.018609405,
0.018803252,
-0.037934557,
-0.0059682806,
0.00068126374,
-0.0010204978,
-0.016447254,
0.0031556212,
-0.0040111616,
-0.007828476,
0.013181662,
-0.026363324,
0.009401626,
-0.033401497,
-0.04261673,
0.052816115,
-0.037397746,
-0.07736025,
-0.058303505,
0.0031090232,
0.01278651,
0.03876959,
0.009640208,
-0.024559047,
-0.03927658,
-0.03632413,
0.0063336096,
-0.040409844,
0.015731508,
-0.036383774,
-0.015627129,
0.026825577,
0.015507838,
0.07002385,
-0.01974267,
-0.007843387,
-0.047448017,
0.048909333,
-0.04780589,
-0.016417433,
-0.00955074,
0.0059272745,
-0.010341044,
0.028898258,
0.028510563,
-0.022575833,
-0.008163982,
0.015358724,
0.06447682,
0.054128315,
-0.03420671,
-0.028853524,
0.014792091,
-0.0020559067,
0.0109598655,
0.035787318,
-0.016685836,
0.02439502,
-0.0134277,
0.048402347,
-0.036831114,
-0.030225372,
-0.03850119,
-0.027168538,
0.05317399,
-0.013889953,
0.017118266,
-0.0053531863,
-0.00089468295,
-0.004003706,
0.021919731,
-0.013345687,
0.014844281,
-0.061136667,
-0.04154311,
0.01311456,
-0.02588616,
-0.010012993,
-0.031791065,
-0.013293497,
0.04586741,
-0.029509624,
0.04917774,
0.060480565,
-0.006587103,
-0.0015675591,
-0.06382071,
0.027004514,
0.006221774,
0.0141434455,
-0.024320465,
0.011064245,
-0.041781694,
0.0055656736,
-0.049356673,
-0.044942904,
-0.0042124656,
0.019250594,
-0.0040111616,
-0.0069785267,
0.067816965,
-0.0075637987,
-0.051384624,
-0.05696148,
0.027198361,
0.017968215,
0.0036122822,
0.023425782,
0.0044547752,
-0.009483639,
-0.008268361,
-0.0075637987,
0.004890933,
-0.02815269,
0.07229038,
0.009289791,
-0.044763967,
0.0011789311,
0.024454666,
-0.029211398,
-0.06021216,
-0.009692398,
0.025587931,
-0.044376273,
0.0048238323,
0.011936561,
0.0165069,
-0.026065096,
0.05242842,
0.050340828,
-0.049774192,
-0.02557302,
-0.002365318,
-0.026244033,
-0.020652264,
0.037994202,
0.042378146,
-0.019190948,
-0.014478952,
-0.035996076,
0.0076942733,
-0.059913933,
-0.0024473306,
0.050847813,
-0.012846156,
0.026065096,
0.034475114,
0.012331713,
0.035846964,
0.011809815,
-0.0039179656,
0.030926207,
-0.036682,
-0.032447167,
-0.02666155,
0.019906696,
-0.020413682,
0.015448192,
-0.036592532,
-0.0013709152,
0.023888035,
0.02730274,
-0.0074221403,
-0.06942739,
0.03149284,
-0.041900985,
-0.00052283035,
0.024573958,
0.009416537,
-0.007220837,
0.027481677,
0.014538597,
-0.018341,
0.003209675,
0.033461142,
-0.037278455,
0.003043786,
-0.06817484,
0.009177956,
-0.0700835,
-0.03450494,
0.0041602757,
-0.049147915,
0.0071984697,
0.04679192,
0.01192165,
-0.009364348,
0.022173226,
0.011444486,
0.001957119,
0.030016612,
-0.045807764,
-0.00506987,
-0.011220815,
-0.00372039,
-0.050728522,
-0.009438905,
-0.005595496,
-0.036443416,
0.025334438,
0.027854461,
0.019340063,
-0.036413595,
-0.030568333,
0.037964378,
-0.025558108,
0.0075377035,
0.010057727,
0.009945892,
-0.0483427,
0.0050810534,
-0.008424931,
-0.043988578,
-0.025364261,
0.020234745,
0.011474309,
0.050251357,
0.009252513,
0.009990626,
-0.016119204,
0.04282549,
0.040797543,
0.006076388,
0.028883347,
-0.012801422,
-0.01396451,
-0.010907676,
0.033371672,
0.037159164,
-0.05016189,
0.010072638,
0.014478952,
0.024782717,
-0.014322382,
0.006460356,
0.0035377254,
0.06728016,
0.038352076,
0.011041879,
0.021069784,
-0.023649452,
-0.0060391095,
0.011832181,
-0.07163428,
-0.05645449,
0.01574642,
-0.018311176,
0.010736195,
-0.013174206,
-0.004588978,
0.008499488,
0.049446143,
-0.010728739,
0.0067250333,
-0.014724989,
0.016417433,
0.02060753,
-0.030717447,
-0.05263718,
-0.011019511,
-0.0043839463,
-0.021069784,
-0.022471452,
-0.013763206,
0.015358724,
0.013144383,
-0.03817314,
-0.014590788,
0.016760394,
-0.013509712,
0.038113493,
-0.0073028496,
0.045688476,
-0.03915729,
0.029062284,
-0.020861024,
0.014232914,
-0.033729546,
0.029002639,
0.010281398,
0.01574642,
0.013554446,
0.011153714,
0.0360259,
-0.0041602757,
0.025289703,
0.010147195,
0.04380964,
-0.009267424,
0.02460378,
0.008320551,
0.039455518,
0.023798566,
0.025930893,
-0.0022795775,
0.03355061,
0.012368991,
-0.028510563,
-0.015612217,
0.018594494,
0.012048396,
-0.011265549,
0.017863836,
0.015179787,
0.008238538,
-0.010072638,
0.0008271157,
0.010684005,
-0.0059198188,
0.020965403,
-0.0042311046,
-0.031671777,
0.03870995,
0.0079925,
-0.0673398,
-0.002100641,
0.014642977,
0.031463016,
0.007724096,
0.036831114,
0.02254601,
0.039395873,
0.03310327,
0.023351224,
0.039395873,
-0.0033457414,
0.008357829,
-0.0029021278,
-0.0047604586,
0.0024249635,
-0.009692398,
-0.012756688,
-0.012883434,
-0.030180637,
0.04679192,
0.009520917,
-0.016998976,
0.0109225875,
-0.028957903,
-0.030777093,
-0.06394,
0.013830307,
-0.07455691,
0.015955178,
0.011779992,
-0.023038086,
-0.06179277,
0.044167515,
-0.0012451004,
0.036294304,
0.026601905,
0.038918708,
0.006244141,
0.032536637,
0.06644512,
-0.009230145,
0.02072682,
0.026378235,
-0.025155501,
-0.018579582,
0.0040931744,
-0.02394768,
0.0028834885,
-0.043213185,
-0.04043967,
0.026497526,
0.0047902814,
-0.015299078,
-0.052935407,
0.040409844,
-0.0030549695,
-0.04887951,
-0.0144342175,
0.05535105,
0.029897321,
-0.031134965,
0.013010181,
0.006773495,
-0.042586908,
-0.024007326,
-0.009155588,
0.017118266,
0.017625254,
-0.070620306,
-0.023157377,
-0.06161383,
0.009744588,
0.004439864,
-0.05263718,
0.012018574,
0.035668027,
-0.002486473,
0.039634455,
0.017983127,
-0.027869374,
-0.00048461993,
0.041722048,
0.055201937,
0.008902095,
0.061136667,
0.050668877,
-0.010147195,
-0.017878747,
-0.025960715,
0.026482614,
0.018534848,
0.008574044,
-0.012115498,
-0.0012413725,
-0.030240282,
-0.054128315,
-0.030359574,
0.046463866,
-0.004495782,
-0.035131216,
-0.039843213,
-0.006564736,
-0.06555044,
-0.029390333,
-0.031582307,
0.024902008,
-0.006024198,
-0.031015676,
0.022695124,
-0.035339974,
0.26721197,
0.038381897,
0.009684943,
0.012995269,
0.040171262,
0.05233895,
0.037069697,
-0.00415282,
0.02609492,
-0.023455605,
-0.026169475,
-0.010184474,
-0.012652308,
0.0041453643,
-0.009394171,
0.029360512,
-0.06626618,
-0.014314927,
-0.022039022,
-0.057379,
-0.048014652,
0.048521638,
0.010437967,
0.057050947,
0.012391359,
-0.0023988686,
-0.024633603,
-0.036592532,
-0.00372039,
-0.041513287,
0.050967105,
-0.018341,
0.04747784,
-0.019504087,
-0.002628131,
0.024454666,
-0.009088487,
-0.03832225,
-0.013614092,
-0.02566249,
0.023530161,
-0.0059198188,
0.02772026,
-0.027392209,
0.005092237,
0.03364008,
-0.04184134,
0.011317739,
0.014300016,
-0.09805725,
0.031552486,
-0.058482442,
0.03763633,
-0.020383859,
-0.03149284,
-0.036711823,
-0.05785616,
-0.08559133,
-0.0018508753,
0.017655076,
0.020682087,
-0.0015601034,
-0.038053848,
0.029807853,
-0.030165726,
0.012764143,
-0.025871247,
0.008462209,
0.00782102,
-0.009282336,
0.013293497,
0.028987726,
-0.02244163,
-0.035101395,
0.012421181,
0.033938307,
-0.028107956,
0.026795754,
0.0423185,
-0.0593473,
0.010296309,
-0.005263718,
-0.0023951407,
-0.02071191,
0.046046346,
0.030568333,
-0.053024873,
-0.008902095,
0.000050588027,
0.030627979,
0.022471452,
0.023067908,
0.013576813,
0.008723158,
-0.009289791
] |
It is worth spending some time to create fitting model cards for each checkpoint. The model cards should highlight the
specific characteristics of this particular checkpoint, e.g. On which dataset was the checkpoint
pretrained/fine-tuned on? On what down-stream task should the model be used? And also include some code on how to
correctly use the model.
13. (Optional) Add notebook
It is very helpful to add a notebook that showcases in-detail how brand_new_bert can be used for inference and/or
fine-tuned on a downstream task. This is not mandatory to merge your PR, but very useful for the community.
14. Submit your finished PR
You're done programming now and can move to the last step, which is getting your PR merged into main. Usually, the
Hugging Face team should have helped you already at this point, but it is worth taking some time to give your finished
PR a nice description and eventually add comments to your code, if you want to point out certain design choices to your
reviewer.
Share your work!!
Now, it's time to get some credit from the community for your work! Having completed a model addition is a major
contribution to Transformers and the whole NLP community. Your code and the ported pre-trained models will certainly be
used by hundreds and possibly even thousands of developers and researchers. You should be proud of your work and share
your achievements with the community.
You have made another model that is super easy to access for everyone in the community! 🤯 |
[
0.032954894,
-0.030285204,
-0.015659316,
-0.010362994,
0.0059960396,
-0.026940914,
0.023754507,
-0.016506154,
0.008260254,
0.03998795,
-0.01344175,
0.00067415077,
0.04535604,
-0.057068232,
0.011073476,
0.008927676,
0.04001666,
0.0042377757,
-0.04753772,
0.013011155,
-0.0040942435,
-0.026510319,
-0.06085747,
-0.02652467,
-0.034677275,
0.038064625,
0.010284051,
-0.014424942,
0.07480876,
0.03714602,
-0.053336404,
-0.014044584,
-0.0045068976,
-0.0158172,
-0.0059888633,
-0.063670695,
-0.0022642137,
0.013700107,
-0.049087867,
-0.051929794,
-0.010284051,
-0.030256497,
0.03952865,
-0.04857115,
-0.030801918,
0.0045643104,
0.007915777,
-0.009666865,
0.030055553,
-0.05729788,
-0.021716356,
0.061144534,
-0.04001666,
0.044580966,
-0.024156397,
0.01933373,
-0.022060834,
0.023338266,
-0.06039817,
0.0076287137,
0.060570408,
0.023567917,
0.0123509085,
-0.040619493,
-0.009724277,
0.016807571,
-0.030342616,
-0.008152604,
-0.031060275,
-0.013936935,
-0.010743353,
0.011310304,
-0.010757706,
-0.046590414,
-0.03401703,
0.00008858601,
0.025362063,
0.013154686,
0.0055905622,
0.05204462,
0.019190198,
0.03143346,
0.035882942,
0.025964897,
-0.010255345,
-0.022706727,
0.06872301,
0.0055403262,
-0.030227792,
-0.019218905,
-0.026237607,
0.028950358,
-0.032553006,
0.04314565,
0.0084037855,
0.034648567,
-0.035882942,
-0.0012424468,
0.0008755438,
-0.012860446,
0.013649872,
0.090425014,
-0.0049195513,
0.009430037,
-0.02652467,
-0.019577734,
0.0039004758,
-0.0019466496,
-0.023309559,
-0.026983973,
0.008389432,
0.010973004,
-0.00887744,
0.008418138,
-0.00074008567,
0.014023053,
-0.03235206,
0.019721266,
-0.07503841,
-0.020840812,
0.044724498,
0.004524839,
-0.0061754542,
-0.03243818,
0.0065522254,
-0.022534488,
0.048685975,
0.03921288,
0.029825902,
-0.014769419,
-0.0070402334,
-0.00244004,
0.019462908,
0.03998795,
0.012587736,
-0.038064625,
-0.008009072,
-0.010162049,
0.034476332,
-0.036658015,
-0.027385863,
0.040963966,
0.01874525,
0.06332622,
0.010563938,
-0.005328617,
0.01847254,
-0.06527825,
-0.0065163425,
-0.013255159,
-0.027357155,
0.009451567,
0.024558285,
0.0014990099,
-0.04305953,
0.0035865002,
-0.038409103,
-0.008159781,
0.0061180415,
0.022204366,
-0.011095006,
0.064531885,
-0.031835347,
0.057269175,
-0.018285947,
0.03284007,
0.01590332,
-0.008202841,
0.006279515,
-0.03220853,
-0.010865355,
0.024744878,
-0.021888595,
-0.0025566597,
0.04251411,
0.019749971,
0.06016852,
0.0066419328,
-0.00019993527,
0.016606625,
0.016420035,
0.010879708,
0.018156769,
0.04702101,
-0.03654319,
-0.012602089,
0.036485776,
-0.013240806,
0.0030859332,
-0.016864983,
-0.008296137,
0.028864238,
-0.020209273,
0.016721452,
-0.05787201,
-0.0036600602,
-0.03866746,
0.018056296,
0.026395492,
-0.032610416,
-0.032265943,
0.037203435,
-0.016118618,
0.016477447,
-0.021084817,
-0.044380024,
-0.008698026,
-0.0329836,
-0.03347161,
-0.01373599,
0.047509015,
0.018831369,
0.0021780946,
0.0013518898,
-0.0083391955,
-0.018860074,
-0.013958464,
0.0022642137,
0.03301231,
-0.016290857,
-0.0033729966,
-0.005307087,
0.02661079,
0.008188487,
0.033098426,
0.026452905,
0.0135852825,
0.03220853,
0.007980366,
-0.026007956,
0.008784144,
0.013011155,
0.039471235,
0.037519205,
0.045241214,
-0.0055582677,
0.034849513,
0.043863308,
0.032466885,
0.012171494,
0.026539024,
-0.014798125,
0.01344175,
0.025534302,
-0.015171308,
-0.02913695,
0.0045930166,
0.0007243869,
-0.0012029756,
0.0023377738,
-0.023984158,
0.061374184,
0.03582553,
-0.0076861265,
-0.069067486,
-0.027170565,
0.02652467,
0.048370205,
-0.010441937,
0.0100759305,
0.052302975,
0.020769047,
0.032926187,
-0.02498888,
0.034964338,
0.025103707,
-0.022032127,
0.038208157,
-0.00507026,
-0.069928676,
-0.037232142,
-0.044580966,
-0.09438649,
-0.017152047,
-0.02959625,
0.019175844,
0.02570654,
-0.03915547,
0.024070278,
-0.0059888633,
-0.014209645,
0.0013249776,
0.0117480755,
0.037203435,
0.029510131,
0.03306972,
-0.04920269,
0.021673298,
-0.04630335,
0.02137188,
0.0035524112,
-0.0032402298,
-0.010183579,
0.021630237,
0.009092738,
0.020367159,
-0.014597181,
-0.008030603,
-0.04225575,
-0.001268462,
-0.043203063,
-0.009817573,
-0.019663852,
0.026811734,
-0.025835719,
0.013068568,
-0.010126166,
-0.03731826,
0.04874339,
0.030371323,
0.0028562823,
0.004047596,
-0.001207461,
-0.00624722,
-0.03266783,
0.046619117,
0.06263726,
0.02267802,
-0.052618746,
-0.012881977,
-0.061431598,
0.015544491,
0.006340516,
-0.0040440075,
0.0019197374,
0.056522813,
-0.0028455174,
-0.05201591,
0.0071371174,
-0.019190198,
-0.03628483,
-0.007535418,
-0.023094261,
0.050437063,
0.028778119,
0.007915777,
-0.0058489195,
-0.012996802,
-0.03212241,
0.0017466022,
0.05063801,
0.0010953269,
0.0024795113,
0.033270665,
-0.008913323,
0.007571301,
0.032926187,
-0.052475214,
0.013204923,
0.014783773,
0.009688394,
0.03691637,
0.0072519425,
0.0054542073,
0.014561298,
0.04179645,
-0.039729595,
-0.019764325,
-0.008174134,
0.008253077,
0.011640427,
0.031175101,
0.023639683,
0.017022869,
-0.07911471,
-0.007155059,
-0.008439668,
0.004998494,
0.054972667,
-0.030055553,
0.006401517,
-0.02913695,
-0.0016290856,
0.0020901815,
-0.01129595,
-0.06252244,
0.0077291857,
0.023194734,
0.040275015,
-0.002572807,
-0.043404005,
0.011597367,
-0.024931468,
0.051901087,
0.02000833,
-0.0062077492,
-0.05015,
0.012846094,
-0.031232513,
0.008396609,
0.03439021,
-0.039614767,
-0.0015420695,
-0.014166586,
-0.0033819673,
-0.04748031,
0.012236083,
0.049719404,
0.06573755,
0.015731081,
0.036858957,
-0.0065594018,
-0.02307991,
0.0092075635,
-0.006828524,
0.007521065,
-0.078999884,
0.022821551,
0.019319376,
-0.035624586,
-0.015515785,
0.00022370771,
0.005278381,
0.03235206,
-0.0032240823,
-0.019993976,
-0.054197595,
0.006379987,
0.012056668,
0.02299379,
-0.054283716,
-0.02570654,
-0.028333172,
0.0025692186,
0.035538465,
-0.05480043,
0.00047724313,
-0.02118529,
0.003939947,
0.07440687,
0.004865727,
-0.056551516,
0.026122782,
-0.011281597,
-0.074579105,
0.038064625,
0.050523184,
-0.02028104,
0.021702003,
-0.059077676,
0.019793032,
0.041710332,
-0.033586435,
-0.008310489,
0.007693303,
0.014245528,
0.01011899,
0.032725245,
-0.009982634,
0.005694623,
-0.0021242702,
-0.024586992,
0.018917488,
-0.020984344,
-0.019190198,
-0.054283716,
0.05095378,
0.032753948,
0.051441785,
0.013829286,
-0.00412295,
0.0135852825,
0.023740156,
-0.019721266,
-0.06102971,
0.027041385,
0.04793961,
-0.0021188878,
0.032237235,
0.011776782,
-0.024386048,
0.041107498,
0.016348269,
0.0006867098,
0.036715426,
-0.0014371119,
0.04093526,
0.01735299,
0.01222173,
0.017596995,
-0.029854609,
0.06522083,
0.01527178,
-0.02728539,
-0.034964338,
-0.03573941,
-0.015946379,
-0.0023503327,
-0.023209088,
0.046418175,
0.038868405,
0.03470598,
0.004707842,
0.012637972,
-0.021687651,
-0.03180664,
-0.039700888,
0.056867287,
0.054111477,
0.020725988,
0.04346142,
-0.0415668,
-0.032725245,
-0.010729,
-0.0033478786,
0.021845536,
-0.016391328,
-0.00982475,
0.029711077,
-0.00039359104,
-0.00041332663,
0.0075784773,
0.012472911,
-0.022534488,
0.0092075635,
-0.012609266,
0.0033245545,
-0.035538465,
-0.02566348,
0.036514483,
-0.049661994,
-0.045930166,
-0.05709694,
0.0017214841,
0.011539955,
0.057068232,
0.010255345,
-0.032553006,
-0.059709217,
-0.015070836,
0.017223813,
-0.060972296,
-0.0018461774,
-0.030256497,
-0.009925222,
0.0073703565,
0.042169634,
0.032696538,
-0.04446614,
-0.000066888046,
-0.036715426,
0.017840998,
-0.05187238,
-0.012903506,
0.018271595,
0.019850444,
-0.032868776,
0.038954522,
0.0024490107,
-0.03935641,
-0.008009072,
0.025175473,
0.04225575,
0.022563195,
0.002840135,
-0.017611349,
-0.0041624215,
0.0062005725,
-0.019089725,
0.05029353,
-0.027629865,
0.022462722,
-0.013872346,
0.047365483,
-0.033041015,
-0.037203435,
-0.038150743,
-0.009035325,
0.03321325,
-0.041853864,
0.036198713,
0.017596995,
-0.0144536495,
-0.0050056702,
0.038696166,
0.005059495,
0.015429665,
-0.041538093,
-0.026108429,
0.031777933,
-0.03726085,
0.014503885,
-0.018817015,
-0.030285204,
0.03622742,
-0.0201088,
0.0221326,
0.05864708,
-0.020725988,
-0.004941081,
-0.056666344,
0.05181497,
0.020481983,
-0.00851861,
-0.015444019,
0.009939575,
-0.03990183,
0.0035416465,
-0.023826273,
-0.018372066,
-0.014360353,
-0.002242684,
0.01598944,
0.018156769,
0.042944707,
0.0085832,
-0.04512639,
-0.06481895,
0.0343328,
0.012645149,
0.021989068,
0.0055295615,
0.016362622,
0.005942215,
0.014625887,
0.008044955,
-0.016233442,
-0.04328918,
0.073373444,
-0.0033084073,
-0.033787377,
0.00079704984,
0.030600972,
-0.03550976,
-0.05589127,
-0.051929794,
0.030313909,
-0.04038984,
0.0015905114,
-0.003742591,
-0.0022283308,
-0.019261964,
0.058704495,
0.035653293,
-0.03858134,
-0.02959625,
-0.01798453,
-0.021788122,
-0.011037593,
0.019405495,
0.07251225,
-0.025290297,
-0.024601346,
-0.036744133,
0.01617603,
-0.03835169,
-0.027213624,
0.06527825,
-0.00473296,
0.011992079,
0.0158172,
0.0155588435,
0.043317888,
0.019821737,
-0.00675317,
0.025735246,
-0.012501617,
-0.020625515,
-0.042169634,
-0.0010136932,
0.0053322054,
0.012279143,
-0.069067486,
0.017898412,
0.027041385,
0.020381512,
0.0014191704,
-0.053020637,
0.019348083,
-0.013362808,
-0.02141494,
0.0110663,
0.015501431,
-0.008102369,
-0.010929944,
0.013111627,
-0.041652918,
-0.005120496,
0.015544491,
-0.004004536,
-0.030371323,
-0.036715426,
-0.001865913,
-0.058618374,
-0.055632915,
-0.04251411,
-0.050523184,
0.0015797465,
0.050063882,
-0.03944253,
-0.023309559,
-0.0036259713,
0.019218905,
-0.007050998,
0.03284007,
-0.03622742,
-0.008633436,
0.011482541,
-0.025433829,
-0.036715426,
-0.00488008,
0.00978169,
-0.024744878,
0.042657644,
-0.013570929,
-0.0014981128,
0.008367903,
-0.018285947,
0.028103521,
-0.043404005,
-0.029452719,
0.008367903,
0.018946193,
-0.059307326,
0.01350634,
-0.020453278,
-0.02968237,
-0.008841557,
0.0043705422,
-0.02696962,
0.03143346,
-0.006964879,
0.016793218,
-0.01316904,
0.02059681,
0.03835169,
0.004076302,
0.021859888,
-0.0072591193,
-0.017740527,
0.015530137,
0.010484996,
0.01956338,
-0.028404938,
0.018759603,
0.0013052421,
0.024070278,
0.017324284,
0.0036923548,
0.013334101,
0.060570408,
0.024070278,
0.0014900392,
0.026940914,
-0.04702101,
0.0072268248,
0.010836649,
-0.07538289,
-0.0483415,
0.033241957,
-0.026739968,
0.02795999,
-0.017697467,
-0.010965827,
0.0032994365,
0.02335262,
0.0010038253,
0.02417075,
0.023338266,
0.029481426,
0.011568661,
-0.034648567,
-0.00016640715,
-0.012645149,
0.03149087,
-0.010449112,
-0.031232513,
-0.023926746,
0.009013795,
0.034103148,
-0.02307991,
-0.0282327,
0.008769792,
-0.022821551,
0.023524856,
-0.019233257,
0.012006433,
-0.04590146,
0.025462536,
-0.046446882,
0.021874242,
-0.014561298,
0.023797568,
0.045958873,
0.020941285,
0.00565874,
0.03203629,
0.029223068,
0.008791321,
0.04251411,
0.015286134,
0.022276131,
-0.027314097,
0.017410403,
0.0073093553,
0.06659874,
-0.009099914,
0.020352805,
-0.00034784028,
0.013312572,
-0.00034537332,
-0.013750344,
-0.048054438,
0.017295578,
0.00795166,
-0.0057233293,
0.0059314505,
-0.008733909,
0.032782655,
0.016147325,
0.01278868,
0.032639123,
-0.030026846,
-0.004252129,
0.0061646895,
-0.03637095,
0.029538838,
-0.019692559,
-0.0483415,
0.012444205,
0.015386606,
0.049346223,
0.024342988,
-0.007133529,
0.021199642,
0.0070258803,
0.02806046,
0.013047038,
0.04107879,
0.005131261,
0.028634587,
-0.02267802,
0.024759231,
-0.00856167,
0.008841557,
-0.01916149,
-0.033098426,
-0.0034806454,
0.047824785,
0.026108429,
-0.032639123,
0.015171308,
-0.019893503,
-0.016908042,
-0.07084728,
0.016032498,
-0.08565976,
-0.0045320154,
-0.0054542073,
-0.0048119025,
-0.071536236,
0.034131855,
0.010384523,
0.010499349,
0.012501617,
0.034677275,
0.017869705,
0.04084914,
0.050867658,
-0.01531484,
0.017826647,
0.016003793,
-0.0488008,
-0.026998326,
-0.008353549,
-0.025835719,
0.02606537,
-0.054829136,
-0.054197595,
0.023984158,
-0.0039865947,
-0.015745435,
-0.06883784,
0.03338549,
0.0038574163,
-0.092377044,
0.0038717694,
0.059307326,
0.036744133,
-0.013176217,
0.008439668,
-0.016965454,
-0.02272108,
-0.027328448,
-0.0070258803,
0.013312572,
-0.0007665494,
-0.0632688,
-0.022190012,
-0.03217982,
0.027586807,
0.015860261,
-0.030227792,
0.031691816,
0.046274643,
0.021917302,
0.036485776,
-0.014302941,
-0.041624215,
0.004399249,
-0.0003498587,
0.04446614,
0.025046295,
0.07693303,
0.04825538,
-0.017596995,
-0.028634587,
-0.024500873,
0.040246308,
0.0013527869,
-0.0002626183,
-0.0053465585,
-0.02318038,
-0.011453835,
-0.056178335,
-0.031720523,
0.0065163425,
-0.01929067,
-0.05494396,
-0.03898323,
-0.001889237,
-0.033902206,
-0.05505879,
-0.011819841,
0.024960175,
-0.024386048,
-0.051470492,
0.018917488,
-0.059422154,
0.24503744,
0.03542364,
0.016678391,
-0.0080377795,
0.029510131,
0.05132696,
0.021041758,
0.006817759,
0.018415127,
-0.0041193618,
-0.033442903,
-0.01802759,
-0.019534674,
0.018587364,
0.008080838,
0.026725616,
-0.07188071,
-0.0046540177,
-0.010312757,
-0.04793961,
-0.038150743,
0.024845349,
0.0021870653,
0.023912393,
0.035882942,
-0.02358227,
-0.019950915,
-0.045872755,
-0.011626073,
-0.032753948,
0.0578433,
0.008662142,
0.03212241,
-0.014869891,
-0.005073848,
0.045097683,
0.027027031,
-0.0077363625,
0.006240044,
-0.035394933,
0.03347161,
-0.03510787,
0.042657644,
-0.013613989,
0.010133343,
0.008461198,
-0.041222323,
0.0032402298,
0.012293496,
-0.06252244,
0.03691637,
-0.030974155,
0.030744506,
-0.030141672,
-0.012128434,
-0.02909389,
-0.0506093,
-0.07142141,
-0.02042457,
-0.0040583606,
0.033643845,
-0.014970364,
-0.032696538,
0.025878778,
-0.040188897,
-0.019678205,
-0.019017959,
0.030428736,
0.0137862265,
0.017898412,
0.008532964,
0.02385498,
-0.032409474,
-0.013362808,
0.013434574,
0.0361413,
-0.020969993,
0.03645707,
0.008848733,
-0.03424668,
0.0026284256,
0.0021170937,
-0.005802272,
-0.045643102,
0.04535604,
0.042916,
-0.06717287,
-0.016807571,
-0.0022767726,
0.023711449,
0.041767746,
0.02570654,
0.013635518,
0.020883873,
-0.0047975495
] |
make quality
There are a couple of other very strict design tests in 🤗 Transformers that might still be failing, which shows up in
the tests of your pull request. This is often because of some missing information in the docstring or some incorrect
naming. The Hugging Face team will surely help you if you're stuck here.
Lastly, it is always a good idea to refactor one's code after having ensured that the code works correctly. With all
tests passing, now it's a good time to go over the added code again and do some refactoring.
You have now finished the coding part, congratulation! 🎉 You are Awesome! 😎
12. Upload the models to the model hub
In this final part, you should convert and upload all checkpoints to the model hub and add a model card for each
uploaded model checkpoint. You can get familiar with the hub functionalities by reading our Model sharing and uploading Page. You should work alongside the Hugging Face team here to decide on a fitting name for each
checkpoint and to get the required access rights to be able to upload the model under the author's organization of
brand_new_bert. The push_to_hub method, present in all models in transformers, is a quick and efficient way to push your checkpoint to the hub. A little snippet is pasted below:
thon
brand_new_bert.push_to_hub("brand_new_bert")
Uncomment the following line to push to an organization.
brand_new_bert.push_to_hub("/brand_new_bert") |
[
0.034917664,
-0.0016546751,
-0.04772174,
-0.018479243,
-0.041151963,
-0.0012755151,
-0.016829811,
0.015278225,
-0.00045385622,
0.07078585,
-0.020310394,
-0.037154183,
0.026209215,
-0.021232959,
-0.017458832,
0.037433747,
-0.01699755,
-0.047973346,
-0.057003293,
0.009568111,
0.040788528,
0.0022959271,
-0.072519146,
-0.019401807,
0.0035347494,
0.005769522,
0.032233838,
-0.0022242886,
0.09572304,
0.042465918,
-0.04347235,
-0.015991116,
-0.0032342172,
-0.052194778,
-0.0119933365,
-0.021889936,
0.0049832454,
0.020883502,
-0.07710402,
-0.04213044,
0.022127567,
-0.046072304,
0.026041476,
-0.033240274,
-0.057310816,
0.010392827,
-0.01403416,
-0.06743107,
-0.013831476,
-0.041822918,
-0.029242495,
0.010763251,
0.027467256,
-0.005542375,
-0.016955614,
0.018633004,
-0.0138174975,
0.046240043,
-0.058596816,
0.015501876,
0.0387477,
-0.0025195791,
-0.011308403,
-0.062007505,
0.03925092,
0.028683364,
0.00056044036,
-0.014593291,
-0.014481464,
-0.008079427,
-0.072742805,
0.018227635,
-0.024098499,
-0.03047258,
0.0017516492,
0.00053641526,
0.016843788,
-0.0027222638,
0.029577972,
0.074364275,
0.03421875,
0.036567096,
-0.03877566,
0.01930396,
-0.042354092,
-0.03564453,
0.039838005,
-0.0027589567,
-0.0071848193,
-0.028683364,
-0.0083799595,
0.030528493,
0.03997779,
0.013894378,
-0.0065627876,
0.046883043,
-0.0051090494,
0.041151963,
0.008233188,
-0.02504902,
0.0015262499,
0.0804588,
-0.02576191,
0.024350109,
-0.052921645,
0.037042357,
-0.00406767,
0.0071358955,
-0.00034246707,
-0.03631549,
0.0037391812,
-0.0046931966,
-0.0039034258,
0.016717985,
-0.029326364,
0.019080307,
-0.027159736,
-0.0020757697,
-0.028962929,
-0.022854434,
-0.00289175,
-0.003941866,
0.02425226,
-0.0063006952,
0.04045305,
-0.046268,
-0.009134785,
0.00773696,
-0.05160769,
-0.0055633425,
0.006639668,
0.0005499567,
-0.010001436,
0.071736366,
0.03430262,
0.005112544,
0.04028531,
0.06793428,
-0.014118031,
-0.012182043,
-0.009316502,
-0.053788297,
0.019569548,
0.07542662,
-0.006789934,
0.01706744,
0.028739277,
-0.042997092,
-0.021107154,
0.035868183,
-0.019136222,
0.04450674,
0.015753485,
0.038328357,
-0.020631894,
0.00033940934,
-0.013964269,
-0.009498219,
0.0106514245,
0.0056926413,
0.02601352,
0.01140625,
-0.0458207,
0.027956495,
-0.022309283,
0.02362324,
-0.015431985,
0.012077206,
0.00046739765,
-0.03620366,
0.03016506,
0.007240732,
-0.044534698,
0.044534698,
0.03567249,
0.061839767,
0.0066256896,
0.011287435,
0.007911689,
-0.005255821,
-0.01467716,
-0.01659218,
-0.0066885916,
0.037405793,
0.03925092,
0.0073455693,
0.01842333,
0.0029563995,
-0.0055773207,
-0.0059162932,
-0.0061679017,
0.050908778,
-0.014453508,
0.028934972,
-0.03564453,
-0.004794539,
-0.026516736,
0.014719095,
0.00001704964,
-0.041040137,
0.026782323,
0.017039483,
-0.0039383713,
0.009484241,
0.019345894,
0.030248929,
-0.03310049,
0.05320121,
-0.05199908,
-0.060441945,
0.014649204,
0.054599036,
-0.029577972,
-0.017025506,
0.052446384,
-0.010462718,
-0.014900812,
-0.018619027,
0.023902804,
0.0021613867,
0.04162722,
0.020450177,
0.03391123,
-0.02530063,
-0.010917012,
-0.011007871,
-0.0049727615,
0.045037914,
0.024447955,
0.0076321233,
0.0060141413,
0.026153302,
0.0028515626,
0.02369313,
-0.0055318917,
-0.041683134,
0.06167203,
0.035057444,
-0.037405793,
0.04788948,
-0.020883502,
-0.0027152747,
-0.004116594,
0.030612363,
-0.0015445964,
-0.043388482,
0.007331591,
-0.01833946,
-0.051579736,
0.016242724,
-0.057087164,
0.011846565,
0.00466524,
-0.013985237,
-0.027481236,
0.013663737,
0.015096508,
0.01706744,
-0.044171263,
-0.0154459635,
0.0066816024,
0.039111137,
-0.020939415,
-0.039446615,
0.012258924,
0.04979052,
-0.00350854,
0.022868413,
-0.0019377345,
-0.009078872,
-0.023832912,
-0.044255134,
-0.03374349,
0.002587723,
-0.02288239,
0.017095396,
0.013461052,
-0.024112478,
0.0057939836,
-0.02049211,
0.011049805,
0.050629213,
-0.010784218,
0.02767693,
0.022477023,
0.004214442,
-0.02831993,
0.02225337,
-0.044982,
0.0393907,
-0.009092851,
-0.02033835,
-0.007771906,
-0.03125536,
0.040117573,
-0.04059283,
0.011455175,
0.030248929,
-0.01731905,
-0.021163067,
-0.008652535,
-0.027145756,
0.043136872,
0.0055004405,
-0.01435566,
0.022644762,
0.017095396,
-0.011469153,
0.027872626,
0.00007278517,
-0.056248467,
0.03256932,
-0.006454456,
0.03877566,
0.009232633,
0.05831725,
0.01332127,
-0.020967372,
-0.0052138865,
-0.0376574,
0.002811375,
-0.013300302,
-0.042018615,
-0.050880823,
0.010239067,
0.07257506,
-0.052110907,
-0.07542662,
0.008386949,
-0.025272671,
-0.030780101,
0.016927658,
-0.03008119,
0.033771448,
0.013831476,
0.016955614,
-0.016787875,
0.009568111,
-0.03709827,
0.021442631,
0.031646755,
-0.023679152,
0.03790901,
0.039474573,
0.000062519895,
-0.011357326,
0.0826394,
-0.06435585,
0.026111366,
-0.026446845,
0.01555779,
0.01706744,
-0.0017551437,
0.028305952,
0.024755476,
0.047805607,
-0.066816024,
0.010735294,
-0.019905025,
0.016047029,
0.025510302,
0.036427315,
0.00574506,
0.029717755,
-0.011986348,
-0.020366307,
-0.001054484,
-0.02448989,
0.08118566,
-0.047805607,
0.029074755,
-0.012538488,
-0.031367186,
-0.012699238,
0.012664293,
-0.045904566,
0.03558862,
0.050517388,
0.029577972,
-0.011692804,
-0.022700675,
0.034498315,
0.02106522,
0.03413488,
0.023259804,
0.03598001,
-0.022854434,
0.03055645,
-0.026768345,
-0.008904144,
0.019485677,
0.0052103917,
0.009679937,
-0.0071987975,
-0.0387477,
-0.053340994,
0.016690027,
0.013272346,
0.035337012,
-0.00733858,
0.055577513,
-0.046519607,
0.055465687,
0.01419491,
0.027928539,
-0.032205883,
-0.029158626,
0.03494562,
0.026684474,
0.005336196,
0.009155752,
-0.043444395,
0.0065138633,
0.024881281,
-0.049399126,
-0.022714652,
-0.049482998,
0.026950061,
-0.0010099284,
0.030193016,
0.0006041224,
-0.042885263,
-0.012957836,
0.040313266,
0.034190793,
-0.05594095,
-0.020282438,
-0.08012331,
0.0028585517,
0.033491883,
-0.013258368,
-0.03192632,
-0.012300858,
-0.024084521,
-0.043220744,
0.03997779,
0.043584175,
-0.002449688,
-0.017864201,
-0.056891467,
-0.043751914,
0.011280446,
0.029941406,
-0.009162742,
-0.0073525584,
-0.010336914,
0.012859988,
0.026069432,
0.012063228,
-0.0011898984,
-0.02991345,
-0.028851103,
0.010854109,
-0.052697994,
-0.01627068,
0.01348202,
0.008428884,
-0.031395145,
0.043500308,
0.035952054,
-0.025789868,
0.004410137,
0.043528263,
-0.032988664,
-0.03192632,
0.01181162,
0.017360983,
-0.017850222,
0.022141544,
0.017360983,
0.00053248386,
0.021694241,
0.026838236,
-0.014048139,
0.024210325,
0.0057730163,
0.025398476,
-0.023259804,
-0.0036902574,
-0.025580194,
-0.05599686,
0.04794539,
0.035616577,
-0.022015741,
0.01316751,
-0.022588849,
0.029577972,
0.009029948,
-0.02465763,
0.044870175,
-0.017906135,
-0.03908318,
0.014180932,
-0.04760991,
-0.025733953,
-0.02362324,
0.035560664,
0.022742609,
0.04428309,
0.03430262,
0.031311274,
-0.010903033,
-0.0026436362,
-0.021372741,
-0.051915213,
-0.020044807,
-0.0387477,
0.02497913,
0.021917893,
-0.018185701,
-0.033072535,
-0.009980469,
0.016382506,
-0.040788528,
0.0069786403,
0.0055703316,
-0.0072896564,
-0.00869447,
-0.05336895,
0.042941175,
-0.022155523,
-0.070170805,
0.0054829675,
0.012140108,
0.013943302,
0.017514745,
0.017374963,
-0.023092065,
-0.020464154,
-0.062902115,
0.040648744,
-0.018143766,
-0.018045917,
0.010078317,
-0.030612363,
-0.020757698,
0.03214997,
0.049035694,
-0.017221201,
-0.03584023,
-0.03981005,
0.012237956,
-0.045205653,
0.0015655637,
-0.038328357,
0.031143537,
0.005297756,
-0.017137332,
-0.010260034,
-0.0036308498,
-0.037797183,
0.028515626,
0.05594095,
0.05082491,
-0.033687577,
-0.034526274,
-0.0008928606,
-0.022924326,
0.010819164,
-0.007862764,
-0.053788297,
0.010204121,
-0.019611482,
0.031395145,
-0.014942747,
-0.044059437,
-0.002779924,
-0.016102942,
0.032401577,
-0.013838465,
0.026586628,
0.0069192327,
0.017095396,
-0.0026471308,
-0.024867304,
-0.019429764,
0.011392272,
-0.014830921,
-0.0022749598,
0.012720206,
-0.052837778,
-0.009225643,
-0.0115809785,
-0.02362324,
0.022826478,
-0.04372396,
0.03310049,
0.064244024,
-0.00092693255,
0.015725529,
-0.051411994,
0.0068423524,
-0.004640778,
0.014180932,
-0.013831476,
0.010022404,
-0.011280446,
-0.034106925,
-0.041990656,
-0.025650084,
-0.025132889,
0.012594401,
0.044450827,
-0.020282438,
0.023888826,
0.0076321233,
-0.030528493,
-0.04618413,
0.0486443,
0.011902478,
0.06502681,
0.043835785,
0.021163067,
-0.016606158,
0.02330174,
-0.014481464,
-0.016955614,
-0.051328126,
0.04937117,
-0.015585747,
-0.025594171,
0.040704656,
0.003892942,
-0.047274433,
-0.089069396,
0.013454064,
-0.0028078805,
-0.029298408,
-0.012783107,
-0.008079427,
-0.06536229,
0.012901923,
0.018814722,
0.040788528,
-0.00654182,
0.017892158,
0.03751762,
0.00039838007,
-0.032373622,
0.036399357,
0.027970474,
-0.009582089,
-0.012776119,
-0.017892158,
0.013174498,
-0.013663737,
0.008750383,
0.034666054,
-0.05138404,
0.000009821631,
0.04467448,
-0.011567,
0.03396714,
-0.008757372,
-0.00096712,
0.013628792,
-0.054934513,
-0.06357307,
-0.022868413,
0.015278225,
-0.019737286,
-0.002033835,
0.004210947,
0.02767693,
0.031311274,
0.04229818,
-0.011413239,
-0.030780101,
0.014928768,
-0.042577744,
-0.00486443,
0.00046040854,
-0.035784315,
0.006195858,
-0.007450406,
-0.00087364047,
-0.026768345,
0.012559456,
-0.007394493,
0.015781442,
-0.044227175,
-0.044339,
0.047749694,
-0.068325676,
-0.03869179,
0.01667605,
-0.022127567,
0.008918122,
0.012000326,
-0.032597274,
0.031003753,
-0.006429994,
0.009442306,
0.009246611,
0.006653646,
-0.026628561,
-0.019164179,
-0.026307063,
0.0077229817,
-0.034917664,
0.052697994,
-0.022938306,
-0.021708218,
-0.0034054506,
0.012293869,
-0.007939645,
-0.034246705,
-0.009770795,
0.035616577,
-0.020911459,
0.020729741,
-0.018059896,
0.031339232,
-0.047106694,
0.0138174975,
0.00021087498,
-0.021330805,
-0.023804955,
0.03726601,
-0.002587723,
0.021820044,
0.004714164,
0.0056996304,
0.0123148365,
0.038244486,
0.03343597,
-0.040648744,
0.007953623,
0.009400371,
-0.024406021,
-0.01906633,
0.042997092,
0.052921645,
-0.00933747,
-0.008072438,
-0.0051370063,
0.01316751,
-0.014886834,
0.015264247,
0.010113263,
0.0895167,
0.031702667,
-0.013447074,
-0.047553997,
-0.025622128,
-0.0017831002,
0.027621018,
-0.089125305,
-0.007226754,
0.018395374,
-0.017347006,
0.006426499,
-0.017193245,
-0.007946634,
0.016382506,
0.036734834,
0.02648878,
-0.004888892,
0.023120021,
0.015585747,
0.024112478,
-0.026362976,
-0.042605698,
0.002330873,
-0.0027222638,
-0.037992876,
-0.043248698,
0.028962929,
0.029102711,
-0.0059302715,
0.0057240925,
-0.07162454,
0.008673503,
0.019359874,
0.013307292,
-0.06698377,
-0.032261796,
-0.041683134,
0.056863513,
-0.02082759,
0.0002848068,
-0.037293967,
0.022281326,
0.039474573,
0.025803845,
-0.003941866,
0.01555779,
0.060218293,
-0.030528493,
0.031646755,
-0.006807407,
0.014257813,
0.017025506,
-0.017584635,
0.0010055602,
0.046128217,
0.02528665,
0.052558213,
0.009218655,
0.031618796,
0.049734607,
-0.014900812,
0.013663737,
0.029186582,
0.011462163,
-0.03296071,
0.005989679,
-0.002107221,
0.0081283515,
-0.026474802,
-0.025160845,
-0.010637446,
-0.026055453,
-0.029270452,
-0.021512523,
-0.024350109,
0.037685357,
0.008848231,
-0.043416437,
-0.02074372,
-0.018842679,
0.041375615,
0.012014304,
0.01691368,
-0.00037872314,
0.0112594785,
0.034973577,
0.06306986,
-0.0041899798,
0.014691139,
0.051048562,
-0.024154412,
0.010406805,
0.011664848,
0.015264247,
-0.017682483,
-0.017920114,
-0.027607039,
0.03899931,
-0.02696404,
0.0019010417,
-0.01308364,
-0.032429535,
-0.038719747,
-0.037601486,
0.0061574182,
-0.058037683,
0.0040012733,
0.012482575,
0.03094784,
-0.033491883,
0.038468137,
0.019289982,
0.045289524,
0.06944393,
0.03502949,
-0.0033041083,
0.07939645,
0.044702437,
0.038831573,
0.03094784,
0.027425323,
-0.022309283,
-0.026376953,
0.017584635,
-0.01833946,
-0.0037636433,
-0.003134622,
-0.0684375,
0.020086743,
0.015096508,
-0.06564185,
-0.0387477,
-0.00074128393,
-0.009071883,
-0.03567249,
-0.008317057,
0.07816636,
0.030696232,
0.010420783,
-0.036790747,
-0.007750938,
-0.011930435,
0.01762657,
-0.010274013,
0.020212546,
0.015585747,
-0.041375615,
-0.015543812,
-0.030220972,
-0.012531499,
-0.053900123,
-0.027942518,
-0.03598001,
0.013922335,
0.02537052,
0.027816713,
-0.005392109,
-0.02752317,
-0.020142656,
0.012915901,
0.043220744,
0.0004250261,
0.06273437,
0.05370443,
0.000062683706,
-0.024098499,
0.0067619774,
0.0076391124,
-0.020911459,
-0.009966491,
0.0043297624,
0.03542088,
-0.010728305,
-0.016005093,
-0.010378849,
0.042717524,
0.010232077,
-0.021344785,
-0.032038145,
-0.006643162,
-0.052781865,
0.006597733,
-0.03670688,
-0.008589634,
-0.010190142,
-0.020408241,
-0.012790097,
-0.021987785,
0.23125613,
0.044618566,
0.03693053,
0.050237823,
0.025887715,
0.044450827,
0.0383004,
0.015753485,
0.032848883,
-0.042773437,
-0.008449851,
-0.050125998,
-0.009246611,
0.03838427,
-0.020198569,
0.021260915,
-0.042326134,
0.015334138,
-0.009875632,
-0.018297527,
-0.029745711,
0.03360371,
-0.004308795,
0.044618566,
0.017556679,
-0.0006775082,
-0.025622128,
-0.034666054,
0.0041899798,
-0.038412225,
0.049902346,
-0.011678826,
0.036818705,
-0.02848767,
0.018870635,
0.01826957,
0.008400927,
-0.028040364,
0.016438419,
0.014956725,
-0.013195466,
-0.04386374,
0.0034840782,
0.011070772,
-0.024392042,
0.05138404,
-0.019527612,
0.0123148365,
0.0194717,
-0.10282399,
0.013859433,
-0.04243796,
-0.009805741,
-0.033659622,
-0.03086397,
-0.011909467,
-0.027159736,
-0.030836014,
-0.02320389,
-0.0031940297,
0.021526502,
-0.030444624,
-0.011734739,
0.056108687,
-0.010749273,
-0.0079676015,
0.008009536,
-0.0017324291,
0.017123353,
-0.003913909,
0.003924393,
0.0018556124,
0.0072057866,
-0.03790901,
0.015292203,
0.034246705,
0.0023273784,
0.026838236,
0.038076747,
-0.013272346,
-0.022868413,
-0.011000881,
-0.0061783856,
-0.03256932,
0.040816482,
0.0025353048,
-0.049203433,
-0.022281326,
-0.005619256,
0.03047258,
0.016200788,
0.07106541,
-0.01197237,
-0.023343673,
0.0013427854
] | Using pipelines for a webserver
Creating an inference engine is a complex topic, and the "best" solution
will most likely depend on your problem space. Are you on CPU or GPU? Do
you want the lowest latency, the highest throughput, support for
many models, or just highly optimize 1 specific model?
There are many ways to tackle this topic, so what we are going to present is a good default
to get started which may not necessarily be the most optimal solution for you. |
[
0.011713701,
0.012841483,
-0.025074102,
0.022984594,
-0.007430901,
-0.0021085355,
-0.033902623,
-0.0012021592,
-0.0021465893,
0.088506594,
-0.049954474,
-0.022320379,
0.026956044,
-0.020466113,
-0.008987654,
-0.0053413925,
-0.035701536,
-0.077381,
-0.09254724,
-0.012391754,
0.039548445,
-0.0082888445,
-0.051587336,
-0.07001929,
-0.024119293,
0.035452455,
0.0023558862,
0.012232619,
0.07173518,
0.060720287,
-0.01891628,
-0.030194089,
-0.019013144,
-0.033625863,
-0.020493789,
-0.016494663,
0.0070192264,
0.0059710126,
-0.05150431,
-0.05861694,
0.007590036,
-0.031993005,
0.025862856,
-0.04638432,
-0.05861694,
-0.0031152358,
0.018113686,
-0.017352607,
-0.0056838784,
-0.019566655,
-0.004607989,
0.010634352,
0.033044677,
0.0050750147,
-0.034898944,
0.015235423,
-0.020438436,
-0.014363641,
-0.05615381,
0.0048432318,
0.0110564055,
-0.0019165359,
0.002262481,
-0.081476994,
0.029142417,
0.023496592,
-0.014737261,
-0.05850624,
-0.023413565,
-0.081144884,
-0.06725173,
0.015276936,
-0.034511484,
-0.0076246304,
-0.025240155,
0.045138918,
0.0024164265,
0.0074032256,
0.039354715,
0.027703285,
0.027952366,
0.021476272,
-0.019206872,
0.012274133,
-0.040351037,
-0.027468042,
0.023870213,
-0.04065547,
-0.004140963,
0.0071126316,
-0.02370416,
0.02381486,
0.020908922,
-0.011360837,
-0.019815736,
0.043201625,
-0.043256976,
0.010786569,
0.0135956425,
-0.007638468,
0.016480826,
0.081919804,
-0.03783256,
-0.008953059,
-0.044889838,
0.03276792,
0.030498521,
-0.01386548,
-0.053856734,
-0.008081278,
-0.013671751,
-0.0082888445,
0.0066974973,
-0.007126469,
-0.03498197,
0.026056586,
0.016937472,
0.003774261,
-0.03622737,
-0.014737261,
-0.0176432,
0.02595972,
0.054354895,
-0.008655547,
0.026084261,
-0.07793452,
-0.014024615,
0.045720108,
-0.022915404,
-0.017311094,
0.010136192,
0.002534048,
-0.015526016,
0.023745673,
0.015069369,
0.03207603,
0.002767561,
0.011257054,
0.060498882,
-0.02407778,
-0.021254867,
-0.036863912,
0.028367499,
0.08900476,
0.017546335,
-0.00030508035,
0.015373801,
-0.059225805,
-0.02514329,
-0.006510687,
-0.028921012,
0.010025489,
-0.018514983,
0.019123847,
-0.013623319,
-0.00018086443,
-0.0033124245,
-0.030996682,
-0.018058335,
0.013388076,
-0.030194089,
-0.022998432,
-0.0018075632,
0.05200247,
-0.002009941,
0.027122097,
-0.006005607,
0.0130075365,
-0.012004295,
-0.018888604,
0.04978842,
-0.0032069113,
-0.008136629,
0.01613488,
0.07583117,
0.015332287,
0.017933795,
-0.017919958,
0.011326243,
0.011948944,
-0.024617454,
-0.0067528486,
0.022527946,
-0.0072579286,
0.032242086,
-0.014197587,
0.018348929,
0.0038019367,
0.018501144,
-0.01783693,
0.027080584,
0.020507626,
-0.04627362,
0.030664574,
-0.022361891,
0.0060609584,
-0.03512035,
-0.0045976103,
0.0065452815,
-0.022569459,
0.0039057203,
0.009299004,
-0.01897163,
0.0072371718,
-0.017324932,
-0.002539237,
0.016785257,
0.018888604,
-0.014266777,
-0.011464621,
0.018957792,
0.033072352,
-0.027218962,
-0.019552818,
0.0031999922,
-0.0032674517,
-0.016245583,
0.02760642,
0.0048397724,
-0.02173919,
0.06359855,
0.028561229,
0.027246637,
-0.032629542,
0.029778956,
-0.020286221,
-0.04278649,
0.02193292,
0.073008254,
0.02118568,
-0.018501144,
0.02503259,
-0.0062581473,
0.060775638,
0.019691195,
-0.013159752,
0.05477003,
0.021282542,
-0.035148025,
0.026319504,
-0.018708711,
-0.005542041,
0.028782634,
0.016868284,
-0.015899638,
-0.005749608,
-0.0035597752,
-0.028450526,
-0.03251884,
0.045526378,
-0.037555803,
0.018570334,
-0.02099195,
-0.034898944,
-0.01966352,
-0.03988055,
0.004002585,
0.010869595,
-0.045083568,
-0.02533702,
0.012806888,
0.036863912,
0.0012125376,
-0.03567386,
0.025489235,
0.044862162,
0.01046138,
0.06232547,
-0.030664574,
-0.0017781579,
-0.04134736,
-0.025046427,
-0.021130327,
-0.027883176,
-0.010689704,
0.0058257156,
0.042149954,
0.0024233456,
0.038358394,
0.009278248,
-0.013249698,
0.038109314,
-0.020327736,
0.053746033,
0.025240155,
0.0014201046,
-0.041375037,
0.028644256,
0.00983176,
0.043201625,
0.0024181562,
-0.020258546,
0.025890533,
-0.051781066,
0.011755215,
0.029529875,
0.032740247,
-0.007292523,
-0.0034559916,
-0.0014209696,
-0.013851643,
-0.005905283,
-0.0017513471,
-0.016563851,
-0.019234547,
0.023994753,
0.0033072352,
-0.035507806,
0.04007428,
0.0020791302,
-0.030913655,
0.0011865917,
-0.013374238,
0.037223693,
-0.011824404,
0.050092854,
0.03276792,
-0.02003714,
0.0071749017,
-0.0111532705,
-0.013872399,
-0.017006662,
-0.008012089,
-0.023980916,
-0.0031930734,
0.041402712,
-0.044668432,
-0.051781066,
0.00788063,
-0.030719927,
0.02748188,
0.004659881,
-0.03384727,
0.031107385,
0.017048175,
0.015166234,
-0.019691195,
0.015138558,
-0.01569207,
0.03932704,
0.024880372,
-0.015207747,
0.018556496,
0.050535664,
0.0045111245,
-0.03536943,
0.06968718,
-0.06869086,
0.0005496203,
-0.013298131,
-0.009970138,
0.0030010738,
0.014488181,
0.07201193,
0.044197947,
0.019026982,
-0.050341934,
0.024091618,
-0.025641453,
0.04179017,
0.036974613,
0.021158002,
0.017989146,
-0.006099012,
-0.053746033,
-0.044225622,
0.027052907,
-0.00070053886,
0.09282399,
-0.030111063,
0.020341573,
0.0015896178,
0.0003679991,
-0.018902441,
-0.005566257,
-0.06758384,
0.040295687,
0.053607654,
0.034456134,
-0.02528167,
-0.047795776,
-0.034705214,
0.022154326,
0.019386765,
0.033349108,
0.020825896,
0.0026326424,
0.0098179225,
-0.011713701,
-0.019455953,
0.019455953,
0.02514329,
-0.00023935077,
0.00642766,
-0.030415494,
-0.04688248,
0.01897163,
0.04740832,
0.045554053,
-0.037223693,
0.037970934,
-0.014128398,
0.024050104,
0.04007428,
0.008953059,
-0.005452095,
-0.055295866,
0.041873198,
0.03863515,
0.002400859,
0.005995229,
-0.028754957,
-0.006012526,
0.036504127,
-0.019137684,
-0.021891408,
-0.014930991,
-0.0012903753,
0.03088598,
-0.0061924173,
0.009949381,
-0.044474702,
-0.0044142595,
0.07162447,
0.01178289,
-0.040959902,
-0.026181126,
-0.06492698,
0.010260732,
0.037057642,
-0.044253297,
-0.025253993,
-0.0026741556,
-0.018805576,
-0.0511722,
0.020618329,
0.07068351,
-0.011554567,
-0.017684715,
-0.057952724,
-0.038662825,
0.0035839914,
0.015664395,
-0.009416626,
-0.011616837,
0.014585046,
0.016785257,
0.0056250677,
0.018514983,
0.00058983645,
-0.053441603,
-0.03113506,
0.022929242,
-0.04367211,
-0.002243454,
0.001241943,
-0.0075623603,
-0.017006662,
0.023122972,
0.067141026,
-0.022182,
0.0199126,
0.052223876,
-0.023607295,
-0.06453952,
0.020064816,
0.021019625,
-0.010931865,
0.018805576,
0.015609044,
-0.011561486,
0.033238407,
0.031743925,
0.0036324237,
0.021324057,
-0.010710461,
0.026485559,
0.023538105,
-0.014709586,
0.019386765,
-0.028561229,
0.032740247,
0.017186554,
-0.035341755,
0.0030685333,
-0.05861694,
0.019262224,
-0.0045733945,
-0.005773824,
0.030969007,
-0.012433267,
-0.033321433,
0.0062754443,
-0.022541784,
0.019110007,
0.0008899438,
0.032048356,
0.020189356,
0.034760565,
0.034400783,
0.046910156,
-0.03622737,
-0.0032639923,
0.0004994583,
-0.03617202,
-0.0030218305,
-0.026056586,
-0.02773096,
0.011879755,
-0.028146094,
-0.01581661,
0.01959433,
0.004372746,
-0.028921012,
0.000705728,
0.021351732,
0.005936418,
0.031245762,
-0.00013113482,
0.011001054,
-0.036753207,
-0.07184588,
0.031218087,
0.034317754,
0.0077699274,
0.006770146,
0.011983539,
-0.048127886,
-0.05421652,
-0.06415206,
0.037472773,
-0.00096778147,
-0.017380282,
0.009091438,
-0.06182731,
-0.01783693,
0.02168384,
0.026942205,
-0.04696551,
-0.00019935088,
-0.03437311,
0.026347179,
-0.05526819,
0.00045924215,
0.007147226,
0.036338076,
-0.0074032256,
0.0068670106,
-0.0030564251,
0.00068972807,
-0.01273078,
0.024575941,
0.06171661,
0.0635432,
-0.04411492,
-0.033459812,
-0.0075623603,
-0.009596517,
0.01185208,
-0.008427223,
-0.039935905,
-0.013111319,
0.01191435,
0.0070434427,
0.00025275614,
-0.03218673,
-0.02338589,
-0.013076725,
0.048902802,
-0.0063377144,
0.028505877,
-0.0066490653,
0.07062815,
0.009215978,
0.018708711,
-0.011699864,
-0.012350241,
0.0005180528,
-0.02193292,
-0.0044073407,
-0.022707837,
-0.0144743435,
-0.01739412,
0.00743782,
0.03852445,
-0.040240336,
0.052915763,
0.026471721,
0.020756707,
0.04807253,
-0.05191944,
-0.0076107923,
0.02413313,
-0.017131202,
-0.015263098,
-0.007984413,
-0.050840095,
0.00033426945,
0.0019234548,
-0.057288513,
0.0013837805,
-0.012654672,
0.034649864,
-0.029142417,
0.023745673,
0.0037846395,
-0.023939403,
-0.04001893,
0.038469095,
0.006631768,
0.013851643,
0.045996863,
0.008897709,
0.005559338,
0.0131389955,
-0.026125776,
-0.006787443,
-0.043340005,
0.057343863,
-0.03473289,
-0.032684896,
0.019234547,
-0.005396744,
-0.011609918,
-0.066642866,
0.00958268,
-0.004877826,
-0.020286221,
-0.03484359,
-0.024603616,
-0.043256976,
0.001128646,
0.016107205,
0.049843773,
-0.01594115,
-0.0018784819,
0.0035148023,
-0.034317754,
-0.049760744,
0.022638649,
0.036587156,
-0.025945883,
-0.00296302,
-0.03448381,
0.0037362073,
-0.011333162,
-0.0076799816,
0.041015252,
0.00018367523,
0.018888604,
0.028893337,
0.010025489,
0.073451065,
-0.018362766,
0.017684715,
0.020050978,
-0.030470846,
-0.055544946,
-0.033957973,
0.02023087,
0.01613488,
0.014391317,
-0.001619888,
0.026361018,
0.01184516,
0.02079822,
-0.010475218,
-0.09276864,
0.014405155,
-0.032878622,
-0.010579001,
-0.010385272,
-0.01638396,
-0.01556753,
-0.0024441022,
-0.049068853,
-0.016024178,
-0.03398565,
-0.01285532,
0.022638649,
-0.0077284137,
-0.029419173,
0.015235423,
-0.03844142,
-0.039603796,
-0.006548741,
0.009977057,
0.03572921,
0.004092531,
-0.041873198,
-0.01084192,
-0.027468042,
-0.0045664753,
0.003947234,
-0.0013768616,
-0.028035391,
-0.042343684,
0.012114998,
-0.00012486457,
-0.013339643,
0.060388178,
0.016646879,
-0.049179558,
0.0069811726,
0.028450526,
-0.0023212917,
-0.03423473,
0.009727976,
0.06514838,
-0.009734895,
0.011014893,
-0.0004722151,
0.040544767,
-0.03213138,
-0.022638649,
0.009949381,
-0.033321433,
-0.03636575,
0.0061785798,
-0.014086885,
0.032242086,
-0.033736568,
0.04967772,
-0.0014996721,
0.022361891,
-0.008475656,
-0.023980916,
-0.005144204,
-0.007382469,
-0.01178981,
-0.0272328,
0.05477003,
0.02143476,
0.028699607,
0.03492662,
-0.013242779,
-0.007444739,
-0.023247512,
0.00277275,
-0.0027468042,
0.065812595,
0.02111649,
-0.019829573,
0.001058592,
-0.034705214,
-0.024022428,
-0.0025876695,
-0.07583117,
-0.023621133,
0.016370123,
-0.03586759,
0.023302862,
-0.030166414,
-0.023053782,
-0.006313498,
0.052168522,
0.002879993,
0.015733583,
-0.006005607,
0.015705908,
0.013346562,
-0.034317754,
-0.033238407,
0.0029163172,
0.026610099,
-0.02780015,
-0.040295687,
0.0065694978,
0.0008882141,
-0.014031534,
0.00812971,
-0.06254688,
-0.008683222,
0.007901386,
-0.0018231308,
-0.04790648,
-0.012274133,
-0.065812595,
0.0062270123,
-0.0045803133,
-0.026042748,
-0.019331412,
0.031467166,
0.057011753,
0.020825896,
-0.009748734,
0.025599938,
0.034041,
-0.026637774,
0.04713156,
0.012571645,
0.020784382,
0.010682785,
-0.03152252,
-0.019123847,
0.047103886,
-0.002150049,
0.057454564,
0.029723603,
0.04217763,
0.018611846,
0.014764938,
-0.0249634,
0.014225263,
0.022569459,
-0.0043589086,
-0.0136164,
-0.0272328,
-0.023925563,
0.008039764,
0.013208184,
-0.004891664,
-0.009665706,
0.021268705,
-0.021849893,
-0.017809255,
-0.009215978,
-0.0011416188,
-0.036836237,
-0.013685589,
-0.017006662,
0.01783693,
0.018985467,
0.007430901,
-0.02180838,
0.020092493,
0.03750045,
0.04929026,
-0.011215541,
0.0065867947,
0.05679035,
-0.012184187,
0.024437563,
-0.01796147,
0.03769418,
-0.029695928,
-0.03763883,
-0.052168522,
0.0028021554,
-0.028782634,
0.007790684,
0.007908305,
0.017103527,
-0.030692251,
-0.040378712,
0.030304791,
-0.048321612,
0.0035320995,
0.028422851,
0.030498521,
-0.060277477,
0.034566835,
0.033930298,
0.017075852,
0.034262404,
0.06177196,
-0.024921887,
0.048958153,
0.03932704,
0.038911905,
0.010696623,
0.032795597,
0.008531006,
-0.052832738,
0.0068981457,
0.014598884,
0.03913331,
-0.022915404,
-0.040434066,
0.01569207,
-0.0004644313,
-0.0002724318,
-0.057011753,
0.020300059,
0.020078653,
-0.03896726,
0.008378791,
0.061495204,
0.04336768,
-0.014335966,
-0.06586795,
0.007154145,
-0.034068674,
0.045221943,
-0.019705033,
0.013145914,
0.008683222,
-0.03763883,
-0.039160985,
-0.027869338,
-0.00090205186,
-0.047242265,
-0.04353373,
-0.018058335,
0.015069369,
0.020023303,
0.068082,
0.0046045296,
-0.049151883,
-0.041236658,
0.07107096,
0.04790648,
0.0030737224,
0.046301294,
0.049456313,
-0.0043831244,
-0.04071082,
0.016480826,
0.022873892,
0.012765375,
-0.01203889,
0.05482538,
0.009063762,
-0.012689266,
-0.048293937,
-0.0066456054,
0.004210152,
-0.009610355,
-0.041375037,
-0.0047152317,
0.010558245,
-0.040046606,
0.00017859417,
-0.011340081,
0.017933795,
0.0055074464,
-0.02533702,
-0.022168163,
-0.052140847,
0.22439384,
0.052666683,
0.009340518,
0.02351043,
0.044640757,
0.04801718,
0.037306722,
0.009423545,
-0.00077232247,
-0.029419173,
-0.016480826,
-0.0523069,
0.0044972864,
0.014073047,
-0.026513234,
0.028132256,
-0.020466113,
0.020590654,
-0.017228067,
-0.041015252,
-0.054105815,
0.029861983,
-0.0021673462,
0.058838345,
0.022071298,
0.028367499,
-0.016508501,
-0.056181487,
-0.011360837,
-0.029031714,
0.016522339,
-0.0255861,
0.039244015,
-0.007064199,
0.0147511,
-0.0015048613,
0.023607295,
-0.025627615,
0.015041693,
0.008323439,
-0.017048175,
-0.027869338,
0.028893337,
-0.033874944,
-0.02698372,
0.06315574,
-0.009534247,
0.020189356,
0.032795597,
-0.03606132,
0.010177705,
-0.016176393,
0.006801281,
-0.03409635,
-0.054603975,
-0.023233674,
0.012931428,
-0.029087065,
-0.037389748,
-0.0127169425,
0.0295022,
0.015609044,
0.024548266,
0.10013036,
-0.016466988,
0.013526454,
-0.024160806,
-0.02326135,
-0.021420922,
0.010087759,
0.036697857,
-0.003687775,
0.047934156,
-0.043782815,
-0.007714576,
0.023330538,
0.00031459384,
0.09437383,
0.025682965,
-0.02413313,
-0.011817485,
-0.01827974,
-0.00989403,
-0.03296165,
0.034705214,
0.04342303,
-0.04001893,
0.0046979347,
-0.0077491705,
0.009942463,
0.030609224,
0.0398252,
0.00033643164,
0.065203734,
0.024755832
] |
The key thing to understand is that we can use an iterator, just like you would on a
dataset, since a webserver is basically a system that waits for requests and
treats them as they come in.
Usually webservers are multiplexed (multithreaded, async, etc..) to handle various
requests concurrently. Pipelines on the other hand (and mostly the underlying models)
are not really great for parallelism; they take up a lot of RAM, so it's best to give them all the available resources when they are running or it's a compute-intensive job.
We are going to solve that by having the webserver handle the light load of receiving
and sending requests, and having a single thread handling the actual work.
This example is going to use starlette. The actual framework is not really
important, but you might have to tune or change the code if you are using another
one to achieve the same effect.
Create server.py: |
[
0.029693957,
0.014775046,
-0.022212923,
-0.019306827,
-0.022371175,
-0.024097567,
-0.017609207,
0.024227047,
0.0018558723,
0.06917081,
-0.037606593,
-0.002996011,
0.0153648965,
-0.059387915,
-0.0087398635,
0.0062581743,
-0.039793357,
-0.06560293,
-0.03893016,
-0.0053877844,
-0.0043951087,
0.0040821997,
-0.049547475,
-0.05558985,
-0.03150667,
0.049202196,
0.0046612606,
0.0065782764,
0.058754902,
0.048396546,
-0.0013694252,
-0.01312778,
-0.0075673554,
-0.03213968,
0.028974626,
-0.0398509,
0.02565132,
-0.0026201608,
-0.047389485,
-0.056827098,
-0.004596521,
-0.026269944,
0.011926497,
-0.052309703,
-0.06761705,
0.01552315,
0.027161915,
-0.00401746,
0.03596652,
-0.010610123,
-0.03634057,
0.019220507,
0.021364111,
0.017134449,
-0.038901385,
-0.031564217,
-0.0066070496,
-0.023004185,
-0.04986398,
0.011660345,
0.036139157,
0.012768114,
-0.01539367,
-0.049000785,
-0.0072652367,
0.030643474,
-0.019177347,
0.0062941406,
-0.03875752,
-0.037405178,
-0.038699973,
0.06174732,
-0.023795448,
-0.043735284,
-0.01286882,
0.025205337,
-0.02214099,
-0.019911064,
0.019148575,
0.04664138,
0.015925974,
0.029722732,
-0.0022982606,
0.022961026,
-0.021320952,
-0.033952393,
0.014659952,
-0.018299764,
-0.04761967,
-0.025435522,
-0.008567224,
0.036398116,
-0.012573895,
-0.006736529,
0.0067617055,
0.059100185,
-0.024802512,
0.0036793747,
-0.021551138,
-0.003316113,
0.050554536,
0.09938268,
-0.041145697,
0.009818859,
-0.035678785,
0.008200366,
0.046842795,
-0.035937745,
-0.04376406,
0.021450432,
-0.010257651,
-0.014213968,
0.0314779,
-0.031736854,
-0.02747842,
0.025967827,
-0.0019260071,
-0.016774785,
-0.033434477,
-0.04362019,
-0.009236202,
-0.01857311,
0.043361235,
-0.030988753,
0.0034833574,
-0.05251112,
0.0013046855,
0.046785247,
-0.00049184216,
-0.016717238,
0.016041066,
-0.0012372482,
0.045058854,
0.043390006,
0.0025841943,
-0.0029438594,
0.018803297,
-0.0207311,
0.063703895,
-0.027852472,
-0.010768375,
-0.036685847,
0.044425845,
0.105194874,
0.02837039,
0.00722927,
-0.018501177,
-0.043390006,
-0.021392886,
-0.007883861,
-0.04065655,
-0.0037585013,
0.008020533,
0.028543029,
-0.024471618,
0.027190687,
-0.0040318468,
0.020572849,
-0.003355676,
-0.0055316505,
-0.0003520223,
-0.034067485,
-0.029636411,
0.06318598,
-0.013314805,
0.016026681,
-0.036196705,
-0.030269422,
-0.014875752,
0.0021651844,
0.007912634,
-0.014098875,
-0.0057078865,
0.0008227341,
0.058754902,
-0.015062778,
0.044051792,
-0.008337039,
-0.00968938,
-0.008588805,
-0.004326772,
-0.0032028183,
-0.026974889,
0.018688204,
0.0005718676,
0.0058301724,
0.04341878,
-0.02140727,
0.00006395297,
-0.022500655,
0.038728748,
0.027722992,
-0.041951347,
0.023018572,
-0.050727177,
0.022529427,
-0.032715145,
-0.0048195133,
-0.0109266285,
-0.03044206,
-0.014890139,
0.042929634,
-0.0073407665,
-0.009344102,
0.021738164,
-0.028686894,
-0.000780923,
0.03283024,
-0.026658384,
-0.00060873333,
0.023061732,
0.003102112,
-0.03795187,
0.008703898,
0.038469788,
-0.0032351883,
-0.04206644,
0.04117447,
0.03162176,
-0.002190361,
0.048741825,
0.02573764,
0.0330892,
0.04905833,
-0.0038664008,
-0.01798326,
-0.03274392,
0.011782631,
0.026960501,
0.026068533,
0.01742218,
0.029463772,
0.0041145696,
0.05656814,
0.00979728,
-0.009020403,
0.063588805,
0.01539367,
0.016026681,
0.017134449,
-0.018688204,
-0.011358227,
0.020889353,
0.008689511,
0.023349464,
0.00200873,
-0.028801987,
-0.048108816,
-0.047130525,
0.04252681,
-0.04600837,
0.046065915,
0.011653152,
-0.035333507,
-0.050899815,
-0.03562124,
0.0002258023,
0.036052838,
-0.014976459,
0.0040030736,
0.037433952,
0.0053554145,
-0.00732638,
0.00047475804,
0.027852472,
0.042210307,
-0.009358488,
0.04025373,
-0.028586188,
-0.048626732,
-0.02989537,
-0.033952393,
-0.049000785,
0.0028269684,
-0.054554015,
-0.022975411,
0.047734763,
-0.01628564,
0.044166885,
-0.008157207,
0.00015937664,
-0.0056755166,
-0.004524588,
0.05334554,
0.02658645,
0.0069487314,
-0.06381899,
0.0045893276,
-0.018961549,
0.04281454,
-0.048339,
0.019321214,
0.0003904615,
-0.031823177,
0.0036236267,
0.013012687,
0.0075601623,
-0.0033520795,
-0.009890793,
-0.0045605544,
-0.028183363,
0.008941276,
0.015954748,
0.023781061,
-0.006013602,
0.015163484,
-0.00047970345,
-0.03680094,
0.05829453,
0.012271776,
-0.022184148,
0.030413289,
-0.000002391914,
0.010020272,
-0.0144801205,
0.014134842,
0.059042636,
-0.0049417997,
-0.010272037,
-0.045663092,
-0.018285377,
-0.012861627,
-0.0101065915,
0.013278838,
0.0023216389,
0.038268376,
-0.031218939,
-0.04315982,
0.02747842,
-0.03193827,
0.005049699,
-0.03274392,
-0.013156553,
0.01785378,
-0.005445331,
0.02752158,
-0.042987183,
0.027636673,
0.003139877,
0.04074287,
0.014724692,
-0.012832854,
0.0019385953,
0.06289825,
-0.013005493,
0.011753858,
0.06140204,
-0.07037928,
-0.005247515,
-0.032254774,
-0.031823177,
-0.01942192,
0.037433952,
0.012415642,
0.015825268,
0.038699973,
-0.029952917,
-0.001859469,
0.005074876,
0.037664138,
0.010789955,
0.033779755,
0.027377713,
0.0007233766,
-0.041490976,
-0.012602668,
0.013789563,
0.0259966,
0.07590374,
-0.039505623,
0.030326968,
-0.014242741,
-0.0146095995,
-0.027852472,
-0.010415903,
-0.049403608,
0.03918912,
0.033434477,
0.03645566,
0.0032423816,
-0.047734763,
-0.046929114,
-0.0137248235,
0.035419825,
0.028427936,
-0.012789694,
0.025162175,
0.010545383,
-0.030902432,
-0.008452131,
0.015551923,
-0.0044454616,
0.013638504,
-0.0003227995,
-0.04126079,
-0.031305257,
0.016343186,
0.061459586,
0.047331937,
-0.020500915,
0.05915773,
-0.015566309,
-0.003614635,
0.023421397,
-0.051158775,
0.001379316,
-0.052827623,
0.046152238,
0.0402825,
0.035937745,
0.0063301073,
-0.0092218155,
-0.012271776,
0.019047868,
-0.01691865,
-0.0010969788,
-0.03714622,
0.01835731,
0.01992545,
-0.019752812,
0.0030895239,
-0.051532827,
-0.016458279,
0.038412243,
0.0435051,
0.00013476204,
-0.023694742,
-0.019695265,
-0.025939053,
0.023061732,
-0.016803557,
-0.011638765,
0.009718154,
-0.0479074,
-0.031535443,
0.009603061,
0.07601883,
-0.010243264,
0.0127753075,
-0.060826577,
0.0047295974,
0.03435522,
0.025550615,
0.027794925,
0.004628891,
-0.017738687,
0.00064649817,
0.016558984,
-0.025838347,
-0.006901975,
-0.016400732,
-0.024629872,
0.04235417,
-0.0374915,
0.0011446344,
-0.025723254,
-0.019220507,
0.016429506,
0.03832592,
0.03464295,
-0.020026157,
-0.006959521,
0.038210828,
-0.024500392,
-0.064221814,
0.040886737,
0.014055715,
0.036628302,
0.002488883,
0.0027316571,
-0.026010986,
0.03133403,
-0.007603322,
0.0028953047,
0.003614635,
0.00005167377,
0.043015957,
0.007675255,
0.006103518,
0.018673817,
-0.043390006,
0.038153283,
0.013890269,
-0.018429244,
0.01606984,
-0.07947162,
0.029866597,
0.010279231,
0.013271646,
0.035851426,
-0.0010691048,
-0.010171331,
-0.026658384,
0.0017425778,
0.0072004967,
-0.025435522,
-0.020213183,
-0.0060495683,
0.052079517,
0.032657597,
0.049087103,
-0.047533352,
-0.018155899,
-0.021018833,
-0.041836254,
0.0074522626,
-0.014293094,
-0.003844821,
0.0030103975,
0.0009531127,
-0.0136600835,
0.05504316,
-0.015537536,
-0.030672247,
0.028629348,
0.029636411,
0.008423358,
0.01363131,
-0.030355742,
-0.0048518833,
-0.04108815,
-0.043390006,
-0.008624771,
0.026241172,
0.00094322197,
0.030988753,
0.025536228,
-0.0519932,
-0.036110383,
-0.06514256,
0.03268637,
-0.034499083,
-0.0037477112,
-0.042555586,
-0.036369342,
-0.018716976,
0.023133665,
0.020170024,
-0.06623594,
-0.008070887,
-0.020371435,
0.0040642167,
-0.045548,
0.0007265237,
-0.011401386,
-0.0002403013,
-0.024716191,
0.011667538,
-0.024601098,
0.021191472,
-0.0038520142,
0.024054408,
0.018040806,
0.03124771,
-0.030816114,
-0.0003304424,
-0.004672051,
0.002862935,
-0.02874444,
0.05210829,
-0.024097567,
0.018199058,
0.001180601,
0.0048051267,
-0.018414857,
-0.02552184,
-0.027679833,
-0.008603191,
0.044799894,
-0.015623855,
0.009826053,
-0.004247646,
0.05058331,
-0.004754774,
0.0054705073,
-0.019580172,
-0.017954485,
-0.018558724,
-0.04897201,
0.010077818,
-0.0015348712,
-0.020673554,
-0.02214099,
-0.007862281,
0.06589066,
-0.06548784,
0.043562647,
0.043533873,
0.029550092,
0.05075595,
-0.06888308,
0.031851947,
0.018328538,
-0.027794925,
-0.013811143,
-0.0033035248,
-0.029118493,
0.0030715407,
-0.031161392,
-0.04215276,
-0.0314779,
0.00018174331,
0.036225475,
-0.0109913675,
0.03257128,
0.019076642,
-0.048454095,
-0.061977506,
0.058467172,
0.03400994,
0.0032226,
0.02904656,
-0.008070887,
0.053374313,
0.055561077,
0.014595213,
-0.006959521,
-0.051273867,
0.07147267,
-0.051360186,
-0.040224954,
0.022716453,
0.014300288,
-0.031075072,
-0.0402825,
-0.032110907,
-0.008941276,
-0.027507193,
-0.013667277,
-0.030183103,
0.0096678,
0.017134449,
0.04825268,
0.03464295,
-0.040138636,
-0.004089393,
0.0050173295,
-0.0014962072,
-0.029377451,
-0.0034581807,
0.060078472,
-0.01598352,
-0.011509286,
-0.044425845,
0.0033143146,
-0.06094167,
-0.022874705,
0.051964425,
0.0009243395,
0.0414622,
0.0064200233,
0.03884384,
0.07774523,
-0.019119801,
0.02569448,
0.017364634,
-0.045432907,
-0.030010464,
-0.0423254,
-0.0139981685,
0.011293487,
0.025176562,
-0.004211679,
-0.02671593,
0.0082579125,
-0.002648934,
0.016630918,
-0.08298195,
-0.016774785,
-0.045231495,
-0.028269684,
-0.0033251047,
-0.040167406,
0.017450955,
0.021277793,
-0.041951347,
-0.024572326,
0.010732409,
0.019076642,
0.030154329,
-0.0209469,
-0.04269945,
0.020069318,
-0.06433691,
-0.018170284,
-0.022615748,
-0.018429244,
0.006024392,
-0.0049202195,
-0.025119016,
-0.020285117,
-0.016803557,
0.032887783,
-0.030096782,
-0.002339622,
-0.0021849659,
-0.02688857,
0.0048374967,
0.005546037,
-0.043390006,
0.045893278,
-0.0034887523,
-0.035851426,
-0.006664596,
0.023061732,
-0.013832723,
0.00481232,
-0.009257782,
0.05898509,
-0.015882814,
0.0027802119,
-0.008826183,
0.05029558,
-0.017235156,
-0.016501438,
0.000053809283,
-0.031794403,
-0.0025338412,
0.05216584,
-0.019234894,
0.06548784,
-0.021220246,
0.0064056367,
0.004636084,
0.022774,
0.015897201,
-0.010200105,
0.014710306,
-0.013990976,
-0.00818598,
-0.0018261999,
0.047562122,
0.033520795,
0.013818337,
0.024428459,
-0.015336123,
-0.0036344167,
-0.028658122,
0.022054669,
-0.0020231167,
0.052770074,
0.049115878,
-0.061056763,
0.03849856,
-0.0002913288,
-0.025809573,
-0.00085555355,
-0.048741825,
-0.052280933,
0.046929114,
-0.023248758,
0.03757782,
-0.025047082,
-0.007883861,
0.017781846,
0.019867904,
0.011566833,
0.0061215013,
-0.0038052576,
-0.005337431,
-0.01798326,
-0.046037145,
-0.057949252,
-0.007168127,
0.0439367,
0.002262294,
-0.052770074,
0.019882292,
0.009365682,
0.01865943,
-0.013329192,
-0.036858488,
-0.038239602,
-0.0026561273,
0.016184933,
-0.012602668,
0.019278053,
-0.036570754,
0.026572064,
-0.051878106,
0.022083443,
-0.0042620325,
0.020803034,
0.026428198,
-0.0048195133,
0.009869212,
0.032082133,
0.040167406,
0.020083703,
0.009077949,
0.012099137,
0.011609992,
-0.008380199,
-0.0057186764,
-0.029190427,
0.03714622,
0.0026687155,
0.02662961,
-0.012027204,
0.03918912,
0.01992545,
-0.015897201,
-0.026528904,
0.018155899,
0.030902432,
0.011415773,
0.016386345,
-0.015206644,
-0.022702066,
0.0015906192,
0.0029780278,
0.020026157,
-0.017997645,
-0.005887719,
-0.03167931,
-0.010682056,
-0.014192388,
-0.0036937615,
-0.036858488,
0.02183887,
-0.012991106,
0.03562124,
0.035880197,
0.008768637,
-0.043188594,
0.031190164,
0.024773737,
0.050698403,
0.03536228,
0.018026419,
0.038958933,
-0.024298979,
0.0239537,
-0.04333246,
0.008524065,
-0.0042584357,
-0.024140727,
-0.08833377,
0.02806827,
0.016587758,
-0.0070098746,
0.05397855,
-0.012185456,
-0.026370652,
-0.05225216,
0.016328799,
-0.009840439,
-0.006135888,
0.020414596,
-0.025967827,
-0.068940625,
0.036369342,
0.0056467433,
0.023119278,
0.025680093,
0.07463772,
-0.0050173295,
0.059387915,
0.035506148,
0.015105938,
0.029219199,
0.017148836,
-0.04281454,
-0.030643474,
0.023335077,
0.0005206154,
0.0072076903,
-0.06905571,
-0.04474235,
0.013458671,
0.0071033873,
-0.026831023,
-0.017407795,
0.009610253,
0.027118756,
-0.04574941,
0.03671462,
0.05737379,
0.049547475,
-0.025795188,
-0.042555586,
0.02425582,
-0.031449124,
0.03596652,
-0.029952917,
0.023637196,
-0.033808526,
-0.0306147,
-0.0016787372,
-0.050410673,
0.009049176,
-0.004859077,
-0.045173947,
-0.0042620325,
0.014070102,
0.022874705,
0.048655506,
-0.020759875,
-0.04600837,
-0.026816636,
0.022385562,
0.03570756,
0.012688988,
0.046238557,
0.03024065,
-0.016889878,
-0.04226785,
-0.011149621,
0.03357834,
0.0034635756,
-0.019752812,
0.022428721,
0.0008299274,
-0.0033466846,
-0.07463772,
0.01929244,
-0.020745488,
0.019062255,
-0.00040215062,
-0.021177085,
0.008308265,
-0.06612085,
-0.008977243,
-0.02608292,
0.028039498,
-0.002808985,
-0.016861103,
-0.013983782,
-0.03257128,
0.24652891,
0.05996338,
0.029089719,
0.0116819255,
0.0060711484,
0.030211875,
0.0462961,
-0.03202459,
0.020428982,
-0.0045605544,
-0.02675909,
-0.058438398,
0.050727177,
0.034326445,
-0.044109337,
0.05593513,
-0.050094165,
0.020817421,
-0.008588805,
-0.022932252,
-0.057229925,
-0.006704159,
0.011897724,
0.04574941,
0.037117448,
0.022961026,
0.0029492546,
-0.069516085,
0.0117466645,
-0.031362806,
0.019206122,
-0.0069559244,
0.030355742,
0.015609469,
0.021364111,
0.00008716261,
0.01445854,
-0.03634057,
0.0016184933,
0.02501831,
-0.0005624264,
-0.053115353,
0.031132618,
-0.022702066,
0.007977374,
0.025090244,
-0.03133403,
0.015019618,
0.049461156,
-0.029924143,
0.017709913,
-0.035851426,
0.009926759,
-0.035419825,
0.004089393,
-0.0052007586,
-0.003503139,
-0.025104629,
-0.021320952,
0.021263406,
0.024183886,
0.021939576,
-0.0010376341,
0.0223424,
-0.0241695,
0.016141774,
-0.029952917,
0.033664662,
0.019076642,
0.0018972339,
-0.0009567094,
0.00029537504,
-0.019407533,
-0.04690034,
0.0243853,
0.023867382,
-0.0044058985,
0.038872615,
0.0024816897,
-0.028356003,
0.0009027596,
0.013228485,
-0.025536228,
-0.04160607,
0.062610514,
0.057143603,
-0.016041066,
-0.014746273,
0.007106984,
0.0066574025,
0.018328538,
0.03875752,
-0.025565,
0.020716714,
-0.0065099397
] |
from starlette.applications import Starlette
from starlette.responses import JSONResponse
from starlette.routing import Route
from transformers import pipeline
import asyncio
async def homepage(request):
payload = await request.body()
string = payload.decode("utf-8")
response_q = asyncio.Queue()
await request.app.model_queue.put((string, response_q))
output = await response_q.get()
return JSONResponse(output)
async def server_loop(q):
pipe = pipeline(model="google-bert/bert-base-uncased")
while True:
(string, response_q) = await q.get()
out = pipe(string)
await response_q.put(out)
app = Starlette(
routes=[
Route("/", homepage, methods=["POST"]),
],
)
@app.on_event("startup")
async def startup_event():
q = asyncio.Queue()
app.model_queue = q
asyncio.create_task(server_loop(q)) |
[
0.025067776,
0.008728353,
-0.027153373,
-0.009134638,
-0.018011963,
0.0070151854,
-0.007109985,
0.011653604,
0.0016319109,
0.06430135,
0.013766286,
-0.02317178,
0.039247118,
-0.033884156,
-0.0274784,
0.042687,
-0.02800657,
-0.07226454,
-0.06478889,
-0.010746235,
0.038813747,
0.0045977905,
-0.07291459,
-0.07513562,
-0.028331598,
0.040818088,
0.010949377,
0.0044826763,
0.08678245,
0.04260574,
-0.026110575,
-0.013177172,
0.019298531,
-0.02523029,
-0.023104066,
-0.013312601,
0.00047188296,
-0.022074811,
-0.05595897,
-0.03288199,
0.04184734,
-0.035915583,
0.03724278,
-0.05964262,
-0.046587333,
-0.015195054,
0.022074811,
-0.02298218,
0.008592925,
-0.029523367,
0.009121096,
0.03025468,
0.034155015,
-0.01733482,
-0.019853787,
0.008789296,
-0.035969753,
-0.007191242,
-0.061484445,
0.02177687,
0.023970807,
-0.00043379376,
0.007509499,
-0.07703161,
0.020476757,
0.028033657,
0.015357568,
-0.017497335,
-0.01608888,
-0.033098675,
-0.053873375,
0.005515317,
-0.066089004,
-0.009412266,
-0.024729205,
0.019894416,
0.010136807,
0.0020331172,
0.025555318,
0.047481157,
0.037974093,
0.013922028,
0.013651172,
0.0038935633,
-0.047372814,
-0.039815918,
0.0415494,
-0.029604625,
-0.010143579,
-0.013935572,
-0.0007101521,
0.018729733,
0.027356515,
0.018106762,
0.009229438,
0.02560949,
-0.0012569438,
0.0491063,
0.024837548,
-0.0136444,
0.008430411,
0.088190906,
-0.035211354,
-0.012886002,
-0.055038057,
0.011017092,
0.0050243894,
0.020002758,
-0.050433494,
-0.016264938,
0.011017092,
-0.017104592,
-0.014301227,
-0.017673392,
-0.035482213,
0.011484319,
-0.0047670756,
0.026300173,
-0.045558076,
-0.0075704413,
0.008958582,
0.011951546,
0.018662019,
-0.039084606,
0.0277628,
-0.051408578,
0.0036870353,
0.04553099,
-0.020449672,
-0.015344026,
0.012202089,
0.007793898,
-0.024580235,
0.04634356,
0.019068303,
0.0041373344,
0.0019721745,
0.05883005,
0.051544007,
-0.03835329,
0.004489448,
-0.024526063,
0.006026559,
0.08835342,
-0.019569388,
-0.011849975,
0.019786073,
-0.059100907,
-0.04303911,
0.0044725193,
-0.038895003,
-0.010773321,
-0.021180985,
0.03025468,
0.007888698,
0.0049295896,
-0.017226478,
0.006121359,
-0.018797446,
0.008179869,
-0.009073695,
-0.0113014905,
-0.021004928,
0.05040641,
-0.040249288,
0.021411212,
-0.0207747,
0.0061484445,
-0.0010656513,
-0.0349405,
0.0141387135,
-0.011748404,
-0.016766023,
0.028927483,
0.04859167,
0.048185386,
-0.003940963,
0.003527907,
0.0068696,
-0.007109985,
-0.0024563307,
-0.001278951,
0.033829987,
0.022711324,
0.042659912,
-0.015249225,
-0.021167442,
-0.014341856,
0.009452894,
0.018418247,
0.030715136,
0.057529937,
-0.031717304,
0.027356515,
-0.019786073,
0.00909401,
-0.031988163,
0.013806914,
-0.012764117,
-0.031771477,
0.004442048,
0.0073605278,
-0.024404177,
0.014179342,
-0.012899545,
0.020165272,
0.0026814803,
0.016413908,
-0.047860358,
-0.021004928,
-0.0011731476,
0.009073695,
-0.034913413,
-0.026828345,
0.021966469,
-0.007333442,
-0.032394446,
-0.0067849574,
0.024214579,
-0.007854841,
0.011003548,
-0.0030843792,
0.014626255,
-0.01622431,
0.019203732,
-0.0004130563,
0.006189073,
0.026679372,
0.028494112,
-0.023483265,
-0.012994344,
0.0279524,
-0.0133329155,
0.0473999,
0.015289854,
-0.03087765,
0.04972927,
0.037351124,
-0.03586141,
0.03629478,
-0.017172307,
-0.022602981,
0.008843468,
0.023253037,
-0.014287685,
-0.024444807,
0.009249752,
0.005322332,
-0.028087828,
0.03594267,
-0.005864045,
0.045693506,
0.0053629605,
-0.011538491,
-0.028764969,
-0.017348364,
-0.0025494376,
0.027166914,
-0.042389054,
-0.06170113,
-0.002508809,
0.041711915,
-0.010238378,
-0.043526653,
0.004926204,
0.059100907,
0.023876008,
0.025298005,
-0.046749845,
-0.021858126,
-0.035590556,
-0.019935044,
-0.033044502,
0.017551506,
0.0058234166,
0.026909601,
0.022007097,
-0.024146864,
0.037838664,
-0.0024377091,
-0.014707512,
0.047210302,
-0.01799842,
0.042497396,
0.034398787,
-0.013461572,
-0.018783905,
0.014788769,
-0.031365193,
0.014287685,
-0.019325618,
-0.027112743,
0.0015421896,
-0.0031385506,
0.013278744,
0.0033383074,
0.03791992,
0.037784494,
-0.011958318,
-0.012872459,
0.0077329553,
-0.0036599496,
0.017686935,
0.012120832,
-0.031175593,
0.057313252,
-0.013271973,
-0.02704503,
0.0066901576,
0.007590756,
-0.036592726,
0.035644725,
-0.019569388,
0.045151792,
-0.021086184,
0.04347248,
0.0343717,
-0.028548284,
0.017781734,
-0.020761156,
0.008146011,
-0.008796068,
-0.01622431,
-0.035536382,
-0.007807441,
0.07183117,
-0.058288336,
-0.070531055,
-0.00557626,
-0.020571558,
0.031338107,
-0.011795804,
-0.033017416,
0.0061450587,
-0.006476858,
0.022277953,
-0.014098085,
-0.0126286885,
-0.020734072,
0.023578065,
0.02364578,
-0.034480043,
0.013007888,
0.040628485,
-0.0003696769,
-0.03911169,
0.05758411,
-0.06625152,
-0.0012628688,
-0.015167968,
-0.005491617,
0.023009267,
0.004662119,
0.031771477,
0.023767665,
0.035211354,
-0.047426987,
0.027979486,
-0.01024515,
-0.004723062,
0.037892837,
0.009940436,
0.010658206,
0.026083488,
-0.03949089,
-0.02158727,
0.027871143,
-0.0039138775,
0.08911181,
-0.04547682,
0.030227594,
-0.0011375976,
-0.008992438,
0.016914994,
-0.015669053,
-0.068093345,
0.034832157,
0.011877061,
0.042145286,
-0.006426072,
-0.022413382,
0.035888497,
0.02589389,
0.057096567,
0.018296363,
0.030606793,
-0.0148429405,
-0.0033400003,
-0.0068222,
-0.0018722961,
0.008897639,
0.015154426,
-0.008118926,
-0.008247583,
-0.04680402,
-0.063976325,
0.009947208,
0.027925314,
0.05227532,
-0.021763327,
0.025731375,
-0.041495226,
0.026435602,
0.04417671,
0.021126814,
-0.013515743,
-0.06706409,
0.04222654,
0.06419301,
-0.009859179,
-0.001122362,
-0.01421997,
-0.018987047,
0.007414699,
-0.008728353,
-0.0336133,
-0.054631773,
0.015167968,
-0.0051056463,
0.010780092,
-0.0067781857,
-0.050270982,
-0.0059148306,
0.051435664,
0.032394446,
-0.06316376,
-0.05633817,
-0.06094273,
0.036782324,
0.048645843,
-0.017524421,
-0.047941614,
-0.026367888,
-0.0058606593,
-0.052302405,
0.06365129,
0.06982683,
-0.024620863,
-0.030281765,
-0.02230504,
-0.022602981,
-0.0068865283,
-0.021180985,
-0.010367036,
0.0056507452,
0.015452368,
-0.019420417,
0.0061382875,
0.02498652,
0.0064937863,
-0.019637102,
-0.016698308,
0.005400203,
-0.04715613,
0.006107816,
-0.0026967158,
0.020354873,
-0.008708039,
0.01646808,
0.04474551,
-0.016332652,
-0.009513837,
0.019731902,
-0.040005516,
-0.02302281,
0.03331536,
0.020788243,
-0.017348364,
0.014612713,
0.042064026,
-0.025826175,
0.0487271,
0.037351124,
-0.02336138,
0.029794224,
0.015818024,
0.03423627,
0.027261715,
0.01220886,
-0.012662545,
-0.047210302,
0.055308912,
0.049675096,
-0.003944349,
0.010901977,
-0.040384717,
0.010549864,
0.007827755,
-0.019379789,
0.03629478,
0.0075433557,
-0.01756505,
-0.00081045367,
0.0028152156,
-0.017686935,
-0.023212409,
0.029604625,
0.024106236,
0.047318645,
0.047616586,
0.027844056,
-0.0089247245,
-0.026124118,
-0.0027830515,
-0.023185324,
0.01512734,
-0.009215895,
-0.01699625,
-0.0006098505,
-0.011565576,
-0.010990006,
-0.010421207,
-0.0074620987,
-0.022074811,
0.01690145,
-0.022413382,
-0.007198014,
0.0017326357,
-0.047941614,
0.03250279,
0.0010597263,
-0.062838726,
-0.00425922,
0.034588385,
-0.007969955,
0.05002721,
0.024810463,
-0.047047786,
-0.04691236,
-0.084182225,
0.034019586,
0.002244724,
-0.008972124,
0.016021166,
-0.037269864,
-0.02536572,
0.007739727,
0.0155065395,
-0.014666884,
-0.02379475,
-0.050541837,
0.031148506,
-0.034696728,
-0.0037039637,
-0.009114324,
0.035590556,
0.020937214,
0.036890667,
0.00837624,
0.008775753,
-0.017077507,
0.03767615,
0.052004464,
0.055417255,
-0.05222115,
-0.0040899343,
-0.008118926,
0.0041339486,
0.011599433,
0.004800933,
-0.040140945,
0.016630594,
0.020598643,
0.025000062,
-0.010847806,
-0.03867832,
-0.026841886,
-0.04553099,
0.043255795,
-0.028114913,
0.028060742,
-0.026246002,
0.035211354,
0.005346032,
0.009242981,
-0.02364578,
0.011403062,
-0.023889551,
-0.026394974,
-0.0044691334,
-0.037703235,
-0.000189388,
-0.016251395,
-0.011707775,
0.025582405,
-0.03873249,
0.015303397,
0.069068424,
-0.008315297,
0.01603471,
-0.02857537,
-0.014030371,
-0.012886002,
-0.011369205,
-0.017267106,
0.024444807,
-0.06527644,
-0.021614356,
-0.03567181,
-0.06516809,
-0.010238378,
0.016508708,
0.019284988,
0.01101032,
0.019284988,
-0.019758988,
-0.031229764,
-0.033098675,
0.044447564,
0.017727563,
0.0098320935,
0.0148429405,
0.037974093,
-0.042064026,
0.0083220685,
-0.014003285,
0.015858652,
-0.030850565,
0.05238366,
0.005820031,
-0.009276838,
-0.0013153473,
0.012269803,
-0.044095453,
-0.059588447,
-0.022156069,
-0.004706133,
-0.032475702,
-0.017686935,
-0.032150675,
-0.043797508,
-0.007482413,
0.035319697,
0.05265452,
-0.023848921,
-0.011782262,
0.026083488,
-0.022508182,
-0.05251909,
0.016671222,
0.017483793,
0.0042253626,
0.01828282,
-0.049702182,
-0.017023336,
-0.006040102,
-0.0028541512,
0.024769835,
-0.04347248,
0.025744919,
0.039030433,
0.03025468,
0.059046734,
-0.000668254,
0.028087828,
0.012858916,
-0.035346784,
-0.06419301,
-0.019163104,
-0.006189073,
-0.01459917,
0.011870289,
-0.0052444604,
0.053873375,
-0.008775753,
0.018851617,
-0.010780092,
-0.06635986,
0.018039048,
-0.07383551,
-0.013339686,
-0.026625201,
-0.016278481,
0.0078006694,
0.010224836,
0.0022616524,
-0.028060742,
-0.039870087,
0.011193148,
-0.005894516,
-0.011701005,
-0.015872195,
-0.004039149,
-0.042199455,
-0.029902566,
-0.007915784,
0.0111796055,
-0.0038089207,
0.007820983,
-0.03835329,
0.00093530165,
-0.022034183,
-0.0014964826,
-0.008741897,
0.028304514,
-0.026665831,
0.0048551043,
-0.0057421597,
-0.02566366,
-0.037215695,
0.032259017,
-0.007678784,
-0.04639773,
0.015601339,
-0.00033349218,
0.015709681,
-0.020815328,
-0.0007067664,
0.059913475,
-0.0021837812,
-0.015398197,
0.024756292,
0.020788243,
-0.052735776,
0.026747087,
-0.0015193361,
-0.040520143,
-0.01747025,
0.030958908,
0.033775814,
0.0621345,
-0.016860822,
0.05441509,
0.00016050368,
0.029117083,
0.01737545,
0.0025951446,
0.007482413,
-0.0026188446,
-0.012276575,
0.0017436392,
0.021275785,
0.011626518,
-0.010116493,
0.023036351,
-0.003781835,
0.021506013,
-0.02355098,
-0.014314771,
0.030308852,
0.06446387,
0.02623246,
-0.010116493,
-0.030985992,
-0.05184195,
0.012940173,
-0.015763853,
-0.06825586,
-0.03599684,
0.011166062,
-0.049133383,
-0.006358358,
-0.023334295,
0.0071641565,
0.0034398786,
0.032556962,
-0.006954243,
0.0007203092,
0.0000051843645,
0.025460519,
0.02743777,
-0.03661981,
-0.047806185,
0.0068425145,
0.016589966,
-0.032421533,
-0.029875482,
-0.0064802435,
0.034452956,
0.0029438725,
-0.04284951,
-0.04897087,
-0.0050480897,
0.027600285,
0.042930767,
-0.03962632,
-0.011470776,
-0.050270982,
0.03442587,
0.015587796,
-0.019379789,
-0.03206942,
0.024119778,
0.054929715,
0.00928361,
-0.005190289,
0.03922003,
0.056284,
-0.035617642,
0.05969679,
0.012642231,
0.02422812,
0.032475702,
0.01775465,
-0.004032377,
0.05677154,
0.05758411,
0.032259017,
0.033288274,
0.006595358,
0.023307208,
-0.013685029,
-0.009053381,
0.03410084,
0.023469722,
-0.035048842,
0.010861349,
0.000801143,
0.0037513636,
-0.028467027,
-0.003896949,
-0.016644137,
0.0018316676,
-0.0273836,
-0.01981316,
-0.042497396,
0.020598643,
-0.02895457,
-0.04111603,
-0.010908749,
0.024878178,
0.004729833,
0.010773321,
-0.026557488,
-0.03206942,
0.030688051,
0.033721644,
0.03049845,
-0.00075035734,
0.0076381555,
0.051191892,
0.025717832,
0.015763853,
-0.012175003,
-0.0097305225,
-0.005711688,
-0.027099201,
-0.02398435,
0.018174477,
-0.02398435,
0.004394648,
-0.005119189,
-0.014111628,
-0.021262242,
-0.036755238,
-0.018472418,
-0.070097685,
0.020558015,
0.03672815,
0.039274205,
-0.0415494,
0.046424817,
0.029740052,
0.004939747,
0.0339925,
0.00063355046,
-0.003805535,
0.056825712,
0.05926342,
0.0020060316,
0.024173949,
0.032854903,
-0.026516858,
-0.016969165,
0.03661981,
-0.039138775,
0.013698571,
-0.023605151,
-0.063109584,
0.01986733,
0.04005969,
-0.008349154,
-0.03049845,
0.048510414,
0.004035763,
-0.057042398,
0.009310695,
0.06657655,
0.015371111,
-0.013549601,
-0.045720592,
0.009540923,
-0.006266944,
0.024905263,
-0.03499467,
0.034642555,
0.004475905,
-0.047183216,
-0.051544007,
-0.023659322,
-0.00828144,
-0.028223256,
0.0031724076,
-0.0072318707,
0.021262242,
0.056554854,
0.06338044,
0.011206691,
-0.020463215,
-0.0205851,
0.07383551,
0.0783859,
0.015723225,
0.039247118,
0.047752015,
0.0033637001,
-0.0148429405,
0.03307159,
0.027844056,
0.016576422,
-0.018309904,
0.009229438,
0.013102687,
-0.01618368,
-0.0205851,
0.0064802435,
0.02336138,
-0.013813686,
-0.039003346,
-0.047806185,
0.013935572,
-0.054794285,
0.01019775,
-0.043228712,
0.036159355,
0.011227005,
-0.0345613,
-0.039897174,
-0.0332341,
0.21376002,
0.04504345,
0.031283934,
0.013779828,
0.061592788,
0.06245953,
0.04623522,
0.023727037,
0.012242718,
-0.06560146,
0.0051395036,
-0.026841886,
-0.0064023724,
0.036321867,
-0.02498652,
0.01579094,
-0.040628485,
0.02426875,
0.004797547,
-0.042497396,
-0.06446387,
-0.016725393,
0.006192459,
0.07204785,
0.009920122,
0.0055254744,
-0.0025274304,
-0.058179993,
-0.020232987,
-0.013028202,
0.0338029,
-0.018838076,
0.034452956,
-0.008735125,
-0.002904937,
0.019623559,
0.029117083,
-0.043797508,
0.011640062,
0.00020917323,
-0.028114913,
-0.030660965,
0.014748141,
-0.013441258,
-0.019190188,
0.09095364,
0.005721845,
0.045260135,
0.016576422,
-0.054794285,
0.027640915,
-0.019284988,
0.002476645,
-0.016413908,
-0.071072765,
-0.0147616835,
-0.032665305,
-0.040655572,
-0.044555906,
-0.019027675,
0.00067121646,
-0.012892773,
-0.008335611,
0.065113924,
-0.0057692453,
-0.03819078,
-0.024769835,
-0.0070490427,
-0.021695612,
-0.007170928,
0.035157185,
-0.0053155604,
0.0027610443,
-0.050812695,
0.012276575,
0.0069881,
-0.01661705,
0.075623155,
0.055065144,
-0.03724278,
-0.023483265,
-0.035536382,
0.001989103,
-0.031338107,
0.056554854,
0.024119778,
-0.037838664,
-0.022345668,
-0.005735388,
0.00088874815,
0.027844056,
0.0492959,
0.010685292,
0.014707512,
0.03063388
] | And there you go, now you have a good idea of how to create a webserver!
What is really important is that we load the model only once, so there are no copies
of the model on the webserver. This way, no unnecessary RAM is being used.
Then the queuing mechanism allows you to do fancy stuff like maybe accumulating a few
items before inferring to use dynamic batching: |
[
0.006891322,
0.018357493,
-0.012620777,
0.031138027,
-0.05027978,
0.014537857,
-0.004422355,
0.02169786,
0.0300633,
0.07151289,
0.02030362,
0.045080427,
0.010188119,
-0.025851533,
-0.050395966,
0.007864385,
0.0010002946,
-0.06146275,
-0.01616447,
-0.0104568,
-0.0155254435,
0.02757981,
-0.07459184,
-0.01790727,
0.0075521334,
0.018052503,
-0.0065028225,
0.0029827296,
0.047171786,
0.046561807,
0.008125805,
-0.00017030878,
-0.0040229633,
-0.02967117,
-0.0031134395,
-0.059371386,
0.008532458,
-0.043540955,
-0.02230784,
-0.0063321735,
-0.000009800414,
-0.013187187,
0.024733236,
-0.03781876,
-0.044906147,
-0.00025279677,
-0.01690516,
-0.053097308,
0.004331584,
-0.010507632,
-0.0004969703,
0.039329186,
0.034187928,
-0.0017182919,
0.017529663,
0.04513852,
-0.038225412,
-0.0026868167,
-0.037847806,
0.007149111,
0.014472501,
0.034129832,
-0.016483983,
-0.053533006,
0.009636232,
0.022670923,
-0.008350917,
-0.036192145,
0.012838627,
-0.041362453,
-0.023382567,
0.012918505,
-0.045283753,
-0.035785493,
-0.043889515,
0.008989943,
0.02208999,
-0.007835339,
-0.043947607,
0.0731395,
-0.002361857,
0.022075467,
0.02139287,
0.0063103884,
-0.029830927,
-0.03903872,
0.03991012,
0.013673718,
0.0117639005,
-0.014784753,
0.01267887,
0.018313924,
-0.0059799827,
-0.031312305,
0.003990286,
-0.02030362,
0.00065128074,
0.014443455,
-0.0050250734,
0.01503165,
0.04853698,
-0.014581427,
-0.008786617,
-0.017587757,
0.0072834515,
0.06367029,
0.010907023,
-0.0069784615,
-0.002648693,
-0.03259036,
0.01943222,
-0.0029355288,
0.0021113297,
-0.025372263,
-0.032909874,
-0.010754528,
0.014661305,
0.027042447,
-0.033926506,
-0.061578933,
0.015481873,
0.011226537,
0.018923903,
-0.063379824,
0.012976598,
-0.03363604,
-0.02030362,
0.01773299,
-0.042146713,
-0.0016229826,
0.02945332,
0.0064156824,
0.010188119,
0.013978709,
-0.008459842,
-0.01777656,
0.00553339,
0.0063285427,
0.046910368,
-0.046939414,
-0.014762969,
-0.0030371922,
0.0043025375,
0.10509084,
-0.016847067,
0.0020441592,
0.03215466,
-0.036831174,
-0.031689912,
0.012475544,
-0.024747761,
-0.017587757,
0.0061179544,
-0.0030771312,
-0.02113145,
0.036540706,
-0.000011303806,
0.031138027,
-0.00091360847,
0.009127915,
-0.02444277,
0.049727894,
-0.028131697,
0.015627107,
-0.0033222125,
0.02174143,
-0.0133251585,
-0.040229633,
0.0025016442,
-0.0060162907,
0.023818268,
-0.0126716085,
0.018386541,
0.02675198,
0.05498534,
-0.010856192,
0.036918312,
0.01755871,
0.0039975476,
0.04932124,
-0.024951087,
0.003389383,
0.003367598,
0.05475297,
-0.005602376,
0.0069094757,
-0.01185104,
-0.011996274,
-0.039387282,
-0.027812183,
0.025168937,
0.034333162,
-0.028015511,
0.00011074042,
-0.004897994,
-0.02213356,
-0.009926698,
-0.0044804486,
0.017762037,
-0.05248733,
-0.059719946,
0.023948977,
-0.01015181,
-0.0088519715,
0.011618666,
0.00023237334,
0.03886444,
0.0283205,
-0.0461842,
-0.0035219083,
0.030789467,
0.03476886,
-0.03198038,
-0.010776313,
0.030440906,
-0.00975968,
-0.021073356,
0.016396843,
0.049350288,
-0.0048653167,
-0.007958787,
0.07546324,
0.04435426,
0.014392624,
0.0035618476,
-0.0053736335,
-0.043889515,
0.062392242,
-0.020666704,
-0.009737895,
-0.004578481,
0.025822487,
-0.031864192,
0.0662264,
0.020797413,
0.032183707,
0.07279095,
0.057221934,
0.012337572,
0.02326638,
-0.02509632,
0.008140328,
0.004465925,
0.006778766,
0.007250774,
-0.04464473,
0.003276827,
0.012294002,
0.017224673,
0.07000247,
-0.025154414,
0.060939908,
0.031835146,
0.008873757,
-0.032997012,
-0.02596772,
-0.00056913315,
0.034391254,
-0.037237827,
-0.006949415,
0.0017555079,
0.011059518,
0.018096073,
-0.024718713,
0.0018880334,
-0.01063108,
0.019330557,
-0.002679555,
-0.0008564228,
-0.02357137,
-0.027826708,
-0.02291782,
-0.09294933,
-0.012874935,
-0.03607596,
0.007399638,
0.029003097,
-0.040810566,
-0.03084756,
-0.06384458,
0.023121146,
0.003812375,
0.002688632,
0.0579481,
-0.02008577,
-0.0059581976,
-0.029700218,
0.01424739,
-0.011393555,
0.048914585,
-0.037237827,
0.020419806,
-0.0070292936,
-0.04969885,
-0.018052503,
-0.025299646,
-0.013361467,
0.020710273,
-0.0058057024,
0.02448634,
0.004273491,
-0.021538103,
0.013187187,
0.002841127,
-0.040549148,
0.0031334092,
0.034449346,
-0.012010797,
0.0052356618,
0.026258187,
-0.0063539585,
0.05606007,
0.0026922629,
0.031602774,
-0.025328694,
0.06849204,
0.040287726,
0.027942894,
-0.015017127,
-0.019403173,
-0.018677007,
-0.017747514,
-0.0020205588,
-0.031225167,
0.008372702,
0.02958403,
-0.033781275,
-0.07767079,
-0.0023491492,
-0.04104294,
-0.02426849,
-0.036947362,
-0.013499439,
0.043715235,
0.0026650317,
0.0020441592,
-0.03828351,
-0.027478147,
0.0038414218,
0.037673526,
0.03520456,
-0.031602774,
-0.025982244,
0.054142985,
0.01877867,
0.00535911,
-0.030353768,
-0.05812238,
-0.0017482463,
-0.011161182,
-0.005166676,
0.027202204,
0.006949415,
0.0061542625,
0.01546735,
0.060998,
-0.037586387,
0.017965363,
0.01503165,
0.009810512,
0.00068531977,
0.041188173,
0.0204779,
-0.013448607,
0.011037733,
-0.056089114,
0.01106678,
-0.0030789466,
0.041420545,
-0.058616173,
0.023150194,
0.03215466,
0.0079442635,
-0.02143644,
-0.013499439,
-0.04932124,
0.06355411,
0.012344833,
0.017428,
-0.03032472,
0.00906256,
-0.009752419,
0.0026178309,
0.038661115,
0.022540214,
0.0152495,
-0.00679692,
-0.034042694,
-0.029395226,
-0.047520347,
0.026693886,
0.02213356,
0.00296276,
0.014450717,
-0.024849424,
-0.057890005,
0.029264517,
0.02095717,
0.06628449,
0.045341846,
-0.015220453,
-0.0069675692,
0.008263777,
0.008779355,
-0.009679802,
0.010754528,
-0.02030362,
0.053562053,
0.025038227,
0.016149947,
-0.03982298,
0.01233031,
0.0076174885,
0.032387033,
0.002679555,
0.012780533,
-0.049785987,
0.0627408,
-0.00036716802,
-0.04435426,
-0.00023101177,
-0.037266873,
-0.033490807,
0.05289398,
0.03886444,
-0.047810815,
0.0034710767,
-0.02583701,
0.004004809,
0.026563177,
-0.04714274,
-0.027260296,
-0.043453813,
-0.029859973,
-0.049785987,
0.056960512,
0.08435152,
0.0039721318,
0.0075739184,
-0.037179735,
0.03381032,
-0.021799523,
0.0015839511,
0.010275259,
-0.038109228,
-0.021886664,
0.011669499,
0.01603376,
0.025488451,
-0.058238566,
-0.018183213,
-0.057396214,
0.02535774,
-0.00095309375,
-0.04278574,
-0.01677445,
0.022148084,
0.030905653,
0.025996767,
0.027216727,
0.0031515635,
0.028945003,
0.048507933,
-0.010580248,
-0.01542378,
0.045632314,
0.01106678,
0.021334777,
0.005729455,
-0.014320007,
0.017311813,
0.033258434,
0.0071563725,
0.000762475,
-0.0014477948,
-0.01468309,
0.030876607,
-0.004640205,
-0.0071817883,
-0.006303127,
-0.06152084,
0.07424328,
-0.0047527608,
-0.016454937,
-0.0074177925,
-0.024747761,
0.025633683,
0.0071382183,
0.00032564037,
0.038138274,
-0.020550517,
-0.017428,
0.0049125175,
-0.059109967,
-0.051819254,
0.02714411,
-0.013317897,
-0.03686022,
0.041711014,
0.036395475,
0.028117174,
-0.05393966,
-0.04905982,
0.040374868,
0.010732743,
-0.0030589772,
-0.010754528,
0.0029300826,
0.02762338,
-0.012272216,
-0.0021966542,
0.02374565,
-0.031225167,
-0.011684022,
-0.040055353,
0.023542324,
0.01777656,
0.0031570096,
-0.037586387,
0.04862412,
-0.014218343,
-0.06953772,
-0.013615625,
0.0061324774,
0.02649056,
0.04383142,
0.050918806,
-0.008677692,
-0.03209657,
-0.040113445,
0.010318829,
-0.01084893,
-0.0003778336,
-0.044470448,
-0.045458034,
-0.038835395,
0.02757981,
0.010609295,
-0.07250048,
-0.011531527,
-0.03601787,
-0.0063358042,
0.007907955,
0.01856082,
0.0046946676,
0.0148864165,
-0.0005682254,
0.07197764,
-0.014973557,
0.038922533,
-0.033839367,
0.022220701,
-0.00061451853,
0.07598608,
-0.061404653,
-0.01015181,
0.0024290276,
-0.041507687,
-0.029918067,
-0.033955555,
-0.0352917,
0.024123257,
-0.033142246,
-0.00016474906,
-0.05829666,
-0.041449595,
-0.045283753,
0.02452991,
-0.0045167566,
-0.045254707,
0.01642589,
0.0149154635,
0.057454307,
0.0072652977,
0.010834407,
-0.044499494,
-0.022496644,
-0.01721015,
-0.018618913,
-0.012417451,
-0.020419806,
0.010464062,
-0.026112953,
0.0003519639,
0.0200422,
-0.04322144,
0.016178994,
0.058790453,
-0.02862549,
0.032125615,
-0.08348012,
0.04688132,
0.023643987,
0.011524265,
-0.022322364,
-0.011320938,
-0.01764585,
-0.03340367,
-0.028030034,
-0.031428494,
-0.049001727,
0.0024453662,
0.062798895,
-0.018139644,
0.020332666,
-0.019243417,
-0.030440906,
-0.03930014,
0.01760228,
0.020448854,
0.023498753,
0.047694627,
0.031254213,
-0.0026813704,
0.026897214,
-0.050744526,
0.02357137,
-0.00024757744,
0.06134656,
0.0014350868,
0.013470392,
0.047200833,
0.002813896,
-0.041449595,
-0.049611706,
-0.020840984,
-0.01507522,
-0.014842846,
-0.015757816,
0.006934892,
-0.0008500689,
-0.036714986,
0.004636574,
0.013136355,
-0.033606995,
-0.0017827392,
-0.05725098,
-0.00024122349,
-0.03084756,
0.008162114,
0.0714548,
-0.037354015,
-0.016977778,
-0.08243444,
-0.01124106,
-0.017181104,
0.042117666,
0.04470282,
-0.029032143,
0.029438797,
0.02644699,
0.030789467,
0.07395282,
-0.010180857,
0.0011400817,
0.03468172,
-0.060010415,
-0.05237114,
-0.0028719893,
0.03729592,
-0.012424712,
0.02365851,
0.0044042007,
0.031573728,
0.00048153926,
0.037702575,
0.0026813704,
-0.022641877,
-0.007105541,
-0.004640205,
-0.023513276,
0.0021712384,
-0.023673033,
-0.02060861,
0.003939454,
-0.030382814,
-0.024718713,
-0.007345176,
0.008822925,
-0.013230757,
-0.023861837,
-0.05123832,
0.02104431,
-0.052923027,
-0.0010111871,
-0.024384677,
-0.01529307,
-0.0048762094,
-0.0015276731,
-0.0027993724,
-0.022540214,
0.0257063,
0.034391254,
0.026984353,
-0.014719399,
-0.0030644233,
-0.016919684,
0.041943386,
-0.00514126,
-0.006669841,
0.022670923,
-0.00365988,
-0.035320748,
0.030702326,
0.013317897,
0.007922478,
-0.022641877,
-0.00932398,
0.0440057,
0.0048253774,
0.031341355,
-0.058470942,
0.0034747075,
-0.068259664,
0.014450717,
-0.021029787,
-0.0016311519,
0.031225167,
-0.006560916,
0.034565534,
0.043424767,
-0.020724798,
0.04339572,
-0.01851725,
-0.00222207,
0.025343217,
0.00057594094,
0.0015421965,
-0.012511852,
0.01389883,
-0.013971447,
0.044760913,
0.020710273,
0.015046174,
-0.006735196,
-0.051877346,
0.01259173,
-0.027173158,
-0.012751487,
-0.0038196368,
-0.008038665,
0.0053191707,
0.01681802,
-0.022119036,
0.039968215,
0.0044586635,
0.008009618,
-0.06326364,
-0.037789714,
0.028683584,
-0.021189544,
0.006756981,
-0.0257063,
-0.060998,
0.016019236,
0.020463377,
-0.019199846,
0.01690516,
0.04252432,
0.017747514,
0.012163292,
-0.0309347,
-0.02749267,
-0.007254405,
0.01028252,
-0.0230921,
-0.029235471,
0.0064846682,
0.049350288,
0.023034006,
-0.017965363,
-0.048304606,
0.031225167,
0.0149154635,
0.008735785,
-0.031341355,
-0.0032096568,
-0.053968705,
0.042669553,
-0.0226564,
-0.00066988874,
0.033026062,
0.022990437,
0.026258187,
0.008336393,
-0.027913846,
-0.0016901529,
0.0005968182,
-0.021712383,
0.029947113,
0.019490313,
0.0035146468,
0.009069822,
-0.0033276589,
-0.035349794,
0.048362702,
0.05698956,
0.03656975,
-0.007871646,
0.033839367,
0.0026759242,
-0.02954046,
-0.052284,
0.039503466,
0.01084893,
-0.017820131,
0.06651687,
-0.031108981,
-0.030644234,
0.03584359,
0.0060743843,
-0.005515236,
-0.01346313,
0.0023291796,
-0.013129094,
-0.02422492,
0.030644234,
-0.053039216,
0.0014432563,
-0.004643836,
-0.012649823,
0.02779766,
0.012715179,
0.0095854,
0.01729729,
0.024951087,
0.052109722,
0.013078262,
0.042001482,
-0.026868166,
0.02897405,
-0.017762037,
-0.00035718322,
-0.0757537,
-0.020158388,
-0.0053917877,
0.01198175,
-0.074882306,
0.010703697,
0.02370208,
-0.045719452,
0.0501055,
-0.021334777,
0.0039285617,
-0.005907366,
0.0032169183,
-0.046736088,
-0.008619598,
0.01646946,
-0.019693641,
-0.013971447,
0.0562053,
0.0067243036,
0.01664374,
0.03322939,
0.03381032,
-0.000693943,
0.08475818,
0.029206423,
-0.0020060355,
0.014929987,
0.032357987,
-0.008024142,
0.00044273474,
0.020492423,
0.010057408,
0.038980626,
-0.031196121,
-0.06169512,
-0.005921889,
0.024558958,
-0.009447428,
-0.03322939,
0.030382814,
-0.02431206,
-0.03625024,
0.03601787,
0.08592004,
0.0149009405,
-0.0040411176,
-0.024834901,
0.017050393,
-0.03503028,
-0.026301757,
-0.019679116,
0.015017127,
-0.0011164813,
-0.0270134,
-0.021770477,
-0.024500864,
0.012540898,
-0.030731374,
0.00819116,
-0.0043279533,
0.017224673,
0.023324473,
0.077786975,
0.018851288,
-0.0050468585,
0.026287233,
0.008205683,
0.037615433,
-0.022278793,
0.0570767,
0.021378348,
-0.010042885,
-0.010093717,
-0.008350917,
0.014871893,
0.000023770612,
0.013680981,
-0.00631765,
0.01093607,
-0.058151428,
-0.0309347,
-0.0063684816,
0.02226427,
0.010093717,
-0.013572055,
-0.043947607,
0.010304305,
-0.065994024,
-0.010079194,
-0.042901926,
0.009745156,
-0.013913354,
-0.006869537,
0.00623051,
-0.09254268,
0.2518927,
0.0008854695,
0.035524074,
-0.0044114627,
0.010863453,
-0.008510673,
0.039677747,
-0.043540955,
0.007820815,
-0.017166581,
0.024500864,
-0.016135424,
-0.014087633,
0.0548982,
-0.00089182344,
0.021654291,
-0.043134302,
-0.040810566,
0.032648455,
-0.026476037,
-0.030905653,
0.0283205,
-0.001160959,
0.062101774,
0.04583564,
0.024036117,
-0.00383416,
-0.024718713,
0.0015149652,
-0.010957855,
0.05237114,
-0.01843011,
0.030789467,
-0.014370838,
-0.021029787,
0.009345765,
0.040752474,
-0.030818513,
-0.00374702,
0.01154605,
0.049902175,
-0.011829255,
0.029729264,
-0.028654536,
-0.02274354,
0.0058129644,
-0.024253966,
0.022322364,
0.028015511,
-0.017805606,
-0.008314609,
0.006161524,
0.039677747,
-0.012824103,
-0.07186145,
0.01581591,
0.02505275,
-0.034013648,
-0.022424027,
0.012453758,
-0.013100047,
-0.0030244843,
-0.02387636,
0.010834407,
-0.04243718,
0.0553339,
-0.0322418,
0.011357247,
-0.016411366,
-0.0021512688,
-0.020114817,
-0.021596197,
-0.03459458,
-0.060184695,
0.00037216043,
0.04060724,
-0.027042447,
0.039881073,
0.0025216138,
-0.051993534,
0.0071164332,
-0.02030362,
-0.044557586,
-0.010740005,
0.014654043,
0.037847806,
-0.01572877,
0.009774203,
-0.02256926,
0.028785247,
0.007602965,
0.020579563,
-0.0073960074,
-0.005606007,
-0.008793878
] | Now you can start it with:
uvicorn server:app
And you can query it:
```bash
curl -X POST -d "test [MASK]" http://localhost:8000/
[{"score":0.7742936015129089,"token":1012,"token_str":".","sequence":"test."},] |
[
-0.02341009,
-0.004637713,
0.018550852,
0.010818948,
-0.037015952,
-0.046277087,
0.019193986,
0.0077319033,
0.026640052,
0.051450744,
0.028240742,
-0.013534404,
0.016735783,
-0.047734857,
-0.034357663,
0.008367891,
0.005656009,
-0.028297909,
-0.071573704,
0.011119078,
-0.0101115005,
0.03858806,
-0.06728614,
-0.033014227,
-0.007803363,
0.017836258,
0.040617503,
-0.022509702,
0.07003018,
0.043418713,
-0.003980287,
-0.0058489493,
0.010726051,
-0.023009917,
0.0034568468,
-0.010047187,
0.052822765,
0.012684038,
-0.012119508,
-0.020794677,
0.0013300375,
-0.026668636,
0.044676397,
-0.052136753,
-0.026497133,
-0.04196094,
0.014706338,
-0.013148524,
0.003501509,
0.0026743668,
-0.02654001,
0.020494547,
0.028412245,
-0.03387174,
-0.011797941,
0.028012073,
0.012862686,
-0.0038516598,
-0.046248503,
0.02493932,
0.0068100775,
0.017707631,
-0.0041017677,
-0.05590981,
0.0037659085,
0.03410041,
-0.021023346,
0.019251153,
-0.015420931,
-0.0357011,
-0.037416123,
0.03249972,
-0.018893857,
-0.03532951,
-0.035786852,
0.025039362,
0.00793199,
-0.0041053407,
-0.012248135,
0.04156077,
-0.0009700609,
0.03044169,
0.023553008,
-0.010082916,
-0.030241605,
-0.030298771,
0.028440828,
-0.018279307,
-0.0065028025,
-0.0346435,
-0.004848518,
0.052165337,
0.00796772,
0.0023420807,
0.00022353383,
0.04058892,
-0.038816728,
0.020937594,
-0.0080749085,
0.022795537,
0.019822828,
0.030155852,
-0.029326925,
0.028555162,
-0.017250292,
0.010654592,
0.030813279,
0.008453643,
-0.038559474,
-0.025067946,
0.012326741,
0.01953699,
0.026411382,
0.020537423,
-0.013584426,
0.03364307,
0.014284727,
0.010097208,
-0.021880858,
-0.036329944,
0.04470498,
-0.048935376,
-0.028883876,
-0.032471135,
0.005327296,
-0.0425612,
0.016864412,
0.05325152,
-0.009604139,
-0.018422225,
0.02669722,
-0.0054952255,
0.025825415,
-0.00020611561,
0.0029744962,
0.012977021,
-0.0061705164,
0.030899031,
0.001317532,
-0.049678553,
0.006649294,
-0.0037766276,
-0.0014220414,
0.11239129,
-0.016750075,
0.010654592,
0.040217333,
0.031699374,
-0.04287562,
0.007567547,
-0.027297478,
0.004716318,
0.0072388337,
0.024067516,
-0.006245549,
0.0334144,
-0.0058418033,
0.016221276,
-0.008282141,
0.0054880795,
0.03501509,
0.012691184,
0.0036908763,
0.032671224,
-0.034500584,
0.033757403,
-0.043132875,
-0.008732335,
-0.028440828,
-0.012248135,
0.015378056,
-0.012755497,
-0.019637033,
-0.027140267,
0.035186592,
0.029255465,
0.027211728,
0.0037337518,
-0.019422656,
0.026354214,
-0.00881094,
0.00587396,
-0.00059802557,
0.07003018,
0.031756543,
-0.0037158872,
-0.010411629,
-0.011797941,
-0.05408045,
-0.031070532,
0.03067036,
0.008575124,
-0.03067036,
0.02578254,
-0.0005037885,
-0.0003863272,
-0.042361114,
-0.03592977,
-0.024281893,
-0.07814796,
-0.028497996,
-0.010676029,
-0.014320457,
0.047792025,
-0.028669499,
-0.03807355,
0.025010778,
0.051936667,
-0.0031638634,
0.008896691,
0.020866135,
0.011340601,
-0.052365426,
0.009389761,
-0.00495928,
0.02868379,
-0.015020759,
0.03381457,
0.017864842,
-0.008610854,
-0.0052665556,
0.021094805,
0.013441507,
-0.002424259,
-0.021294892,
-0.02861233,
0.00028405097,
0.0062526944,
0.025196573,
-0.0016801883,
-0.017135955,
0.04007441,
-0.020323044,
0.09678457,
0.0025725372,
0.007338877,
0.0379878,
0.06825799,
-0.0031424256,
0.028983919,
-0.01586398,
0.061283555,
-0.0030405961,
0.018279307,
0.001686441,
-0.003626563,
0.035986938,
-0.01915111,
0.0018382922,
0.0062562674,
-0.008660875,
0.035386678,
0.006213392,
0.01399889,
-0.020580297,
-0.051536497,
-0.01693587,
0.019008191,
-0.04178944,
-0.008868108,
0.0033961064,
0.018450808,
0.0009718474,
-0.0019472678,
0.025896875,
0.017879134,
0.034529164,
0.000020781836,
-0.0018561571,
-0.02891246,
-0.02562533,
0.0046841614,
-0.03958849,
0.000030119007,
-0.05279418,
0.00030392563,
0.048906792,
-0.06254124,
0.00858227,
-0.041932356,
-0.0010057905,
0.020122958,
0.00796772,
0.018893857,
-0.014906424,
-0.0060847653,
-0.0096327225,
-0.003951703,
0.01716454,
0.050507482,
-0.05385178,
-0.021309184,
-0.00071146735,
-0.005327296,
0.011597855,
-0.029169714,
-0.001376486,
0.013984598,
-0.0029119693,
-0.031242035,
-0.028841,
-0.0069351317,
-0.0068743913,
-0.03784488,
-0.031384952,
0.023038499,
0.016035482,
-0.034843586,
0.015220845,
0.048935376,
-0.029355507,
0.0051665124,
-0.033585902,
0.022338198,
-0.04584833,
0.044647813,
0.025825415,
0.009125361,
-0.02905538,
-0.04310429,
0.003095977,
-0.0099471435,
-0.019279737,
-0.031985212,
-0.02258116,
0.00020276595,
0.026797263,
-0.07265989,
0.035672516,
-0.03607269,
-0.003748044,
-0.025353784,
-0.024067516,
0.046562925,
-0.0008548327,
0.040417418,
0.0051379283,
0.007760487,
-0.044304807,
-0.002638637,
0.029584179,
-0.044819314,
-0.014627732,
0.02326717,
0.0037837734,
0.014834965,
0.00059087964,
-0.03392891,
-0.01510651,
-0.036444277,
-0.060540374,
0.027468981,
0.01830789,
0.05096482,
0.012176676,
0.04676301,
-0.04104626,
0.010690321,
0.026268464,
0.022152403,
0.038416557,
0.021023346,
0.048735287,
-0.024439104,
-0.039331235,
-0.07031602,
0.003095977,
-0.007953428,
0.08032033,
-0.02966993,
0.035358094,
0.015778229,
-0.03895965,
0.04662009,
-0.017007329,
-0.009889976,
0.04461923,
0.009868539,
0.027669067,
-0.048306532,
0.0027404667,
-0.017993469,
0.01906536,
0.066771634,
-0.02045167,
0.061969563,
-0.028655207,
-0.0051629394,
-0.010490235,
-0.02379597,
-0.014992176,
-0.005956138,
0.0061204946,
-0.022295322,
-0.0080677625,
-0.06825799,
0.01862231,
0.018650895,
0.010547402,
0.022166695,
0.0033157147,
-0.022852706,
0.058768183,
0.037644796,
-0.019279737,
0.019779952,
-0.020794677,
0.020122958,
-0.0053951824,
-0.015406639,
-0.043475877,
0.0028405099,
-0.024767816,
0.027969196,
-0.009203967,
0.022866998,
-0.011297726,
0.018179262,
0.034500584,
0.027025932,
0.021795107,
-0.028340785,
-0.027283186,
0.013227128,
0.076775946,
-0.067571975,
-0.03172796,
-0.028026363,
0.04018875,
0.045591075,
-0.011926568,
-0.03807355,
-0.029412676,
-0.0033603767,
-0.069973014,
-0.0030673933,
0.0518795,
-0.043218624,
0.008360746,
-0.038273636,
0.02120914,
0.012383908,
0.015578142,
0.0043268646,
-0.00024005881,
-0.028126407,
0.019051068,
-0.007881968,
-0.00999002,
-0.03044169,
0.031041948,
-0.079977326,
0.016564282,
-0.055595387,
-0.017793382,
-0.027283186,
0.00085215294,
0.0026815129,
0.03281414,
-0.036044106,
-0.00033474248,
-0.00130592,
-0.010518819,
-0.044590645,
-0.05630998,
0.018050635,
-0.0031388528,
0.0068386616,
0.03204238,
-0.0061204946,
-0.05339444,
0.040388834,
0.0115192495,
-0.00024162198,
0.015878271,
-0.051765166,
-0.0034675659,
0.0020383785,
0.010718905,
0.0016792951,
-0.047649104,
0.040703256,
0.04104626,
-0.05933986,
-0.011376332,
-0.060311705,
0.009811371,
-0.006549251,
-0.005309431,
0.049249794,
-0.014327603,
-0.012962729,
0.003958849,
-0.034386247,
0.0024474834,
-0.009975728,
-0.012512535,
-0.0032531878,
0.019279737,
0.039988663,
0.015606726,
0.008589416,
-0.053137187,
-0.000059791393,
-0.010861823,
-0.04127493,
-0.056595817,
-0.010883261,
-0.0148063805,
-0.01632132,
-0.031156285,
0.023524424,
0.0021455674,
-0.010125793,
-0.005530955,
0.043990385,
0.05439487,
-0.020108666,
-0.043247208,
0.010740343,
0.006645721,
-0.057253245,
-0.039759994,
0.022709787,
-0.01937978,
0.042646952,
0.024467688,
-0.03470067,
-0.01945124,
-0.0189939,
0.0037373248,
-0.023781678,
0.007853384,
-0.027511856,
-0.048335116,
-0.023052791,
0.011019034,
0.04073184,
-0.017593296,
-0.0070494665,
-0.013627301,
0.01106191,
-0.050564647,
0.0029101828,
-0.029612761,
0.011104786,
-0.0020741082,
0.0144991055,
0.00743892,
-0.0276119,
-0.022238156,
0.024153266,
0.015706768,
0.0736889,
-0.053451605,
-0.0357011,
-0.009404053,
0.009246842,
-0.00923255,
0.028355077,
-0.07734762,
-0.0063634566,
-0.014541981,
0.008174951,
-0.010032895,
0.015049343,
-0.008632291,
-0.0083821835,
0.035043675,
-0.014077495,
0.024396228,
-0.0049378425,
0.04899254,
0.0034514875,
0.011948006,
-0.010232981,
-0.034500584,
-0.05207959,
-0.054366287,
0.02806924,
-0.017807674,
-0.016521405,
0.0005247797,
-0.011640731,
0.027168851,
-0.017979177,
0.034672085,
0.09192533,
0.014749213,
-0.022138111,
-0.032985643,
-0.011855109,
0.0099471435,
0.00042205688,
0.015692476,
0.0025636049,
-0.023295755,
-0.0012040903,
-0.0052915663,
-0.051622245,
-0.047248933,
-0.0032442552,
0.02159502,
-0.000548004,
0.03770196,
-0.0077533415,
-0.05951136,
-0.010218689,
0.005630998,
-0.03318573,
0.0014550914,
0.032671224,
0.05042173,
-0.0033818146,
0.021352058,
-0.02929834,
0.012962729,
-0.038416557,
0.04699168,
0.00042362005,
-0.013498674,
0.0011755066,
0.012240989,
-0.06339875,
-0.045876913,
-0.007774779,
0.0053594527,
-0.019351197,
-0.05079332,
-0.0015578142,
0.008310724,
-0.018050635,
0.0018758083,
-0.0017364626,
0.013648739,
0.0076604444,
-0.011712191,
0.00264221,
-0.016335612,
0.00018925566,
0.06608562,
-0.016392779,
0.0035318793,
-0.040617503,
0.0027386802,
0.018207846,
-0.019008191,
0.05265126,
0.026297048,
0.057396162,
-0.0037909194,
0.02196661,
0.040160164,
-0.024553439,
0.008753773,
-0.016006898,
-0.032899894,
-0.04973572,
-0.02623988,
-0.015349472,
0.0059418464,
-0.0016891208,
-0.019408364,
0.063913256,
0.009589847,
0.004755621,
-0.021309184,
-0.049249794,
0.02235249,
-0.06728614,
-0.005427339,
0.016892994,
-0.012834102,
-0.020637466,
-0.0036873033,
0.007960574,
-0.036444277,
-0.059397027,
0.027797693,
-0.013905993,
0.0051307827,
-0.0011746134,
-0.021294892,
-0.039559904,
-0.01732175,
-0.055252384,
-0.01563531,
0.015535266,
-0.010054333,
-0.032842726,
-0.006338446,
-0.041875187,
0.0016757222,
0.010811802,
0.010540256,
-0.008332162,
-0.008725189,
0.011619293,
0.032785557,
-0.00793199,
0.015378056,
0.019279737,
0.014006036,
0.00027869153,
-0.053823195,
0.0021009054,
-0.03867381,
0.0106403,
0.0070387474,
-0.0024456969,
0.007488942,
-0.015306597,
0.0098042255,
-0.037587628,
-0.00093343796,
0.018436518,
-0.01464917,
0.030470274,
-0.018836688,
0.033214312,
0.05828226,
-0.038730975,
0.005881106,
0.011090494,
0.022638328,
0.024653481,
0.008618,
-0.006542105,
0.011276288,
0.00061321066,
-0.0022241727,
0.050507482,
-0.019193986,
-0.019494114,
0.0334144,
-0.014734921,
-0.022138111,
-0.04050317,
-0.017264582,
0.00793199,
0.045962665,
0.051850915,
-0.011333455,
0.0010611716,
-0.0050593233,
-0.015092218,
0.03996008,
-0.0782623,
-0.0423897,
0.04350446,
-0.037673377,
-0.011847963,
-0.019165402,
-0.00070298155,
0.015992606,
0.011597855,
0.004719891,
0.0043590213,
0.04653434,
0.04287562,
0.024896443,
-0.03713029,
0.017278874,
0.030727528,
0.042075276,
-0.05613848,
-0.050764736,
-0.013470091,
0.030984782,
0.0005582763,
0.009682744,
-0.027025932,
0.031299204,
-0.0060275975,
0.042246778,
-0.011319164,
0.004498367,
-0.025668204,
0.028283618,
-0.011004742,
0.013920285,
-0.038187888,
-0.0076532983,
0.0346435,
0.00851081,
-0.0425612,
0.041475017,
0.029698513,
-0.04499082,
0.0717452,
0.00079632533,
0.049507048,
0.013734491,
-0.030870447,
0.034586333,
0.011269142,
0.009982874,
0.081692345,
0.012305303,
-0.00953268,
0.011619293,
-0.010697467,
-0.044361975,
0.0179363,
0.004948561,
0.012319595,
0.00858227,
-0.007996303,
-0.0025332347,
-0.009668453,
-0.0017400356,
0.015535266,
-0.0088538155,
0.018879564,
-0.05165083,
-0.021537853,
0.06848666,
0.004180373,
0.0033103551,
-0.0060669,
0.0065849805,
0.02966993,
0.045819744,
0.013427215,
-0.0031888743,
0.049707137,
0.04676301,
0.013827387,
0.009103923,
0.0048163612,
0.019737078,
-0.037873466,
0.027969196,
0.022981333,
0.024724942,
0.016121233,
-0.048792455,
-0.027969196,
0.019665617,
-0.0018990327,
0.0013755928,
-0.008167806,
-0.010397338,
0.012126654,
-0.05196525,
0.03790205,
-0.019808536,
-0.009997166,
0.066428624,
-0.027569024,
-0.029841432,
0.024038931,
-0.01654999,
0.0070994883,
0.026368506,
0.057196077,
0.038502306,
0.096613064,
0.04156077,
-0.007960574,
0.0042446866,
0.016049774,
0.005427339,
-0.02341009,
-0.013527258,
-0.023853136,
0.012341033,
-0.016764367,
-0.035043675,
-0.004716318,
0.032070965,
0.007453212,
-0.030556025,
0.016235568,
0.032899894,
-0.051622245,
0.042646952,
0.039016813,
0.022681203,
-0.004066038,
-0.025282323,
-0.016449947,
0.0036730114,
0.032556888,
0.014441938,
0.021552145,
-0.045248073,
-0.020094374,
0.001317532,
-0.041818023,
0.0057060304,
-0.012112362,
0.000029169936,
-0.021852275,
0.037044536,
0.02402464,
-0.014220414,
0.048849624,
-0.025968334,
-0.012726913,
0.048563786,
0.033300065,
-0.022695495,
0.027197435,
-0.01616411,
0.03884531,
0.022866998,
-0.013848825,
0.0033103551,
0.00021181002,
-0.013248567,
0.007574693,
-0.01762188,
-0.055738308,
-0.010754635,
-0.023124252,
0.04521949,
-0.016464239,
-0.0064599267,
-0.10118646,
-0.045505326,
-0.045448158,
-0.0023599456,
-0.056024145,
0.008675167,
-0.004719891,
-0.010590279,
0.0013568348,
-0.04633425,
0.2444482,
0.043761715,
0.028798126,
0.013520112,
0.036501445,
0.080549,
0.033671655,
-0.028326493,
0.0132414205,
-0.062083896,
0.03547243,
-0.056395732,
0.027869154,
0.05279418,
-0.0184651,
0.062426902,
-0.06820082,
-0.03058461,
0.03607269,
-0.054137617,
-0.047048848,
0.030384524,
0.007903406,
0.05508088,
0.012526827,
0.022095237,
0.0066421484,
-0.03615844,
-0.021680772,
-0.028469412,
0.04782061,
-0.05651007,
0.042075276,
-0.0034764982,
0.024925027,
0.022238156,
-0.0009316515,
0.017579004,
0.025496703,
-0.022652619,
-0.020737508,
0.0021759376,
-0.03158504,
-0.052051004,
-0.035072256,
0.081292175,
-0.013841679,
0.06465644,
0.026911598,
-0.07168803,
0.049678553,
0.0016185547,
0.021066222,
-0.014356187,
-0.025825415,
-0.01663574,
0.0025761102,
-0.005523809,
-0.009711328,
0.019637033,
0.03510084,
0.044962235,
-0.033442985,
0.03610127,
-0.037101705,
0.0074746497,
-0.014270436,
-0.0043661674,
-0.036501445,
-0.016178401,
-0.047277518,
-0.0020955459,
0.031842295,
-0.054051865,
0.03295706,
0.039988663,
0.0071673747,
0.063913256,
0.06088338,
-0.008875254,
0.012240989,
-0.015735352,
-0.003158504,
-0.021909442,
0.046877343,
0.050164476,
-0.06345592,
-0.017007329,
-0.039474156,
-0.012669746,
0.0025260886,
0.04036025,
0.008525102,
0.026797263,
-0.03455775
] | The code sample below is intentionally written like pseudo-code for readability.
Do not run this without checking if it makes sense for your system resources! |
[
-0.0029100054,
-0.009080972,
-0.031293526,
0.032170914,
-0.03307755,
-0.024932457,
0.016918976,
-0.015354299,
0.02703819,
0.0960448,
0.011903238,
-0.022095568,
0.016714253,
-0.037172027,
-0.053783916,
0.010528662,
-0.025093311,
-0.055948142,
-0.05910674,
0.0053118565,
0.031849205,
-0.009592782,
-0.04913376,
-0.05603588,
-0.04179294,
0.025985325,
-0.004375975,
0.0046501593,
0.05755669,
0.044278875,
-0.02373336,
-0.014835178,
0.008569161,
-0.051824417,
0.00042749842,
-0.019668126,
0.005607975,
-0.030006688,
-0.046062898,
-0.06785138,
0.010835748,
-0.036967304,
0.007808758,
-0.042641085,
-0.067324944,
-0.042494852,
0.00011218692,
0.019799735,
0.0257806,
-0.007808758,
-0.038283385,
0.048665818,
0.024113562,
-0.025532007,
-0.020399284,
0.025795223,
-0.00039551032,
0.008971298,
-0.039570224,
-0.027520753,
0.015924603,
-0.031030308,
0.005180248,
-0.065219216,
0.0019558454,
0.03623615,
-0.00071196427,
-0.011040472,
-0.0021422904,
-0.062704034,
-0.04313827,
0.043459978,
-0.051824417,
-0.03205393,
-0.009987606,
0.03825414,
0.023323912,
-0.0057907645,
-0.015134952,
0.07592335,
0.008225517,
0.026628742,
0.019068578,
-0.01102585,
-0.0070008296,
-0.055363216,
0.03968721,
-0.009037102,
-0.021276671,
-0.013168139,
0.013650703,
0.017825611,
-0.0017812815,
0.005260675,
0.015325054,
0.013672638,
0.010652959,
-0.0067485804,
-0.008517981,
-0.007348129,
0.001432154,
0.09118991,
-0.038517356,
0.031585988,
-0.062236093,
0.029948195,
0.046121392,
-0.005673779,
-0.06878726,
0.0019119759,
-0.003072688,
-0.00017056524,
-0.0029776373,
-0.030884076,
-0.04234862,
0.04044761,
-0.025444267,
-0.007198242,
-0.009300319,
-0.046618577,
0.021525266,
0.020808732,
0.057351965,
-0.0063647227,
-0.0062002125,
-0.036645595,
0.01917094,
0.047174256,
-0.023089942,
-0.04746672,
-0.0018269789,
0.023016825,
-0.003853198,
0.037639968,
0.029743472,
0.010857684,
-0.0063318205,
0.021115817,
0.046706315,
-0.0409448,
-0.010726075,
-0.023952708,
0.019244056,
0.09779958,
-0.0033870854,
0.008108532,
0.012415048,
-0.003017851,
-0.027886333,
0.009395369,
-0.051064014,
0.018191189,
-0.035388004,
0.008503357,
0.004873162,
0.02075024,
-0.016114702,
0.033486996,
0.0037654592,
0.018717622,
0.026263164,
0.0107772555,
-0.051034767,
0.019229433,
-0.033574734,
0.0068107285,
-0.032638855,
-0.02075024,
0.02507869,
0.012056781,
0.023046073,
-0.023908837,
0.01912707,
0.022870595,
0.06235308,
0.03527102,
0.027140552,
-0.035066295,
-0.0017191331,
0.0036375066,
-0.019492649,
0.029290155,
0.009965671,
0.002352498,
0.022154061,
0.014016282,
0.011873991,
-0.0120348465,
-0.0021623971,
0.00197778,
0.030884076,
0.04597516,
-0.019799735,
0.02904156,
-0.04462983,
-0.0048987526,
-0.03810791,
0.031118046,
-0.014213694,
-0.011537659,
-0.016641136,
0.03834188,
-0.03983344,
0.022826726,
-0.013014597,
0.01577837,
0.023046073,
0.03047463,
-0.03644087,
-0.0139870355,
0.02247577,
0.008474111,
-0.056240607,
0.006682776,
0.021613004,
-0.016699629,
-0.037815444,
0.036499362,
0.025049442,
-0.010455547,
0.014645077,
0.021013455,
-0.016392542,
0.0054434645,
0.006313542,
-0.030591615,
0.010089968,
-0.0036119162,
0.021159686,
0.021232802,
0.022080945,
0.0397457,
-0.0040469547,
0.043752443,
0.02991895,
-0.017942596,
0.029933572,
0.026204672,
0.011376805,
0.020867225,
-0.025371151,
-0.0013416733,
-0.021978583,
-0.004010397,
0.0035552515,
-0.0069715832,
-0.0076479036,
-0.013372864,
-0.055626433,
0.04834411,
-0.055363216,
0.057117995,
0.011910549,
-0.035154033,
-0.04919225,
-0.013753065,
-0.020735616,
0.018118074,
-0.048373356,
0.000035158377,
0.032492623,
0.024157431,
-0.017942596,
-0.016129326,
0.03872208,
0.042202387,
0.026497133,
0.027974071,
-0.016962845,
0.014228318,
-0.04635536,
-0.007183619,
-0.024493763,
-0.011318312,
-0.031469002,
0.03234639,
0.033340763,
-0.015617516,
0.024654618,
-0.0067632035,
-0.016319428,
0.0020381005,
-0.04992341,
0.04650159,
-0.0051071323,
-0.051385723,
-0.027652362,
-0.017752495,
-0.031849205,
0.039336253,
-0.003240854,
0.0065182657,
-0.014696258,
0.0072932923,
0.025122559,
0.012575902,
0.015295807,
0.016100079,
-0.0069862064,
0.0027180766,
0.010462859,
-0.020062951,
0.013190075,
-0.0041346936,
-0.026233917,
0.051151752,
-0.003630195,
-0.019931342,
0.028208042,
0.041208014,
-0.030679353,
0.042962793,
-0.03392569,
0.01367995,
-0.02354326,
0.031059554,
0.010411677,
-0.012524721,
0.00484026,
-0.04384018,
-0.00055019575,
-0.012824496,
-0.008408307,
-0.03997967,
-0.033428505,
0.07937442,
-0.05779066,
-0.064634286,
0.010411677,
-0.04708652,
-0.0044235005,
0.043167517,
-0.021086572,
0.03275584,
0.0058675357,
0.03132277,
-0.019331794,
0.022636624,
-0.025181051,
0.037756953,
0.028953822,
-0.033545487,
-0.0007133352,
0.031439755,
-0.008137778,
-0.0054142186,
0.073115714,
-0.056299098,
-0.0046794056,
-0.01842516,
-0.026131555,
0.048285615,
-0.0108649945,
0.014447665,
0.039774947,
0.070191085,
-0.05501226,
0.027930202,
-0.01917094,
0.038517356,
0.041822188,
-0.00090252206,
0.013658015,
0.02456688,
-0.026672611,
-0.05626985,
-0.017942596,
0.033340763,
0.042962793,
-0.030182166,
0.014096709,
-0.018454406,
0.014316056,
-0.019156316,
0.0023908839,
-0.024610749,
0.04620913,
0.015091083,
0.027798593,
0.015617516,
-0.023104565,
-0.016407166,
0.0013398454,
0.0322879,
0.021188933,
0.037113536,
0.009271072,
0.030650107,
-0.011420674,
0.0030288184,
0.016246311,
0.004708652,
0.03793243,
-0.035592727,
-0.046238378,
-0.026365526,
0.028705228,
0.054778293,
0.03629464,
-0.023353158,
0.04889979,
-0.02782784,
0.03085483,
0.034335136,
0.02676035,
-0.019785112,
-0.052555572,
0.051151752,
0.033340763,
0.02997744,
0.0014248424,
0.002352498,
0.025371151,
0.008832378,
-0.040886305,
-0.040272135,
-0.013475225,
0.01940491,
-0.015749125,
-0.0009258277,
-0.019814357,
-0.05784915,
0.013833493,
0.032785084,
0.041208014,
-0.028222665,
0.0009971155,
-0.0075382297,
0.009563535,
0.03951173,
-0.0083936835,
-0.055948142,
-0.006613316,
-0.033340763,
-0.101484604,
0.038605094,
0.061358705,
-0.059516188,
-0.013358241,
-0.054895278,
-0.022505015,
0.030299151,
-0.008013482,
-0.023806475,
-0.014111333,
0.015325054,
0.0028058155,
-0.0038239518,
-0.028968444,
-0.015515154,
-0.00089978025,
-0.0570595,
0.040418364,
-0.062704034,
0.006854598,
-0.008942052,
-0.0064524617,
-0.010397054,
0.007845316,
0.050800797,
-0.019565765,
-0.038692836,
0.03626539,
0.0019412221,
-0.03626539,
0.016217064,
0.025561253,
-0.0022885217,
0.03281433,
-0.0057871086,
-0.031001061,
0.041383494,
0.026394771,
-0.014403795,
-0.002999572,
-0.0111647695,
0.013116959,
0.0075236065,
0.015676009,
0.014652388,
-0.08458026,
0.05469055,
0.033428505,
-0.020837978,
0.009351499,
-0.04369395,
0.032375637,
0.0015948365,
-0.009782882,
0.058200106,
-0.011998288,
-0.0113841165,
-0.006510954,
-0.012875677,
-0.044659078,
0.009717078,
0.0080427285,
0.002301317,
0.032872822,
0.05492452,
-0.0037234176,
-0.012276128,
-0.021803105,
-0.0044783372,
-0.012700199,
0.0066571855,
-0.018205812,
-0.041997664,
0.019419532,
0.015983095,
-0.020501645,
0.033106793,
0.0102362,
-0.01987285,
0.012254193,
-0.0025371152,
-0.011837434,
0.01722606,
-0.04038912,
0.0094319265,
-0.019039331,
-0.04620913,
0.025941454,
0.05612362,
-0.015836863,
0.030884076,
-0.023294665,
-0.031761464,
-0.040593844,
-0.05281879,
0.055831157,
-0.029655732,
0.0056372215,
-0.04386943,
-0.055860404,
-0.053579193,
0.004244367,
0.036704086,
-0.05123949,
-0.0024603438,
-0.04699878,
0.046647824,
-0.037025798,
0.0120056,
-0.008510669,
0.014740127,
0.02447914,
0.017430786,
-0.023762606,
0.028032564,
-0.0061051617,
0.040827814,
0.020501645,
0.05492452,
-0.033896443,
-0.013921231,
-0.0019320827,
0.018001089,
0.016772743,
0.011369493,
-0.022812102,
-0.026482511,
0.0072092093,
0.0204724,
-0.014301433,
-0.018878477,
-0.013562964,
0.00020106821,
0.059720915,
0.002727216,
-0.00039710972,
0.027169798,
0.027842462,
-0.0171237,
0.019799735,
-0.013445979,
0.013957789,
-0.027301406,
-0.035855945,
-0.00535207,
-0.0046574706,
-0.008269387,
0.02341165,
-0.026731104,
0.07294023,
-0.05311125,
0.026409395,
0.06077378,
0.005439809,
0.026116932,
-0.053871658,
0.012436982,
0.009563535,
-0.03164448,
-0.012605148,
0.039014544,
-0.01963888,
-0.02703819,
-0.033165287,
-0.031059554,
-0.019902097,
-0.016041588,
0.0146597,
-0.019741243,
0.049952652,
0.021232802,
-0.045068525,
-0.073232695,
0.035943683,
0.027023567,
0.0144184185,
0.004240711,
-0.008876247,
-0.027813217,
-0.015953848,
-0.0074066217,
0.004332106,
-0.023323912,
0.00814509,
-0.032463375,
0.0012475369,
0.04974793,
0.031030308,
-0.006839975,
-0.07212134,
-0.018586013,
-0.00085956656,
0.009344188,
-0.022885218,
-0.06720796,
-0.04416189,
0.0141186435,
0.003681376,
0.032989807,
-0.008291322,
0.004383287,
-0.008905494,
0.0030763436,
-0.045331743,
0.026921205,
0.026409395,
-0.014374549,
0.011749695,
-0.060188852,
-0.0025425989,
-0.030942569,
0.016787367,
0.040652335,
-0.0011442609,
0.013416733,
0.019214809,
0.025985325,
0.07919894,
-0.028485881,
0.030708598,
0.041412737,
-0.020165313,
-0.04044761,
0.013233944,
-0.024406025,
0.001655157,
0.02861749,
0.005556794,
0.003476652,
0.0058711916,
0.013343617,
-0.014447665,
-0.08586709,
0.013621457,
-0.040564597,
-0.012195701,
0.004555109,
-0.029480254,
-0.0073846867,
0.0031092456,
-0.017489279,
-0.021993207,
-0.02997744,
-0.0023945395,
-0.003984806,
-0.024903212,
-0.051093258,
0.0070483545,
-0.037903186,
-0.006313542,
-0.04708652,
0.009000544,
0.0030781715,
-0.004946278,
-0.016597267,
-0.017913349,
-0.015471284,
0.02991895,
-0.020004459,
0.030562367,
-0.024961704,
-0.015076459,
-0.0111209,
-0.02313381,
-0.026482511,
0.009044413,
-0.0065731024,
-0.012444294,
-0.00062468235,
0.0030964504,
-0.009322253,
-0.007881873,
0.006788794,
0.037903186,
-0.017386917,
0.018220436,
0.02275361,
0.017372293,
-0.033720966,
-0.0027363554,
-0.01302922,
-0.034335136,
-0.014593896,
0.03337001,
0.020062951,
0.050888535,
-0.05044984,
0.024215924,
0.011259819,
0.013285125,
0.016816614,
-0.0031494594,
0.010748009,
0.00716534,
-0.014213694,
-0.046852548,
0.019580388,
0.000477537,
-0.0018809016,
0.016948221,
-0.030240659,
0.0014257564,
-0.047437474,
-0.009037102,
0.004072545,
0.030035933,
0.035943683,
-0.00031462606,
-0.008715393,
-0.028222665,
-0.0062842956,
-0.030299151,
-0.05431035,
-0.03857585,
0.021071948,
-0.012254193,
-0.014001659,
0.001279525,
-0.0054983017,
0.018863853,
0.04384018,
-0.01586611,
0.0006429613,
0.0027656017,
0.017094454,
0.030913323,
0.007432212,
-0.032200158,
-0.02294371,
0.030240659,
-0.012400425,
-0.029948195,
-0.010243511,
0.045916665,
0.016480282,
-0.009293007,
-0.06808535,
0.005472711,
-0.0075455415,
0.006770515,
0.0053118565,
0.012327309,
-0.013285125,
0.029860457,
-0.074928984,
-0.02601457,
-0.0028898986,
0.014952163,
0.029787341,
0.015383545,
-0.018322797,
0.034013428,
0.044542093,
-0.023747982,
0.011011226,
0.019346418,
0.003359667,
0.0059552747,
-0.01912707,
-0.012568591,
0.05258482,
0.02526879,
0.01772325,
0.0041895304,
0.004211465,
0.028544374,
-0.0277401,
-0.037347507,
0.034920063,
0.012532033,
-0.017986465,
0.0010364152,
-0.039716456,
-0.002745495,
-0.023528636,
0.0036539577,
0.014242941,
-0.021613004,
0.018586013,
-0.0206625,
-0.052994266,
0.0069752387,
0.014498846,
-0.036089916,
0.008861625,
-0.036791828,
0.024976326,
-0.017913349,
-0.0106456475,
-0.02289984,
0.026467888,
0.037669215,
0.041529723,
0.029421762,
0.0030507531,
0.07586486,
-0.011457232,
0.04857808,
-0.017694002,
0.013394798,
0.002233685,
0.0036777202,
-0.018732246,
0.017840233,
-0.02806181,
0.009980295,
-0.012444294,
-0.012605148,
0.0031256967,
-0.04983567,
-0.026774973,
-0.036791828,
-0.008890871,
0.053871658,
0.029948195,
-0.038458865,
0.03737675,
0.020443153,
-0.006291607,
0.025722107,
0.06650605,
0.023484766,
0.024727734,
0.08844076,
0.01590998,
0.014959475,
0.01763551,
-0.017035961,
-0.020779485,
0.008115844,
-0.0035040705,
0.017094454,
-0.035885192,
-0.07680074,
0.016509527,
0.010769945,
-0.012744068,
-0.06194363,
-0.0044271564,
-0.04021364,
-0.05384241,
0.014184448,
0.060422823,
0.046092145,
0.00795499,
-0.07282325,
-0.0046136016,
-0.007366408,
0.044659078,
0.0058894707,
-0.0048475717,
-0.048285615,
-0.05469055,
-0.0058053876,
-0.0350078,
-0.005264331,
-0.0350078,
-0.009592782,
0.015164198,
0.004039643,
0.045770437,
0.04489305,
0.019536518,
-0.045448728,
0.0074651144,
0.034539863,
0.06434183,
-0.0048475717,
0.03872208,
0.050830044,
0.0010254479,
-0.010492105,
0.010009541,
0.020604007,
0.018454406,
0.011003914,
0.007030076,
-0.01605621,
-0.00621118,
-0.021861598,
0.005575073,
-0.011581529,
0.0076186573,
-0.03345775,
-0.04889979,
-0.01931717,
-0.06153418,
0.018776115,
-0.00043915125,
0.030533122,
-0.011939796,
0.000051866456,
-0.01857139,
-0.0582586,
0.2550276,
0.050654564,
0.044425108,
-0.025824469,
0.02550276,
0.04422038,
0.025400398,
-0.017825611,
0.00828401,
-0.02145215,
0.003069032,
-0.04150048,
-0.0019083201,
0.03211242,
-0.022007829,
0.033720966,
-0.035709713,
0.008715393,
0.007918431,
-0.013775,
-0.031118046,
-0.002149602,
0.028485881,
0.03126428,
0.012546656,
0.016977469,
0.017810987,
-0.07726868,
0.0007215607,
-0.020954963,
0.05071306,
-0.012707511,
0.03579745,
-0.023323912,
-0.0012978038,
0.03652861,
0.024332909,
-0.018278928,
0.028134925,
-0.0073773754,
-0.0004585726,
-0.024113562,
-0.0072238324,
-0.02038466,
-0.0029886046,
0.017854856,
-0.009870621,
0.06890424,
0.039248515,
-0.062002122,
0.02354326,
-0.011852057,
0.0034053642,
-0.036967304,
-0.058229353,
-0.0052789543,
-0.017650133,
-0.034744587,
-0.060890764,
0.05030361,
-0.007483393,
0.013533718,
0.01865913,
0.044746816,
-0.020794109,
0.00875195,
-0.058843523,
-0.004291892,
-0.025327282,
0.0138554275,
0.03337001,
-0.0013773172,
-0.0222418,
-0.013928543,
0.016611889,
0.02829578,
-0.011098965,
0.07498747,
0.053579193,
-0.038137157,
0.014469599,
0.011398739,
-0.012480852,
0.0047378982,
0.020443153,
0.0523216,
-0.039014544,
-0.041588217,
-0.0038824442,
-0.0033011744,
0.028953822,
0.0724723,
0.019390287,
0.043021284,
-0.014476911
] |
py
(string, rq) = await q.get()
strings = []
queues = []
while True:
try:
(string, rq) = await asyncio.wait_for(q.get(), timeout=0.001) # 1ms
except asyncio.exceptions.TimeoutError:
break
strings.append(string)
queues.append(rq)
strings
outs = pipe(strings, batch_size=len(strings))
for rq, out in zip(queues, outs):
await rq.put(out)
Again, the proposed code is optimized for readability, not for being the best code.
First of all, there's no batch size limit which is usually not a
great idea. Next, the timeout is reset on every queue fetch, meaning you could
wait much more than 1ms before running the inference (delaying the first request
by that much).
It would be better to have a single 1ms deadline.
This will always wait for 1ms even if the queue is empty, which might not be the
best since you probably want to start doing inference if there's nothing in the queue.
But maybe it does make sense if batching is really crucial for your use case.
Again, there's really no one best solution.
Few things you might want to consider
Error checking
There's a lot that can go wrong in production: out of memory, out of space,
loading the model might fail, the query might be wrong, the query might be
correct but still fail to run because of a model misconfiguration, and so on.
Generally, it's good if the server outputs the errors to the user, so
adding a lot of try..except statements to show those errors is a good
idea. But keep in mind it may also be a security risk to reveal all those errors depending
on your security context.
Circuit breaking
Webservers usually look better when they do circuit breaking. It means they
return proper errors when they're overloaded instead of just waiting for the query indefinitely. Return a 503 error instead of waiting for a super long time or a 504 after a long time.
This is relatively easy to implement in the proposed code since there is a single queue.
Looking at the queue size is a basic way to start returning errors before your
webserver fails under load.
Blocking the main thread
Currently PyTorch is not async aware, and computation will block the main
thread while running. That means it would be better if PyTorch was forced to run
on its own thread/process. This wasn't done here because the code is a lot more
complex (mostly because threads and async and queues don't play nice together).
But ultimately it does the same thing.
This would be important if the inference of single items were long (> 1s) because
in this case, it means every query during inference would have to wait for 1s before
even receiving an error.
Dynamic batching
In general, batching is not necessarily an improvement over passing 1 item at
a time (see batching details for more information). But it can be very effective
when used in the correct setting. In the API, there is no dynamic
batching by default (too much opportunity for a slowdown). But for BLOOM inference -
which is a very large model - dynamic batching is essential to provide a decent experience for everyone. |
[
0.021304015,
-0.018264567,
-0.0102546485,
-0.009822434,
0.00091497117,
0.010533497,
-0.0137611665,
0.007201259,
-0.011586149,
0.045006126,
-0.023590572,
0.030645436,
-0.011544323,
-0.012603946,
-0.029306963,
0.009306564,
-0.011732545,
-0.048937887,
-0.038759924,
0.0069677234,
0.002696115,
0.03454931,
-0.049384046,
-0.027131947,
-0.021025166,
0.058781236,
-0.0109587405,
0.030980054,
0.065808214,
0.02098334,
-0.011551294,
0.036557022,
-0.008574587,
-0.045284975,
0.0052702343,
-0.055546593,
0.034326233,
-0.021652576,
-0.012025336,
-0.046902295,
0.0057861037,
-0.016675131,
0.027062234,
-0.034660853,
-0.088896856,
-0.0142561225,
-0.023646342,
-0.019310249,
-0.010442872,
-0.012011393,
-0.033712767,
0.017734757,
0.032736797,
-0.008902234,
-0.0030882456,
-0.0065215663,
-0.011000568,
0.016312629,
-0.011767401,
-0.020049198,
0.011021482,
0.049495585,
-0.03937339,
-0.05471005,
-0.008198142,
0.04018205,
-0.0039457045,
-0.025765589,
-0.007264,
-0.049607124,
-0.055490825,
0.032179102,
-0.02686704,
-0.046846524,
-0.042635914,
-0.002467808,
0.04514555,
-0.024719907,
-0.038146455,
0.06714669,
0.024692023,
-0.004472031,
-0.031649288,
-0.0071280613,
-0.04589844,
-0.024524713,
0.056522563,
-0.033015646,
0.013593858,
-0.0029889059,
0.015294833,
0.015169351,
-0.011377013,
0.012631831,
0.04520132,
0.049662896,
-0.045563824,
0.04093494,
-0.017386196,
0.042301297,
0.049997512,
0.07255635,
-0.012840968,
0.018236684,
-0.015294833,
0.032736797,
0.04191091,
-0.0068004145,
-0.02462231,
0.009243824,
-0.022865565,
-0.0015441228,
0.031816598,
-0.0012635316,
-0.01954727,
0.038313765,
0.00059124565,
-0.014709251,
-0.016340515,
-0.013266211,
-0.039233964,
0.041938793,
-0.0155597385,
-0.057777382,
0.00386205,
-0.029195424,
-0.009188053,
0.035887785,
-0.03834165,
-0.0022151016,
0.0068980115,
-0.024998756,
-0.0089580035,
0.040795516,
-0.017177058,
0.021792,
-0.032485835,
0.014904445,
0.01822274,
0.00870704,
-0.027396852,
-0.011697689,
0.011823171,
0.07556791,
0.006364714,
0.028512245,
-0.011648891,
-0.016535709,
0.02300499,
0.0413811,
-0.030645436,
-0.018891977,
0.02416221,
0.007501021,
-0.059004314,
0.016117435,
0.015002042,
0.04277534,
-0.0012286756,
-0.020537183,
-0.013970303,
-0.016340515,
-0.0086582415,
0.051782142,
-0.011418841,
0.056020636,
-0.04422535,
-0.0067760153,
0.020913627,
-0.007919294,
0.0004258973,
0.013133758,
0.027355025,
-0.018780438,
0.020969396,
0.021304015,
0.03304353,
-0.0056187944,
0.013538088,
0.027062234,
0.0058244453,
-0.036166634,
-0.0024451516,
0.0073127984,
-0.0128618805,
-0.012506349,
0.022056906,
0.017079463,
-0.027996376,
-0.0063716853,
-0.020969396,
0.06636591,
-0.047822494,
0.0055804527,
0.011328215,
0.022530949,
-0.0015537082,
0.0033897504,
0.03148198,
-0.051810026,
-0.033991616,
0.028330995,
0.012645774,
-0.018961689,
-0.016173204,
-0.0020896199,
0.01914294,
0.028275223,
-0.0349397,
-0.025054526,
0.031928137,
0.017748699,
-0.016173204,
-0.014667424,
0.0019414817,
-0.034270465,
0.020718433,
0.043444574,
0.0072779423,
0.028554073,
-0.0054967985,
0.04575902,
0.0413811,
-0.001079666,
0.017888123,
-0.010136138,
0.0050436696,
0.017846296,
0.028972344,
-0.0055037695,
0.009724837,
0.008393336,
-0.008470019,
0.069377474,
0.017734757,
0.045619592,
0.059060086,
0.035023354,
-0.0018194856,
-0.007361597,
-0.014974157,
0.050694633,
0.0003158829,
-0.014235209,
0.020049198,
-0.0089580035,
0.0017375739,
-0.029139655,
0.0028808522,
0.00002183949,
-0.020174678,
0.049021542,
0.02398096,
0.0022900421,
-0.016870325,
-0.036752213,
-0.019282365,
0.0045452286,
0.006688875,
-0.020788146,
0.01130033,
0.050527323,
0.023158357,
0.0035588022,
-0.0072152014,
0.046372484,
0.008978917,
0.023827592,
-0.012241444,
-0.01776264,
-0.008539732,
-0.036250286,
-0.081535265,
0.0014299693,
-0.02138767,
0.0011981765,
-0.0065215663,
-0.060342785,
-0.029111769,
-0.004792706,
0.0000070324795,
-0.0014186411,
-0.015406372,
0.040042624,
0.035887785,
0.001142407,
-0.036863755,
0.013796023,
-0.008964975,
0.06268511,
-0.002187217,
-0.014207324,
-0.04110225,
-0.01804149,
-0.005071555,
-0.003914334,
-0.040488783,
-0.012548177,
-0.022070847,
-0.028233398,
-0.038062803,
-0.026100207,
0.016744845,
0.0060335817,
-0.056411024,
0.0617928,
0.044838816,
-0.019128999,
0.029920429,
0.030645436,
-0.019909773,
0.038704153,
0.023046818,
0.01925448,
-0.018961689,
0.07556791,
0.02743868,
0.02416221,
-0.01897563,
-0.014737136,
-0.047766726,
0.006186948,
0.015685221,
-0.08231604,
0.018473703,
0.043779194,
0.0075916466,
-0.06301973,
0.0048972745,
-0.02554251,
-0.05933893,
-0.012143847,
0.02063478,
0.014005159,
-0.0038829634,
0.028860806,
-0.06458128,
0.02272614,
-0.0090556005,
0.0025235778,
0.011718603,
-0.031677175,
0.012924622,
0.031900253,
-0.0010343532,
0.028456476,
-0.028121857,
-0.020216506,
0.033712767,
-0.01960304,
-0.0199516,
0.01378208,
0.0024904644,
0.035441626,
-0.020188622,
0.0122553855,
-0.060231246,
0.020160737,
0.0027902264,
0.004824077,
0.023325665,
0.018864091,
0.05270234,
-0.044058044,
-0.015866471,
-0.017037636,
-0.031147363,
0.005597881,
0.037895493,
-0.0494677,
0.042691685,
0.025988668,
-0.021931425,
0.023437206,
-0.0426638,
-0.0399032,
0.055016782,
0.012018365,
0.057442762,
-0.02023045,
0.006472768,
0.0051761228,
-0.0094529595,
0.03574836,
0.06095625,
0.04665133,
0.0071454896,
0.012401781,
-0.034660853,
0.0042106104,
0.0016722188,
-0.000056259836,
-0.014332806,
-0.013266211,
-0.031956024,
-0.05783315,
0.05621583,
0.06469282,
0.038062803,
-0.011133021,
0.029892545,
-0.005782618,
0.047878265,
0.05253503,
-0.000676643,
-0.007326741,
-0.028219454,
0.052088875,
-0.0025096352,
-0.0023649826,
-0.055435054,
-0.005960384,
-0.01735831,
0.056355253,
-0.028972344,
0.008086602,
-0.033433918,
0.010045513,
-0.013628714,
0.020328047,
-0.047404222,
-0.027243486,
-0.012882794,
0.0063925986,
0.027829068,
-0.012952507,
0.0041583264,
-0.010045513,
0.008888291,
0.0008234741,
-0.030115623,
-0.019017458,
-0.047041718,
-0.03867627,
-0.047710955,
0.062238954,
0.018654956,
-0.009982771,
0.0076474166,
-0.050945595,
0.025166065,
0.006504138,
-0.016772728,
0.021513151,
-0.017651102,
-0.01147461,
0.0066714473,
0.012666687,
0.009850319,
-0.029836776,
0.027076175,
-0.06368896,
0.011112107,
-0.021122763,
0.012269328,
-0.039708007,
-0.019128999,
-0.015754933,
0.022935279,
0.016619362,
-0.026769442,
0.012039279,
0.05367831,
-0.010882057,
-0.06558514,
0.040265705,
0.013321981,
-0.021234304,
0.015671277,
0.01885015,
-0.017386196,
0.012366925,
0.022084791,
0.005332975,
-0.045229204,
-0.041464753,
-0.006688875,
0.021792,
-0.011314273,
0.0042315237,
0.016173204,
0.015782818,
0.0032398694,
-0.0253752,
-0.05172637,
-0.03552528,
0.017595332,
-0.044309005,
-0.014290979,
-0.0043082074,
0.014228238,
-0.012122933,
0.03348969,
-0.08627568,
-0.017999662,
-0.034911815,
0.011028453,
-0.05211676,
0.054905243,
0.026518479,
0.037839722,
-0.042747453,
-0.03689164,
0.020104967,
-0.01873861,
-0.0051273243,
-0.0044999155,
0.034409888,
0.012492407,
0.018641014,
-0.014904445,
0.03828588,
-0.0034315777,
-0.040683977,
0.021582864,
0.03008774,
0.035134893,
0.007849582,
-0.03390796,
0.018543417,
-0.0015876929,
-0.05431966,
-0.052479263,
0.05264657,
-0.018180914,
0.01625686,
0.06413513,
-0.008086602,
-0.0013646142,
-0.023339609,
0.028693497,
-0.041938793,
0.011885911,
-0.0698794,
0.009808491,
0.039819546,
0.0019955086,
0.04433689,
-0.048045572,
0.001983309,
-0.04790615,
0.024831448,
-0.00003265031,
-0.040628206,
-0.024998756,
-0.015810702,
-0.044085927,
0.04071186,
0.05788892,
0.016410226,
0.0063159154,
0.015573681,
0.011112107,
0.054236006,
-0.020843916,
0.036584906,
-0.02640694,
-0.019128999,
0.023269895,
0.045061897,
-0.030533897,
0.015099639,
-0.058725465,
-0.021527093,
-0.0467071,
-0.038481075,
-0.055156205,
0.0019798235,
0.012143847,
-0.019644868,
-0.03008774,
0.018180914,
0.04352823,
0.0037783952,
0.030004084,
-0.03176083,
0.00048144913,
-0.054933127,
-0.032206986,
0.010080368,
-0.013572944,
-0.012429666,
-0.03265314,
0.0034699193,
0.049885973,
-0.019700637,
0.03446566,
0.062406264,
0.028916575,
0.021527093,
-0.06324281,
0.007396453,
0.00536086,
-0.00049669866,
-0.023492975,
-0.004911217,
-0.01216476,
0.016842442,
-0.006054495,
-0.046958067,
-0.0125621185,
0.04324938,
0.070102476,
-0.029390618,
0.014430403,
0.009864261,
-0.008323624,
-0.004238495,
0.04168783,
0.028693497,
0.002943593,
0.030868514,
0.012443609,
0.009899117,
0.038062803,
-0.047878265,
-0.022210272,
0.008546703,
0.072444804,
-0.0020669636,
-0.032987762,
0.022795854,
0.03903877,
-0.05108502,
-0.040656094,
0.04737634,
-0.007535877,
-0.044866703,
-0.047850378,
-0.0026996008,
0.00599524,
-0.06870823,
0.0052493205,
0.015308775,
-0.032987762,
-0.004022388,
0.053064846,
-0.026183862,
-0.027201658,
0.039401274,
0.06820631,
-0.034660853,
0.0060266103,
-0.039457045,
0.038146455,
-0.006089351,
-0.015002042,
0.05632737,
-0.02421798,
-0.005800046,
-0.002283071,
0.004963501,
0.05183791,
-0.045703247,
-0.011690718,
0.030450242,
-0.022517005,
-0.033712767,
-0.009717866,
0.024887217,
0.0012696314,
0.030255048,
-0.020453528,
-0.004538257,
0.031231018,
0.00807266,
-0.013816937,
-0.06156972,
0.02432952,
-0.029920429,
-0.009927002,
-0.017609274,
-0.02975312,
-0.0035466026,
0.031677175,
-0.020523239,
-0.006751616,
-0.0047125374,
-0.010965712,
-0.024747793,
0.01279914,
-0.02681127,
-0.0034646909,
-0.040683977,
-0.045396514,
-0.011112107,
-0.059562013,
0.035079125,
0.006507624,
-0.027006464,
-0.002530549,
-0.0021628176,
0.05967355,
-0.016312629,
-0.004555685,
-0.03376854,
-0.010505612,
-0.01954727,
0.0123599535,
-0.012889766,
0.009878203,
0.017804468,
-0.010470756,
0.0026403454,
0.02416221,
-0.031509865,
-0.05189368,
-0.00094721303,
0.023381436,
-0.040154163,
0.048212882,
-0.05049944,
0.0031527292,
-0.0030777887,
-0.02877715,
0.0015345374,
-0.033238724,
0.0026874011,
0.02837282,
0.049635008,
0.054654278,
0.003145758,
0.03471662,
0.005681535,
0.0087558385,
0.01879438,
-0.031900253,
0.046037864,
-0.034326233,
0.027578102,
-0.053315807,
0.03293199,
0.030199278,
-0.016535709,
0.01592224,
0.018292453,
-0.037923377,
-0.05286965,
0.018878035,
0.019993428,
0.032820452,
0.0057721613,
-0.028052146,
0.0002274357,
0.019575154,
-0.029641582,
0.0059464416,
-0.031788714,
-0.05049944,
0.0080517465,
-0.0076822722,
0.0007990748,
-0.041548405,
-0.0077450136,
0.057386994,
0.023520859,
-0.0036912553,
0.0036912553,
-0.013809965,
0.025626164,
-0.01625686,
-0.055630248,
-0.0118162,
-0.0073755393,
0.00962724,
-0.013328952,
0.0050366987,
0.024747793,
0.040628206,
-0.008295739,
-0.026309343,
-0.02519395,
-0.0024312092,
0.017260714,
0.041994564,
-0.031007938,
0.016772728,
-0.048268653,
0.028637728,
-0.021136707,
-0.0010021114,
-0.029474271,
0.039457045,
0.004709052,
0.015657336,
-0.011139993,
0.017916007,
0.026574248,
0.0018787408,
0.017051578,
0.015029927,
-0.0019658809,
-0.026783386,
-0.03240218,
0.02219633,
0.02877715,
0.06357743,
-0.0038864492,
-0.0118162,
0.022963163,
0.03753299,
-0.070827484,
-0.018111201,
0.022168444,
-0.015322718,
0.017079463,
-0.024301635,
-0.036027208,
0.0072152014,
0.015197236,
0.04316573,
0.025779532,
-0.013572944,
-0.05334369,
0.006591278,
-0.017191002,
0.009662095,
-0.017135233,
-0.06854093,
-0.01314073,
0.012088076,
0.0100524835,
0.04087917,
0.032011792,
0.0056466796,
0.049384046,
0.03903877,
0.040098395,
0.013726311,
0.0040049595,
0.010728691,
-0.0150578115,
-0.007166403,
-0.034632966,
-0.02063478,
-0.011209704,
0.02260066,
-0.048408076,
0.027327139,
-0.0072570285,
-0.06764861,
0.021931425,
-0.011307301,
-0.041046478,
-0.060565867,
0.035581052,
-0.043890733,
-0.0013018734,
0.03850896,
-0.027592046,
-0.04386285,
0.039010886,
-0.026086265,
0.034158926,
-0.00072979846,
0.0630755,
-0.002140161,
0.037086833,
0.041074365,
0.06168126,
0.027870893,
0.028414648,
-0.030701205,
-0.05286965,
-0.027508391,
-0.019352077,
0.036584906,
-0.033406034,
-0.053009074,
0.056522563,
0.029083885,
-0.02081603,
-0.030366587,
0.006054495,
0.027870893,
0.020077081,
0.004538257,
0.06134664,
-0.022865565,
-0.0071803452,
-0.010101282,
-0.000021090631,
-0.021025166,
-0.05049944,
0.0006539865,
0.032876223,
-0.041576292,
-0.039345503,
-0.03084063,
-0.035664707,
-0.0011432783,
0.013008276,
0.0041548405,
-0.035832014,
0.015768874,
-0.005367831,
0.051503293,
0.02254489,
-0.025905013,
-0.0069921226,
0.06898709,
0.025347317,
0.022503063,
0.058613926,
0.017651102,
0.028916575,
0.017079463,
0.00017569626,
0.019575154,
0.012875823,
0.005991754,
-0.031732943,
0.013886648,
-0.050136935,
-0.08131219,
0.00070714206,
0.02294922,
0.02046747,
-0.026880983,
-0.030812744,
-0.046734985,
-0.054961015,
0.012806111,
-0.04313784,
0.024120383,
0.010038541,
0.0050297272,
0.011899854,
-0.054347545,
0.22843258,
0.04860327,
0.033684883,
0.04352823,
-0.000036980087,
-0.0049844147,
0.018069373,
-0.025849244,
0.0004193618,
-0.043444574,
0.026100207,
0.0053748023,
0.0082539115,
0.06335435,
-0.016019838,
0.024176152,
-0.06407935,
0.0072291438,
0.016898211,
-0.0066784183,
-0.030394472,
0.040321473,
0.014151555,
0.016577536,
0.026169918,
0.007995977,
0.011711631,
0.00830271,
-0.027522333,
-0.023897305,
-0.0072779423,
-0.04439266,
0.017832354,
-0.014033044,
-0.026211746,
0.025821358,
-0.0038132514,
-0.050164822,
0.033461805,
0.05685718,
-0.03471662,
-0.018292453,
0.031175246,
0.025584338,
0.036138747,
0.03240218,
0.0013951132,
0.040098395,
0.022015078,
-0.06781592,
0.0073894816,
0.00042872937,
-0.008163285,
-0.0544312,
-0.038983002,
-0.0051865797,
-0.01054744,
-0.022893451,
-0.02144344,
0.0074173664,
-0.016703017,
-0.008365451,
0.017302541,
-0.020188622,
0.000711499,
0.035664707,
0.021889597,
0.036473367,
-0.06313127,
-0.029362733,
-0.0138587635,
-0.0045452286,
-0.0002529242,
-0.010693835,
0.012840968,
0.033461805,
-0.013907562,
0.022335755,
-0.0018839693,
-0.028888691,
0.04099071,
-0.008630357,
-0.054459088,
-0.012018365,
-0.0033723223,
0.053706195,
-0.06664476,
0.023032876,
0.006688875,
-0.0012713743,
0.013126787,
0.006284545,
0.014681366,
0.027410794,
-0.011035424
] | Summary of the tokenizers
[[open-in-colab]]
On this page, we will have a closer look at tokenization. |
[
0.03793997,
-0.010890987,
0.00647267,
-0.021767402,
-0.029926537,
-0.01596859,
0.03071331,
-0.0016236311,
0.010694293,
0.049974695,
0.0020324984,
0.018940846,
-0.013571844,
-0.018226922,
-0.012996335,
-0.022670735,
0.0001874734,
-0.02463767,
-0.04679846,
0.009754536,
-0.013659264,
-0.00064426195,
-0.059561674,
-0.0034239222,
-0.012493674,
0.04178642,
-0.0039739353,
0.023603208,
0.075646825,
0.029780837,
0.004283545,
0.028702667,
0.023370089,
0.016784504,
-0.037765134,
-0.038464487,
0.021184608,
-0.032141156,
-0.011954588,
-0.0068004923,
0.026415195,
-0.012413539,
0.04335997,
-0.05049921,
-0.08089198,
0.004564015,
-0.0005932674,
-0.019931598,
-0.01972762,
-0.027609926,
-0.05734705,
-0.011255234,
0.02702713,
0.003762672,
-0.018707728,
-0.030946428,
0.032490835,
0.028921215,
-0.013637409,
0.04064997,
0.02092235,
0.07127586,
-0.023923745,
-0.034851156,
-0.03557965,
-0.01825606,
-0.026036378,
0.012333404,
-0.027216539,
-0.040183734,
-0.03808567,
0.029795408,
-0.018911706,
-0.02210251,
-0.04414674,
-0.059503395,
0.033452448,
-0.035142552,
-0.033947825,
0.06678834,
-0.009404859,
0.052451573,
0.01955278,
0.021155467,
-0.03152922,
-0.08304832,
0.054637056,
0.012566523,
0.034647178,
-0.045195773,
-0.013717543,
0.016070578,
-0.045545448,
0.00920088,
0.030625891,
0.07168382,
-0.01730902,
0.040853947,
0.0049683293,
0.0016491285,
0.046303082,
0.079551555,
-0.055890065,
0.041320182,
-0.014059936,
0.008807493,
0.044816956,
0.0021162753,
-0.021942241,
0.00046395967,
-0.01471558,
0.015487784,
0.04062083,
0.021097189,
-0.03336503,
0.03196632,
0.024725089,
0.020805791,
-0.036570404,
0.006705788,
0.016973913,
-0.01720703,
-0.019203104,
-0.0320246,
0.036395565,
-0.031791482,
0.016682515,
0.03718234,
0.006064713,
-0.030072235,
0.055686086,
0.013957947,
0.01972762,
-0.0016609664,
0.010184347,
0.032286856,
0.011430072,
0.0037189622,
0.039688356,
-0.03292793,
-0.016740793,
0.016157998,
-0.0075471983,
0.04551631,
0.0033401453,
-0.008887628,
0.01583746,
-0.027770193,
-0.016187139,
0.0062614065,
-0.07640446,
0.049304478,
-0.008486956,
0.017731545,
-0.036920078,
-0.013972516,
0.017818965,
-0.004196126,
-0.068128765,
-0.0075471983,
0.013076468,
-0.013455286,
-0.02083493,
0.05425824,
-0.011998298,
0.045370612,
-0.02832385,
0.015706332,
0.021126328,
-0.022932993,
-0.017644126,
0.014147355,
-0.0185766,
0.0033874975,
0.01343343,
0.05154824,
0.034151804,
-0.010788997,
0.010009509,
-0.023850895,
-0.002422243,
-0.010672438,
-0.0072922255,
0.03292793,
-0.009208165,
-0.008822063,
-0.010563164,
0.00585345,
-0.008508811,
0.024433691,
0.02086407,
0.037211478,
-0.032694813,
-0.0025825114,
-0.021767402,
0.024972776,
-0.0031088484,
0.00175476,
0.016915632,
-0.017629556,
-0.026007239,
0.055919204,
-0.006975331,
0.03426836,
-0.059445117,
-0.032811373,
0.02469595,
0.041582443,
-0.023952885,
0.039163843,
0.028688097,
0.016959341,
-0.0110075455,
0.013834102,
-0.009616122,
-0.023136972,
-0.048634265,
0.025103906,
0.00065473403,
0.019581921,
-0.003755387,
0.015342085,
0.008887628,
0.00093702547,
0.010461175,
-0.026182076,
0.009470423,
0.025424443,
0.016303698,
0.01608515,
0.014365903,
0.022947563,
-0.0062869038,
0.0071210293,
0.014416898,
0.043680504,
0.03799825,
0.059678234,
0.012413539,
0.005412711,
-0.020121006,
0.024958206,
0.017687837,
0.014132785,
0.013753968,
0.017090471,
-0.008064429,
-0.008275692,
-0.00024404551,
0.032957073,
-0.063582964,
0.053617164,
0.02090778,
0.022539606,
-0.061076943,
-0.044467278,
0.0036570402,
0.022423048,
-0.05883318,
-0.054607917,
0.034210082,
0.029154332,
0.043738782,
-0.015371225,
0.026852291,
0.0028465905,
0.027158258,
0.0137831075,
-0.018022943,
-0.05778415,
0.002159985,
-0.04679846,
-0.093480356,
-0.008975047,
-0.021548854,
-0.026050948,
-0.035113413,
-0.05387942,
0.03788169,
-0.034880295,
-0.025642991,
-0.01608515,
-0.036599543,
0.037502874,
0.0015371225,
0.022627026,
-0.016988482,
0.026721163,
0.004159701,
0.08841004,
-0.029212613,
-0.0283967,
-0.0056239744,
-0.026050948,
-0.0057186782,
0.013047329,
0.011925448,
0.021490576,
-0.041116204,
0.027274817,
-0.027988743,
-0.01971305,
0.012202276,
0.028950354,
-0.031470943,
0.025861539,
0.015108967,
-0.032257717,
0.056939095,
0.05559867,
-0.02969342,
-0.0005081246,
-0.015444074,
0.06515651,
-0.019946167,
0.015808322,
0.042077817,
0.03426836,
-0.04770179,
-0.04298115,
-0.021723693,
-0.004134204,
-0.011189669,
-0.036570404,
-0.008064429,
0.061076943,
-0.013163888,
-0.054462217,
-0.031587504,
-0.017644126,
-0.028746376,
-0.035171695,
-0.012173136,
0.036308143,
0.015181816,
-0.023792617,
-0.0059700087,
-0.01716332,
-0.034180943,
0.032374278,
0.005135883,
-0.030771589,
0.021942241,
0.0035841907,
0.0137831075,
-0.013834102,
0.0071829516,
-0.031092128,
-0.021738263,
0.018736867,
0.016857352,
0.034064382,
0.00737236,
-0.008028004,
0.00641439,
0.004593155,
-0.042340074,
0.035288252,
0.0034949502,
0.011954588,
0.02083493,
0.046099104,
-0.010082358,
-0.0037990967,
-0.05781329,
0.014161925,
-0.02335552,
0.00852338,
0.0065637315,
-0.028819226,
0.006046501,
0.023297241,
-0.024987347,
0.033481587,
-0.064457156,
-0.050207812,
0.10029906,
0.00797701,
0.038872443,
-0.0270417,
-0.020383265,
0.008669079,
0.016667943,
0.045224912,
0.046273943,
0.03668696,
-0.003021429,
0.0069498336,
0.015881171,
0.0022164432,
0.034967717,
0.008268408,
0.0048153456,
0.0039775777,
-0.007729322,
-0.05886232,
0.024870787,
0.0321703,
0.021825682,
0.0092664445,
0.006683933,
0.011386362,
0.016391117,
0.009033326,
0.027799334,
0.0019815038,
-0.051752217,
0.053238347,
0.023632348,
0.025264174,
-0.04437986,
-0.04032943,
-0.008960477,
0.032257717,
-0.03654126,
0.0320246,
-0.036016747,
-0.021068048,
0.024229713,
0.048867382,
-0.06026103,
-0.023559498,
-0.033860404,
-0.0048954803,
0.01473015,
-0.043797065,
0.009769105,
-0.022612456,
-0.008035289,
0.014839424,
-0.028017882,
0.008129993,
0.005481918,
-0.0008778354,
-0.042281795,
0.024156863,
0.011772464,
-0.012602948,
0.012661227,
-0.05772587,
0.005875305,
0.06381608,
-0.02688143,
0.008210128,
0.0172216,
-0.0040686396,
-0.005685896,
0.03196632,
-0.039921474,
-0.036191586,
0.03219944,
-0.031004708,
-0.029926537,
-0.035229973,
0.0024277065,
-0.014263914,
-0.014963268,
-0.005026609,
0.022831004,
0.02455025,
-0.013324156,
0.0041633435,
0.057055656,
-0.06469028,
-0.069061235,
0.0036679676,
0.022627026,
-0.05667684,
-0.0024349915,
-0.008829348,
-0.017032191,
-0.021519715,
0.020689232,
0.027507937,
-0.005296152,
-0.028819226,
0.0037025711,
0.012610232,
-0.01349171,
0.0000032583037,
-0.03703664,
0.0032581897,
0.015575203,
-0.04295201,
-0.032403417,
-0.05542383,
-0.033452448,
-0.0197859,
-0.011488351,
0.0072521586,
0.026604604,
0.036104165,
0.033306748,
-0.043505665,
-0.0013987087,
-0.03665782,
-0.01169233,
-0.010104213,
0.022466756,
0.044962656,
0.06707973,
-0.02437541,
-0.0220588,
0.020193856,
0.015327515,
-0.013098324,
-0.00673857,
0.005172308,
0.027464226,
0.0014952341,
0.0058133826,
0.05749275,
-0.02816358,
0.016318267,
0.041465882,
-0.02197138,
-0.008217413,
-0.014256629,
-0.016347406,
0.057055656,
-0.02943116,
-0.070809625,
-0.020470683,
0.021155467,
-0.020397834,
0.016041439,
0.038493626,
-0.047352113,
-0.018649448,
-0.0317332,
0.025322454,
-0.026677452,
-0.024317132,
-0.050528347,
-0.008530665,
0.024302563,
0.02807616,
-0.003631543,
-0.04912964,
0.005270655,
-0.03930954,
0.022277348,
-0.04773093,
0.0042944727,
-0.01107311,
0.0075836233,
-0.028352989,
0.014701011,
0.019071974,
-0.009339294,
0.019130254,
-0.029139763,
-0.0060683554,
0.05772587,
-0.047031578,
0.021913102,
-0.016478537,
-0.026371485,
0.017469287,
-0.00025838774,
-0.004181556,
0.040737387,
-0.0065892288,
0.016915632,
-0.06457371,
-0.014934128,
-0.055831786,
0.017177891,
0.0013021831,
-0.021476004,
-0.0567934,
-0.036366425,
0.0660307,
-0.011553916,
-0.0005176861,
-0.035025995,
0.018649448,
-0.016449396,
-0.027682774,
-0.024171432,
-0.0042762603,
-0.0079478705,
-0.02221907,
0.015065257,
0.056094043,
-0.050178673,
-0.026721163,
0.08147477,
-0.0020707443,
-0.008333972,
-0.032082878,
0.04324341,
-0.015181816,
0.0013914236,
-0.011532061,
0.017789826,
-0.036191586,
0.034180943,
-0.035084274,
-0.044991795,
-0.015298376,
0.04528319,
0.07180037,
-0.062417373,
0.021505145,
-0.014810285,
0.00611935,
-0.04437986,
0.011371792,
0.037444595,
-0.0034111736,
0.021563424,
-0.022000521,
-0.00986381,
0.013579129,
-0.008312117,
-0.022306489,
-0.02204423,
0.07273285,
0.01166319,
-0.0030560326,
0.010490315,
-0.01850375,
-0.037211478,
-0.016813643,
0.037240617,
0.027245678,
-0.053354904,
-0.0045822277,
-0.009535987,
0.013251307,
-0.04201954,
0.019290524,
0.013047329,
-0.015283805,
0.004862698,
-0.006538234,
-0.021665413,
0.03184976,
0.021461435,
0.041291043,
-0.032723952,
0.046069965,
-0.05303437,
-0.014504317,
0.0069498336,
-0.018460039,
0.03910556,
0.049537595,
0.024491971,
0.012792356,
-0.00044756854,
0.06014447,
-0.024215143,
-0.036191586,
0.030217934,
-0.04560373,
-0.03461804,
0.017032191,
0.029766267,
-0.046419643,
0.045982547,
-0.026080087,
-0.023690628,
-0.008071714,
0.011488351,
0.0066802907,
-0.041232765,
0.02338466,
-0.0107234325,
-0.012894345,
0.0043126848,
-0.027274817,
0.033598147,
0.033569008,
-0.004746139,
-0.014001656,
0.024943637,
0.03190804,
-0.03808567,
-0.029722558,
-0.036016747,
0.029635139,
-0.0185766,
0.00019635192,
-0.013804963,
-0.038726743,
-0.012435393,
-0.0029740771,
0.009623406,
0.007824026,
0.013644694,
0.018897137,
-0.008042575,
0.001850375,
-0.013440715,
-0.040970508,
0.016959341,
-0.008960477,
0.019450791,
0.025235035,
0.036628682,
-0.030888148,
0.000032696862,
0.012369829,
-0.01711961,
-0.0020816717,
0.013651979,
0.041378465,
-0.054870173,
0.07331564,
-0.023530358,
0.008414106,
-0.044933513,
-0.012479103,
-0.022874713,
-0.011262518,
0.012989049,
-0.0014879492,
0.016303698,
0.04819717,
0.024870787,
-0.0029613285,
0.00924459,
0.040358573,
0.025453582,
0.010825422,
0.053646304,
-0.02455025,
-0.011910878,
-0.023370089,
0.012406254,
0.027741054,
0.012049292,
-0.011889023,
0.026080087,
-0.053354904,
-0.011954588,
0.021650843,
0.000049543287,
0.010009509,
0.0073140804,
-0.07045995,
0.034530617,
0.018532889,
-0.039192982,
-0.00107635,
-0.019013695,
-0.052131034,
0.023705197,
-0.016187139,
0.020878641,
-0.013331441,
-0.030451052,
0.015050688,
-0.018620308,
0.049595878,
-0.023078691,
0.013600985,
-0.01719246,
0.0045676576,
-0.043680504,
-0.047381256,
0.00097618205,
-0.00052542635,
-0.017920954,
-0.027376806,
0.008720074,
0.033889543,
-0.0057587456,
-0.030946428,
-0.03654126,
0.009543273,
-0.00023448403,
0.048109747,
-0.013987086,
0.028003313,
-0.05513243,
0.0066438657,
-0.05411254,
-0.02962057,
0.00019350623,
0.0197859,
0.047643512,
-0.001185624,
-0.011233378,
0.04796405,
0.057434473,
-0.029722558,
-0.034880295,
0.038318787,
0.021898532,
-0.025264174,
-0.0040467847,
0.03082987,
0.03793997,
0.031062987,
0.0050994586,
-0.029897397,
-0.007000828,
0.03826051,
-0.029110624,
-0.04787663,
0.0053216494,
-0.010898272,
0.00856709,
-0.0039848625,
0.005292509,
-0.01946536,
-0.008880342,
0.020077297,
0.040358573,
-0.0015744579,
-0.015181816,
-0.002068923,
-0.043272547,
-0.0069680456,
0.019946167,
-0.034151804,
-0.034880295,
0.022000521,
0.009142601,
0.022801865,
0.015050688,
0.01956735,
0.03447234,
0.0395718,
0.022976702,
0.0013213061,
-0.00520509,
0.0050921733,
0.015473214,
0.032082878,
-0.032986213,
0.014176494,
-0.009565127,
-0.0048918375,
-0.041465882,
0.06142662,
-0.030305354,
-0.0418447,
-0.023180682,
-0.02575955,
-0.008712789,
-0.06136834,
0.051752217,
-0.029678848,
0.0059809363,
0.019596491,
-0.037473734,
-0.039018143,
0.017804395,
-0.012042007,
0.030188793,
0.026458904,
0.046099104,
0.0112916585,
0.060494147,
0.016755363,
0.0050156815,
0.031237826,
0.02100977,
0.00006101138,
-0.0129307695,
0.007729322,
0.00025793244,
-0.01730902,
-0.02455025,
-0.033831265,
-0.005146811,
0.030771589,
-0.017352728,
-0.012646657,
0.057958987,
-0.0029394736,
-0.0196402,
0.040242013,
0.052451573,
0.02093692,
0.0033820337,
-0.014008941,
0.01847461,
-0.014679155,
-0.02316611,
-0.018197782,
0.008938623,
-0.0056822537,
-0.06579758,
-0.026036378,
-0.059328556,
-0.007390572,
-0.0419904,
0.0024732375,
-0.05012039,
0.007029968,
0.02575955,
0.04796405,
0.016143428,
-0.04309771,
-0.010614159,
0.009251875,
0.021942241,
0.022597887,
0.06673006,
0.042369217,
-0.025249604,
0.05047007,
0.014635446,
0.047177278,
0.0013112894,
0.016973913,
0.0073942146,
-0.0048517706,
-0.046244804,
-0.071101025,
-0.028090732,
0.018824287,
0.028979493,
-0.044787817,
-0.056239743,
-0.037444595,
-0.06031931,
-0.035113413,
-0.025074765,
0.014824854,
0.014395043,
-0.053617164,
0.044758677,
-0.0419904,
0.25293314,
0.06894468,
0.0075763385,
0.02469595,
0.0050156815,
0.014897704,
0.0065710163,
-0.026240356,
0.0072703706,
-0.0139943715,
0.0012639372,
-0.04671104,
0.008516096,
0.012646657,
-0.0419904,
0.02589068,
-0.035229973,
-0.026123798,
-0.028003313,
-0.03826051,
-0.052043617,
0.028615247,
0.024011165,
0.068361886,
0.030859008,
-0.034151804,
0.02452111,
0.003352894,
-0.046419643,
-0.025235035,
0.01832891,
-0.017920954,
0.02928546,
-0.004622295,
-0.03339417,
0.021796543,
0.016609665,
-0.024404552,
0.009951229,
-0.00016174845,
-0.013906952,
-0.012748647,
-0.004574943,
-0.010992976,
-0.018139502,
0.03426836,
0.0066547934,
0.038610186,
0.021184608,
-0.058658343,
0.038143948,
-0.026706593,
0.052014478,
-0.051431682,
-0.034035243,
-0.013346012,
-0.03234514,
0.004298115,
0.008690935,
0.0028866578,
0.014977838,
0.021563424,
0.012799641,
0.003438492,
-0.000049287177,
0.037094917,
0.009572412,
0.03056761,
-0.034851156,
-0.005751461,
-0.010147923,
0.013892381,
0.014263914,
-0.03566707,
0.028819226,
0.027697345,
-0.00064426195,
0.032315996,
0.004684217,
-0.012457249,
0.016056009,
-0.020062726,
-0.04816803,
-0.014504317,
0.042485774,
0.059445117,
0.0110439705,
0.024331702,
-0.021927672,
0.01956735,
0.04271889,
0.032112017,
0.0037881692,
-0.028090732,
-0.029096054
] |
A simple way of tokenizing this text is to split it by spaces, which would give:
["Don't", "you", "love", "🤗", "Transformers?", "We", "sure", "do."]
This is a sensible first step, but if we look at the tokens "Transformers?" and "do.", we notice that the
punctuation is attached to the words "Transformer" and "do", which is suboptimal. We should take the
punctuation into account so that a model does not have to learn a different representation of a word and every possible
punctuation symbol that could follow it, which would explode the number of representations the model has to learn.
Taking punctuation into account, tokenizing our exemplary text would give:
["Don", "'", "t", "you", "love", "🤗", "Transformers", "?", "We", "sure", "do", "."]
Better. However, it is disadvantageous, how the tokenization dealt with the word "Don't". "Don't" stands for
"do not", so it would be better tokenized as ["Do", "n't"]. This is where things start getting complicated, and
part of the reason each model has its own tokenizer type. Depending on the rules we apply for tokenizing a text, a
different tokenized output is generated for the same text. A pretrained model only performs properly if you feed it an
input that was tokenized with the same rules that were used to tokenize its training data.
spaCy and Moses are two popular
rule-based tokenizers. Applying them on our example, spaCy and Moses would output something like:
["Do", "n't", "you", "love", "🤗", "Transformers", "?", "We", "sure", "do", "."]
As can be seen space and punctuation tokenization, as well as rule-based tokenization, is used here. Space and
punctuation tokenization and rule-based tokenization are both examples of word tokenization, which is loosely defined
as splitting sentences into words. While it's the most intuitive way to split texts into smaller chunks, this
tokenization method can lead to problems for massive text corpora. In this case, space and punctuation tokenization
usually generates a very big vocabulary (the set of all unique words and tokens used). E.g., Transformer XL uses space and punctuation tokenization, resulting in a vocabulary size of 267,735!
Such a big vocabulary size forces the model to have an enormous embedding matrix as the input and output layer, which
causes both an increased memory and time complexity. In general, transformers models rarely have a vocabulary size
greater than 50,000, especially if they are pretrained only on a single language.
So if simple space and punctuation tokenization is unsatisfactory, why not simply tokenize on characters? |
[
0.06536244,
0.006115176,
-0.018836893,
-0.033025537,
-0.005907152,
-0.02423116,
0.055549465,
-0.019181209,
-0.024604168,
0.037960716,
0.031246575,
0.002092789,
-0.03001278,
-0.046281658,
-0.015278973,
0.01207254,
-0.0073059313,
0.010975037,
-0.044990476,
0.0015790066,
0.0013396001,
0.029898008,
-0.09204684,
-0.0063841715,
-0.012732477,
0.059394315,
0.04384276,
-0.014977697,
0.049925655,
0.051446382,
-0.0029804755,
0.006760766,
0.015164201,
0.00694727,
-0.019267287,
-0.029582387,
0.0048562745,
-0.022538278,
0.0075462344,
-0.012682265,
0.00878003,
-0.027573884,
0.027530843,
-0.056525026,
-0.08567702,
-0.0012858008,
0.045765184,
-0.057500582,
-0.057127576,
-0.061173275,
-0.007352557,
-0.01945379,
-0.009784281,
0.020687586,
-0.00039094084,
0.0027850051,
0.054659985,
-0.004450987,
-0.013571745,
-0.009109998,
0.034632336,
0.033484623,
-0.00560229,
-0.06507551,
-0.019138169,
0.0056166365,
-0.031361345,
0.009117171,
0.012725304,
-0.024001615,
-0.04473224,
-0.0076179667,
-0.021820955,
-0.036439992,
-0.036956463,
-0.03417325,
0.018779507,
-0.0037802905,
-0.044100996,
0.0457078,
-0.022939978,
0.034890573,
-0.015924564,
-0.010329446,
-0.022696089,
-0.04255158,
0.05735712,
-0.012158619,
0.033312462,
-0.046568587,
-0.011706706,
0.0066818604,
-0.03890758,
0.036382604,
0.01900905,
0.073166914,
-0.030156244,
0.024532435,
-0.025407568,
-0.0044725067,
0.017187051,
0.06760049,
-0.036296528,
0.055836394,
-0.02058716,
-0.0014687182,
0.026282702,
0.001631909,
-0.021490987,
-0.010573336,
-0.019109476,
0.00069894124,
-0.0006487287,
0.011756918,
-0.02107494,
0.028836371,
0.022997364,
0.035550512,
-0.07207658,
-0.0055592507,
0.029754544,
-0.03572267,
0.0044868533,
-0.018263035,
0.04602342,
0.00989188,
-0.0028352179,
0.024173774,
0.011914729,
0.0033929362,
0.05342619,
0.035177503,
0.012911808,
0.018219996,
0.003783877,
0.035320967,
-0.00021777468,
-0.01613976,
-0.00936106,
-0.002263153,
-0.023269948,
0.005164723,
0.005702715,
0.06972376,
0.0090024,
-0.058303986,
0.028248167,
-0.07156011,
-0.031849127,
0.008607872,
-0.026225315,
0.03566528,
0.011190234,
0.011104154,
-0.047429375,
-0.03405848,
0.00035866132,
0.018191302,
-0.012366642,
0.0019313912,
-0.015981948,
0.022653049,
-0.022323081,
0.043211516,
-0.0046877037,
0.051159453,
-0.03368547,
0.025737537,
-0.026583977,
-0.033169,
-0.013127005,
0.0173879,
-0.0028908104,
0.011039596,
0.014482744,
0.054258287,
0.04372799,
0.014819886,
0.012883115,
0.016369304,
-0.011799958,
-0.030328402,
-0.04926572,
0.04364191,
-0.010953517,
-0.02774604,
-0.0057923803,
-0.0060613765,
-0.0024783497,
0.023097789,
0.021591412,
0.04335498,
-0.024848057,
0.005971711,
-0.0232556,
0.009246289,
-0.017990451,
-0.022480892,
0.009920572,
-0.011197407,
-0.009196077,
0.0513603,
0.0042680698,
0.018191302,
-0.05440175,
-0.027401725,
-0.010458564,
0.04252289,
-0.013700862,
0.04829016,
0.0024371038,
0.014418186,
-0.00913869,
0.04955265,
-0.0058210734,
-0.024073347,
0.005516211,
0.01711532,
0.0073597305,
0.020328924,
0.017459633,
-0.0033767964,
0.022782167,
-0.020429349,
0.03210736,
0.008342463,
0.008285076,
0.015967602,
0.020759318,
0.0037157314,
0.030787488,
0.045076557,
0.030471867,
0.021390561,
-0.012797036,
0.022064844,
0.0047271564,
0.04542087,
0.024733284,
0.0034826016,
0.016326264,
-0.0031974658,
0.027502151,
0.019683333,
-0.01387302,
0.01429624,
-0.02329864,
-0.0080985725,
-0.008084226,
-0.001900905,
-0.0039452747,
0.033513315,
0.015824137,
0.0024496568,
-0.070814095,
0.0049566994,
-0.008808722,
0.03672692,
-0.0291233,
-0.08194694,
-0.004906487,
0.05557816,
0.01276117,
-0.017072279,
0.025192373,
0.013557398,
0.03595221,
0.05727104,
-0.03583744,
-0.047945846,
-0.031418733,
-0.06450165,
-0.062091447,
-0.009109998,
-0.03956752,
-0.037874635,
-0.019726373,
-0.077585615,
0.0202285,
-0.003613513,
-0.010121423,
-0.0033283771,
-0.0015834897,
0.054086126,
-0.0037551841,
0.05253671,
-0.017287476,
0.05626679,
0.022093538,
0.039538823,
0.012359469,
-0.034201942,
-0.03543574,
-0.03216475,
-0.011656493,
0.0032853377,
0.022825208,
-0.007022589,
-0.027860813,
-0.00920325,
0.01053747,
-0.004031353,
-0.018377807,
0.047343295,
-0.040600464,
0.008242037,
-0.0013898127,
-0.0075892736,
0.051274225,
0.060369875,
-0.038362417,
0.004210684,
-0.022538278,
0.027846465,
-0.030156244,
0.06788742,
0.055147767,
0.017861335,
-0.014905965,
-0.025048908,
0.004562172,
0.028692907,
0.01029358,
-0.032308213,
0.01096069,
0.06358348,
-0.021247096,
-0.04688421,
-0.011699532,
-0.037099928,
-0.01844954,
0.020214152,
-0.051762003,
0.03744424,
0.023356026,
0.008521793,
-0.004630318,
-0.037673786,
-0.025909694,
0.042322036,
0.017689176,
-0.04295328,
0.012216005,
0.0196116,
0.013370894,
0.0043756682,
-0.002519596,
-0.040342227,
-0.024245506,
-0.009942092,
0.033312462,
0.050212584,
0.0111328475,
-0.029955395,
-0.0018300695,
-0.0029195033,
-0.019712027,
0.020730624,
-0.0107096275,
0.027071757,
0.059968174,
0.012753997,
-0.020357616,
0.01747398,
-0.035579205,
-0.006305266,
-0.009698202,
-0.004433054,
0.032049976,
-0.006986723,
0.051991545,
0.0037731172,
-0.025163678,
0.04392884,
-0.036784306,
-0.077757776,
0.070182845,
0.019152515,
0.028850717,
-0.025981426,
-0.0009872153,
0.0299267,
0.0049674595,
-0.004551412,
0.04659728,
0.017660484,
-0.0053189476,
-0.008306596,
0.016111067,
0.016311917,
-0.004877794,
0.009282155,
-0.0089665335,
0.004422294,
0.0011997222,
-0.04392884,
0.04295328,
0.05253671,
0.021433601,
-0.006473837,
0.060255103,
-0.003952448,
-0.015766753,
0.019984609,
0.009461486,
-0.020415002,
-0.047056366,
0.046052113,
0.020156767,
-0.007209093,
-0.043383673,
-0.032365598,
-0.008428541,
0.0048383414,
-0.0033194106,
0.030271016,
-0.015881523,
-0.045306098,
0.013127005,
0.052479327,
-0.053282727,
-0.015924564,
-0.050585594,
0.03270991,
0.028979836,
-0.065190285,
-0.020027649,
-0.009762761,
0.012223178,
0.022380468,
0.005218522,
0.0022021804,
0.0021268616,
-0.01876516,
-0.048347548,
0.048605785,
0.03483319,
-0.007531888,
0.012488588,
-0.08504578,
0.0224522,
0.023987269,
-0.0022739128,
0.008041187,
0.018535618,
0.016842736,
-0.01569502,
0.020400656,
-0.031763047,
-0.00335169,
0.042350728,
-0.05841876,
0.016268877,
-0.024460703,
0.0038269165,
-0.055721626,
0.01273965,
-0.02067324,
-0.0012580046,
0.0065061166,
0.0042070975,
-0.0053763334,
0.025507994,
-0.025464954,
-0.036870383,
-0.007596447,
0.012409682,
-0.032824684,
-0.002865704,
0.007241372,
0.004515546,
0.00245683,
0.029065914,
0.01634061,
0.022237003,
-0.009691029,
-0.025249757,
-0.0007213576,
-0.041891642,
-0.013012233,
-0.023599915,
0.006875538,
0.03830503,
0.005222109,
-0.044760935,
-0.05262279,
-0.029496308,
0.0063483054,
-0.0019726374,
-0.0069400966,
0.022538278,
0.005501865,
0.0057816207,
-0.018105224,
0.009454313,
-0.03130396,
-0.030242324,
-0.006093656,
0.057902284,
0.042494193,
0.082922496,
-0.004928007,
0.007897723,
-0.005268735,
0.005315361,
0.010128596,
-0.030787488,
-0.03425933,
-0.008873281,
-0.004996152,
-0.0001498532,
0.02438897,
0.0030073752,
0.0084931,
0.00077291514,
0.00583542,
-0.010838745,
-0.018593004,
-0.030873567,
0.037989408,
-0.04719983,
-0.07896288,
-0.04748676,
-0.012137099,
0.012502934,
0.013758249,
0.024202466,
-0.065018125,
-0.031963896,
-0.04332629,
0.019138169,
-0.0299267,
0.011756918,
-0.047917154,
0.0030342748,
0.022208309,
0.006696207,
-0.0032207787,
-0.042637657,
-0.023198215,
-0.017373554,
0.0022667395,
-0.047716305,
-0.04105955,
-0.013837154,
-0.015393744,
0.000514679,
0.0055126245,
0.011154368,
-0.027014371,
-0.015996296,
-0.017746562,
0.03592352,
0.056697182,
-0.05933693,
-0.018922972,
0.003462875,
-0.01233795,
0.024991522,
-0.002514216,
-0.033111613,
0.03833372,
-0.007277238,
0.058705688,
-0.062263608,
-0.006929337,
-0.030873567,
0.0102648875,
0.014626209,
-0.051790696,
-0.035234887,
-0.044273153,
0.037932023,
0.017660484,
0.026956985,
-0.041116934,
0.008242037,
-0.04780238,
-0.008428541,
0.0042501367,
-0.021376215,
0.023542529,
-0.04017007,
0.004895727,
0.05052821,
-0.05635287,
0.00026451272,
0.06513289,
-0.010006651,
0.025178025,
0.0040098336,
0.017890027,
0.00042658282,
-0.006907817,
-0.031533506,
0.006082896,
-0.05735712,
0.01051595,
-0.0655346,
-0.043814067,
0.00017215744,
0.060484648,
0.067543104,
-0.06346871,
0.017789602,
-0.01367217,
-0.013621957,
-0.044474006,
0.012610532,
-0.00075767207,
-0.008062706,
0.013148524,
-0.013973446,
-0.046339042,
0.005333294,
-0.042293344,
-0.024891095,
0.01322743,
0.06415734,
-0.031418733,
-0.009059785,
0.052594095,
-0.0018578657,
-0.026340088,
-0.031332653,
-0.014719461,
0.043211516,
-0.025450608,
-0.009863187,
0.007320278,
0.027717348,
-0.00035731634,
-0.019080782,
0.022208309,
-0.010867438,
-0.009016746,
0.036468685,
0.0026361607,
-0.022839554,
0.045822572,
0.02358557,
-0.035866134,
0.041719485,
-0.031676967,
0.02038631,
0.0012068953,
-0.034029786,
0.037329473,
0.016182799,
-0.039969217,
-0.0050427783,
-0.029295458,
0.035034038,
-0.023513837,
-0.024001615,
0.024948481,
-0.018090878,
-0.033542007,
0.0034413554,
0.0063769985,
-0.0026917532,
0.026483553,
-0.038190257,
0.028850717,
-0.003959621,
0.031017032,
-0.022179617,
-0.03446018,
0.052393246,
-0.036468685,
-0.019181209,
-0.0035543337,
-0.035177503,
-0.0047056368,
0.04226465,
-0.008213344,
-0.038792808,
0.02256697,
0.042608965,
-0.06783003,
-0.0246759,
0.00046850136,
0.035780054,
-0.021806609,
0.006416451,
-0.001611286,
-0.04869186,
-0.02334168,
0.009920572,
-0.013593264,
0.033455927,
-0.001476788,
0.004515546,
-0.028951142,
0.010322273,
-0.015135508,
-0.022939978,
-0.0028728773,
0.009934919,
-0.0031149737,
0.031705663,
0.026598323,
0.00468053,
0.01520724,
-0.03190651,
0.01229491,
-0.032422982,
0.005713475,
0.047343295,
-0.014231682,
0.034976654,
-0.019625949,
0.03985445,
-0.040198762,
-0.0038233297,
-0.00782599,
-0.01933902,
0.0014507851,
0.019955916,
0.067256175,
0.03572267,
0.01298354,
0.026612671,
0.021347523,
0.023155175,
0.033427235,
0.019970262,
0.028377283,
0.018521272,
-0.008155959,
-0.040801313,
-0.027387379,
0.021648798,
-0.0064021046,
0.014949004,
0.01787568,
-0.017574405,
-0.034029786,
0.022079192,
0.060656805,
0.017574405,
0.027243914,
-0.06461643,
-0.018133916,
-0.020314578,
0.014633382,
-0.0055413176,
-0.059394315,
-0.050901216,
-0.00026428857,
-0.024891095,
-0.0022703263,
-0.009741242,
-0.01832042,
-0.005193416,
-0.021978766,
0.01142695,
-0.007653833,
0.020802356,
-0.011534548,
0.028865064,
-0.040428303,
-0.028305551,
0.01844954,
0.024073347,
-0.012237525,
-0.03268122,
0.037300777,
0.06191929,
-0.03773117,
-0.038649343,
-0.05035605,
0.009662336,
0.031217882,
0.03778856,
-0.009346714,
-0.0038089834,
-0.03328377,
0.04068654,
-0.057529278,
-0.046195578,
0.01836346,
0.0347758,
0.021318829,
-0.022193963,
-0.018549964,
0.031045724,
0.05511907,
-0.014475571,
-0.009526045,
0.014834233,
0.037157312,
-0.03741555,
0.0137223825,
0.0150207365,
-0.002281086,
0.020328924,
0.019382058,
-0.008808722,
0.01796176,
0.008686777,
-0.041461248,
0.01209406,
0.02289694,
0.023269948,
-0.011613454,
-0.012244698,
0.020242846,
0.01549417,
-0.019109476,
-0.016197145,
0.009088478,
0.028836371,
-0.012467068,
0.009325194,
-0.03770248,
-0.018291729,
0.01885124,
-0.043555833,
0.00056444324,
0.023413412,
0.01816261,
0.033484623,
0.035292275,
-0.028692907,
0.040657848,
0.015422437,
0.03603829,
0.020156767,
-0.0093969265,
-0.004106672,
0.02483371,
0.049610034,
-0.0021555545,
-0.021390561,
-0.042580273,
-0.037932023,
-0.0501552,
0.06564937,
-0.017258784,
-0.026612671,
-0.016297571,
-0.044387925,
-0.04243681,
-0.04717114,
0.034574952,
-0.048347548,
-0.02512064,
0.029754544,
-0.007861856,
-0.046482507,
0.0050607114,
-0.006362652,
0.034288023,
0.02196442,
-0.017947413,
0.011756918,
0.08785768,
0.027760386,
0.0089665335,
0.03159089,
0.04335498,
-0.028291205,
-0.016369304,
-0.0054767583,
-0.0030199285,
-0.009841667,
-0.018105224,
-0.03474711,
0.007761431,
0.03210736,
-0.010566163,
-0.014905965,
0.024073347,
0.018019145,
-0.04711375,
0.015709367,
0.04874925,
0.015164201,
0.012244698,
0.0058461796,
0.00855766,
-0.048634477,
-0.049150947,
-0.021419255,
0.036755614,
-0.029754544,
-0.06737094,
-0.019841144,
-0.048491012,
-0.021620104,
-0.022667397,
-0.004648251,
-0.011305005,
0.0537992,
-0.007904896,
0.04048569,
0.030070165,
-0.02867856,
-0.00762514,
0.044674855,
0.0065132896,
-0.0145831695,
0.07454417,
0.03623914,
0.020802356,
0.027444765,
-0.024704592,
0.009741242,
0.0032548516,
-0.007653833,
-0.014690768,
-0.016412342,
-0.02908026,
-0.06765787,
0.007112254,
0.019138169,
0.0031095936,
-0.029338496,
-0.027286954,
-0.0000063606344,
-0.03692777,
0.019984609,
-0.02192138,
0.023413412,
0.0026343674,
-0.012158619,
0.045937344,
-0.03336985,
0.24538173,
0.07104363,
0.044474006,
0.00982732,
0.040916085,
0.073626,
-0.00960495,
-0.01100373,
0.009260636,
0.01949683,
0.007481675,
-0.00012003946,
0.0014678215,
0.0044725067,
-0.0416621,
0.01889428,
-0.010594856,
-0.02843467,
-0.034919266,
-0.03689908,
-0.01273965,
0.009131517,
0.011082635,
0.035206195,
0.029467614,
-0.030787488,
0.01649842,
-0.020544121,
-0.009920572,
-0.04335498,
-0.0063196127,
-0.027889505,
0.021935727,
-0.0048383414,
-0.014324933,
0.030672716,
-0.0016534288,
-0.037329473,
-0.008285076,
0.036439992,
-0.018707775,
-0.02058716,
0.03446018,
-0.027229568,
-0.028076008,
0.038821504,
-0.018492578,
0.016928814,
0.031476118,
-0.050499514,
0.050269973,
-0.04697029,
0.042350728,
-0.043469753,
-0.027932543,
0.0026648536,
-0.071387954,
-0.03368547,
0.036095675,
0.004106672,
0.038247645,
0.0059035653,
-0.01144847,
0.01409539,
-0.002741966,
0.041145626,
-0.006423624,
0.059738632,
-0.03394371,
0.014202989,
0.005509038,
0.008945013,
0.015551555,
-0.029668465,
0.058303986,
0.012373816,
0.013564572,
0.065764144,
0.0011862724,
-0.006592195,
0.000037995684,
-0.014432532,
-0.036870383,
-0.04243681,
0.04926572,
0.055721626,
-0.010745494,
-0.0069580297,
-0.010752667,
0.039825752,
0.028793331,
0.043756682,
0.019955916,
-0.041203015,
-0.031045724
] |
While character tokenization is very simple and would greatly reduce memory and time complexity it makes it much harder
for the model to learn meaningful input representations. E.g. learning a meaningful context-independent
representation for the letter "t" is much harder than learning a context-independent representation for the word
"today". Therefore, character tokenization is often accompanied by a loss of performance. So to get the best of
both worlds, transformers models use a hybrid between word-level and character-level tokenization called subword
tokenization.
Subword tokenization |
[
0.04102701,
-0.027767556,
-0.0016555736,
-0.004656417,
-0.0053067547,
-0.027202692,
0.008911483,
-0.010234456,
0.0009104726,
0.04322701,
-0.018224318,
0.007818916,
0.0028354719,
-0.028406745,
-0.02425945,
0.008435807,
-0.024541881,
-0.041324306,
-0.049767546,
0.019606749,
-0.0006782092,
0.013623643,
-0.06100538,
-0.00969932,
-0.012441887,
0.043851335,
0.007670267,
0.01740675,
0.086394556,
0.0131851295,
-0.022758098,
0.005143241,
-0.0028447623,
-0.0033594582,
-0.025374314,
-0.036418904,
0.004121282,
-0.012070266,
-0.038054038,
-0.018625667,
0.020275667,
0.0031662148,
0.027232422,
-0.06510808,
-0.07361078,
0.024304044,
0.0048608086,
-0.041383766,
-0.036181066,
-0.031127013,
-0.0152959395,
0.008844591,
0.02680134,
0.015474318,
-0.023278369,
-0.020974316,
-0.0001743137,
0.018506749,
-0.038678363,
0.0017967898,
0.029387826,
0.06409727,
-0.017644588,
-0.03001215,
-0.0022613166,
0.021345938,
-0.057051327,
0.01043513,
-0.02995269,
-0.058151327,
-0.051640518,
-0.004738174,
-0.0356162,
-0.0056152004,
-0.058359437,
-0.027485123,
0.03154323,
-0.0042030388,
-0.028971609,
0.09014051,
-0.019770263,
0.040254038,
0.023293234,
0.0044817547,
-0.01719864,
-0.04955944,
0.033802688,
-0.010108104,
0.017644588,
-0.039154038,
-0.0149317505,
0.019472964,
0.0018804047,
0.0010293914,
0.04652701,
0.04197836,
-0.0080418885,
0.04084863,
0.0051989844,
0.021583775,
0.02512161,
0.07396754,
-0.040759444,
0.041383766,
-0.031335123,
0.0010953543,
0.07141078,
-0.0033854716,
-0.06177835,
0.0023635125,
-0.017763507,
-0.029685123,
-0.006826686,
-0.014515535,
-0.008993239,
0.041710794,
0.03463512,
0.0019324316,
-0.043375656,
-0.00031030393,
0.0067226323,
-0.020052694,
-0.015184453,
-0.03264323,
0.05690268,
-0.047716197,
0.0012049826,
0.04504052,
-0.011512833,
-0.010487158,
0.046972953,
0.02307026,
0.013482427,
0.021806749,
0.026949989,
0.0028280395,
0.009476348,
-0.011386482,
-0.0005049407,
-0.02199999,
-0.03356485,
-0.0029172285,
-0.006763511,
0.051818896,
0.04224593,
-0.014998643,
0.009922293,
-0.036032416,
-0.021881072,
0.030294582,
-0.06790268,
0.014842561,
0.03377296,
0.025032422,
-0.038499985,
-0.014634454,
-0.0017103878,
0.02006756,
-0.023114854,
-0.046883766,
-0.0057266867,
-0.013772292,
-0.009394591,
0.06516754,
-0.049172953,
0.03383242,
-0.042364847,
-0.008019592,
-0.004864525,
-0.014389183,
0.007075673,
0.0026385125,
0.015214182,
0.030383771,
0.0038128363,
0.02321891,
0.045010794,
0.018922966,
-0.004537498,
-0.001781925,
0.0061391867,
-0.01893783,
0.0010275333,
0.019577019,
-0.0065442543,
-0.0076776994,
0.02472026,
-0.0037459445,
-0.008190537,
0.004258782,
0.044713493,
0.04831079,
-0.021583775,
0.004968579,
-0.020974316,
-0.006336146,
-0.007685132,
-0.0005453545,
-0.00039322197,
0.004641552,
-0.039362147,
0.048102684,
0.0034189175,
0.011059455,
-0.04108647,
-0.061599974,
0.02006756,
0.04643782,
-0.012204049,
0.022862153,
0.02257972,
0.029447285,
-0.033386473,
0.0017521952,
-0.0027630057,
-0.033862147,
0.0012486482,
-0.0014929892,
-0.014574994,
0.010598645,
0.021093234,
0.017912155,
0.067427,
-0.02732161,
-0.0021721274,
-0.023605395,
0.0064476323,
0.03760809,
0.039837822,
0.01841756,
0.036181066,
0.03992701,
0.023590531,
0.01719864,
-0.004399998,
0.029759448,
0.013199994,
0.06695133,
0.002980404,
0.004533782,
-0.02058783,
0.013036481,
0.031037824,
0.018477019,
0.021063505,
-0.017391885,
-0.02512161,
-0.03175134,
-0.016737832,
0.0045969575,
-0.030339176,
0.023887828,
0.012427022,
-0.016559452,
-0.039154038,
-0.051848628,
-0.013757426,
0.02425945,
-0.004637836,
-0.04233512,
0.019591885,
0.031275664,
0.04013512,
0.010397969,
0.028927015,
0.04542701,
0.04709187,
0.028287826,
-0.026682422,
-0.049767546,
-0.018982425,
-0.07188646,
-0.040283766,
0.0013638508,
-0.012055401,
-0.02101891,
-0.06255133,
-0.055267546,
0.0049983086,
-0.0065702675,
-0.0042141876,
-0.02003783,
-0.022758098,
0.02483918,
-0.0015914689,
0.017302696,
-0.0526216,
0.045902684,
0.012196616,
0.030889176,
-0.0038165525,
0.0018952695,
-0.0015292224,
-0.030889176,
0.005708106,
0.016782425,
0.008577024,
-0.00890405,
-0.03686485,
0.016455399,
-0.021821612,
-0.012620265,
-0.008249996,
0.0611243,
-0.02417026,
0.032108095,
0.003270269,
-0.037221607,
0.035081066,
0.05238376,
-0.02373918,
-0.0084060775,
0.008428375,
0.031156743,
-0.011371617,
0.033386473,
0.026727015,
0.009283104,
-0.007428713,
-0.022312153,
-0.0257608,
0.00374037,
-0.016068913,
-0.04935133,
0.013118238,
0.06796213,
-0.011557427,
-0.057497274,
-0.036389176,
-0.02049864,
-0.018566208,
-0.007915537,
-0.021777019,
0.051699977,
0.026667556,
-0.007306078,
-0.05357295,
-0.012003373,
-0.016574318,
-0.0050466196,
0.0036994917,
-0.026518907,
0.010955401,
0.040581062,
0.0043665525,
-0.002387668,
0.0018293067,
-0.036002688,
-0.0027834447,
-0.040313497,
0.0071983077,
0.057408083,
0.008777699,
0.0009313763,
-0.0071945917,
0.027529718,
-0.039332416,
0.005641214,
0.008086483,
-0.004154728,
0.055178355,
0.023263505,
-0.011245266,
-0.010561482,
-0.04727025,
-0.025627017,
-0.008881753,
0.028525664,
0.04102701,
-0.035972957,
0.038381066,
0.029655393,
-0.008941213,
0.049083762,
-0.026994584,
-0.046913493,
0.033148635,
0.040462144,
0.05387025,
-0.044029713,
0.0016128372,
0.008160807,
-0.00040390607,
0.009580402,
0.04914322,
0.04084863,
-0.0263108,
0.00890405,
0.011951346,
0.0055780383,
0.008108781,
0.0152067505,
0.006737497,
0.0012077697,
0.009409456,
-0.043821603,
0.037489172,
0.04313782,
0.039481066,
0.004206755,
0.074324295,
0.03329728,
0.0041472954,
0.039124306,
0.0183581,
-0.0139804,
-0.04117566,
0.037489172,
-0.015964858,
0.017213507,
-0.038381066,
-0.046913493,
0.0033650324,
0.008703375,
-0.025582422,
0.028495934,
-0.037727013,
-0.013103373,
0.020112153,
0.039540526,
-0.057527002,
-0.034129716,
-0.05473241,
-0.009572969,
0.039213497,
-0.019636478,
-0.027975664,
-0.033386473,
0.013281751,
0.0122709405,
-0.032970257,
-0.025374314,
-0.0014010129,
-0.01789729,
-0.03689458,
0.06261078,
0.042454038,
-0.005317903,
0.035586473,
-0.052056734,
-0.0075773615,
0.029610798,
-0.02900134,
-0.010256752,
0.014671615,
0.00460439,
-0.0045597954,
0.011029725,
-0.004622971,
-0.03582431,
0.015652696,
-0.0146493185,
-0.003010134,
-0.05978646,
0.0054108086,
-0.051759437,
-0.026875665,
-0.006403038,
0.017793236,
0.040491875,
-0.018209452,
-0.0008259287,
0.05244322,
-0.019799992,
-0.06011349,
0.007395267,
0.038440526,
-0.033059444,
0.021212153,
0.0131554,
0.010992563,
0.0007525335,
0.012917562,
0.023887828,
0.0016583608,
-0.026994584,
-0.0125385085,
0.0075773615,
-0.02113783,
-0.010962834,
-0.028778367,
0.024155395,
-0.022966206,
-0.005451687,
-0.03478377,
-0.07468105,
0.0058604707,
0.0033371607,
-0.008183105,
-0.006313849,
0.03766755,
0.02156891,
0.019785127,
-0.037221607,
-0.01101486,
-0.0496189,
-0.016410803,
-0.0012560806,
0.04643782,
0.017941885,
0.090794556,
-0.029595934,
-0.0021721274,
-0.029521609,
-0.006458781,
-0.006964186,
-0.0029581068,
-0.018120263,
0.018833775,
-0.0056746597,
0.022356747,
0.051432412,
0.015124993,
-0.01838783,
0.035140526,
-0.0047530388,
0.00529189,
-0.023545936,
-0.058389165,
0.03698377,
-0.027827015,
-0.04605133,
-0.02995269,
-0.003994931,
0.003407769,
0.027604043,
0.035408095,
-0.02266891,
-0.02257972,
-0.016514858,
0.0075624967,
-0.05874592,
0.00474189,
-0.02428918,
-0.0015106413,
0.00235608,
0.020810802,
-0.007915537,
-0.05681349,
-0.0040432415,
-0.053097274,
0.004426012,
-0.0062952675,
-0.017956749,
-0.009543239,
0.015251345,
-0.01340067,
-0.00948378,
0.0141067505,
-0.025299989,
-0.020677019,
-0.0013201853,
0.06683241,
0.06873511,
-0.04123512,
0.021345938,
0.0019844586,
-0.024274314,
0.009550672,
0.006856416,
-0.035586473,
0.045754034,
-0.045605388,
0.015622967,
-0.045575656,
-0.039332416,
-0.06528646,
0.02677161,
0.0033594582,
-0.056040518,
-0.039778363,
-0.035527013,
0.054108087,
0.043256737,
0.024735125,
-0.018893236,
0.026266206,
-0.047805384,
-0.02732161,
0.0113418875,
-0.014983778,
0.007532767,
0.000041604184,
0.01697567,
0.067724295,
-0.04423782,
0.023932423,
0.06873511,
0.001644425,
0.008272294,
-0.012672292,
0.026905395,
-0.011416212,
-0.016678372,
-0.011282428,
-0.006128038,
-0.051016197,
0.020409452,
-0.045783766,
-0.059816193,
-0.016039183,
0.02474999,
0.061540514,
-0.06784321,
0.016083777,
-0.024110802,
-0.024660802,
-0.03766755,
0.025864854,
0.03677566,
0.011148644,
0.0124493195,
-0.026563503,
-0.0008565875,
0.013616211,
-0.038678363,
-0.023144584,
-0.03493242,
0.05378106,
0.0019603032,
-0.025582422,
0.01691621,
-0.009528374,
-0.01997837,
-0.007599659,
0.04709187,
0.027425664,
-0.036359444,
-0.01285067,
-0.0096026985,
0.03992701,
-0.029506745,
0.00047660453,
0.024467558,
-0.022416206,
-0.044981062,
0.034159444,
0.013876346,
0.021435127,
0.030621609,
0.044921603,
-0.02729188,
0.022104045,
-0.041889172,
0.021955397,
0.008027024,
-0.018922966,
0.039213497,
0.021985127,
-0.005611484,
-0.0012802359,
0.008695942,
0.05155133,
-0.017510803,
-0.028867556,
0.026920259,
-0.038589172,
-0.04863782,
-0.0041287146,
0.02266891,
-0.030799987,
-0.0011585299,
-0.03980809,
0.0043182415,
0.012806076,
0.029655393,
0.0098776985,
-0.04622971,
0.039272957,
-0.010286482,
-0.001954729,
-0.032256745,
-0.028599989,
-0.0005987751,
0.011304725,
0.0013638508,
-0.025879718,
0.024898639,
0.00092487293,
-0.060410786,
0.00012205443,
-0.031067554,
0.018551344,
-0.01208513,
-0.042632416,
0.008710807,
-0.034099985,
-0.012501346,
0.0021033776,
-0.027202692,
-0.0005012245,
-0.0057155383,
0.012464184,
-0.036299985,
0.018922966,
-0.03273242,
-0.02321891,
0.026489178,
0.012040536,
0.0011027867,
0.028317556,
0.03897566,
-0.03576485,
0.0067969565,
0.025537828,
-0.0070533752,
-0.021866208,
0.008606753,
0.037370253,
-0.03154323,
0.047656737,
-0.029997285,
0.00841351,
-0.037281066,
-0.03157296,
0.019889181,
0.006425335,
0.006146619,
0.036745932,
0.024883773,
0.05161079,
0.005693241,
0.036567554,
0.0066185785,
0.05039187,
0.021940531,
0.028258096,
0.052205384,
-0.0011445942,
0.0035415527,
-0.010568915,
-0.008420942,
0.008829726,
0.0034895255,
0.0017373303,
0.025448639,
-0.028020259,
-0.019354045,
0.021375667,
0.032078367,
0.014641886,
0.01241959,
-0.05800268,
0.019071614,
-0.0134304,
0.0003574534,
-0.0018060803,
-0.037191875,
-0.063740514,
0.018135129,
0.00019440448,
0.028525664,
-0.03499188,
-0.019755397,
0.0032535458,
-0.022014856,
0.037429713,
0.023397287,
0.02885269,
0.002803884,
-0.0075922264,
-0.03573512,
-0.012189184,
-0.00092673104,
0.009253374,
-0.018090533,
-0.02744053,
0.0537216,
0.041681062,
-0.014998643,
-0.016618911,
-0.04444593,
-0.019621614,
0.031781066,
0.038321607,
-0.014582426,
-0.006403038,
-0.045605388,
0.023991883,
-0.046616197,
-0.019993234,
-0.011408779,
0.03445674,
0.014352021,
0.014731075,
0.0022631746,
0.024348639,
0.05553511,
0.003653039,
-0.004738174,
0.013341211,
0.020231072,
-0.011668914,
-0.003684627,
-0.029239178,
0.015184453,
0.05476214,
-0.0031885123,
-0.0018534621,
0.012055401,
0.03050269,
-0.020171613,
-0.0063064164,
0.03279188,
0.007982429,
-0.0014994927,
-0.01058378,
0.01685675,
-0.00917905,
-0.0155783715,
-0.00654797,
0.0559216,
0.01844729,
-0.021643234,
0.0056486465,
-0.041443225,
-0.0034467892,
0.030116204,
-0.069924295,
-0.0076776994,
0.02903107,
-0.0063956054,
0.019562153,
0.006172633,
-0.044981062,
0.07771348,
0.011698644,
0.05068917,
-0.0027945933,
-0.0063101323,
0.030294582,
0.015154723,
0.0337135,
-0.03389188,
0.024735125,
-0.03169188,
0.012649994,
-0.06546484,
0.04233512,
-0.02998242,
-0.027544584,
0.022356747,
-0.016083777,
-0.032970257,
-0.06284862,
0.019725667,
-0.016247291,
-0.014463508,
0.025359448,
-0.057943217,
-0.056545924,
0.0021033776,
0.0027648637,
0.011052023,
0.011847292,
0.026667556,
0.0049054036,
0.0693297,
0.030978365,
0.009082429,
0.03255404,
0.02156891,
-0.004812498,
-0.049975656,
-0.017986478,
-0.034754038,
0.00039066706,
-0.013140535,
-0.024081072,
0.02417026,
0.030681068,
-0.021925667,
-0.03154323,
0.013512157,
0.012664859,
-0.019116208,
0.025522962,
0.03487296,
-0.030279716,
-0.0011826854,
-0.031156743,
0.0088668885,
-0.014916886,
-0.05077836,
-0.022921612,
0.020914856,
-0.04117566,
-0.06379998,
-0.011936481,
-0.022564856,
-0.025835125,
-0.039362147,
-0.009127024,
-0.019785127,
0.030056745,
0.0051358086,
0.016871614,
0.021851342,
-0.016737832,
-0.029135123,
0.07604862,
0.028302692,
-0.01364594,
0.087108076,
0.036151335,
0.015964858,
0.03689458,
0.0053624976,
0.024913503,
0.030948635,
-0.024348639,
-0.011661482,
-0.012947292,
-0.036121607,
-0.07384862,
-0.007685132,
0.068021595,
0.015474318,
-0.039659444,
-0.046824306,
0.011817562,
-0.052264843,
-0.024110802,
-0.01523648,
0.026652692,
-0.015399993,
-0.0021869924,
0.033594582,
-0.05381079,
0.26376206,
0.06296754,
0.011089184,
0.025567558,
0.0014985636,
0.06576213,
0.013571616,
-0.044505388,
-0.0023988166,
-0.019056749,
0.040224306,
-0.051759437,
0.013474994,
0.00457466,
-0.015251345,
0.048221603,
-0.03267296,
-0.0149243185,
-0.031245934,
-0.02842161,
-0.054375652,
0.056129705,
-0.0063956054,
0.05773511,
0.033921607,
-0.034427013,
0.014693913,
0.009193915,
-0.018016208,
-0.033089176,
-0.00025688333,
-0.04108647,
0.036329716,
0.0076925643,
-0.015095264,
0.030279716,
0.018164858,
-0.037013497,
-0.022193234,
0.06237295,
-0.025285125,
-0.0400162,
0.022044586,
0.00038439594,
-0.038113497,
0.047924306,
-0.01786756,
0.010509455,
0.049113493,
-0.05024322,
0.03903512,
-0.027202692,
0.031097284,
-0.043643225,
-0.0038648632,
-0.026117558,
-0.04019458,
-0.009201348,
-0.01422567,
-0.012649994,
0.029313501,
0.016217561,
-0.010784455,
0.008272294,
-0.023114854,
0.01685675,
0.015964858,
0.036508095,
-0.024675665,
0.0055520246,
0.017971614,
-0.02512161,
0.020216208,
-0.010881077,
0.0047864844,
0.04426755,
0.003324154,
0.059191868,
0.025805395,
-0.038618904,
0.03445674,
-0.022654045,
-0.058597274,
-0.03888647,
0.031840526,
0.07028105,
-0.030889176,
-0.003342735,
0.029804042,
0.0015134284,
0.024378369,
0.014292561,
0.022044586,
-0.048281062,
-0.006573984
] |
As we saw in the preprocessing tutorial, tokenizing a text is splitting it into words or
subwords, which then are converted to ids through a look-up table. Converting words or subwords to ids is
straightforward, so in this summary, we will focus on splitting a text into words or subwords (i.e. tokenizing a text).
More specifically, we will look at the three main types of tokenizers used in 🤗 Transformers: Byte-Pair Encoding
(BPE), WordPiece, and SentencePiece, and show examples
of which tokenizer type is used by which model.
Note that on each model page, you can look at the documentation of the associated tokenizer to know which tokenizer
type was used by the pretrained model. For instance, if we look at [BertTokenizer], we can see
that the model uses WordPiece.
Introduction
Splitting a text into smaller chunks is a task that is harder than it looks, and there are multiple ways of doing so.
For instance, let's look at the sentence "Don't you love 🤗 Transformers? We sure do." |
[
0.046248104,
-0.0010247047,
-0.018829385,
0.041715622,
-0.003836522,
-0.019668734,
0.012520282,
0.01563986,
-0.017710254,
0.035644334,
0.04630406,
-0.017990036,
-0.052291412,
-0.048094667,
-0.04675171,
0.025026575,
-0.041323926,
-0.055173174,
-0.023921432,
0.0035549907,
0.026649315,
0.0042352127,
-0.050276976,
0.015206197,
0.04185551,
0.059425876,
-0.009386715,
0.009092942,
0.11073805,
0.036427725,
-0.013660396,
0.023501758,
-0.040820315,
0.00045858155,
-0.02965698,
-0.06339879,
0.01418499,
-0.0071169757,
-0.01629735,
-0.0034640613,
0.017962057,
-0.021263495,
0.018227851,
-0.056795914,
-0.07251971,
0.0011383664,
0.016842926,
-0.030020699,
0.016521176,
-0.022620441,
-0.022956181,
-0.017150687,
0.0068092146,
0.0042876718,
-0.0014557451,
0.0024183728,
0.01002322,
0.020410158,
-0.01409406,
-0.013002907,
0.026439479,
0.057355482,
-0.01060377,
-0.043534208,
-0.010121144,
0.01328269,
-0.06580492,
0.023823509,
-0.024592912,
-0.031895243,
-0.026635326,
-0.012967935,
-0.005749537,
-0.039813098,
-0.037714727,
-0.054781478,
0.03472105,
-0.012597222,
-0.013870234,
0.07789154,
0.0117089115,
0.009673491,
0.020731907,
-0.024383074,
-0.00280832,
-0.022424594,
0.04812265,
0.0013892966,
0.0033941155,
-0.03975714,
-0.034441266,
0.02607576,
-0.01614347,
-0.02283028,
0.0391696,
0.025278378,
0.008288566,
-0.0027593581,
-0.019374961,
0.006606372,
0.051144302,
0.057411436,
-0.0017661292,
0.04009288,
-0.042443056,
0.025362315,
0.04859828,
-0.012723125,
-0.053354587,
0.013093837,
-0.032482788,
-0.0029097414,
0.011380167,
-0.0067147883,
-0.010386937,
0.060433093,
-0.0059488826,
0.020144364,
-0.07229588,
-0.013520505,
-0.00036655922,
-0.021697158,
0.012408368,
-0.008533376,
0.022760333,
-0.0042841746,
0.0037455927,
0.03894577,
-0.0082396045,
-0.0065713995,
0.04235912,
0.023431811,
-0.00019147637,
0.031811308,
0.054501697,
-0.0025232914,
0.004581444,
0.013058864,
0.0374909,
-0.009302779,
0.010365954,
0.0046758708,
0.019109167,
0.049829323,
0.025572151,
-0.020186331,
0.043730058,
-0.04126797,
-0.0073792725,
0.04434558,
-0.0177802,
0.06306305,
0.047171384,
0.03483296,
-0.02411728,
-0.04384197,
-0.028607795,
-0.01840971,
0.0051864744,
-0.03718314,
-0.007533153,
0.010128139,
-0.039197575,
0.04350623,
-0.026915109,
0.051703867,
-0.054305848,
0.0065853884,
-0.015849698,
0.0011278746,
-0.0093517415,
0.004266688,
-0.028076207,
0.03894577,
0.030356437,
0.0609367,
0.059593745,
-0.02771249,
0.026677294,
0.002442854,
0.0015388055,
0.009071958,
-0.031223765,
0.011729895,
-0.0068162093,
0.004903194,
-0.018269818,
0.014478762,
-0.018983265,
-0.012268477,
0.05181578,
0.036595594,
-0.03206311,
0.009260812,
-0.024005366,
-0.007756979,
0.009295785,
-0.023837497,
0.004091824,
-0.049185824,
-0.0131567875,
0.040204793,
0.016814949,
0.011443118,
-0.036595594,
-0.039980967,
0.022200769,
0.042023383,
-0.033238202,
0.023697605,
0.002295968,
0.046192147,
-0.03357394,
-0.016409263,
0.0009355238,
-0.022774322,
0.011296232,
0.01482849,
-0.0127860755,
0.010792623,
-0.0040603485,
-0.008491409,
0.02722287,
0.00017541072,
0.029852828,
-0.011303226,
-0.0017713751,
0.01712271,
0.020326223,
0.011296232,
0.029489111,
0.04722734,
0.017892113,
0.0148424795,
-0.014954393,
0.021445354,
0.016423251,
0.07016954,
-0.008295561,
-0.01924906,
-0.034301374,
0.023040116,
0.008449442,
0.02593587,
0.028286045,
0.036091987,
0.004018381,
-0.0014513734,
0.00035519304,
-0.010386937,
0.0062706326,
0.018689493,
0.01115634,
0.013968158,
-0.06239157,
-0.017542385,
-0.00497314,
0.0065504154,
-0.016325328,
-0.04806669,
-0.02951709,
0.042275187,
0.030943982,
0.010289013,
0.036903355,
0.041603707,
0.041631687,
0.042079337,
-0.039365444,
-0.025795978,
-0.0030321465,
-0.0228023,
-0.021109615,
-0.015388056,
-0.00037770683,
-0.039813098,
-0.028425936,
-0.043422297,
0.0154160345,
-0.0018168398,
0.0075401473,
0.006886155,
0.010960492,
0.03796653,
-0.01626937,
0.022970172,
-0.025530184,
0.044849187,
0.036371768,
0.0411001,
0.011925743,
-0.010498851,
-0.020759886,
-0.0073373048,
0.0026736746,
0.047674995,
-0.010848579,
-0.0070015653,
-0.024397064,
-0.008582339,
0.021487322,
-0.02592188,
-0.0023484272,
0.012883999,
-0.03667953,
0.0024218701,
-0.0063021085,
-0.0006793477,
0.0564322,
0.04596832,
-0.045996297,
-0.018227851,
-0.005529208,
0.02508253,
-0.03732303,
0.01955682,
0.02901348,
-0.009974258,
-0.014926414,
-0.026047781,
-0.018479656,
-0.006641345,
-0.026397511,
-0.0411001,
0.024033345,
0.06110457,
-0.025152477,
-0.063958354,
-0.01874545,
-0.060489047,
-0.014087066,
-0.0014496248,
-0.016101502,
0.06787532,
0.011652955,
-0.005980358,
-0.027460685,
-0.03891779,
-0.02201891,
0.014618653,
0.011967711,
-0.06334283,
0.018143917,
0.03127972,
0.038190357,
-0.0071344622,
0.009925296,
-0.051619932,
-0.0063545676,
0.005081556,
0.0066588316,
0.061272442,
0.017304568,
0.016535165,
-0.025054554,
0.02330591,
-0.032818526,
0.013023891,
0.016619101,
0.018983265,
0.033965636,
0.038246315,
0.023683617,
-0.02330591,
-0.03368585,
0.01303788,
0.009904312,
-0.02168317,
0.044289622,
-0.026187673,
0.037239097,
-0.02283028,
-0.027866371,
0.059873525,
-0.02315203,
-0.06502153,
-0.0032717106,
0.010519834,
0.04493312,
-0.027684512,
-0.009253818,
0.024327118,
0.015807731,
0.0009871088,
0.03290246,
0.030020699,
-0.019514853,
-0.0034500721,
0.009526606,
0.007854903,
-0.02442504,
-0.011701917,
0.010554807,
0.01859157,
0.011995689,
-0.021067647,
0.030384416,
0.03158748,
0.04613619,
-0.009526606,
0.045856405,
-0.000322406,
-0.0015755271,
0.046360016,
0.029461132,
-0.03421744,
-0.020647973,
0.043254428,
-0.021697158,
0.02755861,
-0.034133505,
0.00038448282,
-0.03231492,
-0.002295968,
0.0060223257,
0.026579369,
-0.051424086,
-0.028132165,
0.05542498,
0.014534718,
-0.04940965,
-0.020340212,
-0.029041458,
0.029824851,
0.026159694,
-0.07973811,
-0.022298692,
-0.03586816,
0.03785462,
0.0010946504,
-0.0047493135,
-0.0042596934,
0.0030234032,
0.0071519488,
-0.0074702017,
0.017374514,
-0.0059034177,
-0.010107155,
0.021948963,
-0.07973811,
-0.02478876,
0.0019305015,
0.022130823,
-0.007190419,
0.0030618734,
0.036064006,
0.024383074,
0.030916004,
-0.013646408,
-0.0059034177,
0.007095992,
-0.04644395,
0.0004970517,
-0.06552514,
0.022228746,
-0.07168036,
-0.011862792,
-0.031251743,
0.009099937,
0.053522456,
-0.0018727963,
-0.0054068035,
0.017164677,
-0.0036686524,
-0.037239097,
-0.004326142,
0.013471544,
-0.027334783,
0.050612714,
0.039533313,
0.015919643,
0.016745003,
0.02201891,
0.016059535,
0.008666273,
-0.027670523,
-0.014758545,
0.008925073,
-0.034637116,
0.0059383907,
-0.01810195,
0.019528842,
0.042107318,
-0.0015746527,
-0.048206583,
-0.076548584,
0.007022549,
0.023193996,
-0.0008166162,
0.044961102,
0.015863687,
0.008351518,
0.04042862,
-0.033797767,
-0.012674162,
-0.0325947,
-0.0051934686,
-0.003367886,
0.033154264,
0.013352636,
0.07223993,
-0.0060398118,
0.016912872,
0.014520729,
-0.01759834,
-0.012716129,
-0.008225615,
-0.035924114,
0.022214757,
0.02558614,
-0.020480104,
0.020857811,
0.017542385,
-0.012653179,
0.0381344,
0.014758545,
-0.031111851,
-0.01877343,
-0.043422297,
0.04269486,
-0.037630793,
-0.101001605,
-0.07694028,
0.018059982,
-0.023557715,
-0.009547589,
0.017808177,
-0.035448484,
-0.015094284,
-0.037882596,
0.0122824665,
-0.044877168,
-0.0037351009,
-0.016758991,
0.04012086,
0.014115044,
0.024676846,
-0.018983265,
-0.04633204,
-0.047842864,
-0.02134743,
-0.010568797,
0.0065818913,
-0.07705219,
-0.025292369,
-0.04059649,
0.008099713,
0.0177802,
-0.0012747606,
-0.039980967,
-0.023683617,
0.0015335596,
0.052683108,
0.057299525,
-0.023040116,
-0.026285598,
-0.016507188,
0.0143038975,
0.028551837,
0.021781094,
-0.0456046,
0.03326618,
-0.03782664,
0.031559505,
-0.049913257,
-0.027390739,
-0.03667953,
-0.013093837,
0.012016673,
-0.048626255,
-0.046108212,
-0.029349219,
0.041184034,
0.014059087,
0.03276257,
-0.027208881,
0.029237306,
-0.047507126,
-0.033462025,
0.010323986,
-0.008358512,
0.031531524,
-0.02965698,
-0.0077150115,
0.050780583,
-0.05360639,
-0.011093389,
0.077331975,
0.028467903,
0.010645737,
-0.022046888,
0.011862792,
-0.0026544395,
-0.009526606,
-0.027726479,
-0.0139331855,
-0.06227966,
0.033797767,
-0.057747178,
-0.05022102,
-0.01482849,
0.04272284,
0.07604498,
-0.110514216,
0.018983265,
0.0064419997,
-0.026971065,
-0.05167589,
0.030916004,
0.012709135,
-0.04283475,
0.04384197,
-0.021543277,
-0.013569468,
-0.01615746,
-0.026117727,
-0.022886235,
0.027432706,
0.024341106,
-0.0076170876,
0.0052284417,
0.036064006,
0.0029114902,
-0.033238202,
-0.061496265,
-0.008638295,
0.009225839,
0.00032874482,
-0.02656538,
0.0021893007,
-0.0015938878,
-0.0049171834,
0.003186027,
0.017948069,
-0.015136251,
-0.026019804,
0.012988918,
0.024550945,
-0.008498403,
0.03849812,
0.025166467,
-0.037211116,
0.022144811,
-0.030776111,
0.030860046,
0.021109615,
-0.001101645,
0.03698729,
0.012268477,
-0.030440371,
-0.025530184,
0.047171384,
0.053382564,
-0.022074865,
-0.03231492,
-0.0054137977,
-0.046387993,
-0.029629001,
0.017654296,
0.013121815,
-0.027684512,
0.028705718,
-0.017052764,
-0.011827819,
-0.033322137,
0.047311276,
-0.004707346,
-0.015709806,
0.044205688,
-0.018843373,
-0.015402045,
-0.010072182,
-0.018045994,
-0.013303674,
-0.014198978,
0.027306804,
-0.039561294,
-0.01075765,
0.03290246,
-0.071960144,
-0.007966816,
-0.017430471,
0.0074352287,
-0.02593587,
-0.035336573,
0.012177547,
-0.018353755,
0.011093389,
0.0038260303,
-0.057243567,
0.030048676,
-0.004137289,
0.030860046,
0.012828043,
0.01629735,
-0.039029706,
-0.02608975,
-0.0146746095,
0.028733697,
0.0057250564,
0.03553242,
-0.005868445,
-0.015849698,
-0.006599378,
-0.022522518,
-0.016073523,
-0.03223098,
-0.05016506,
0.011534047,
-0.030384416,
0.019808624,
-0.031223765,
0.047003515,
-0.024159247,
-0.013079847,
-0.0073792725,
-0.00887611,
-0.008869116,
0.034916896,
0.036735486,
0.06457388,
0.02593587,
-0.0005328989,
0.0137303425,
0.036847398,
0.043086555,
0.017542385,
0.04759106,
-0.027264837,
-0.01923507,
-0.019710701,
-0.0039309487,
0.016563144,
0.005168988,
-0.0062916167,
-0.005931396,
-0.01810195,
-0.017612329,
0.011918749,
0.014436794,
0.032510765,
0.044289622,
-0.03995299,
-0.012988918,
-0.009253818,
0.011590004,
-0.005529208,
-0.038078442,
-0.043058578,
-0.0035252636,
-0.045268863,
0.0027418719,
-0.0054103006,
-0.044121753,
-0.0014470018,
-0.0014627397,
-0.0010194588,
-0.01808796,
0.01923507,
-0.0037455927,
-0.0017661292,
-0.014198978,
-0.007414245,
0.009134909,
0.018045994,
-0.036259856,
-0.034944877,
0.037518878,
0.0564322,
-0.010184095,
-0.022956181,
-0.08275976,
0.025767999,
0.010044204,
0.0155839035,
-0.03279055,
0.013744332,
-0.035168704,
0.052207477,
-0.05701974,
0.022438584,
-0.0032682132,
0.020997701,
0.017570361,
-0.0038295276,
-0.025460238,
0.02508253,
0.056516133,
-0.008834143,
-0.010659726,
0.04971741,
0.043450274,
-0.0045639575,
0.019766657,
-0.017248612,
-0.009988247,
0.028048228,
-0.02168317,
-0.00870824,
0.014171001,
0.0058544558,
-0.030188568,
-0.020773875,
0.038246315,
0.0024533458,
0.01776621,
-0.001270389,
0.011715906,
0.009680486,
0.0056795916,
-0.014052093,
0.00664834,
-0.008827148,
-0.0044170716,
0.024480999,
-0.01940294,
-0.030272502,
0.013891217,
-0.05198365,
-0.027754458,
0.018185884,
0.009071958,
0.013618429,
0.031923223,
-0.05234737,
0.041044142,
0.04241508,
0.061384354,
0.013310668,
-0.016059535,
0.013982147,
0.021109615,
0.036231875,
-0.012065635,
-0.006823204,
-0.044065796,
-0.018018015,
-0.072575666,
0.049633473,
-0.021263495,
-0.025362315,
-0.008484415,
-0.024956629,
-0.008330534,
-0.055508915,
0.011142352,
-0.031727374,
-0.03701527,
0.055369023,
-0.029629001,
-0.04708745,
0.02006043,
-0.008918078,
0.043282405,
0.053886175,
-0.02117956,
-0.011750879,
0.059649702,
0.024187226,
0.024984607,
0.014786523,
0.04272284,
-0.01645123,
-0.05181578,
0.0007895122,
-0.020480104,
0.01230345,
0.016101502,
-0.028314022,
0.01923507,
0.030440371,
-0.015122262,
-0.045744494,
0.021249507,
0.011555031,
-0.020899778,
0.0024655862,
0.0583627,
-0.03175535,
-0.02070393,
-0.013702365,
-0.0019934527,
-0.041239988,
-0.055005305,
-0.0119117545,
0.033462025,
-0.036959313,
-0.06899445,
-0.00944267,
-0.00781993,
0.00044437384,
-0.0023309407,
0.0018185885,
-0.0032577214,
0.064965576,
0.013674386,
0.022564486,
0.031559505,
-0.026523413,
-0.012163559,
0.0583627,
0.020885788,
-0.010086171,
0.07470202,
0.05587263,
0.012422358,
0.02315203,
0.027278826,
0.039980967,
0.029097416,
-0.039253533,
-0.019025233,
-0.024508975,
-0.061216485,
-0.058586527,
0.008995018,
0.05853057,
0.04775893,
-0.016926862,
-0.04079234,
0.0019864582,
-0.031531524,
0.012296456,
-0.007945833,
0.01026803,
0.008918078,
-0.029461132,
0.035756245,
-0.036231875,
0.22807896,
0.06429409,
0.03421744,
-0.0025023078,
-0.0028275552,
0.066084705,
0.029125392,
-0.042107318,
0.034497224,
-0.0001534434,
0.016199427,
-0.012751102,
-0.005927899,
0.024900673,
-0.020773875,
0.033657875,
-0.016493198,
0.008561355,
-0.03651166,
-0.01377231,
-0.048794128,
0.01955682,
0.02347378,
0.03729505,
0.0014435046,
0.013947174,
-0.0069386144,
0.021445354,
-0.039505336,
-0.05704772,
0.01857758,
-0.03225896,
0.026621336,
-0.014548708,
0.004679368,
0.04789882,
0.015541936,
-0.04826254,
-0.01312881,
0.02918135,
-0.01825583,
-0.027432706,
0.008995018,
-0.043813992,
-0.030692177,
0.040316705,
-0.036091987,
0.003675647,
0.025180455,
-0.027208881,
0.04137988,
-0.017150687,
0.039253533,
-0.03175535,
-0.029041458,
-0.01741648,
-0.05914609,
-0.0374909,
0.021053659,
-0.0007632825,
0.013884223,
-0.017010797,
-0.030720156,
0.032007158,
0.0042317156,
0.02574002,
-0.0015326854,
0.015765762,
-0.029237306,
-0.012863016,
0.025698053,
-0.00627413,
0.017304568,
-0.008582339,
0.021403387,
0.0058614505,
-0.00444505,
0.058586527,
0.02053606,
0.020717919,
0.021319453,
-0.017080743,
-0.028411947,
-0.057355482,
0.05623635,
0.064965576,
-0.033993613,
-0.0013569468,
-0.017360525,
0.023012139,
0.007218397,
0.010282019,
0.00725337,
-0.029265285,
-0.027992273
] |
Subword tokenization algorithms rely on the principle that frequently used words should not be split into smaller
subwords, but rare words should be decomposed into meaningful subwords. For instance "annoyingly" might be
considered a rare word and could be decomposed into "annoying" and "ly". Both "annoying" and "ly" as
stand-alone subwords would appear more frequently while at the same time the meaning of "annoyingly" is kept by the
composite meaning of "annoying" and "ly". This is especially useful in agglutinative languages such as Turkish,
where you can form (almost) arbitrarily long complex words by stringing together subwords.
Subword tokenization allows the model to have a reasonable vocabulary size while being able to learn meaningful
context-independent representations. In addition, subword tokenization enables the model to process words it has never
seen before, by decomposing them into known subwords. For instance, the [~transformers.BertTokenizer] tokenizes
"I have a new GPU!" as follows: |
[
0.0037025667,
-0.011693718,
-0.020177657,
-0.002993352,
-0.020497302,
-0.04480372,
0.025891328,
0.015409603,
-0.022388542,
0.04104788,
0.017753674,
-0.017007833,
0.016768098,
-0.04086142,
0.01421093,
0.015968984,
-0.03596018,
-0.07277275,
-0.026277568,
0.02108332,
-0.017860223,
0.001087962,
-0.0641423,
-0.02438633,
0.007931218,
0.022788098,
0.009975621,
0.028102214,
0.08662408,
0.03169823,
-0.027969029,
0.023866905,
-0.039449647,
-0.004301903,
-0.011527236,
-0.06430213,
-0.006722556,
0.015849115,
-0.052208852,
-0.0032330866,
-0.018859116,
0.0022841373,
0.040328674,
-0.025105532,
-0.065261066,
-0.03484142,
0.0038923565,
-0.020137701,
0.015649337,
-0.031858057,
-0.011061084,
-0.009402921,
0.02860832,
0.021669338,
-0.028927967,
-0.01327863,
-0.031937968,
0.018419603,
-0.06089257,
-0.0042686067,
0.019604957,
0.05146301,
-0.0001589906,
-0.07485045,
0.0014525582,
0.03321655,
0.00912323,
0.019778099,
-0.049252126,
0.009556085,
-0.047866993,
0.031831417,
-0.020270886,
-0.03454841,
-0.04227319,
-0.005430653,
0.022308629,
0.026037833,
-0.027542833,
0.039502922,
0.02879478,
0.032230977,
0.013298607,
0.011127678,
-0.041660532,
-0.036253188,
0.04978487,
-0.024239825,
-0.016155444,
-0.040142216,
-0.028102214,
0.0113407755,
-0.010854647,
-0.010295266,
0.018965665,
0.043125577,
-0.03161832,
0.041926906,
-0.025838055,
-0.007944535,
0.030472923,
0.07511682,
-0.031005666,
0.052635048,
-0.0020677103,
0.024612745,
0.04075487,
0.005410675,
-0.02587801,
0.040062305,
-0.0038290932,
-0.009909027,
0.026850266,
-0.009749204,
-0.0053041265,
0.030712657,
-0.032710444,
0.023640487,
-0.055085666,
-0.016062213,
0.00037167175,
-0.035454072,
0.027969029,
-0.045602836,
-0.025012303,
-0.06424885,
-0.018486196,
0.012939005,
-0.0058701662,
-0.010022235,
0.02334748,
0.0064461953,
0.014250886,
0.036199912,
0.024919072,
-0.01073478,
-0.024972348,
0.0006759182,
-0.000001781881,
-0.025598321,
-0.02165602,
0.013225355,
0.0032031196,
0.083427615,
0.019072214,
0.008417346,
0.02531863,
-0.029513985,
-0.011720355,
0.039902482,
-0.055778235,
-0.017180974,
0.018805843,
0.01449062,
-0.05271496,
0.0022158795,
-0.0124129215,
0.008896815,
-0.0032530644,
-0.017846905,
0.023773674,
-0.00893677,
-0.013997832,
0.038623895,
0.007651527,
0.04989142,
-0.026144382,
-0.01627531,
-0.0120266825,
-0.044856995,
0.016901284,
-0.0020627158,
-0.01844624,
-0.0016606611,
0.025931286,
0.01101447,
0.049944695,
-0.0030999007,
0.010588275,
0.009136549,
0.0072319917,
-0.006899027,
-0.035880268,
0.02134969,
-0.0019495079,
0.005004458,
0.0014816925,
0.0074517485,
-0.017753674,
-0.012985621,
0.024306418,
0.012486174,
-0.005563839,
0.034601685,
-0.054819297,
0.06014673,
-0.022614958,
0.012879072,
-0.03161832,
-0.07309239,
-0.00030029248,
0.05354071,
-0.014597169,
-0.0011753652,
0.004957843,
-0.028395222,
0.0011603817,
0.027649382,
-0.025025621,
-0.020190975,
0.02249509,
0.05271496,
-0.030073365,
-0.0015616041,
0.034015667,
-0.0047580646,
0.00048487974,
-0.0060366485,
0.017567214,
0.045389738,
0.0056770467,
0.0061232196,
0.060200002,
0.055511862,
-0.0047647236,
-0.023653807,
0.017034471,
0.029247612,
0.012672634,
0.017593851,
0.024159914,
0.043178853,
0.007038872,
0.055511862,
-0.0038457415,
0.019818055,
0.036173277,
0.050690535,
0.012752545,
0.0011320797,
-0.018712612,
-0.010854647,
0.037585046,
-0.005064392,
0.019778099,
-0.00008813157,
-0.0076115713,
-0.0177004,
-0.029407436,
0.019871328,
-0.005447301,
0.023653807,
0.020470666,
-0.009229779,
-0.058228854,
-0.063662834,
0.0072386507,
0.035640534,
0.01289905,
-0.017234249,
0.018193187,
0.024293099,
0.019578319,
0.0042519583,
0.051436376,
0.032124426,
0.010907921,
0.022601638,
-0.042113364,
-0.050504074,
0.0004594912,
-0.057749383,
-0.068777174,
0.015023364,
-0.04677487,
-0.030313099,
0.015622701,
-0.03577372,
-0.0008361574,
-0.021309735,
-0.002229198,
0.0012810813,
-0.019058894,
0.044484075,
0.06014673,
0.009815797,
-0.021203186,
0.028102214,
-0.014384071,
0.03143186,
-0.040248763,
0.0207104,
-0.0036193253,
-0.0107614165,
0.006392921,
0.023880223,
-0.025771461,
-0.015169868,
-0.03231089,
0.007325222,
-0.033323098,
0.0015199835,
0.017074427,
0.0023557248,
-0.021975664,
-0.0006438703,
0.04376487,
-0.022242038,
0.073198944,
0.039662745,
-0.03350956,
0.022814736,
0.024679339,
0.02871487,
-0.02804894,
0.024839161,
0.035161063,
-0.0015357994,
-0.045336463,
-0.029593896,
-0.02946071,
-0.0028751495,
-0.03851735,
-0.04941195,
0.016594958,
0.037771508,
-0.0030566154,
-0.05375381,
0.035427436,
-0.023773674,
-0.039742656,
-0.040435225,
-0.012792501,
0.031671595,
0.009862412,
-0.0076848236,
-0.04339195,
-0.013471749,
0.0134850675,
-0.019032259,
0.034601685,
-0.05929434,
0.023187656,
0.05204903,
0.047467437,
0.02333416,
0.013917921,
-0.03635974,
-0.0024988996,
-0.023374116,
0.012779182,
0.0042885845,
0.032790355,
0.036093365,
-0.0009714243,
0.00799781,
-0.03255062,
0.02061717,
0.030499559,
-0.006945642,
0.014930134,
0.06265062,
0.043551773,
-0.0029700445,
-0.015942346,
-0.009815797,
-0.034814782,
-0.003679259,
0.008956748,
-0.022042258,
0.006426217,
-0.0027985678,
-0.04232646,
0.0067458632,
0.0023007856,
-0.03231089,
0.027622744,
0.011780288,
0.047680534,
-0.006952301,
-0.01618208,
0.0047380864,
-0.010681505,
0.026384117,
0.07122779,
0.050077878,
0.007305244,
0.017487302,
-0.0231477,
-0.017673763,
-0.027050046,
-0.009802478,
0.012239779,
0.02043071,
-0.027462922,
-0.040595047,
0.03433531,
0.0030899118,
0.060200002,
0.021576108,
0.0543931,
-0.025265357,
-0.01044843,
0.012193165,
0.011354093,
-0.039209913,
-0.042486288,
0.05234204,
0.005960067,
-0.00696562,
-0.033616107,
-0.01836633,
-0.05093027,
0.021416284,
-0.013758098,
0.03785142,
-0.006765841,
0.03284363,
0.04584257,
0.012932346,
-0.021296417,
-0.014610488,
-0.035986815,
-0.008044425,
0.027995665,
-0.031218763,
-0.0020793641,
-0.034894694,
0.015382966,
0.038410798,
0.017007833,
-0.027622744,
0.0118602,
-0.001266098,
-0.046748232,
0.023680445,
0.013411815,
0.036919117,
0.02089686,
-0.044910267,
-0.007991151,
-0.008430664,
-0.0041587283,
-0.008803585,
-0.0025471793,
-0.019311948,
-0.005091029,
0.026890224,
0.0064695026,
-0.040408585,
0.033349738,
-0.05497912,
0.011180952,
-0.027729293,
-0.030925754,
-0.05945416,
0.011220908,
0.007877943,
0.049252126,
-0.020510621,
-0.059560712,
-0.02626425,
0.021296417,
-0.020843586,
-0.05212894,
-0.003839082,
0.008290819,
-0.028688231,
0.025398541,
0.013957877,
0.0067725005,
0.044484075,
0.039130002,
0.01458385,
-0.009862412,
-0.007105465,
0.02756947,
-0.019018939,
-0.023294205,
0.020404072,
-0.03604009,
0.044111155,
0.02946071,
-0.043258764,
-0.008603806,
-0.0747439,
-0.004971162,
-0.006296361,
-0.03265717,
0.0363331,
-0.004831317,
-0.0038290932,
0.040248763,
-0.038330887,
0.015729249,
-0.012939005,
-0.04198018,
0.01148062,
0.03462832,
0.048133366,
0.039103366,
-0.050743807,
-0.011920134,
0.030606108,
-0.02136301,
0.0062131197,
-0.024852479,
0.0018063331,
0.0081309965,
-0.0005631264,
-0.012739226,
0.03699903,
-0.020404072,
-0.00071212807,
0.011174292,
0.02617102,
0.011487279,
-0.01731416,
-0.045895845,
0.06371611,
-0.032497346,
-0.05940089,
-0.05929434,
0.04698797,
0.011160974,
0.013618253,
0.051223278,
-0.00065927,
-0.011074403,
-0.04182036,
0.05204903,
-0.02946071,
0.025598321,
-0.04224655,
0.0019062224,
0.030339736,
0.024626063,
-0.00202276,
-0.06201133,
-0.0029117756,
-0.026051152,
0.013771417,
-0.022002302,
-0.036546197,
-0.029141065,
-0.018592745,
-0.03577372,
0.032044515,
-0.012599382,
0.026836948,
-0.016461771,
0.008923452,
0.00809104,
0.07234655,
-0.03164496,
-0.017407391,
-0.037798144,
-0.02099009,
0.017247567,
0.022481771,
-0.025012303,
0.04914558,
-0.04403124,
0.022095533,
-0.046748232,
-0.024785887,
-0.03585363,
-0.007398474,
-0.0044850335,
-0.02201562,
-0.022042258,
-0.021203186,
0.040035665,
0.011207589,
0.009109912,
-0.022535047,
-0.015569426,
-0.068936996,
-0.05721664,
0.041260976,
-0.021416284,
-0.009236438,
0.009662634,
0.00470479,
0.044244338,
-0.022095533,
0.008870178,
0.08667735,
0.0071321023,
-0.0063662836,
-0.057536285,
0.036253188,
0.022335267,
-0.010068851,
-0.0010704813,
-0.022295311,
-0.048426375,
-0.001336853,
-0.062437527,
-0.057536285,
-0.017074427,
0.019085532,
0.04874602,
-0.050317615,
0.048985757,
-0.025558364,
-0.023107745,
-0.078899294,
0.022548364,
0.034148853,
0.0015416262,
0.05780266,
-0.024492878,
0.03265717,
0.06286372,
-0.039236553,
-0.009289713,
-0.015915709,
0.03510779,
-0.017101062,
-0.016781418,
0.038437437,
-0.01855279,
-0.05215558,
-0.04810673,
0.0092031425,
-0.00057852606,
-0.042219914,
-0.036253188,
-0.016235355,
0.016834691,
-0.009429558,
0.010708142,
0.04698797,
-0.025238719,
0.0015749227,
0.013664868,
-0.021003408,
0.0038457415,
0.0088502,
0.018606063,
-0.01694124,
0.006279713,
-0.018153232,
0.024919072,
-0.036626108,
-0.009429558,
0.06382266,
0.020204293,
0.024026727,
-0.02109664,
0.038277615,
0.07303912,
-0.0016989519,
-0.036306463,
-0.008763629,
-0.035826992,
-0.060466375,
-0.013917921,
0.006006682,
-0.027889118,
-0.017833585,
-0.022681551,
-0.033855844,
0.035161063,
0.047760446,
0.0042952434,
-0.06504797,
0.025571683,
-0.018499514,
-0.037771508,
0.009402921,
-0.020444028,
-0.0050344253,
0.03673266,
0.005657069,
-0.012639337,
0.021789204,
0.0123196915,
-0.044084515,
-0.011420687,
-0.02531863,
0.012626018,
-0.024825843,
-0.051516287,
-0.00799781,
-0.052475225,
0.018099956,
0.02531863,
-0.0151432315,
0.01768708,
-0.013338563,
0.02455947,
0.00031964603,
-0.0026121074,
-0.016834691,
-0.050743807,
-0.0042286506,
-0.0020394083,
-0.0005756126,
0.008670399,
0.024359692,
-0.02569155,
-0.022548364,
-0.008177611,
0.0019611616,
-0.01091458,
-0.016741462,
0.024586108,
-0.043498497,
-0.0057336506,
-0.044217702,
0.0048945798,
-0.035613894,
-0.020297524,
-0.0016739797,
-0.025971241,
-0.018899072,
0.04083478,
0.007258629,
0.04981151,
0.035880268,
0.0037891374,
-0.006616007,
0.029940179,
0.034468498,
0.016515044,
0.03265717,
-0.023493985,
0.0030133298,
0.016688187,
0.021496195,
0.028395222,
-0.013232014,
0.007871284,
0.018752567,
0.013664868,
-0.017540576,
0.018939028,
0.03678593,
0.014051107,
0.02946071,
-0.01798009,
0.026903542,
0.0013851328,
-0.046188854,
0.03191133,
-0.03057947,
-0.034068942,
0.015729249,
-0.051622834,
0.026051152,
-0.03484142,
-0.03889027,
0.008490598,
-0.011806926,
0.0006705075,
-0.0075183413,
0.043152217,
0.05308788,
0.0042519583,
-0.041553985,
0.000616817,
-0.008037766,
0.032204337,
-0.015196505,
-0.016581638,
0.029673807,
0.015862435,
0.012745886,
-0.013811372,
-0.06174496,
0.0015882412,
-0.006466173,
0.04403124,
-0.029194338,
0.005260841,
-0.026956815,
0.036013454,
-0.08220231,
0.016328584,
-0.026024515,
0.045309827,
0.02400009,
0.012965643,
0.0070188944,
0.0745308,
0.032790355,
-0.014197611,
0.023600532,
0.01054166,
0.01768708,
-0.02663717,
-0.001680639,
-0.0016556666,
0.016315266,
0.046268765,
0.033855844,
-0.029567258,
0.053300977,
0.021496195,
-0.021802524,
0.0022042259,
0.010927899,
0.012299713,
0.0030715987,
0.013758098,
-0.011180952,
-0.0005618778,
-0.0007042202,
-0.0013726467,
0.027782569,
-0.038171064,
-0.020683762,
-0.0037491817,
-0.030366374,
-0.004301903,
0.008697036,
-0.03635974,
-0.0064928103,
0.019445134,
0.034015667,
0.0291677,
0.018472876,
-0.02767602,
0.02334748,
0.04874602,
0.036386374,
-0.0010463414,
-0.0120266825,
0.03811779,
-0.025478452,
0.011314138,
0.015409603,
-0.012925686,
-0.021709293,
-0.01120093,
-0.0888616,
0.044191066,
0.012466195,
-0.027276462,
0.0207104,
-0.027183231,
-0.007984492,
-0.050983544,
0.012486174,
-0.027156595,
-0.012352987,
0.0048013497,
-0.017487302,
-0.021296417,
0.027249824,
-0.022641594,
0.037611686,
0.048586197,
0.03926319,
0.0022907967,
0.07852638,
0.03255062,
0.021509515,
0.050211065,
0.010674845,
-0.03228425,
-0.014224249,
0.035560623,
-0.023773674,
-0.0012993944,
-0.018406285,
-0.03710558,
0.022761462,
0.052315403,
-0.025185443,
-0.013218695,
-0.00025013968,
-0.015942346,
-0.01355832,
0.010574956,
0.095893815,
0.027076684,
-0.030499559,
0.0007708131,
0.009602699,
-0.027050046,
-0.023573896,
-0.020297524,
0.028262038,
-0.032337524,
-0.059347615,
-0.02842186,
-0.06675275,
-0.007744757,
0.0013068862,
-0.00065136206,
-0.008157633,
0.038783718,
0.044617258,
0.010335222,
0.016528364,
-0.011866859,
-0.03350956,
0.026384117,
0.04131425,
0.011846881,
0.08134992,
0.053034604,
0.016102169,
0.016728142,
-0.01731416,
0.0068657305,
0.002991687,
-0.010162081,
-0.0015074973,
-0.010714802,
-0.0045316485,
-0.07096142,
-0.017247567,
0.04373823,
0.0076848236,
-0.012579404,
-0.05034425,
0.034441862,
-0.046188854,
-0.031192126,
-0.044164427,
0.022548364,
-0.025704868,
-0.005037755,
0.021802524,
-0.060679473,
0.20382762,
0.0432854,
0.038437437,
0.007038872,
0.012306373,
0.045309827,
0.0044251,
-0.045975756,
0.014916815,
-0.026051152,
-0.0034228764,
-0.019445134,
0.016288629,
0.04677487,
-0.039316464,
0.06680602,
-0.08172284,
0.017780311,
-0.021602744,
-0.02136301,
-0.030446285,
0.018139912,
0.044004604,
0.05908124,
0.011473961,
-0.005580487,
0.0011820244,
-0.06222443,
-0.02625093,
-0.05130319,
0.024040045,
-0.008490598,
0.043072302,
-0.006985598,
-0.0027253155,
0.03849071,
0.011813585,
-0.058441952,
0.017833585,
0.023467347,
-0.017713718,
-0.056417525,
0.027249824,
0.00047988526,
-0.0020210952,
-0.010162081,
-0.042033453,
0.051942483,
0.059986908,
-0.07271948,
0.041447435,
-0.028395222,
0.016768098,
-0.029380798,
-0.0123196915,
0.02598456,
-0.08758301,
-0.035161063,
-0.021003408,
0.007864624,
0.019738143,
0.001351004,
0.017593851,
-0.02043071,
0.042672746,
0.059507437,
-0.0040688277,
0.05769611,
-0.016488409,
0.0056903656,
-0.0038057857,
0.005037755,
-0.012446217,
-0.03462832,
0.033456285,
0.046854783,
0.008370731,
0.0246527,
-0.0030299781,
-0.00819093,
0.010588275,
-0.028102214,
-0.004977821,
-0.0222154,
-0.0010022235,
0.06307682,
-0.029247612,
0.0015890737,
-0.011254204,
0.025944604,
0.0042120023,
0.037505135,
0.0090100225,
-0.009176505,
-0.0117336735
] | from transformers import BertTokenizer
tokenizer = BertTokenizer.from_pretrained("google-bert/bert-base-uncased")
tokenizer.tokenize("I have a new GPU!")
["i", "have", "a", "new", "gp", "##u", "!"] |
[
0.014935021,
0.011443626,
-0.0007042502,
0.0028468566,
-0.0049771694,
-0.052209347,
0.034337904,
-0.005001757,
-0.0030207238,
0.03577099,
0.026413772,
0.014063928,
0.033438712,
-0.029336147,
-0.022634355,
0.01274324,
-0.014323851,
-0.052799445,
-0.04880928,
0.029139448,
-0.009848965,
-0.023870744,
-0.07637514,
-0.034309804,
-0.034647,
0.040772747,
-0.0015138744,
0.02073762,
0.072609775,
0.028746052,
-0.025626978,
0.0148928715,
-0.0020881633,
-0.015707765,
-0.017126802,
-0.05114156,
0.016030911,
0.0002265543,
-0.031921323,
-0.0068177036,
-0.0025693716,
-0.023814544,
0.01968388,
-0.06294346,
-0.056396212,
-0.008612576,
0.019262385,
-0.0019950827,
-0.014527574,
-0.0021355816,
-0.010347736,
0.01045311,
0.026217073,
0.029617144,
-0.044959612,
-0.011984547,
-0.016016861,
-0.007119776,
-0.05420443,
-0.001271514,
-0.016452407,
0.056255713,
-0.033185814,
-0.06811381,
-0.014738323,
-0.0007165438,
-0.011106429,
0.026090626,
-0.030741135,
-0.013438709,
-0.022915352,
0.07474536,
-0.022718653,
-0.047825787,
-0.017983845,
-0.013544083,
0.016115211,
-0.012265544,
-0.019374782,
0.051310156,
0.002625571,
0.053726736,
0.017562348,
0.005939586,
-0.02423604,
-0.027537763,
0.06631543,
-0.0049174577,
-0.008324553,
-0.030235339,
-0.0034018268,
0.017590448,
-0.040997546,
-0.0005417984,
0.054794528,
0.007959256,
-0.023449248,
0.02443274,
-0.04304883,
-0.011183703,
0.028422905,
0.07940991,
-0.021791361,
0.008767124,
-0.015468917,
0.022255007,
0.052293647,
-0.026975768,
-0.011422551,
0.0042149634,
0.0029522309,
-0.029420447,
0.039733056,
0.015398667,
0.019037586,
0.023350898,
0.0051106433,
0.022648405,
-0.070024595,
-0.026090626,
0.009996489,
-0.010059713,
0.009806816,
-0.03824377,
0.007853882,
-0.035461895,
-0.015145769,
0.029982442,
0.0007042502,
0.022634355,
0.03560239,
0.03265192,
0.021341765,
0.053782936,
-0.015398667,
0.016831754,
-0.020962419,
0.005001757,
0.018756589,
-0.029701443,
-0.007889007,
0.00201967,
0.006325958,
0.083793476,
0.04529681,
-0.029476646,
-0.000101257916,
-0.005827187,
-0.030741135,
0.0066736923,
-0.043442223,
0.012581666,
-0.008507201,
0.018208643,
-0.008387778,
0.014991221,
-0.0068598534,
0.019641731,
0.004896383,
0.0020899195,
0.019641731,
-0.02551458,
-0.020203726,
0.051956452,
0.0055532143,
0.023674045,
-0.038609065,
-0.012806464,
0.033663508,
-0.018025994,
-0.019023536,
-0.0016930103,
-0.00275202,
0.021159118,
0.029392347,
0.033691607,
0.052377947,
-0.008739024,
-0.012581666,
0.008310503,
-0.0029258872,
0.0067053046,
-0.06356165,
0.023786444,
0.0062311213,
-0.01850369,
0.024840185,
-0.005047419,
-0.027060067,
-0.019515282,
0.04762909,
0.023308748,
-0.016944153,
-0.001069547,
-0.03849667,
0.022423606,
-0.020119427,
-0.009680366,
-0.020442573,
-0.018166494,
-0.013277136,
0.043695122,
-0.015384617,
-0.013846155,
-0.003775905,
-0.06013348,
0.017140852,
0.030572535,
-0.037485078,
0.034478404,
-0.01103618,
0.03560239,
-0.026020376,
-0.0028942751,
0.016691256,
-0.016592907,
0.0029487184,
0.037822273,
0.0021935373,
0.039227262,
0.036164388,
0.019571481,
0.060639277,
0.037541278,
-0.01834914,
-0.011549001,
0.00809273,
0.039985955,
-0.00017397701,
0.014281701,
0.034647,
0.023280649,
0.015272218,
0.07693714,
0.019037586,
0.05119776,
0.053726736,
0.04512821,
0.013319285,
-0.016677206,
-0.021341765,
0.019543381,
0.02897085,
0.017028453,
-0.01272919,
0.020428523,
-0.016747456,
-0.003972603,
-0.041138045,
-0.0153284175,
-0.026877418,
0.06255006,
0.04310503,
0.014302776,
-0.051815953,
-0.043329827,
-0.0069511775,
0.016958203,
0.015721815,
-0.032708116,
0.03124693,
0.0052300673,
-0.00048647705,
0.002056551,
0.01624166,
0.04302073,
0.00016212242,
0.011450651,
-0.04290833,
-0.059515286,
-0.023083951,
-0.047263794,
-0.07199158,
-0.0069511775,
-0.053642437,
-0.021173168,
0.014232527,
-0.05653671,
0.018124344,
-0.016452407,
0.01504742,
-0.0055075525,
-0.010593609,
0.01865824,
0.046111703,
0.046786096,
-0.013178786,
0.01860204,
-0.028675802,
0.04987707,
-0.02079382,
-0.003874254,
0.0045345984,
0.0065086065,
0.007889007,
0.044481914,
-0.029308047,
-0.018250793,
-0.02665262,
0.017730948,
-0.020639272,
0.006814191,
0.0030470674,
0.0051879175,
-0.025753427,
0.0033561648,
0.047853887,
-0.02076572,
0.03565859,
0.030235339,
-0.011647349,
0.0017377944,
-0.00435195,
0.021004569,
-0.027397264,
0.02190376,
0.049118377,
0.041924838,
-0.058166496,
-0.032764316,
-0.053389538,
0.059740085,
-0.026006326,
-0.039227262,
0.025837727,
0.046617497,
-0.02426414,
-0.06569723,
0.0059852484,
-0.02899895,
-0.035180897,
-0.013600282,
-0.0030312613,
0.03714788,
0.014274676,
0.012096945,
-0.058166496,
-0.012932913,
-0.0028661753,
0.0076642088,
0.0020811383,
-0.011541976,
0.0032999653,
0.016817706,
0.025374081,
0.008746049,
0.016424308,
-0.03832807,
-0.0049069203,
-0.01966983,
0.01107833,
-0.017197052,
0.0060484726,
0.015482967,
-0.0051633306,
0.0064524068,
-0.008254304,
0.020372324,
0.042009138,
0.015286268,
0.054878827,
0.028479105,
-0.011001055,
-0.02658237,
0.004538111,
-0.021819461,
-0.013438709,
-0.0065612933,
0.014766422,
-0.048247285,
0.022887252,
0.012588691,
-0.01216017,
0.033213913,
-0.0029135935,
-0.025261682,
0.058840893,
0.008549351,
0.053445738,
-0.0019511769,
-0.0065472433,
-0.010972955,
0.0037407803,
0.0062873205,
0.048078686,
0.043667022,
0.008303478,
-0.036220588,
-0.022676505,
-0.023407098,
-0.0037513175,
0.018335091,
0.009638216,
0.02210046,
-0.040463652,
-0.04864068,
-0.014457325,
0.0037442928,
0.042037237,
0.030713035,
0.02436249,
-0.015862312,
-0.01332631,
0.025177382,
0.013670532,
-0.004913945,
-0.033523012,
0.03933966,
0.03948016,
-0.0073340368,
-0.059234288,
-0.013677557,
-0.019374782,
-0.00019966195,
-0.017660698,
0.024053393,
-0.043357927,
0.0035107133,
0.022381457,
0.033017214,
-0.040969446,
-0.025331931,
-0.039873555,
0.021257466,
0.059290487,
-0.029785743,
0.022943452,
-0.023027752,
-0.0031173169,
-0.00551809,
0.01844749,
0.00018297772,
-0.023252549,
-0.004411662,
-0.08311908,
0.035068497,
0.03138743,
0.006125747,
0.009146471,
-0.051787853,
0.0010344223,
-0.012588691,
-0.002579909,
-0.015468917,
0.012595716,
-0.019009486,
0.004397612,
0.027102215,
-0.018025994,
-0.0347032,
0.040632248,
-0.044819113,
0.009560943,
-0.042374436,
-0.020231826,
-0.059290487,
0.005317879,
0.02417984,
0.052743245,
0.02420794,
-0.03237092,
-0.016621007,
0.02187566,
-0.03256762,
-0.07609414,
-0.005300317,
0.00928697,
0.002377942,
0.01971198,
-0.020526873,
0.004671585,
0.04850018,
0.04313313,
0.0095960675,
-0.012876714,
-0.005883387,
0.0009922726,
0.007179488,
-0.062212862,
0.008774149,
-0.026034426,
-0.0071127512,
-0.008507201,
-0.030684935,
-0.0063891825,
-0.066877425,
-0.0028732002,
0.023069901,
-0.015806114,
0.0010361786,
-0.009069197,
0.008479102,
0.0029820867,
-0.034337904,
-0.00054267654,
-0.027425364,
-0.025247632,
-0.041166145,
0.04164384,
0.047713388,
0.06344925,
-0.041166145,
-0.03231472,
0.042205837,
-0.0080576055,
0.034534603,
-0.025275731,
-0.001488409,
0.030432038,
-0.0041974015,
-0.018925186,
0.023688095,
-0.027565861,
-0.02089217,
0.0039971904,
0.034085006,
-0.0074464357,
0.0046926597,
-0.025992276,
0.04147524,
-0.024025293,
-0.04959607,
-0.04167194,
0.035293296,
-0.0173516,
0.003231472,
0.06288726,
-0.011612224,
-0.04147524,
-0.016592907,
0.024769936,
-0.04953987,
-0.00866175,
-0.023027752,
-0.010916756,
0.0013681069,
0.03683878,
-0.037794173,
-0.054991227,
-0.017913595,
-0.03608009,
0.0055918517,
-0.0051492807,
-0.030460138,
0.009567968,
0.0044081495,
-0.025837727,
0.040688448,
0.027031967,
0.025612928,
-0.03849667,
0.0060238857,
0.016859854,
0.050635763,
-0.045634005,
0.0016965228,
0.007186513,
-0.023364948,
0.00230418,
0.050382864,
-0.014485425,
0.008788199,
-0.015145769,
0.013277136,
-0.042402536,
-0.006736917,
-0.04858448,
-0.00608711,
0.013108537,
-0.03256762,
-0.011211803,
0.0044994736,
0.057379704,
0.023168249,
0.05456973,
-0.021215316,
-0.011001055,
-0.07884792,
-0.06030208,
0.004657535,
-0.015398667,
0.02090622,
0.004425712,
-0.005563752,
0.07345276,
-0.03001054,
0.005145768,
0.048191085,
-0.006178434,
0.032680016,
-0.06451704,
0.035349496,
0.015173869,
-0.02212856,
-0.0065999306,
-0.004552161,
-0.03844047,
0.03237092,
-0.007881982,
-0.047010895,
0.0021812436,
0.035012297,
0.06165087,
-0.049343172,
0.05007377,
-0.018826837,
-0.03683878,
-0.051478755,
0.019206185,
0.03588339,
0.007383211,
0.04262733,
0.012342818,
0.046476997,
0.04835968,
-0.03119073,
-0.023702145,
0.0034808575,
0.059290487,
-0.00039054273,
0.009982439,
0.025809627,
0.004913945,
-0.041053746,
-0.04394802,
0.025739377,
0.04254303,
-0.03695118,
-0.029954342,
-0.012778365,
0.014485425,
0.018812787,
0.0014216721,
0.025641028,
-0.018068144,
-0.03248332,
0.009680366,
-0.017295402,
-0.031724624,
0.02783281,
0.031078331,
-0.02784686,
0.0012074114,
-0.044706713,
0.0037478053,
-0.060920276,
-0.014485425,
0.06485424,
0.009413418,
0.04861258,
0.01043906,
0.002116263,
0.092279606,
0.012181245,
-0.013424659,
-0.0064945566,
-0.035265196,
-0.056480512,
0.016382158,
0.017927645,
-0.011808923,
0.0026905518,
-0.021116968,
-0.02797331,
-0.0023726732,
0.027565861,
0.016733406,
-0.084186874,
0.042177737,
-0.014295751,
-0.015960662,
0.025992276,
-0.023294698,
-0.000121509496,
0.032005623,
0.017688798,
-0.019332632,
0.013403584,
0.028380755,
-0.01861609,
-0.026441872,
-0.040744647,
-0.014197403,
-0.03253952,
-0.020498773,
-0.0029592556,
-0.021538464,
-0.0042044264,
0.020723572,
-0.024812086,
-0.02780471,
-0.0028995436,
0.057070605,
-0.045802604,
0.016016861,
-0.0018141905,
-0.023407098,
0.008767124,
0.003874254,
0.024685636,
0.01733755,
0.058278896,
-0.03147173,
-0.008640676,
-0.004502986,
0.006603443,
-0.022493856,
0.013832105,
0.04965227,
-0.036670182,
0.018967336,
-0.030684935,
0.008577451,
-0.06625923,
-0.02419389,
-0.00022984724,
0.021257466,
0.009771691,
0.04886548,
0.020498773,
0.064123645,
0.021074818,
0.0008434318,
0.0024218478,
0.0026606957,
0.0058025997,
0.003268353,
0.005763963,
-0.010544434,
0.030881634,
-0.012778365,
0.02200211,
0.06260626,
0.005770988,
0.011921322,
-0.0010124694,
-0.03939586,
-0.07440816,
0.0009176327,
0.014176328,
0.016621007,
0.04259923,
-0.057379704,
0.009785741,
0.0058517745,
-0.046224102,
0.006438357,
-0.013593257,
-0.049427472,
0.014176328,
-0.06277486,
0.021791361,
-0.030375838,
-0.029532844,
-0.0038953288,
-0.011239903,
0.025753427,
-0.03948016,
0.02193186,
0.0061749215,
-0.016354058,
-0.069575,
-0.010073763,
-0.014864772,
0.0048647705,
-0.017716898,
-0.014878822,
0.030291539,
0.02204426,
0.0055216025,
-0.007818758,
-0.046898495,
0.0070495266,
0.012300669,
0.058335096,
-0.03591149,
-0.01857394,
-0.05212505,
0.0111415535,
-0.05322094,
0.02191781,
0.014611874,
0.01858799,
0.004896383,
0.007629084,
0.007390236,
0.037485078,
0.06125747,
-0.02769231,
-0.010158062,
0.030741135,
0.027509663,
0.0042606257,
-0.020976469,
-0.027383214,
0.01854584,
0.05111346,
0.040857047,
-0.01106428,
0.06344925,
-0.008247279,
-0.013530034,
0.009476643,
0.0174078,
0.0037407803,
0.0025834215,
-0.0050158068,
-0.025669128,
-0.010811382,
-0.0069230776,
-0.012792415,
0.021777311,
0.0039515286,
-0.008345628,
0.021763261,
-0.042065337,
-0.0052897795,
-0.020105377,
-0.036332987,
0.02075167,
-0.0023147175,
0.05653671,
0.032932915,
0.029841943,
-0.006765017,
0.038918164,
0.036557786,
0.014197403,
0.022929402,
-0.008956797,
0.025289781,
-0.010228312,
0.018939236,
-0.044875313,
-0.02203021,
-0.015918512,
0.01332631,
-0.072553575,
0.04740429,
-0.007748508,
-0.04304883,
0.03116263,
-0.027270814,
-0.019178085,
-0.08907623,
0.031921323,
-0.018011944,
0.0008574817,
0.015932562,
-0.0039058663,
-0.036164388,
0.046926595,
-0.033972606,
0.01039691,
0.045437306,
0.024545139,
0.032118022,
0.054850727,
-0.028408855,
0.006238146,
0.039114863,
0.012377943,
-0.021608714,
-0.04293643,
0.00024433617,
-0.029364247,
-0.007959256,
-0.059571486,
-0.019009486,
0.0035335445,
0.03948016,
-0.025360031,
-0.02547243,
-0.011633299,
0.0006199509,
-0.015623465,
-0.008865474,
0.07671234,
0.03155603,
-0.02776256,
0.016761506,
0.019220235,
-0.050270464,
-0.034871798,
-0.02786091,
0.0053600287,
-0.060695477,
-0.039227262,
-0.015721815,
-0.027228665,
-0.0045697233,
-0.009308045,
0.0029574994,
0.012883739,
0.032680016,
0.02550053,
-0.006206534,
0.022325257,
-0.049315073,
0.009209695,
0.03568669,
0.014710223,
-0.0065226564,
0.057716902,
0.040716548,
-0.012574641,
0.015482967,
-0.0017430631,
0.0058658244,
-0.0036459435,
0.01041096,
-0.018770639,
-0.00043005802,
-0.039733056,
-0.08857044,
-0.01612926,
0.021552514,
0.02430629,
-0.040632248,
-0.04299263,
-0.00032248863,
-0.06238146,
-0.016059011,
-0.043442223,
0.026933618,
-0.0089357225,
-0.011858097,
0.01216017,
-0.02794521,
0.23378998,
0.059234288,
0.03147173,
0.03565859,
0.007397261,
0.025936076,
0.0005123815,
-0.056199513,
-0.0013242011,
-0.0013259572,
0.007980331,
-0.036220588,
0.015244118,
0.05589042,
-0.05336144,
0.057070605,
-0.06238146,
-0.010101863,
-0.025936076,
-0.021678964,
-0.055159822,
0.03723218,
0.032736216,
0.059402887,
0.021749211,
-0.0011248684,
0.022339307,
-0.027312964,
-0.051253956,
-0.027172465,
0.020288024,
-0.026188973,
0.057716902,
0.005145768,
-0.009462593,
0.028535303,
0.014920971,
-0.050326664,
-0.004903408,
0.023041802,
-0.00045881636,
-0.036304887,
0.023069901,
-0.019276433,
-0.016368108,
0.010066738,
-0.012883739,
0.025345981,
0.030235339,
-0.03686688,
0.001877415,
-0.009933264,
0.03237092,
-0.042177737,
-0.025936076,
0.00935722,
-0.06125747,
-0.015187919,
-0.041025646,
-0.006989815,
0.004524061,
0.024053393,
0.024938535,
0.018911136,
-0.029448546,
0.059683885,
-0.013017213,
0.081376895,
-0.075026356,
-0.009406393,
-0.0035282758,
-0.0044151745,
-0.01864419,
-0.017070603,
0.01629786,
0.018742539,
0.022634355,
0.03697928,
0.0034123643,
-0.02082192,
0.037962772,
0.00006179752,
-0.0063821576,
-0.04408852,
0.019852478,
0.06333686,
-0.015876362,
0.024699686,
-0.0017237444,
0.04054795,
0.019149985,
0.015974712,
0.012876714,
-0.015792064,
-0.007425361
] | from transformers import XLNetTokenizer
tokenizer = XLNetTokenizer.from_pretrained("xlnet/xlnet-base-cased")
tokenizer.tokenize("Don't you love 🤗 Transformers? We sure do.")
["▁Don", "'", "t", "▁you", "▁love", "▁", "🤗", "▁", "Transform", "ers", "?", "▁We", "▁sure", "▁do", "."] |
[
0.0017352782,
-0.030237338,
0.009832317,
0.014074725,
-0.025113871,
-0.049250435,
0.045666967,
-0.0008759684,
-0.025691371,
0.054877363,
0.032843493,
0.02253733,
-0.002769041,
-0.031540416,
-0.02311483,
0.025676563,
-0.009151163,
-0.06468006,
-0.051145818,
0.027616374,
0.0045718797,
-0.015096458,
-0.06699007,
-0.020967713,
-0.00943251,
0.043949272,
0.0015788717,
-0.001039316,
0.07060315,
0.018894633,
-0.023425793,
0.016021939,
-0.0076852,
-0.008840201,
-0.0378485,
-0.053307746,
0.0067523145,
-0.00476438,
-0.018850211,
-0.0130826095,
-0.0040165903,
-0.039684653,
0.03494619,
-0.047562353,
-0.042438887,
-0.026194833,
-0.014837323,
-0.039921578,
-0.01608117,
-0.061007753,
0.008047989,
-0.03453157,
0.018776173,
0.004357168,
-0.017976556,
-0.00855145,
-0.015459246,
-0.001012477,
-0.0512939,
-0.005345582,
0.019220404,
0.074038535,
-0.01091328,
-0.06094852,
-0.003681566,
0.016155208,
-0.019279635,
0.0054862555,
-0.036960036,
0.00968424,
-0.057246596,
0.014881746,
-0.03435388,
-0.019531365,
-0.06272545,
-0.04868774,
0.011416742,
-0.00868472,
-0.04101735,
0.03713773,
0.0028097625,
0.017576749,
0.020997329,
-0.027231373,
-0.045045044,
-0.030918492,
0.03873696,
-0.024447525,
0.0082923155,
-0.021915406,
-0.01569617,
0.005460342,
-0.023425793,
0.0029689453,
0.012312609,
0.04874697,
-0.028682528,
0.025987526,
-0.039803118,
-0.0001657769,
0.0390035,
0.0622516,
-0.021234252,
0.059053134,
-0.0307408,
0.014800303,
0.031244261,
-0.018480018,
0.0024081033,
0.020108866,
0.011535204,
-0.010572703,
0.0020545693,
-0.003387263,
-0.03195503,
0.039121963,
0.014304245,
0.014207995,
-0.039536577,
-0.00728169,
0.012978955,
-0.027468296,
0.005712073,
-0.03275465,
-0.0052308226,
-0.027557142,
0.0046200044,
0.023647908,
0.002682046,
0.01588867,
0.04791774,
0.023351753,
-0.017902518,
0.039210808,
0.012253378,
0.019324057,
0.020123674,
0.012838282,
0.039418116,
-0.0024506755,
-0.007885104,
-0.0037315423,
0.022122715,
0.06799699,
0.025572909,
-0.009217798,
0.043356966,
-0.029719068,
-0.02995599,
0.029719068,
-0.061896216,
0.0420835,
0.022004252,
0.013822994,
-0.035271958,
0.006519093,
-0.001514088,
0.0045607737,
-0.018568864,
-0.014800303,
0.018480018,
-0.0159479,
0.00062053546,
0.062014677,
0.009469529,
0.030859262,
-0.036130805,
-0.010513472,
-0.0023340648,
-0.017458286,
0.01381559,
0.017339826,
-0.015022418,
0.020434635,
0.01808021,
0.04622966,
0.0217081,
0.013608282,
0.013415783,
0.0060489485,
0.0042535136,
-0.00238219,
-0.00020591967,
0.02409214,
0.011994243,
-0.0076037575,
0.013793379,
-0.0125051085,
-0.025513679,
-0.014548572,
0.039832734,
0.015126073,
-0.033080418,
0.044334274,
-0.008529239,
0.05804621,
-0.0307408,
0.007033661,
0.01049126,
-0.05541044,
0.00045811344,
0.03636773,
-0.006274766,
0.006097073,
-0.0449562,
-0.025558103,
0.04365312,
0.055291977,
-0.00047986227,
0.029970799,
0.017902518,
0.025350794,
-0.026120795,
-0.029215606,
0.026831565,
-0.0420835,
0.005393707,
0.019797904,
-0.010839242,
0.058608904,
0.008514431,
0.033939265,
0.026357718,
0.037167344,
-0.014296841,
-0.022433676,
0.010520875,
0.018095018,
0.015222323,
-0.01581463,
0.007907315,
0.030000415,
-0.0028597384,
0.04913197,
0.009084528,
0.022433676,
0.032310415,
0.06657545,
-0.026357718,
-0.0155629,
-0.019620212,
0.012830878,
0.008810585,
0.019190788,
0.042438887,
-0.00084357656,
0.010520875,
-0.017058479,
-0.02156002,
-0.0038055808,
0.005567698,
0.026846373,
0.030030029,
0.014015495,
-0.058727365,
-0.05082005,
0.019709058,
-0.01588867,
-0.014533765,
-0.06142237,
0.0006413588,
0.018672518,
0.020049635,
-0.010787414,
0.016629055,
0.031066569,
0.016569825,
0.0022951947,
-0.037108112,
-0.038914654,
-0.02518791,
-0.058016594,
-0.047828894,
-0.009543567,
-0.007692604,
-0.021930214,
0.006322891,
-0.036219653,
0.039240424,
-0.0311258,
-0.009106739,
-0.0063747177,
-0.010646741,
0.037700422,
0.0105578955,
0.048273124,
-0.02666868,
0.0476512,
0.013512033,
0.05585467,
-0.0075704404,
-0.017014055,
0.018272711,
-0.031658877,
-0.0033224793,
0.009017893,
-0.010017414,
-0.014933572,
-0.04560774,
-0.01078001,
-0.0024895458,
-0.008144239,
0.00972126,
0.010365395,
-0.030000415,
0.027438682,
0.01581463,
-0.008455201,
0.037552346,
0.06142237,
-0.056417365,
-0.019783096,
0.024240216,
0.06278468,
-0.010483856,
0.048391588,
0.049635433,
0.001867622,
-0.026520602,
-0.022907523,
-0.017710017,
0.0013326936,
-0.013897033,
-0.061244678,
0.0144745335,
0.014541169,
0.0009402894,
-0.057838902,
0.014104341,
-0.046851587,
-0.033939265,
-0.008610682,
-0.027749643,
0.03927004,
0.02472887,
-0.029260028,
-0.025720987,
-0.021367522,
0.00062932755,
0.0010457943,
0.012675397,
-0.053218897,
0.007133613,
0.017961748,
0.01756194,
0.017547132,
0.014385687,
-0.032073494,
0.005238226,
-0.0234406,
0.0155925155,
0.013882225,
0.014704053,
0.017976556,
0.011002126,
-0.020079251,
-0.05766121,
0.0046607256,
0.0069966414,
-0.014874342,
0.041698504,
0.04424543,
0.013682322,
-0.0020156992,
-0.022196753,
-0.03080003,
-0.029733876,
0.016007131,
0.023011176,
0.021456368,
-0.0048199086,
-0.004383081,
-0.056358133,
0.03565696,
-0.02182656,
-0.051027358,
0.04634812,
-0.0033243303,
0.028267913,
-0.0071595265,
-0.026031949,
0.010928088,
0.0042201965,
0.0155629,
0.059941597,
0.060889293,
-0.036752727,
-0.014504149,
0.016199632,
0.013386167,
0.009254817,
-0.018716943,
0.015518477,
0.011061357,
-0.025113871,
-0.020508675,
0.022433676,
0.039358884,
0.04249812,
0.038174268,
0.06515391,
0.012157127,
0.008329336,
-0.0046644276,
-0.012549532,
-0.047325432,
-0.04282389,
0.06503545,
-0.021278676,
0.0043238504,
-0.061066985,
-0.024462331,
-0.038766578,
0.028386375,
-0.0074075554,
0.05147159,
-0.025572909,
0.005501063,
0.04004004,
0.03965504,
-0.062429294,
-0.017191747,
-0.013215878,
0.01788771,
0.04178735,
-0.049250435,
0.012186742,
-0.030104069,
0.008706932,
0.000058912694,
-0.019768288,
-0.011002126,
0.0049309665,
-0.009795298,
-0.02943772,
0.05780929,
0.0019398096,
0.029348874,
0.0139044365,
-0.019723866,
-0.02073079,
0.007544527,
-0.03479811,
-0.008477412,
0.008832797,
-0.01581463,
0.0025506276,
0.024595601,
-0.01659944,
-0.032576956,
0.048006587,
-0.04797697,
0.006659766,
-0.027483104,
-0.011253857,
-0.055499285,
0.0035205323,
-0.028593682,
0.0301633,
0.0074112574,
-0.036219653,
-0.028060604,
-0.010380203,
-0.022685407,
-0.057868518,
-0.0032410368,
0.00037736516,
-0.04540043,
0.01352684,
0.01646617,
0.0066375546,
0.027601566,
0.041106194,
0.011209434,
0.005804621,
0.027675604,
0.025335986,
0.00247844,
-0.04480812,
0.01736944,
-0.009247413,
0.059882365,
0.011127992,
-0.023781177,
-0.05274505,
-0.07948777,
-0.00707068,
0.022492906,
-0.0091437595,
0.041313503,
0.0069633243,
0.003389114,
0.054018516,
-0.027409066,
-0.0029930077,
-0.043623503,
-0.03867773,
-0.008218277,
0.011150204,
0.02854926,
0.052715436,
-0.019398097,
-0.0002917581,
0.042586964,
-0.009173375,
-0.01898348,
-0.019190788,
-0.026490988,
0.022241175,
0.00536039,
-0.013519436,
0.044008505,
-0.0025561803,
0.03159965,
0.033495035,
0.008514431,
0.01010626,
0.017443478,
-0.011357511,
0.07936931,
-0.022966754,
-0.037048884,
-0.061777752,
0.03811504,
-0.0019971894,
-0.010402414,
0.017798863,
-0.02092329,
-0.03171811,
-0.03790773,
0.039121963,
-0.034827728,
0.008218277,
-0.028741758,
-0.010979915,
0.025158294,
0.035479266,
-0.024136562,
-0.061066985,
0.01181655,
-0.04125427,
0.011127992,
-0.018968673,
-0.04643697,
-0.036426958,
-0.023751562,
-0.028623298,
0.024388293,
0.0041054366,
0.0050272164,
0.010979915,
0.007892508,
0.017280594,
0.048776586,
-0.02718695,
-0.014526361,
-0.0029245222,
-0.0023618292,
0.026328104,
0.004090629,
-0.05049428,
0.05262659,
-0.035153497,
0.0035131285,
-0.0021082473,
-0.017517518,
-0.01717694,
-0.05606198,
-0.000608967,
-0.04714774,
-0.011601838,
-0.008173854,
0.050138894,
0.024432717,
0.02046425,
-0.022389254,
0.00071215816,
-0.06325852,
-0.042853504,
-0.0045718797,
-0.022670599,
0.0045718797,
-0.009750875,
-0.028638106,
0.06077083,
-0.045489274,
-0.0022415167,
0.087720856,
0.012482897,
-0.004057312,
-0.05979352,
0.02027175,
0.017458286,
-0.016614247,
-0.008655105,
-0.01717694,
-0.092755474,
-0.0029448827,
-0.055588134,
-0.040484272,
-0.00829972,
0.049368896,
0.06414699,
-0.0484212,
0.04255735,
-0.018568864,
-0.016066361,
-0.047621585,
0.049901973,
0.0041054366,
0.009454721,
0.0303558,
-0.02860849,
-0.009306644,
0.041935425,
-0.03177734,
-0.025484065,
-0.000022240481,
0.040010422,
0.010047029,
-0.025039833,
0.054581206,
-0.0355385,
-0.04519312,
-0.04463043,
0.0049198605,
-0.004460822,
-0.05185659,
-0.040454656,
-0.028001374,
0.0151779,
-0.035627343,
0.0015603622,
0.017058479,
-0.005101255,
-0.012053474,
0.01923521,
-0.010098856,
0.0019398096,
0.03130349,
0.039862346,
-0.04021773,
0.009358471,
-0.017280594,
0.0023544254,
-0.00007363364,
-0.020864058,
0.06556853,
-0.009691644,
0.027720027,
-0.027986566,
0.009291836,
0.073150076,
-0.00628217,
0.0013049291,
-0.00901049,
-0.022848291,
-0.041224655,
-0.0018204225,
0.01704367,
-0.058401596,
0.00991376,
-0.032488108,
-0.003333585,
0.0049161585,
0.023351753,
-0.014807707,
-0.061777752,
0.020612327,
-0.0156073235,
-0.0013780423,
0.0055306787,
-0.021782137,
0.0070558726,
0.026461372,
0.0050864476,
0.004460822,
0.013682322,
0.022492906,
-0.053041205,
-0.0010596765,
0.009365874,
0.016717901,
-0.021574829,
-0.041283887,
0.0058194287,
-0.031333108,
0.0037185855,
0.009824914,
-0.021870984,
-0.0032003156,
-0.022581752,
0.026787141,
-0.022063483,
-0.013785975,
0.020286558,
-0.031421956,
-0.021841368,
0.006511689,
-0.01865771,
0.01776925,
0.045252353,
-0.014245014,
-0.013882225,
0.00019770603,
-0.02937849,
0.002937479,
-0.0111057805,
0.055291977,
-0.043564275,
0.014252418,
-0.025528487,
0.011860973,
-0.03698965,
-0.020745598,
0.019190788,
-0.019427711,
0.0018231989,
-0.010343184,
0.015681362,
0.0397735,
0.021456368,
0.018450404,
-0.014911361,
0.007766642,
0.03435388,
0.041935425,
0.024077332,
-0.022522522,
0.006881882,
-0.004756976,
0.006663468,
0.052063897,
-0.0074445745,
-0.006419141,
0.027142527,
-0.019679442,
-0.048273124,
0.0054418324,
0.0326658,
0.035183113,
0.049250435,
-0.014207995,
0.024166178,
0.031362724,
-0.032843493,
0.04747351,
-0.021515599,
-0.03802619,
-0.012453281,
-0.025943102,
0.011209434,
-0.040188115,
-0.018879827,
0.009091932,
-0.0076037575,
0.014496746,
0.010572703,
0.040484272,
0.054610822,
0.019338865,
-0.052182358,
0.0074556805,
-0.011698089,
0.013289917,
-0.03764119,
-0.0049679857,
0.030000415,
0.04862851,
-0.016584631,
-0.029733876,
-0.06995161,
-0.010506068,
0.0061933235,
0.0040758215,
-0.009040105,
-0.009950779,
-0.03888504,
0.018509634,
-0.062429294,
-0.013319532,
-0.013275109,
0.027275797,
0.030503877,
-0.013845206,
-0.003931446,
0.061244678,
0.08452239,
-0.041876197,
0.0032151234,
0.021678483,
0.014733668,
-0.02104175,
-0.00007745125,
-0.025824642,
0.004612601,
0.064265445,
0.035953112,
0.00019064923,
0.05256736,
0.030133683,
0.0036630565,
0.020997329,
0.025424832,
0.0075963535,
-0.008403374,
0.0046681296,
-0.005619525,
0.017991364,
-0.013230686,
-0.009847125,
-0.0057305824,
-0.014511553,
-0.045104276,
0.01039501,
-0.04113581,
-0.010291357,
-0.0065931315,
-0.028623298,
-0.035301574,
0.026520602,
0.019472135,
0.02415137,
0.026683489,
0.00029198948,
0.028475221,
0.041195042,
0.045755815,
0.0048495242,
-0.0073372186,
0.00920299,
-0.0028930558,
0.0037241383,
0.032695416,
0.00476438,
-0.01756194,
-0.0021545214,
-0.052063897,
0.0393885,
-0.042764656,
-0.041816965,
0.0000590573,
-0.03171811,
-0.004831014,
-0.043949272,
0.032843493,
-0.033554263,
-0.01433386,
0.037463497,
-0.04042504,
-0.02886022,
0.03222157,
0.0056343325,
0.018006172,
0.030030029,
0.002730171,
-0.0038944269,
0.068944685,
0.00958799,
0.022300407,
0.05597313,
0.0071632285,
-0.027601566,
-0.025113871,
0.018198673,
-0.010306164,
0.011490781,
0.01256434,
-0.0006353432,
0.017784055,
0.05348544,
0.0056787557,
-0.041165426,
0.002883801,
0.0033372869,
-0.026239257,
-0.0038092826,
0.07084007,
0.02549887,
-0.00849222,
-0.022951946,
0.01646617,
-0.04288312,
-0.04415658,
-0.013504629,
0.015296361,
-0.03512388,
-0.06468006,
-0.040573116,
-0.041816965,
-0.019190788,
0.0040758215,
-0.01381559,
-0.025632141,
0.045104276,
0.03275465,
0.025632141,
0.048154663,
-0.013015974,
-0.03506465,
0.054729287,
0.048154663,
-0.004686639,
0.035508882,
0.067049295,
0.009743472,
0.04075081,
0.0039129364,
0.017813671,
0.00062284915,
0.0066301506,
-0.024654832,
0.0058157267,
-0.0355385,
-0.06770083,
-0.016110785,
0.0562989,
0.012964147,
-0.017650787,
-0.047088508,
0.012482897,
-0.0311258,
0.004694043,
-0.04134312,
0.007581546,
0.004597793,
0.018376363,
0.021752521,
-0.0858847,
0.26298487,
0.074749306,
0.040247347,
0.035982728,
0.027882913,
0.05541044,
0.0052345246,
-0.062903136,
0.011735108,
-0.047769662,
0.017028863,
-0.028519643,
0.00057379866,
0.04229081,
-0.04759197,
0.039299656,
-0.07859931,
0.0007579695,
-0.020123674,
-0.023218485,
-0.0461112,
0.036752727,
0.0060489485,
0.059230827,
0.013186263,
0.018776173,
0.0021341608,
-0.01627367,
-0.07711854,
-0.025232332,
-0.000054140677,
-0.01865771,
0.024640024,
-0.01813944,
0.00025705254,
0.044926584,
0.019768288,
-0.06870776,
-0.0163329,
0.029689452,
-0.029689452,
-0.04344581,
0.027157335,
0.0007385344,
-0.020523481,
0.0409285,
-0.011779531,
0.05147159,
0.06154083,
-0.05573621,
0.03544965,
0.0074519785,
0.010069241,
-0.01969425,
-0.024032908,
0.0076407767,
-0.0524489,
0.006822651,
-0.005404813,
-0.017695209,
0.008595874,
-0.006922603,
-0.004346062,
-0.0077074114,
0.009380682,
0.06870776,
0.008699528,
0.040780425,
-0.038263116,
-0.029659837,
-0.015636938,
-0.02943772,
0.0091437595,
-0.005945294,
0.0342058,
0.027394257,
0.022552138,
0.002682046,
0.028623298,
0.003585316,
0.006367314,
-0.027601566,
-0.037759654,
-0.03627888,
0.0056306305,
0.048125047,
-0.006770824,
-0.024003293,
0.00020788632,
0.009188182,
0.008595874,
0.02653541,
0.026727911,
-0.022226369,
-0.016051555
] |
Because we are considering the uncased model, the sentence was lowercased first. We can see that the words ["i", "have", "a", "new"] are present in the tokenizer's vocabulary, but the word "gpu" is not. Consequently, the
tokenizer splits "gpu" into known subwords: ["gp" and "##u"]. "##" means that the rest of the token should
be attached to the previous one, without space (for decoding or reversal of the tokenization).
As another example, [~transformers.XLNetTokenizer] tokenizes our previously exemplary text as follows: |
[
0.044493098,
0.001740785,
-0.013378992,
0.009466616,
-0.01076088,
-0.026698817,
0.034109402,
-0.006837412,
-0.012484101,
0.024568828,
0.05129723,
0.014821171,
0.0069816294,
-0.03073692,
-0.03697897,
0.01276514,
0.00058472995,
-0.016670119,
-0.048102245,
0.008135374,
0.028266724,
-0.00796527,
-0.054699294,
-0.0023777478,
-0.019953853,
0.019554479,
0.013519512,
0.007750792,
0.08324706,
0.042688522,
-0.005794605,
-0.011293378,
0.02572257,
0.0016252258,
-0.023651749,
-0.048960157,
0.011456085,
-0.024953408,
-0.03316274,
-0.009185576,
0.010435466,
-0.008320268,
0.010191404,
-0.0567997,
-0.06597048,
0.02317842,
0.035351895,
-0.04286602,
-0.038221464,
-0.029213386,
0.015826998,
-0.015856583,
-0.00082786666,
-0.005125285,
0.024346953,
-0.0028251933,
0.00005286837,
0.017779488,
-0.04564684,
-0.019140314,
0.02143301,
0.05123806,
-0.022971336,
-0.053634297,
0.014251695,
-0.0013340163,
-0.039671037,
0.030411504,
-0.02282342,
-0.054906376,
-0.044463515,
0.018090112,
-0.010827443,
-0.024627995,
-0.04836849,
-0.0532793,
0.022113424,
0.012816911,
-0.010457653,
0.055054292,
-0.014118571,
0.022187382,
0.021832384,
-0.010124842,
-0.02524924,
-0.01844511,
0.053604715,
-0.00011365255,
0.0067005893,
-0.031476498,
-0.0034593826,
0.009296513,
-0.0186374,
-0.0000697978,
0.042511024,
0.044848096,
-0.002041239,
-0.005458096,
0.0044670594,
-0.014148154,
0.043516852,
0.08235956,
-0.03280774,
0.0441381,
-0.052658055,
-0.01948052,
0.038901877,
-0.02477591,
-0.007003817,
-0.017217409,
-0.011604001,
0.00020107316,
0.019303022,
0.025264032,
-0.011825874,
0.06431382,
-0.011056712,
0.0074882414,
-0.06922463,
0.0053064823,
0.0013830134,
-0.041860193,
-0.00038481242,
-0.01760199,
0.070762955,
-0.016522205,
-0.014517943,
0.06407716,
-0.0088601615,
0.006896578,
0.038901877,
0.011234211,
0.0020245987,
0.03585481,
0.016329912,
0.007321836,
-0.014895129,
0.039700624,
0.016329912,
-0.015605126,
-0.0073514194,
0.037481885,
0.022498006,
0.06733131,
0.024835076,
-0.03576606,
0.035322312,
-0.04822058,
-0.05727303,
0.021270303,
-0.0031690977,
0.027601102,
0.020604681,
0.008076207,
-0.034109402,
-0.03203858,
-0.003875396,
0.0013894849,
-0.0022390767,
-0.0006776396,
0.009444429,
0.012950036,
-0.0378073,
0.0947845,
-0.03316274,
0.05579387,
-0.031328585,
-0.012158685,
-0.027497562,
-0.031062335,
-0.016921576,
0.0039641457,
-0.0060127806,
0.020042602,
0.020811765,
0.051593058,
0.032571077,
0.009621928,
-0.0011176894,
-0.017675947,
-0.008993286,
-0.028961929,
-0.0010548251,
0.03754105,
-0.026240278,
-0.01536846,
0.011958999,
0.001076088,
-0.0074919392,
-0.0005348084,
0.035825226,
0.05245097,
-0.040676866,
-0.006637725,
-0.0172322,
0.00531018,
-0.0015401741,
-0.024154663,
0.048102245,
-0.030441089,
-0.016034082,
0.05540929,
-0.0014505001,
0.03511523,
-0.033783987,
-0.053249717,
0.02132947,
0.052391805,
-0.007854333,
0.059550934,
-0.005606012,
0.032630242,
-0.011485668,
-0.01835636,
0.017187824,
-0.039848536,
-0.001005828,
0.030012133,
0.009355679,
0.0029268854,
0.013090556,
0.021388637,
0.035588562,
0.009008077,
0.03650564,
-0.012676391,
0.0026791263,
0.058988854,
0.0010502028,
0.021211138,
0.025352782,
0.027926518,
0.022616338,
0.03194983,
-0.008179748,
0.024953408,
0.030529838,
0.07088129,
0.03156525,
-0.014333049,
0.003124723,
0.003089593,
0.025352782,
0.023074877,
-0.00603127,
0.017054701,
-0.0030969887,
-0.02030885,
-0.0063086124,
0.019066356,
-0.00717392,
0.02961276,
0.05623762,
0.01081265,
-0.07940125,
-0.011204628,
-0.0023851437,
0.032275245,
-0.031653997,
-0.055054292,
-0.005136379,
0.028961929,
0.021876758,
0.00080983946,
0.019155106,
0.031683583,
0.023311542,
0.055379704,
-0.050173067,
-0.045853924,
-0.049788486,
-0.06792297,
-0.06827797,
-0.02934651,
0.0061865817,
-0.011263794,
-0.045203093,
-0.03810313,
0.023267169,
-0.004023312,
0.0027530843,
-0.002189155,
0.00023146524,
0.03203858,
-0.015605126,
0.04872349,
-0.046238504,
0.071413785,
-0.012839098,
0.030855253,
0.009096826,
-0.023415083,
-0.014074196,
-0.017380117,
-0.009984322,
0.036357723,
0.0039567496,
-0.007869124,
-0.026033195,
-0.0005948992,
0.0065193926,
-0.02477591,
-0.010169216,
0.025264032,
-0.027157355,
0.013386387,
-0.0091929715,
-0.013016597,
0.041091032,
0.070526294,
-0.06632548,
0.001130632,
0.02245363,
0.054462627,
-0.03260066,
0.047569748,
0.049581405,
0.018267611,
0.006770849,
-0.02811881,
-0.013978051,
0.016744077,
0.0009221631,
-0.05718428,
0.027941309,
0.043368936,
-0.010095259,
-0.06969796,
-0.033014823,
-0.0567997,
-0.061178006,
-0.0053693466,
-0.021640094,
0.041741863,
0.03958229,
-0.0020172028,
-0.028754847,
-0.036357723,
-0.009954738,
0.008468184,
0.0068337135,
-0.034138985,
0.012424934,
0.008164956,
0.014680651,
0.009444429,
0.021950716,
-0.02700944,
0.0032282642,
-0.003193134,
0.019894686,
0.0439606,
0.0066857976,
-0.010317133,
-0.0067634536,
0.0010335622,
-0.0054654917,
-0.0009549819,
0.018681776,
-0.007111056,
0.051800143,
0.03502648,
-0.0035093043,
-0.01169275,
-0.057361778,
-0.020752598,
-0.019524897,
-0.01610804,
0.04106145,
-0.024657577,
0.03623939,
-0.010642547,
-0.031358168,
0.049048904,
-0.024065914,
-0.05413721,
0.030500254,
-0.014466173,
0.04600184,
-0.03588439,
-0.01480638,
0.012883473,
0.031091917,
0.0034150078,
0.019998226,
0.038606044,
-0.038606044,
-0.027216522,
0.0055727307,
0.023710916,
-0.010376299,
-0.0019913176,
-0.0006138509,
0.02161051,
-0.027586311,
-0.045587674,
0.038517296,
0.03902021,
0.026905898,
-0.011648376,
0.064491324,
0.021773217,
0.008727037,
0.02058989,
0.020146143,
-0.02820756,
-0.041150197,
0.043191437,
0.018607818,
-0.0041860193,
-0.03437565,
-0.012069936,
0.0067671514,
0.00029952967,
-0.007107358,
0.03064817,
-0.05653345,
-0.037659384,
0.04434518,
0.03523356,
-0.0531018,
-0.01937698,
-0.05049848,
0.010679526,
0.041150197,
-0.04100228,
-0.004015916,
-0.056385532,
0.013941072,
0.005287993,
-0.023252375,
-0.027601102,
0.0022446234,
-0.008993286,
-0.03902021,
0.02048635,
0.031151084,
-0.0068854843,
0.006290123,
-0.06721298,
0.0028843596,
0.0265509,
-0.021788009,
-0.0017666703,
0.014177737,
0.033281073,
0.008076207,
0.032571077,
0.018740943,
-0.025840905,
0.017557615,
-0.01928823,
0.01844511,
-0.04872349,
-0.017202618,
-0.051563475,
-0.0043006544,
-0.011892437,
0.017173033,
0.036209807,
-0.012543267,
0.0017712926,
0.0534568,
-0.059550934,
-0.051593058,
-0.009229951,
0.037215635,
-0.0407952,
0.011419106,
-0.0041675298,
0.0063677784,
-0.0021041033,
0.0036405795,
0.01201077,
0.019214272,
-0.0002662486,
0.002261264,
0.026669234,
-0.056326367,
-0.029923383,
-0.03792563,
0.02729048,
0.0032874304,
-0.016329912,
-0.05262847,
-0.054699294,
-0.008017041,
0.0039234688,
0.0051437747,
0.024805494,
0.036653556,
0.025278823,
0.03810313,
-0.010605569,
-0.013430762,
-0.04860516,
-0.029864216,
-0.0043191435,
0.040262703,
0.033872735,
0.085909545,
-0.04860516,
0.02869568,
0.0047148187,
0.007980062,
0.0030969887,
-0.0040011248,
-0.057805527,
0.01946573,
0.014458777,
0.001456047,
0.031032752,
0.016078455,
-0.010857025,
0.028532973,
-0.0051437747,
-0.0046186736,
0.0014810078,
-0.0145549225,
0.05866344,
-0.030411504,
-0.08099873,
-0.051090144,
0.0053027845,
-0.012439726,
0.018874066,
0.019229064,
-0.027127773,
-0.033931904,
-0.06762714,
-0.0016076607,
-0.05058723,
-0.0101988,
-0.032659825,
0.01517617,
-0.008290685,
0.017173033,
-0.00032194814,
-0.032186497,
-0.010228383,
-0.044108514,
0.0014024274,
-0.007070379,
-0.027941309,
-0.0041934154,
-0.00261996,
-0.012720766,
0.02505695,
0.009370471,
-0.029509218,
-0.029035887,
-0.013097951,
0.043013938,
0.059195936,
-0.024154663,
-0.0502914,
-0.0042488836,
-0.03523356,
0.017853446,
0.00829808,
-0.03875396,
0.045321427,
-0.0216253,
0.03055942,
-0.021921134,
-0.031683583,
-0.04330977,
-0.017394908,
0.008179748,
-0.046800584,
-0.017675947,
-0.014266486,
0.035529394,
0.02143301,
0.039700624,
-0.06993463,
0.015442418,
-0.056918032,
-0.027438397,
-0.011249003,
-0.0046223714,
0.026536109,
-0.011670563,
-0.021758426,
0.05452179,
-0.049699735,
0.023622166,
0.062952995,
0.003919771,
0.011870249,
-0.022719879,
0.0027678758,
0.0037940424,
-0.010169216,
-0.044611428,
0.017986571,
-0.06490549,
0.022054257,
-0.022305714,
-0.046149753,
0.0017176731,
0.021151971,
0.04647517,
-0.059994683,
0.040676866,
-0.025678197,
-0.025190074,
-0.04674142,
0.03875396,
0.022571964,
-0.005805698,
0.037688967,
-0.008342456,
-0.00240918,
0.030766504,
-0.013770969,
-0.01834157,
-0.01164098,
0.065260485,
0.0023592582,
-0.014636276,
0.017868238,
-0.009400054,
-0.03585481,
-0.024761118,
0.025471114,
0.019672813,
-0.018888857,
-0.020456767,
-0.012676391,
0.024154663,
-0.017291367,
0.0074216793,
0.017557615,
-0.020634266,
-0.033369824,
0.03268941,
0.0014357085,
-0.01732095,
0.0627755,
0.05253972,
-0.037748132,
-0.010916192,
-0.04733308,
0.021788009,
0.008697454,
-0.04739225,
0.06230217,
0.0046778396,
-0.0039419583,
-0.0033262584,
-0.010738693,
0.060024265,
-0.02235009,
-0.029568385,
0.026891107,
-0.017749906,
-0.055823453,
0.004666746,
0.006290123,
-0.031032752,
0.03810313,
-0.034612317,
0.010546402,
0.0062420503,
0.022897378,
0.002512721,
-0.057628028,
0.027305271,
-0.034760233,
0.00022799846,
-0.0010548251,
-0.017010326,
0.003263394,
0.035558976,
-0.0019598855,
-0.014177737,
0.01471763,
0.015797416,
-0.05949177,
0.0020024113,
-0.026698817,
0.022305714,
-0.026846733,
-0.018593026,
0.015826998,
-0.02915422,
0.0008417338,
-0.006707985,
-0.011019733,
0.012055145,
0.019332606,
0.02001302,
-0.007358815,
0.03381357,
-0.021669677,
-0.011988582,
0.014902525,
0.02776381,
-0.007077775,
0.0042525814,
0.03268941,
-0.0035647727,
0.013963259,
-0.00013462656,
-0.028133601,
-0.032630242,
-0.025027366,
0.035529394,
-0.02104843,
0.01659616,
-0.030071298,
0.029464843,
-0.043546434,
-0.011899833,
0.018977607,
-0.017557615,
0.011618792,
0.0044004973,
0.0346419,
0.019865103,
0.009207764,
-0.0020319945,
-0.0011417257,
0.054817624,
0.008416413,
0.019820727,
0.023932789,
-0.011507856,
0.0141259665,
-0.04313227,
-0.0028843596,
0.05440346,
-0.0010113749,
-0.007861729,
0.014288674,
-0.05804219,
-0.038783543,
-0.008653079,
0.015250127,
0.019243857,
0.036535222,
-0.030381922,
0.017261783,
-0.016093249,
-0.02317842,
0.009429637,
-0.03529273,
-0.058633856,
0.015960123,
-0.014303465,
0.012964827,
-0.002649543,
-0.02718694,
-0.001185176,
-0.012528475,
0.00028797373,
-0.013881905,
0.019584063,
-0.017587198,
0.021181554,
-0.059343852,
0.0009975077,
0.015035649,
0.020870931,
-0.03399107,
-0.051652227,
0.037866466,
0.04088395,
-0.039848536,
-0.0039308644,
-0.06395882,
0.0048627346,
0.012432329,
0.01956927,
-0.012979618,
0.009400054,
-0.04703725,
0.037629798,
-0.036594387,
0.028266724,
0.001093653,
0.012047748,
0.017306158,
-0.027793394,
-0.0049403906,
0.0126616,
0.065260485,
-0.025071742,
-0.0283111,
0.032186497,
0.04348727,
0.0042119045,
0.0066266316,
-0.01649262,
0.014310861,
0.047658496,
-0.0012887171,
-0.01313493,
0.037511468,
0.02709819,
-0.02635861,
0.01011005,
0.06419549,
0.020249683,
-0.003662767,
-0.0010825593,
0.0022057956,
0.030855253,
-0.018385943,
-0.018740943,
0.018045736,
0.003805136,
-0.01640387,
0.015102211,
-0.02124072,
0.008682663,
0.005668876,
-0.052391805,
-0.03473065,
0.023311542,
0.019598855,
0.040321868,
0.010132237,
-0.022394463,
0.055675536,
0.029597968,
0.03771855,
0.0025256637,
0.0153536685,
0.0064306427,
0.024450496,
-0.0019413959,
-0.0037903443,
0.0071554305,
-0.0443156,
-0.03706772,
-0.05981718,
0.043753516,
-0.021092804,
-0.03286691,
0.019495312,
-0.024968201,
-0.007003817,
-0.06378133,
0.03585481,
-0.028074434,
-0.03197941,
0.04600184,
-0.029183803,
-0.027260896,
0.020989263,
-0.014318258,
0.025855696,
0.02477591,
0.011374732,
-0.0020708223,
0.054640125,
0.023962373,
0.030825669,
0.023548208,
0.025826113,
-0.01359347,
-0.035973143,
0.002803006,
-0.02375529,
-0.0156495,
-0.033458572,
-0.025633821,
0.00689288,
0.030589003,
-0.004411591,
-0.031506084,
0.023355918,
0.015094816,
-0.036209807,
0.013386387,
0.049670152,
-0.002222436,
-0.006648819,
0.0038236254,
0.01271337,
-0.04739225,
-0.062834665,
-0.03473065,
0.038251046,
-0.021299887,
-0.05635595,
-0.0443156,
-0.038073547,
-0.030914418,
0.0009928853,
-0.012106915,
-0.014273883,
0.04564684,
0.0022908472,
0.016936367,
0.014791588,
-0.025101325,
0.0011565173,
0.04842766,
0.031890664,
-0.025116116,
0.06330799,
0.03298524,
-0.012313997,
0.03221608,
0.010775672,
0.022660714,
0.0041379468,
-0.01127119,
-0.014828567,
0.0011824026,
-0.057864692,
-0.074490435,
0.024997784,
0.04041062,
0.019584063,
-0.043280188,
-0.055764288,
-0.0079061035,
-0.035588562,
-0.009096826,
-0.028148392,
0.04617934,
0.00603127,
0.0013192247,
0.008046624,
-0.030825669,
0.2634086,
0.058811355,
0.009784635,
0.014244299,
0.01928823,
0.05227347,
0.03304441,
-0.037688967,
0.035825226,
-0.023326334,
0.030411504,
-0.023311542,
-0.016344706,
0.004189717,
-0.010450257,
0.02523445,
-0.034612317,
-0.008453392,
-0.02581132,
-0.050735146,
-0.050084315,
0.044108514,
-0.005140077,
0.044226848,
0.021270303,
-0.007510429,
0.003982635,
-0.021965507,
-0.036476057,
-0.048960157,
0.0038643023,
-0.039671037,
0.0094962,
0.023903206,
-0.017823864,
0.027615895,
0.009962134,
-0.046771,
-0.04052895,
0.03221608,
0.0057724174,
-0.020190518,
0.03280774,
-0.01788303,
-0.04088395,
0.0810579,
-0.021773217,
0.006145905,
0.025781738,
-0.03363607,
0.053870965,
-0.030234005,
0.0534568,
-0.048753075,
-0.0024942316,
-0.028562557,
-0.018593026,
-0.03325149,
-0.011101087,
0.002904698,
0.017261783,
0.020575099,
-0.025914863,
0.024258204,
-0.008993286,
0.022557171,
-0.013778364,
0.0126616,
-0.024361745,
0.012247435,
-0.0006896578,
-0.02206905,
0.0005588447,
-0.011530043,
-0.008268498,
0.026891107,
0.0032800348,
0.06070468,
0.014480964,
-0.013948468,
0.0022390767,
-0.02458362,
-0.030589003,
-0.032748576,
0.059846766,
0.055438872,
-0.031535666,
0.0134233665,
-0.021373844,
0.046031423,
0.009629324,
0.014303465,
-0.0072330865,
-0.024982993,
-0.014636276
] | We'll get back to the meaning of those "▁" when we look at SentencePiece. As one can see,
the rare word "Transformers" has been split into the more frequent subwords "Transform" and "ers".
Let's now look at how the different subword tokenization algorithms work. Note that all of those tokenization
algorithms rely on some form of training which is usually done on the corpus the corresponding model will be trained
on. |
[
0.028128233,
-0.0005022204,
0.026603583,
0.00015484725,
-0.024083244,
-0.026603583,
0.012274986,
-0.0006018866,
-0.014227471,
0.04284577,
0.00933459,
-0.011932719,
-0.015440969,
-0.021811826,
-0.03344895,
-0.00258257,
-0.028314924,
-0.04284577,
-0.013558493,
-0.010174704,
0.021205079,
0.0036793845,
-0.06391083,
-0.01165268,
0.014274145,
0.06098599,
0.032764412,
0.019027008,
0.110832706,
0.018358028,
0.014414163,
0.027070312,
0.018715855,
-0.034662448,
-0.029123923,
-0.036436018,
0.002502837,
0.0047100787,
-0.032173224,
-0.037711747,
0.057314385,
-0.020753907,
0.056847658,
-0.04524165,
-0.08469585,
-0.008043306,
0.015915478,
-0.025654566,
-0.022231882,
-0.044650458,
-0.02297865,
0.0064603146,
0.017891299,
-0.0057446626,
0.014912008,
-0.02112729,
0.001268921,
-0.008253334,
-0.016475553,
0.011613786,
0.022885304,
0.04710857,
0.0051029096,
-0.054545123,
-0.027630389,
-0.0045467233,
-0.016117726,
0.037493937,
-0.022558594,
-0.030430766,
0.0013058704,
0.00032160582,
-0.019213699,
-0.008968986,
-0.036747172,
-0.025250068,
0.034786906,
-0.0022130758,
-0.04788645,
0.035160292,
0.02489224,
0.02641689,
0.028843885,
-0.011979391,
-0.018513605,
-0.047730874,
0.018700296,
-0.0053090486,
0.021205079,
-0.0380229,
-0.020567214,
0.014787547,
-0.027039196,
0.020380523,
0.0040877727,
-0.0013661563,
-0.01807799,
0.009645743,
-0.017720165,
0.0337601,
0.030228516,
0.08401132,
-0.03808513,
0.04020097,
-0.04822872,
0.010236934,
0.0050367895,
-0.0019622087,
-0.037773978,
0.004947333,
-0.027894868,
0.013426253,
0.0040294314,
0.0041422243,
-0.032857757,
0.037058324,
-0.009816878,
0.016335534,
-0.055478584,
-0.004675074,
-0.0071954136,
0.017517915,
-0.0018815034,
-0.0013700456,
0.016459994,
-0.050500136,
-0.017471243,
0.012298323,
-0.02952842,
0.019944908,
0.028657192,
0.031301994,
-0.04125889,
0.018326912,
0.023725418,
0.036747172,
0.015814353,
0.021951845,
-0.0003801901,
-0.026805833,
0.008525592,
-0.021096174,
-0.017144531,
0.051900323,
-0.0075065666,
-0.035160292,
0.023787647,
-0.037556168,
-0.031535357,
0.026183527,
-0.022091864,
0.047668643,
0.017704606,
0.056194235,
0.00068307813,
0.010034685,
-0.017517915,
0.026650256,
-0.0034868584,
-0.0011930773,
-0.05339386,
0.018840315,
-0.0062036132,
0.064719826,
-0.06132826,
0.05333163,
-0.039423086,
-0.0062814015,
-0.003928307,
-0.009614628,
-0.002497003,
0.007055395,
0.011473767,
0.016257744,
0.003914694,
0.05417174,
0.04477492,
-0.011045932,
0.01370629,
-0.014912008,
0.013682954,
-0.034133486,
-0.000531391,
0.030026266,
-0.004325027,
-0.007922734,
-0.038427398,
0.0025339525,
-0.015666554,
-0.0008556708,
0.0003281692,
0.031286437,
-0.028594961,
0.011403758,
-0.013869646,
-0.009645743,
-0.04091662,
-0.026214642,
-0.006211392,
-0.034444638,
-0.018326912,
0.032857757,
0.01834247,
0.028439386,
-0.04654849,
-0.021251751,
0.02761483,
0.026245756,
0.010555866,
0.025934603,
0.008828967,
-0.013052869,
-0.049131062,
0.008338901,
0.017657934,
-0.0024795006,
-0.006040258,
0.038427398,
0.010345838,
0.0218585,
-0.001503258,
0.021096174,
0.04695299,
-0.03279553,
0.0067636888,
-0.042659078,
0.028283808,
0.032422144,
0.012422784,
0.013986328,
0.0028995571,
0.036124866,
0.0015615992,
0.0068998183,
0.058558997,
0.05488739,
0.014896451,
0.05012675,
0.011232624,
0.032297682,
-0.028034886,
0.0044533773,
-0.012329439,
0.023663187,
0.007471562,
-0.016833378,
-0.02198296,
-0.01787574,
-0.0045000506,
0.024456628,
-0.066337824,
0.048446525,
0.02218521,
0.034537986,
-0.03550256,
-0.036000405,
0.023725418,
0.06092376,
-0.07013389,
-0.036249325,
-0.023600956,
0.026650256,
0.0079499595,
-0.018000202,
0.028594961,
0.039827585,
0.024783337,
-0.005908018,
-0.012772831,
-0.053736124,
-0.013426253,
-0.041507814,
-0.05491851,
0.012687264,
-0.009521282,
-0.037836205,
-0.044183727,
-0.07050727,
0.023243131,
-0.011077047,
-0.01251613,
0.012765053,
-0.024456628,
0.015549872,
0.027039196,
-0.0029306724,
-0.02311867,
0.0433125,
-0.014585298,
0.06515544,
-0.01649111,
-0.0074598934,
-0.0030979172,
-0.035595905,
0.043281384,
0.020567214,
-0.015549872,
0.045863956,
-0.022807516,
-0.0033760103,
-0.037245017,
-0.008408911,
0.005067905,
0.0170823,
-0.05927465,
0.06559106,
0.004667295,
-0.039858703,
0.057781115,
0.017829068,
-0.06107934,
-0.002477556,
0.0051340247,
0.049224406,
-0.03198653,
0.058310077,
0.035160292,
0.03886301,
-0.021951845,
-0.053549435,
-0.06683567,
-0.01244612,
0.004258907,
-0.04829095,
0.011473767,
0.02781708,
-0.017533472,
-0.04284577,
0.0064214203,
-0.015899919,
-0.051184673,
-0.008930092,
-0.017797953,
0.04847764,
0.02112729,
0.0032748855,
-0.00003106972,
0.006238618,
0.015238719,
0.03708944,
0.0030356867,
-0.033137795,
0.030275188,
0.0341646,
0.005398505,
0.0062347287,
0.029279498,
-0.024269935,
-0.03351118,
-0.008720064,
0.032671068,
0.024067685,
0.033262257,
0.0089456495,
-0.036747172,
-0.0017045351,
-0.010361396,
0.037058324,
0.011606008,
0.0072420863,
0.016864493,
0.02952842,
-0.007125404,
0.009777984,
-0.018715855,
-0.017175646,
0.006946491,
0.04007651,
0.022169653,
-0.05768777,
0.0135273775,
0.010501415,
-0.0014770045,
0.06484429,
-0.04013874,
-0.030555226,
0.06319518,
0.0050367895,
0.055727504,
-0.036187097,
-0.015036469,
0.008362237,
0.015394296,
0.015425411,
0.06621336,
0.003059023,
0.00053479424,
0.0024269936,
-0.020645002,
-0.030072939,
0.0070826206,
0.017580146,
0.021485116,
0.0003296277,
-0.00973131,
-0.005993585,
-0.011940497,
0.003733836,
0.013356243,
-0.01602438,
0.08737177,
0.027241446,
0.007491009,
0.05641204,
0.008618939,
-0.0061958344,
-0.029326173,
0.03013517,
-0.0119093815,
-0.007039837,
-0.007996633,
-0.01225165,
0.0082611125,
-0.019244814,
0.0015158986,
0.04558392,
-0.04191231,
-0.014779768,
0.028672751,
0.05093575,
-0.0607993,
0.0050212317,
-0.04272131,
0.025639009,
0.009809099,
-0.038520742,
-0.008867861,
-0.05177586,
-0.0025222842,
0.008681169,
-0.024876684,
0.012508351,
-0.021407327,
-0.0062658438,
0.0022986429,
0.034351293,
0.032079875,
-0.036716055,
0.0016248021,
-0.045521688,
-0.010159146,
0.012422784,
-0.0073548793,
0.011893824,
0.029839573,
0.02171848,
0.03590706,
0.021671807,
-0.0068998183,
-0.005713547,
0.017175646,
-0.039391972,
0.0064680935,
-0.052149247,
-0.0020691676,
-0.04113443,
0.00827667,
0.0013496262,
0.0007807996,
0.060176995,
-0.0011882156,
0.024954472,
0.065217674,
-0.025141165,
-0.06565329,
0.019540409,
-0.0131539935,
-0.022480806,
0.008167767,
0.029030576,
-0.002477556,
0.0067636888,
-0.015542093,
-0.0063825264,
-0.00020249255,
-0.022574151,
0.020100486,
0.025312297,
-0.05681654,
-0.04356142,
0.009770204,
0.01330957,
0.025250068,
-0.030228516,
-0.0077710464,
-0.08799408,
-0.0009013714,
-0.003906915,
-0.016771147,
-0.00457006,
0.010719221,
0.0061958344,
0.020582773,
-0.011310413,
-0.031706493,
-0.01351182,
-0.03575148,
-0.046455145,
0.051215786,
0.042939115,
0.0685159,
-0.02609018,
-0.009497946,
0.026183527,
-0.013962992,
0.0019865176,
-0.022900863,
0.0046284012,
0.009925781,
0.0057446626,
-0.0047217472,
0.035409212,
-0.0013126768,
-0.0069153756,
0.050624594,
-0.022683054,
0.0042239022,
-0.025981277,
-0.039049704,
0.054607354,
-0.045739494,
-0.06092376,
-0.022963092,
0.013076206,
-0.026728043,
0.049660023,
0.03410237,
-0.014997575,
-0.02529674,
-0.022807516,
-0.0014711703,
-0.049660023,
-0.020504983,
-0.029855132,
-0.026432449,
0.00005721691,
0.034413524,
0.010042463,
-0.038894128,
-0.031613145,
-0.040107623,
0.001976794,
-0.010462521,
0.0038388504,
-0.013869646,
-0.004270575,
-0.040107623,
0.022885304,
0.041383352,
-0.052429285,
0.023243131,
0.011115941,
0.02066056,
0.008603381,
-0.043032464,
0.0018134387,
0.026012393,
-0.0031873737,
0.0020361075,
0.010734779,
-0.037307248,
0.07150296,
-0.03808513,
0.008548929,
-0.08282893,
-0.012772831,
-0.044339307,
0.015378738,
0.027972655,
-0.029170595,
-0.02139177,
-0.031473126,
0.05911907,
0.018000202,
0.024129916,
-0.016740032,
0.002304477,
-0.027661502,
-0.03159759,
0.009630186,
-0.02118952,
0.024643319,
-0.013885204,
0.024830012,
0.057252154,
-0.05171363,
0.028268252,
0.06783136,
-0.060519263,
-0.018840315,
-0.025001144,
-0.010322501,
-0.020442754,
-0.015005354,
-0.015977707,
-0.022527479,
-0.017362338,
0.018093549,
-0.037462823,
-0.07648141,
-0.014017443,
0.011333749,
0.0463618,
-0.0760458,
0.036280442,
-0.028781654,
-0.0020652781,
-0.034071255,
0.006615891,
0.031893183,
-0.0066081122,
0.04020097,
-0.012103853,
0.020411639,
0.020287177,
-0.036716055,
-0.027163658,
-0.0115982285,
0.06114157,
0.004079994,
-0.058621228,
0.04113443,
0.010602539,
-0.015409853,
-0.041103315,
0.010096915,
0.025047818,
-0.011069269,
0.0035276974,
-0.00013722334,
0.052678205,
-0.02523451,
-0.020178273,
0.009101226,
0.01205718,
-0.0024600534,
0.0345691,
0.015899919,
-0.036124866,
0.019680427,
0.049224406,
-0.026385777,
0.031535357,
-0.043717,
-0.005484072,
0.007782715,
-0.04132112,
0.044806033,
0.040418778,
0.011014816,
0.02881277,
0.0013671286,
0.07112958,
-0.02139177,
-0.029481748,
0.004278354,
-0.0685159,
-0.026976967,
-0.0027653724,
0.0161644,
-0.04119666,
0.0057835565,
-0.034413524,
-0.0018426093,
0.032142106,
0.019929351,
0.0005756331,
-0.051184673,
0.026572468,
-0.0008872723,
-0.003681329,
-0.019493736,
-0.04987783,
-0.016833378,
0.00020905593,
-0.0066859005,
-0.0073159854,
0.008860082,
0.048726562,
-0.041694503,
0.03820959,
-0.04847764,
-0.0045856177,
-0.019820448,
-0.0076310276,
-0.0022364124,
-0.033697873,
-0.008089978,
-0.016133284,
-0.035533674,
-0.0067636888,
0.016895609,
0.0026039619,
-0.028128233,
0.018498046,
-0.045148302,
-0.022371901,
-0.012267208,
-0.007911066,
-0.009249023,
0.036529366,
0.027863752,
-0.001536318,
0.01848249,
-0.010221377,
-0.018933661,
-0.047761988,
-0.0023258687,
0.05323828,
0.002954009,
0.000018262008,
-0.0020574993,
0.023165341,
-0.03178428,
0.00035612436,
-0.021033945,
-0.0127183795,
-0.019836005,
-0.029419517,
0.019431505,
0.04390369,
0.029077249,
0.014803105,
0.01933816,
0.01834247,
0.0327333,
0.019120352,
0.016537784,
-0.036747172,
0.004258907,
-0.024425512,
0.010656991,
0.030430766,
-0.0026448006,
0.0028120454,
-0.029388402,
-0.031893183,
-0.0013389303,
-0.002967622,
0.025265625,
0.008720064,
-0.0048034247,
-0.07392996,
0.012881735,
-0.016195515,
-0.010610318,
-0.03743171,
-0.02861052,
-0.058247846,
0.03780509,
-0.009241245,
-0.025187837,
-0.017533472,
-0.042690195,
0.027054755,
0.033480063,
0.027505927,
-0.004873434,
0.008331122,
-0.0087589575,
-0.00015727813,
-0.053611666,
-0.007370437,
0.0018931717,
-0.00007140719,
-0.03848963,
-0.010672549,
-0.0006743269,
0.052149247,
0.013426253,
-0.020427195,
-0.046050645,
0.008401131,
0.04396592,
0.00059362163,
-0.03693386,
0.011924939,
-0.060021415,
0.015277613,
-0.055540815,
0.0012455845,
0.021905173,
0.023025323,
0.050344557,
0.033200026,
-0.0016977286,
0.02330536,
0.046921875,
-0.02179627,
-0.013434031,
0.029652882,
0.016242187,
0.01655334,
0.0013029532,
0.019213699,
0.03092861,
0.047730874,
0.03125532,
-0.0075454605,
0.023554284,
0.018949218,
-0.0090701105,
-0.02118952,
0.037991785,
0.007693258,
0.011302633,
-0.008556708,
-0.000070191745,
0.0008410855,
0.0010802844,
-0.04231681,
0.00031990418,
0.007265423,
-0.029886248,
0.030181842,
-0.017906856,
0.03774286,
-0.010618097,
-0.059367996,
-0.028983904,
0.016195515,
0.029295057,
-0.01165268,
0.019773774,
-0.028097117,
0.052149247,
0.030617457,
0.016817821,
0.0031270878,
-0.020878367,
0.006938712,
0.0125316875,
0.032826643,
-0.058558997,
-0.01927593,
-0.011878266,
-0.014297481,
-0.04085439,
0.043685883,
-0.016615571,
-0.03013517,
-0.009762426,
-0.028361598,
-0.031830955,
-0.041476697,
0.014001885,
-0.033137795,
0.024612203,
0.026650256,
-0.034195717,
0.0003133408,
0.022231882,
0.00020224946,
0.0188092,
0.055354122,
0.012539467,
-0.024549972,
0.060145877,
-0.010828125,
0.009155678,
0.015923256,
-0.0019670704,
-0.0024464405,
-0.01596215,
-0.03581371,
0.0048578763,
-0.0050640153,
0.019711543,
-0.017704606,
0.038302936,
-0.00026642476,
0.016895609,
-0.017969087,
0.045801725,
0.018140221,
-0.02934173,
0.031955414,
0.058621228,
-0.016242187,
-0.021905173,
-0.05289601,
-0.010089137,
-0.044277076,
-0.051122442,
-0.0551052,
0.041850083,
-0.033946794,
-0.055447467,
-0.005880792,
-0.018762527,
-0.005507408,
-0.051993668,
-0.005398505,
-0.032951105,
0.037400592,
0.01040029,
0.0146475285,
0.011753805,
-0.022480806,
-0.019120352,
0.04206789,
0.024067685,
-0.029870689,
0.048851024,
0.023212016,
0.012811725,
0.023009766,
0.015425411,
0.0372139,
0.022138538,
0.012189419,
-0.028532732,
-0.0046400693,
-0.08407354,
-0.078783944,
-0.009497946,
0.04004539,
0.0066936794,
-0.059243534,
-0.05563416,
0.0059041283,
-0.07343211,
-0.009552398,
0.0055540814,
0.028128233,
0.048508756,
0.0011133443,
0.017657934,
-0.04710857,
0.28875,
0.07822387,
0.020224946,
0.02279196,
-0.017097859,
0.06895151,
0.009762426,
0.004457267,
0.02682139,
-0.009280139,
0.0066586747,
-0.023756532,
0.0042861328,
0.016911166,
0.004780088,
0.03432018,
-0.020816136,
0.01344181,
-0.016662244,
-0.0039769243,
-0.06801805,
0.017222319,
-0.000048496117,
0.055665273,
0.032204337,
-0.012477236,
0.009319033,
-0.0018785864,
-0.009350148,
-0.002590349,
-0.008416689,
-0.023196457,
0.026261315,
0.011637122,
-0.02899946,
0.052242592,
0.015075363,
-0.019182583,
-0.016708918,
0.00045822145,
-0.006417531,
-0.015658775,
-0.0037027209,
-0.024472184,
-0.036591593,
0.052802667,
0.00050173426,
-0.009365706,
0.0040877727,
-0.017735722,
0.037711747,
-0.026930293,
0.05252263,
-0.05134025,
-0.024596646,
-0.014079674,
-0.0023647628,
-0.030010708,
0.0019097016,
0.015293171,
0.039360855,
0.015020912,
-0.011948276,
0.005079573,
-0.0080744205,
0.050624594,
0.0074054417,
0.059492458,
-0.056380928,
-0.021531789,
0.010602539,
-0.0011075103,
0.015977707,
-0.056847658,
0.030866379,
0.006775357,
0.0020186051,
0.038707435,
0.016817821,
-0.04284577,
-0.008455583,
-0.018389143,
0.032079875,
-0.031021956,
0.024596646,
0.051682517,
-0.012306102,
0.015394296,
-0.00026448007,
0.032017644,
0.00014718996,
0.010019127,
0.030259632,
-0.036716055,
0.0029267832
] |
Byte-Pair Encoding (BPE)
Byte-Pair Encoding (BPE) was introduced in Neural Machine Translation of Rare Words with Subword Units (Sennrich et
al., 2015). BPE relies on a pre-tokenizer that splits the training data into
words. Pretokenization can be as simple as space tokenization, e.g. GPT-2, RoBERTa. More advanced pre-tokenization include rule-based tokenization, e.g. XLM,
FlauBERT which uses Moses for most languages, or GPT which uses
spaCy and ftfy, to count the frequency of each word in the training corpus.
After pre-tokenization, a set of unique words has been created and the frequency with which each word occurred in the
training data has been determined. Next, BPE creates a base vocabulary consisting of all symbols that occur in the set
of unique words and learns merge rules to form a new symbol from two symbols of the base vocabulary. It does so until
the vocabulary has attained the desired vocabulary size. Note that the desired vocabulary size is a hyperparameter to
define before training the tokenizer.
As an example, let's assume that after pre-tokenization, the following set of words including their frequency has been
determined:
("hug", 10), ("pug", 5), ("pun", 12), ("bun", 4), ("hugs", 5)
Consequently, the base vocabulary is ["b", "g", "h", "n", "p", "s", "u"]. Splitting all words into symbols of the
base vocabulary, we obtain:
("h" "u" "g", 10), ("p" "u" "g", 5), ("p" "u" "n", 12), ("b" "u" "n", 4), ("h" "u" "g" "s", 5)
BPE then counts the frequency of each possible symbol pair and picks the symbol pair that occurs most frequently. In
the example above "h" followed by "u" is present 10 + 5 = 15 times (10 times in the 10 occurrences of
"hug", 5 times in the 5 occurrences of "hugs"). However, the most frequent symbol pair is "u" followed by
"g", occurring 10 + 5 + 5 = 20 times in total. Thus, the first merge rule the tokenizer learns is to group all
"u" symbols followed by a "g" symbol together. Next, "ug" is added to the vocabulary. The set of words then
becomes
("h" "ug", 10), ("p" "ug", 5), ("p" "u" "n", 12), ("b" "u" "n", 4), ("h" "ug" "s", 5)
BPE then identifies the next most common symbol pair. It's "u" followed by "n", which occurs 16 times. "u",
"n" is merged to "un" and added to the vocabulary. The next most frequent symbol pair is "h" followed by
"ug", occurring 15 times. Again the pair is merged and "hug" can be added to the vocabulary.
At this stage, the vocabulary is ["b", "g", "h", "n", "p", "s", "u", "ug", "un", "hug"] and our set of unique words
is represented as
("hug", 10), ("p" "ug", 5), ("p" "un", 12), ("b" "un", 4), ("hug" "s", 5)
Assuming, that the Byte-Pair Encoding training would stop at this point, the learned merge rules would then be applied
to new words (as long as those new words do not include symbols that were not in the base vocabulary). For instance,
the word "bug" would be tokenized to ["b", "ug"] but "mug" would be tokenized as ["<unk>", "ug"] since
the symbol "m" is not in the base vocabulary. In general, single letters such as "m" are not replaced by the
"<unk>" symbol because the training data usually includes at least one occurrence of each letter, but it is likely
to happen for very special characters like emojis.
As mentioned earlier, the vocabulary size, i.e. the base vocabulary size + the number of merges, is a hyperparameter
to choose. For instance GPT has a vocabulary size of 40,478 since they have 478 base characters
and chose to stop training after 40,000 merges.
Byte-level BPE
A base vocabulary that includes all possible base characters can be quite large if e.g. all unicode characters are
considered as base characters. To have a better base vocabulary, GPT-2 uses bytes
as the base vocabulary, which is a clever trick to force the base vocabulary to be of size 256 while ensuring that
every base character is included in the vocabulary. With some additional rules to deal with punctuation, the GPT2's
tokenizer can tokenize every text without the need for the symbol. GPT-2 has a vocabulary
size of 50,257, which corresponds to the 256 bytes base tokens, a special end-of-text token and the symbols learned
with 50,000 merges. |
[
0.03333755,
-0.009766252,
-0.010015272,
0.009914108,
-0.009454977,
-0.031002985,
0.036761574,
-0.015882805,
-0.0025271636,
0.024341702,
0.013711662,
-0.010458839,
0.006676848,
-0.025197709,
-0.030333744,
-0.0015417838,
-0.04525938,
-0.02076204,
-0.016544264,
0.0014892562,
0.017758237,
0.017804928,
-0.056371894,
-0.019407993,
-0.0050932365,
0.08827758,
0.041306186,
0.017415835,
0.109693296,
0.036107894,
0.014287521,
0.019781524,
0.028357148,
-0.010816805,
-0.01797613,
-0.051142476,
0.023625769,
-0.015221345,
-0.08815307,
-0.033991225,
-0.0102176005,
0.0042255577,
0.018131766,
-0.048621148,
-0.054504246,
0.0016069569,
0.0147699965,
-0.04684688,
-0.00100678,
-0.04323609,
-0.012692236,
-0.0070114685,
0.007606782,
-0.021602482,
-0.011353754,
-0.030987423,
-0.021228952,
0.024403958,
-0.021882629,
0.029462175,
0.055998366,
0.055002287,
-0.01735358,
-0.032279212,
0.010287638,
0.023065474,
-0.017991694,
0.009937453,
-0.04192874,
-0.06655059,
-0.023158858,
-0.011890704,
0.017026741,
-0.052356448,
-0.046566736,
-0.019299047,
0.029835705,
0.008793518,
0.00044478275,
0.0673599,
0.013680534,
-0.007824674,
-0.0048442166,
0.01685554,
-0.020372946,
-0.044979233,
0.07022363,
-0.015836114,
0.007657364,
-0.036543682,
-0.03126757,
-0.019968288,
-0.011532737,
-0.010871278,
0.035142943,
0.038006674,
0.0046691243,
0.009836289,
-0.009626178,
0.031205315,
0.031034114,
0.058395185,
-0.047407176,
0.025415601,
-0.064745195,
-0.016326372,
0.035329707,
-0.013618279,
-0.037944417,
-0.016839975,
-0.030053597,
0.02761009,
0.014404248,
0.0065173195,
0.004089375,
0.04802973,
0.004248903,
0.0044356682,
-0.042613544,
0.0008526016,
0.008412206,
0.016139606,
0.00014335671,
0.004645779,
0.051920664,
-0.05883097,
-0.0330574,
0.034613777,
-0.025726875,
-0.008669008,
0.0073227435,
0.022084959,
0.016248552,
0.011937395,
0.0467535,
0.011805103,
0.009711779,
0.00406992,
0.01320584,
-0.0070698326,
0.0549089,
-0.011844012,
0.0004900149,
0.06543,
0.007400562,
-0.0048947986,
0.004743052,
-0.01939243,
-0.04995963,
0.017664853,
-0.028077,
0.018505296,
0.030333744,
0.032746125,
0.015019017,
-0.028326022,
0.014396467,
0.02466854,
0.027952492,
-0.03218583,
-0.058146164,
0.026473936,
-0.02997578,
0.028886316,
-0.07009912,
0.02511989,
-0.019439122,
-0.02636499,
-0.029462175,
0.0008740017,
-0.052512087,
0.0010875169,
0.022458488,
0.003060222,
0.0047702887,
0.023205549,
0.026582882,
0.026505062,
0.012879002,
-0.0044979234,
0.022505179,
-0.019174539,
0.00094452495,
0.04441894,
-0.034084607,
0.00060163613,
0.02827933,
-0.010614476,
-0.022987656,
-0.0054745483,
0.03589,
0.035360835,
-0.030427128,
0.008357733,
-0.0149256345,
0.008248786,
0.00813984,
-0.026131533,
0.012240888,
-0.030380437,
-0.026256043,
0.04435668,
0.005637968,
-0.0009119384,
-0.040870402,
-0.04351624,
0.01847417,
0.017166814,
0.0004644806,
0.04329835,
0.006988123,
0.026131533,
-0.028964136,
0.004073811,
0.032964017,
-0.023189984,
-0.028964136,
-0.029197592,
-0.02001498,
-0.010326547,
-0.00292793,
0.06107215,
0.035298582,
0.012801182,
-0.012824529,
0.017960565,
-0.011952959,
0.05892435,
0.004922035,
0.049025808,
0.01685554,
0.047313794,
0.0025738548,
0.021649174,
-0.00452516,
0.008739045,
0.0005291674,
0.033773333,
0.032777254,
-0.0126222,
-0.035734367,
0.008443333,
0.040963784,
0.06935206,
0.014100756,
-0.03915839,
-0.0054745483,
-0.021851502,
0.02113557,
0.0041010478,
-0.054566503,
0.04575742,
0.0023073256,
0.001208136,
-0.030318182,
-0.023656897,
-0.0015894477,
0.057118956,
-0.00038252774,
-0.02554011,
-0.004015447,
0.046099823,
-0.018754316,
0.0011176716,
-0.005089346,
0.016404191,
0.06365573,
-0.0012402362,
-0.020777604,
-0.05792827,
-0.0017411943,
-0.054753266,
-0.046162076,
0.028808497,
-0.00010341381,
-0.032528233,
-0.05248096,
-0.059329007,
0.018956644,
-0.016824411,
0.004264467,
-0.019439122,
-0.020450765,
-0.020855423,
-0.0066496115,
0.005816951,
-0.0343025,
0.04161746,
0.00041681662,
0.028217075,
-0.039874323,
-0.0041710846,
-0.014279739,
-0.039718684,
-0.027827982,
0.013805045,
-0.026956411,
-0.0006896686,
-0.0177738,
-0.012995729,
-0.0063188816,
0.00031370678,
0.043609623,
0.028746244,
-0.05503341,
0.014100756,
-0.0036399716,
-0.02031069,
0.051142476,
0.04637997,
-0.08827758,
-0.016886666,
0.015306946,
0.02001498,
-0.045850802,
0.018536424,
0.048776787,
0.03052051,
-0.018692061,
-0.0316411,
-0.052356448,
0.009999708,
0.0068986313,
-0.040714767,
0.005501785,
0.043734133,
-0.01603066,
-0.08952268,
0.009229302,
-0.039345156,
-0.06303318,
0.008241004,
-0.019205665,
0.033150785,
0.01133819,
0.0036535899,
-0.010349892,
-0.023952609,
-0.026894156,
0.011984086,
-0.011665029,
-0.029290974,
0.037259612,
0.031049678,
0.0057858233,
0.015758295,
0.008241004,
-0.0033325877,
-0.009688433,
-0.035734367,
-0.013540461,
0.052045174,
0.015439238,
-0.0054084025,
-0.011851794,
-0.018053947,
-0.038629223,
0.023485696,
0.0030991314,
-0.0029318212,
-0.01797613,
0.043547366,
0.021415718,
-0.0005953134,
-0.0057858233,
-0.048590023,
0.01374279,
0.044201046,
0.035858877,
-0.036886085,
0.046286587,
0.056371894,
-0.042426776,
0.028217075,
-0.011431573,
-0.014715523,
0.042115502,
0.015112399,
0.03903388,
-0.006692412,
-0.008863554,
0.0041088294,
-0.0028909661,
-0.017727109,
0.057150085,
-0.025057634,
-0.03831795,
0.006723539,
-0.0030174216,
-0.0025835822,
-0.038504712,
0.0058480785,
-0.030551637,
0.027641216,
0.013563806,
-0.015112399,
0.03629466,
-0.0004498896,
0.04015447,
0.022551872,
0.1084482,
0.007894712,
0.02939992,
0.010668949,
0.0032606053,
0.0053539295,
-0.044045407,
0.006999796,
-0.021182261,
0.010692295,
-0.050862327,
-0.0077779833,
0.02220947,
0.030504946,
0.00585586,
0.00035407528,
-0.09232415,
-0.019952726,
0.02345457,
0.050146397,
-0.053290274,
0.022162776,
-0.04027898,
0.017135687,
-0.0069414317,
-0.05767925,
-0.00063860003,
-0.02158692,
-0.022084959,
-0.037259612,
-0.045415018,
-0.03470716,
0.029882396,
-0.024014864,
-0.047656197,
0.051547132,
0.044169918,
0.00406992,
0.04438781,
-0.030131416,
0.00048782624,
0.017213505,
-0.0122875795,
-0.0047119246,
0.039314028,
0.033960097,
0.008988065,
0.037103977,
0.017913874,
-0.0037061176,
0.0073888893,
0.011268154,
0.011034697,
-0.027220996,
0.023983736,
-0.03990545,
0.016310807,
-0.0018063675,
0.0066418294,
0.024575159,
0.013719444,
0.034458138,
0.06605255,
-0.03076953,
-0.03160997,
0.009392722,
0.0065717925,
-0.004517378,
0.0129101295,
-0.0042566853,
0.014808906,
0.006287754,
0.014069628,
0.0017752401,
0.0049337083,
-0.0093382485,
0.0099063255,
0.017649291,
-0.021571355,
-0.004202212,
-0.013229186,
0.007727401,
-0.010692295,
0.010303201,
-0.016450882,
-0.04077702,
0.00033243193,
-0.0015952842,
-0.009641742,
-0.00734998,
0.0019707596,
-0.01237318,
0.023905918,
-0.048496637,
-0.02711205,
-0.048154235,
-0.038691476,
0.00402712,
0.025586803,
0.043858644,
0.06897853,
-0.053414784,
0.013470424,
-0.0024493448,
0.0051632733,
-0.008863554,
-0.02300322,
-0.035983387,
-0.00867679,
-0.017462526,
0.013470424,
0.06437166,
-0.003711954,
-0.011898485,
0.035391964,
-0.010412147,
-0.021898193,
-0.0049765087,
-0.015244692,
0.039189517,
-0.028543914,
-0.091079056,
-0.0026497282,
0.029010827,
-0.038722605,
0.015275818,
0.0333998,
-0.008521152,
-0.027641216,
-0.027127612,
-0.0073344163,
-0.021415718,
-0.04115055,
-0.052076302,
-0.034987304,
-0.009602833,
0.013711662,
0.0015359474,
-0.04647335,
0.000020473017,
-0.04311158,
-0.02641168,
-0.0034220791,
-0.022100523,
-0.022442924,
0.024715232,
0.023843663,
0.005416184,
0.007637909,
-0.013151367,
-0.034489267,
-0.019874906,
0.03604564,
0.027205432,
-0.056745425,
-0.0032606053,
0.0029182027,
0.0061398987,
0.040247854,
-0.00034167292,
-0.039749812,
0.046660118,
-0.0691653,
0.046130948,
-0.053041253,
-0.010925751,
-0.069538824,
0.00033340466,
0.022038268,
-0.03707285,
-0.030971859,
-0.01457545,
0.041368444,
0.027205432,
0.011758411,
-0.04027898,
-0.00063422276,
-0.029119773,
-0.008443333,
0.0122875795,
-0.009665088,
0.02462185,
-0.028139256,
0.0064122644,
0.053290274,
-0.040994912,
0.031360954,
0.029633377,
0.0050932365,
0.016310807,
-0.063126564,
-0.00402712,
-0.0071554333,
-0.0051010186,
-0.03483167,
-0.015672695,
-0.063935876,
0.0037547543,
-0.038006674,
-0.08821532,
-0.024528466,
-0.007050378,
0.042675797,
-0.07184226,
0.009929671,
-0.001973678,
-0.04575742,
-0.03151659,
0.037726525,
0.029431047,
0.0055368035,
0.019610323,
-0.013984027,
0.016559828,
0.023205549,
-0.0021750338,
-0.008100931,
-0.024808614,
0.069227554,
-0.018271841,
-0.047033645,
0.052916743,
0.0004642374,
-0.017555907,
-0.007960857,
0.023610206,
-0.016450882,
-0.0050465455,
-0.020699784,
-0.006692412,
0.040185597,
-0.04634884,
0.012637763,
-0.011369318,
-0.03841133,
-0.020746477,
-0.00040611654,
0.025306655,
-0.026691828,
0.06406039,
0.043827515,
-0.04600644,
-0.0041049384,
-0.02325224,
-0.011400445,
0.025213271,
-0.03333755,
0.04189761,
0.02375028,
-0.030178107,
0.0053422567,
-0.0005101991,
0.052418705,
-0.012964603,
-0.026396116,
0.0060231704,
-0.0190189,
-0.039625302,
0.017540345,
-0.010614476,
-0.006073753,
0.022193905,
-0.04115055,
-0.004132175,
-0.028792934,
0.04161746,
0.005575713,
-0.046130948,
0.033213038,
-0.003235314,
0.026053714,
-0.042675797,
-0.027547834,
-0.00028355204,
0.020699784,
-0.01283231,
-0.021197826,
0.0033520423,
0.027080921,
-0.028466096,
0.01856755,
-0.022660818,
0.030053597,
-0.025415601,
-0.008809081,
0.015501493,
-0.03853584,
-0.003276169,
-0.016964486,
-0.035236325,
-0.018816572,
0.028559478,
0.011921831,
-0.021664737,
0.02466854,
-0.03841133,
0.0026730737,
0.008077585,
0.00950945,
-0.018069511,
0.02536891,
0.045570653,
-0.027423324,
-0.0006128226,
-0.003180841,
-0.034395885,
-0.021602482,
-0.024839742,
0.03567211,
-0.013400387,
0.004704143,
-0.03255936,
-0.008217659,
-0.018878827,
-0.021291208,
-0.012225324,
0.0007310098,
-0.011548301,
0.021477973,
0.03704172,
0.0558116,
-0.032497104,
0.022225032,
0.012489907,
-0.0019960506,
0.02865286,
0.00975847,
-0.00776631,
-0.018925518,
-0.0039648646,
-0.009742906,
-0.023983736,
0.03333755,
0.0074861627,
0.0027625654,
0.013937336,
-0.02113557,
-0.037851036,
-0.0020913787,
0.009851852,
0.026380554,
0.01926792,
-0.03076953,
0.036730446,
0.0012353725,
-0.013135803,
-0.026691828,
-0.05593611,
-0.040528,
-0.00043481222,
0.002009669,
0.029104209,
-0.009073665,
-0.01740027,
-0.0040349015,
0.028139256,
0.04560178,
0.014427595,
0.03371108,
-0.04062138,
-0.011493828,
0.0013472369,
0.016170735,
0.00100678,
0.046442226,
-0.001673103,
-0.054877777,
0.043485112,
0.06374911,
0.002818984,
-0.012007432,
-0.01079346,
0.022318415,
0.042613544,
0.029493302,
-0.048621148,
0.023688024,
-0.022365106,
0.021571355,
-0.054504246,
-0.0013530734,
0.015882805,
0.027438888,
0.028590605,
0.007921948,
-0.008505588,
-0.004015447,
0.023221113,
0.005509567,
-0.0029512758,
0.02076204,
0.031252008,
0.0008380106,
-0.011283717,
0.02001498,
0.016637648,
0.028575042,
0.026847465,
-0.029851269,
0.04575742,
0.020917678,
-0.010723422,
0.010847933,
0.050800074,
-0.004085484,
-0.017260198,
0.017664853,
0.014723306,
0.0063850274,
0.010497748,
0.00647841,
0.050519925,
0.034084607,
0.010692295,
0.0008078558,
-0.033026274,
0.0031049678,
0.012863438,
-0.06141455,
-0.019174539,
0.03604564,
0.007968639,
0.0004939058,
0.028185947,
-0.0084588975,
0.024077117,
0.004809198,
0.03246598,
0.021726992,
0.008443333,
-0.014069628,
0.008739045,
-0.000935284,
-0.02823264,
0.023407876,
0.0011799267,
-0.026069278,
-0.07464374,
0.034862794,
0.032870635,
-0.027345505,
0.009501669,
-0.021415718,
-0.03383559,
-0.03943854,
0.0015437292,
-0.042084374,
-0.027065357,
0.051547132,
-0.0044084317,
-0.020497456,
0.028512787,
-0.008980283,
0.029057518,
0.05964028,
0.0103732385,
-0.0026711284,
0.031158624,
0.0006604866,
-0.0048986897,
0.017104559,
0.006493974,
-0.0013024912,
-0.024139373,
-0.04351624,
-0.03101855,
-0.044699084,
-0.03455152,
-0.014209702,
0.009019192,
-0.020201745,
0.014816688,
-0.03741525,
0.017415835,
0.007984202,
-0.024061555,
-0.0025660729,
0.039998833,
-0.047033645,
-0.016793285,
-0.022769764,
0.034395885,
-0.03694834,
-0.016450882,
-0.041555207,
0.047438305,
-0.03903388,
-0.062192738,
-0.022038268,
-0.013999592,
-0.006256627,
-0.040870402,
-0.017633727,
-0.04329835,
0.05817729,
0.0252444,
0.021446845,
0.005816951,
-0.032030195,
-0.0034220791,
0.045819674,
0.025259962,
-0.0114082275,
0.079748645,
0.025726875,
0.01574273,
0.023937045,
-0.013540461,
0.041181676,
0.007976421,
-0.0042994856,
-0.041959863,
-0.015019017,
-0.028497223,
-0.04659786,
0.016497573,
0.020030543,
0.040247854,
-0.068667255,
-0.0017801037,
0.0148244705,
-0.050675564,
-0.012303143,
-0.033244167,
0.03666819,
0.024263883,
-0.0062138266,
-0.028824061,
-0.047158156,
0.2881161,
0.04040349,
0.051889535,
0.058270674,
0.014295302,
0.027003104,
0.02101106,
-0.036761574,
0.029259846,
0.0044706864,
0.007661255,
0.038847115,
0.027392197,
0.01964145,
-0.039998833,
0.03014698,
-0.011493828,
0.024855306,
-0.009563923,
-0.0346449,
-0.039749812,
0.021260079,
-0.0084588975,
0.034364756,
0.023267804,
-0.0035135162,
0.005248874,
0.016762156,
0.030178107,
-0.037757654,
0.022551872,
-0.048060853,
0.04774958,
0.000671673,
-0.011135862,
0.04572629,
0.01847417,
-0.049741738,
-0.00938494,
0.01876988,
-0.006346118,
0.00011873437,
0.018801007,
-0.003019367,
-0.030240363,
0.021337898,
-0.031827863,
-0.010980224,
0.04161746,
-0.03729074,
0.042955946,
-0.0037216812,
0.05593611,
-0.060511854,
-0.0035524254,
-0.062348373,
-0.001430892,
-0.049928505,
-0.020186182,
0.029026391,
0.045850802,
0.01864537,
-0.00012536113,
0.006163244,
-0.034177992,
0.034209117,
0.029228719,
0.047158156,
-0.04684688,
0.019579194,
0.005318911,
-0.020824295,
-0.011353754,
0.009190394,
0.0016487846,
-0.0037878272,
0.01287122,
0.058052782,
0.01561044,
-0.039002754,
0.04115055,
0.0073966715,
0.0030796768,
-0.015384765,
0.016310807,
0.038878243,
-0.05630964,
0.01814733,
-0.0052216374,
0.03915839,
0.02342344,
0.030582765,
0.018692061,
-0.03355544,
0.01727576
] |
WordPiece
WordPiece is the subword tokenization algorithm used for BERT, DistilBERT, and Electra. The algorithm was outlined in Japanese and Korean
Voice Search (Schuster et al., 2012) and is very similar to
BPE. WordPiece first initializes the vocabulary to include every character present in the training data and
progressively learns a given number of merge rules. In contrast to BPE, WordPiece does not choose the most frequent
symbol pair, but the one that maximizes the likelihood of the training data once added to the vocabulary.
So what does this mean exactly? Referring to the previous example, maximizing the likelihood of the training data is
equivalent to finding the symbol pair, whose probability divided by the probabilities of its first symbol followed by
its second symbol is the greatest among all symbol pairs. E.g. "u", followed by "g" would have only been
merged if the probability of "ug" divided by "u", "g" would have been greater than for any other symbol
pair. Intuitively, WordPiece is slightly different to BPE in that it evaluates what it loses by merging two symbols
to ensure it's worth it. |
[
0.042859323,
-0.028620083,
0.004779192,
-0.013751485,
-0.029170772,
-0.009117833,
0.04304813,
-0.03360775,
-0.040939778,
0.05031722,
0.008047923,
0.02865155,
-0.054502457,
-0.019431448,
-0.044495653,
0.01600931,
-0.022326497,
0.009039164,
-0.026134117,
-0.009479715,
0.0056012915,
0.039020233,
-0.07426432,
-0.026039712,
-0.043866295,
0.061079253,
0.047170427,
-0.021571267,
0.08974654,
0.03971253,
-0.027392834,
0.020092273,
0.015238346,
-0.017889518,
-0.022719847,
-0.04987667,
0.011493661,
-0.023947095,
-0.040688034,
0.004299306,
-0.006718403,
-0.016205985,
0.0050624036,
-0.02849421,
-0.06860009,
-0.022546772,
-0.008488474,
-0.024828197,
-0.015757566,
-0.013751485,
-0.02500127,
-0.00440551,
0.021587001,
-0.018754886,
0.019022364,
-0.025331685,
-0.026653338,
0.05418778,
-0.043111067,
0.005620959,
0.034772065,
0.05670521,
-0.011698203,
-0.044212442,
0.0045864508,
-0.013861624,
0.015497956,
0.012555704,
0.008881823,
-0.03879996,
-0.038988765,
-0.006179515,
-0.024985537,
-0.025457555,
-0.010179875,
0.012956921,
0.039020233,
-0.005491154,
-0.04802006,
0.06652321,
-0.0065453295,
0.00852781,
0.024434848,
0.0082367305,
-0.017826583,
-0.051355664,
0.025441822,
0.004834261,
-0.005609159,
-0.012060084,
0.0033513347,
-0.01144646,
-0.04748511,
0.006667268,
0.036723077,
0.027864853,
-0.030681232,
0.026244255,
-0.006502061,
0.032050088,
0.01650493,
0.046163455,
-0.012437699,
0.056642275,
-0.0763412,
-0.009275173,
0.016300388,
0.0008196413,
-0.013389604,
0.014978735,
-0.042953726,
0.006010375,
-0.008441272,
-0.009581985,
0.002281425,
0.04443272,
-0.031562336,
0.017212959,
-0.03820207,
0.00049070304,
0.030287884,
-0.008991961,
-0.026448796,
-0.013004122,
0.027644577,
-0.006820674,
-0.019683192,
0.01801539,
-0.039303444,
-0.020941908,
0.025976777,
0.005825501,
-0.014734859,
0.03206582,
0.011005909,
0.019950667,
-0.013098526,
0.028793156,
0.036911882,
-0.034457386,
0.024686592,
-0.0049837334,
0.002297159,
0.06463513,
-0.00928304,
0.001202665,
0.043708958,
-0.044180974,
-0.040247485,
0.046729878,
-0.035527293,
0.029627057,
-0.0036483132,
0.003085824,
-0.032600775,
-0.016316121,
-0.0073713628,
0.040184546,
0.024230307,
0.009967467,
-0.030492425,
0.015623827,
-0.019148236,
0.05947439,
-0.057523377,
0.022845717,
-0.03864262,
-0.0023128928,
-0.022106221,
-0.027188292,
-0.031404994,
-0.007898451,
0.0042481706,
-0.004436978,
0.014113367,
0.054533925,
0.0714322,
0.01259504,
-0.01895943,
-0.015820501,
-0.018739153,
-0.019777594,
0.028572882,
0.01785805,
-0.016143048,
-0.0090470305,
-0.05736604,
-0.011792607,
0.007308427,
0.023097461,
0.032946922,
0.023915628,
-0.006651534,
0.0157497,
0.0015301282,
0.029029166,
0.008040057,
-0.03269518,
-0.0107384315,
-0.04518795,
-0.010699096,
0.030240681,
-0.023538012,
0.046194922,
-0.03788739,
-0.013782954,
0.043142535,
-0.016017176,
0.009180769,
0.0043425746,
0.013326669,
-0.0006844275,
-0.01626892,
0.028116597,
0.016410526,
-0.01749617,
-0.010470954,
0.004964066,
-0.019148236,
0.0037958191,
-0.005278745,
-0.00078719,
0.040184546,
0.0024525318,
0.030130545,
-0.011092446,
-0.0005093871,
0.042513173,
0.028981965,
0.023034526,
-0.01228036,
-0.003666014,
-0.0002605938,
0.0064233914,
0.030696966,
0.031578068,
-0.00038130282,
0.04852355,
0.005782232,
-0.027770448,
-0.0067105363,
0.010958707,
0.04701309,
0.04163207,
0.027329898,
0.003030755,
0.003620779,
0.010927239,
0.034488853,
0.009062764,
-0.06419458,
0.064761005,
0.053652823,
0.008929025,
-0.03773005,
-0.033859495,
-0.0009199453,
0.044778865,
-0.0032116957,
-0.019856265,
-0.010250678,
0.03861115,
0.03511821,
0.019809062,
-0.0021221186,
0.045219418,
0.028305404,
-0.0066397334,
-0.019651722,
-0.04138033,
-0.02534742,
-0.028824626,
-0.05698842,
0.00007701039,
0.009369576,
-0.0207059,
-0.049939606,
-0.029863067,
0.04012161,
-0.020863239,
-0.018094061,
-0.01587557,
-0.0232076,
-0.008748085,
-0.022609709,
0.006187382,
-0.042859323,
0.020831771,
0.029076368,
0.032050088,
-0.010093339,
-0.010706964,
-0.017684978,
-0.03511821,
0.00464152,
0.014050432,
-0.005931705,
-0.004027895,
-0.004385843,
0.0024721993,
0.020202411,
0.0038371207,
-0.010596826,
0.027581641,
-0.048429146,
0.028557148,
0.009054897,
-0.039146107,
0.024812464,
0.033796556,
-0.044747397,
-0.0053574154,
-0.013680683,
0.024765262,
-0.037037756,
0.033261605,
0.058907967,
0.017873785,
-0.008818888,
-0.006155914,
-0.061519805,
0.016536398,
0.024906868,
-0.036880415,
0.050757773,
0.025599161,
0.004507781,
-0.07061404,
-0.0076978425,
-0.035999313,
-0.051764745,
-0.025410354,
-0.031279124,
0.034174174,
0.001176114,
-0.020941908,
-0.0044015767,
0.025662098,
0.013106394,
0.031200454,
-0.0011544797,
-0.039303444,
-0.011092446,
0.05919118,
0.04348868,
-0.009377443,
0.02031255,
-0.015285548,
0.00076998095,
-0.012846783,
0.028415542,
0.061708614,
0.032663714,
0.008929025,
-0.011352056,
-0.00977866,
0.019038098,
0.0314994,
-0.0000034879006,
-0.0030995912,
0.017212959,
0.021350991,
-0.005066337,
-0.011234052,
0.0001205861,
-0.024592187,
-0.0009853396,
0.037667114,
0.042198494,
-0.03864262,
0.03584197,
0.012075818,
-0.02534742,
0.02852568,
-0.018550346,
-0.040373355,
0.052142363,
0.0032352966,
0.031200454,
-0.010998042,
-0.006395857,
0.028966231,
0.002218489,
-0.0054636197,
0.0580898,
0.02714109,
-0.0084806075,
-0.0042481706,
0.0024426982,
-0.010848569,
-0.02531595,
-0.029721461,
-0.019447181,
0.008519942,
-0.0039924937,
-0.021492597,
0.040404823,
0.032883987,
0.020863239,
-0.002505634,
0.08597039,
0.015450754,
-0.007394964,
0.0118004745,
-0.014506716,
-0.030555362,
-0.028163798,
0.03285252,
-0.05431365,
-0.016552132,
-0.037383903,
0.0045274487,
-0.023176132,
0.028950496,
-0.0055816243,
0.022751315,
-0.05126126,
-0.02051709,
-0.0036738808,
0.01220169,
-0.063691095,
0.017118555,
-0.058907967,
0.023632417,
-0.0036738808,
-0.081753686,
-0.014231372,
-0.036597203,
0.02471806,
-0.0038685887,
-0.036439866,
-0.015600227,
-0.02714109,
-0.03201862,
-0.017873785,
0.011045244,
0.037195094,
-0.03952372,
0.015411419,
-0.039460786,
0.0073044933,
0.009755058,
-0.0054085506,
0.00035745604,
0.031845547,
0.01269731,
0.015505823,
0.042072624,
0.037761517,
-0.013956027,
0.023742555,
-0.060229618,
0.01916397,
-0.06280999,
0.014412313,
-0.034016833,
0.0107384315,
-0.030256415,
0.009456113,
0.013782954,
-0.040562164,
-0.010966574,
0.021225119,
-0.022074753,
-0.056201726,
0.0102349445,
0.0033119998,
-0.011430726,
0.020438422,
-0.010903638,
-0.010439486,
0.014199904,
0.016599333,
0.0020100141,
0.028714487,
-0.030335085,
0.012288227,
-0.0041026315,
-0.06746724,
-0.022829983,
0.0022066887,
0.0131142605,
-0.000713437,
-0.008968361,
-0.017008416,
-0.069732934,
0.0031153252,
0.0019588787,
-0.03725803,
-0.0005295463,
0.0116038,
-0.010754165,
0.030854307,
-0.025300216,
-0.020847505,
-0.046069052,
-0.0414118,
-0.01955732,
0.011139647,
0.016331857,
0.07432725,
-0.04868089,
-0.00007449049,
0.0224209,
0.03304133,
0.0398384,
-0.011816208,
-0.050537497,
-0.017952455,
0.010518156,
-0.0035224415,
0.018723419,
0.0029029166,
0.0028045794,
0.030995913,
-0.032978393,
-0.036313992,
0.0104866875,
-0.014923667,
0.057838056,
-0.047642447,
-0.06444632,
-0.028478477,
0.018676218,
-0.0060575767,
0.013570545,
-0.008181662,
-0.030681232,
-0.0042481706,
-0.014357244,
0.038265005,
-0.05500594,
-0.016788142,
-0.022011818,
-0.009715724,
-0.0049050637,
0.028856093,
0.013035591,
-0.057114296,
-0.020768834,
-0.03373362,
0.0027809783,
-0.017118555,
-0.02959559,
-0.023003057,
0.0011328455,
-0.015104607,
0.005164674,
0.04392923,
-0.015261946,
0.0082918,
-0.027471503,
-0.0014072065,
0.037792984,
-0.0137436185,
-0.0049522654,
-0.0026885413,
-0.025819438,
0.028509945,
0.0071510873,
-0.012256759,
0.058530353,
-0.029611323,
0.046604007,
-0.033985365,
-0.020564293,
-0.05598145,
0.014963001,
0.032286096,
-0.006655467,
-0.032946922,
-0.0038194202,
0.03603078,
0.008110859,
0.050096948,
-0.053904567,
-0.016221719,
-0.04197822,
-0.021256587,
-0.002497767,
-0.026102649,
0.017480435,
-0.023789756,
0.03773005,
0.042670514,
-0.051827684,
0.0063211205,
0.06343935,
0.019588787,
0.040404823,
-0.029233707,
-0.008716617,
0.0062188497,
-0.013436806,
-0.02114645,
0.004021995,
-0.064100176,
0.011438593,
-0.04912144,
-0.043079596,
-0.043425746,
0.039775465,
0.0506319,
-0.045754373,
0.02401003,
-0.033544816,
-0.013358137,
-0.043551616,
0.06608266,
0.036471333,
0.0012734678,
0.023632417,
-0.021162184,
0.029863067,
0.0021948882,
-0.042072624,
-0.030775636,
-0.014372977,
0.03952372,
0.02865155,
-0.023947095,
0.052551445,
-0.002110318,
-0.03524408,
-0.03433151,
0.019022364,
-0.01801539,
-0.0057900995,
-0.0070173484,
-0.0102349445,
0.03392243,
-0.05198502,
-0.008051856,
0.0030287884,
-0.046855748,
-0.034488853,
0.01600931,
0.00096124696,
-0.07287973,
0.06853715,
0.02146113,
-0.013523343,
0.010321481,
-0.030224947,
-0.022704111,
0.0036994487,
-0.036880415,
0.051166855,
0.011666736,
-0.025614895,
0.00009889043,
0.021681404,
0.09232691,
-0.027990725,
-0.015143942,
0.021885946,
-0.014782061,
-0.04927878,
0.008653681,
0.022609709,
-0.013696417,
-0.0012518336,
-0.02401003,
0.026810678,
-0.015269813,
0.04411804,
0.01152513,
-0.04959346,
0.020690165,
-0.0017602374,
-0.026055448,
-0.041191522,
-0.032883987,
-0.027030952,
0.04002721,
0.0029737195,
-0.024733793,
0.05764925,
0.022955855,
-0.06539036,
-0.0009061781,
0.023349205,
0.022357965,
-0.029107837,
-0.020973375,
0.02098911,
-0.057397507,
-0.01053389,
0.006533529,
-0.027408568,
0.006419458,
0.019573053,
0.011792607,
-0.020139476,
-0.00051233725,
-0.04490474,
-0.0010433586,
0.0006809857,
0.011934212,
-0.006100845,
0.016929748,
0.04622639,
-0.009345976,
-0.0015704464,
-0.034772065,
-0.000012353621,
-0.017763646,
-0.005546223,
0.059222646,
-0.009904531,
0.035999313,
-0.0032785651,
0.016851077,
-0.02539462,
-0.033953898,
-0.0027554107,
-0.004964066,
0.01801539,
-0.02305026,
0.035495825,
0.046950154,
0.025331685,
0.01460112,
0.024340445,
-0.009267306,
0.0009440379,
0.024780996,
0.009503315,
-0.0034752397,
-0.018629014,
-0.018754886,
-0.025803704,
0.057586312,
-0.013790821,
0.007693909,
0.024261774,
0.0148056615,
-0.010714831,
0.008165929,
0.04518795,
0.031955685,
0.031357795,
-0.06715257,
-0.000112165966,
-0.015403552,
-0.004794926,
-0.008873956,
-0.048145935,
-0.042450238,
0.016567865,
-0.017401766,
-0.013303068,
-0.01593064,
-0.013122127,
0.002798679,
-0.0077450443,
0.044967674,
0.0019215106,
0.0070724175,
-0.01608798,
0.020690165,
-0.03653427,
0.00373485,
0.04031042,
0.0058097667,
-0.030807104,
-0.0232076,
0.04169501,
0.046478134,
-0.016803876,
-0.0314994,
-0.058467414,
0.020092273,
0.0314994,
0.010722698,
-0.042041156,
0.02229503,
-0.056359064,
0.028934762,
-0.025882373,
-0.012248892,
0.00985733,
0.033544816,
0.017968189,
0.01749617,
-0.0149944695,
-0.010006802,
0.019683192,
-0.017150022,
-0.016072245,
0.030523892,
0.035401423,
-0.00638799,
0.025567694,
0.037006285,
0.08974654,
0.05582411,
0.002149653,
-0.05566677,
0.031955685,
0.0138694905,
0.0047673914,
0.017669244,
0.03710069,
0.00946398,
0.0057782987,
-0.032915454,
-0.004802793,
-0.015938507,
0.025583427,
-0.009637054,
0.03788739,
0.008425538,
-0.0131771965,
0.003953159,
-0.025079941,
0.048177402,
-0.009550517,
-0.04103418,
-0.015804768,
0.03555876,
0.018754886,
-0.011635267,
-0.000005516107,
0.012075818,
0.041600604,
0.0134918755,
-0.015576626,
0.0034280377,
-0.008024323,
-0.010290014,
0.0040829643,
0.01267371,
-0.021681404,
0.015222612,
-0.026511732,
-0.034803532,
-0.05201649,
0.043079596,
0.0039059569,
-0.01376722,
-0.008763819,
-0.053432547,
-0.032286096,
-0.045345288,
0.011745405,
-0.06145687,
0.0029186506,
0.05097805,
-0.04106565,
-0.055037413,
0.008197396,
-0.000044651275,
0.016143048,
0.038988765,
0.005266945,
0.0018035058,
0.053558417,
-0.016221719,
-0.014066165,
0.014199904,
0.0028596483,
0.009825861,
-0.023286268,
-0.028195266,
0.0015635628,
0.012469168,
0.026873613,
-0.019258374,
-0.011761139,
0.040058676,
-0.010651895,
-0.04940465,
0.014852864,
0.021099247,
-0.01259504,
0.005558023,
0.03722656,
-0.027282696,
0.0023758288,
-0.0010158241,
0.014829262,
-0.049939606,
-0.04578584,
-0.04260758,
0.029988939,
-0.014734859,
-0.04163207,
-0.009353843,
-0.03253784,
0.012862517,
0.00021916922,
-0.0148056615,
-0.022782782,
0.019195437,
0.024749529,
0.030240681,
0.013232265,
-0.031845547,
0.008047923,
0.0489641,
0.026794944,
-0.046289325,
0.06759311,
0.049939606,
0.04503061,
0.031200454,
0.026810678,
0.042670514,
0.0059120376,
-0.012831049,
-0.00037859855,
-0.010321481,
-0.037069224,
-0.07923625,
0.015033804,
0.035527293,
0.043362807,
-0.039743997,
0.001986413,
0.014506716,
-0.06941826,
0.016072245,
-0.008244598,
0.049467586,
0.014239239,
0.012044351,
-0.015733965,
-0.05639053,
0.29529506,
0.10208197,
0.062275037,
0.04927878,
0.026370127,
0.01884929,
0.016615067,
-0.047862723,
0.012657975,
0.0034378713,
0.018219933,
-0.017071353,
0.004838194,
0.019824797,
-0.019038098,
0.021099247,
-0.021225119,
0.021587001,
-0.010148408,
-0.0074579,
-0.04106565,
0.030885775,
0.007619173,
0.062400907,
0.024466317,
-0.020233879,
-0.014561785,
-0.006356522,
-0.013122127,
-0.03694335,
-0.0038292538,
-0.019431448,
0.011249785,
-0.010156275,
-0.023333471,
0.029579856,
-0.011257652,
-0.037667114,
-0.030980177,
-0.019573053,
-0.014192037,
-0.021807276,
0.006899344,
-0.029501185,
-0.019856265,
0.0273771,
-0.045282353,
0.0034241043,
0.041883815,
-0.0406251,
0.057586312,
-0.021885946,
0.03864262,
-0.039964274,
-0.054345116,
0.0023758288,
-0.026968017,
-0.04257611,
0.008004655,
0.016143048,
0.028541414,
-0.0008009572,
0.01642626,
-0.0057035624,
-0.01733883,
0.045282353,
-0.029564122,
0.074893676,
-0.050757773,
0.024466317,
0.0012538004,
0.006163781,
0.0030582896,
-0.012303961,
0.012028617,
0.012760246,
0.033670686,
0.057554845,
-0.014687656,
-0.033293072,
0.030445224,
-0.03102738,
0.012870383,
-0.027125357,
0.0077214437,
0.0828236,
-0.002096551,
-0.0036030782,
0.0207059,
0.024828197,
0.010887904,
0.03470913,
0.01757484,
-0.044495653,
0.030067608
] |
Unigram
Unigram is a subword tokenization algorithm introduced in Subword Regularization: Improving Neural Network Translation
Models with Multiple Subword Candidates (Kudo, 2018). In contrast to BPE or
WordPiece, Unigram initializes its base vocabulary to a large number of symbols and progressively trims down each
symbol to obtain a smaller vocabulary. The base vocabulary could for instance correspond to all pre-tokenized words and
the most common substrings. Unigram is not used directly for any of the models in the transformers, but it's used in
conjunction with SentencePiece.
At each training step, the Unigram algorithm defines a loss (often defined as the log-likelihood) over the training
data given the current vocabulary and a unigram language model. Then, for each symbol in the vocabulary, the algorithm
computes how much the overall loss would increase if the symbol was to be removed from the vocabulary. Unigram then
removes p (with p usually being 10% or 20%) percent of the symbols whose loss increase is the lowest, i.e. those
symbols that least affect the overall loss over the training data. This process is repeated until the vocabulary has
reached the desired size. The Unigram algorithm always keeps the base characters so that any word can be tokenized.
Because Unigram is not based on merge rules (in contrast to BPE and WordPiece), the algorithm has several ways of
tokenizing new text after training. As an example, if a trained Unigram tokenizer exhibits the vocabulary:
["b", "g", "h", "n", "p", "s", "u", "ug", "un", "hug"],
"hugs" could be tokenized both as ["hug", "s"], ["h", "ug", "s"] or ["h", "u", "g", "s"]. So which one
to choose? Unigram saves the probability of each token in the training corpus on top of saving the vocabulary so that
the probability of each possible tokenization can be computed after training. The algorithm simply picks the most
likely tokenization in practice, but also offers the possibility to sample a possible tokenization according to their
probabilities.
Those probabilities are defined by the loss the tokenizer is trained on. Assuming that the training data consists of
the words \(x_{1}, \dots, x_{N}\) and that the set of all possible tokenizations for a word \(x_{i}\) is
defined as \(S(x_{i})\), then the overall loss is defined as
$$\mathcal{L} = -\sum_{i=1}^{N} \log \left ( \sum_{x \in S(x_{i})} p(x) \right )$$ |
[
0.021587929,
-0.005353522,
-0.0053100614,
0.013441093,
-0.014357711,
-0.01898031,
0.018917095,
0.002866406,
-0.010240833,
0.03413611,
0.020987386,
0.027624963,
-0.032555733,
-0.031338844,
-0.03530559,
-0.0035874522,
-0.024811896,
-0.0323977,
-0.06264608,
0.011694779,
0.01675198,
0.018490393,
-0.08919639,
-0.007423814,
-0.02142989,
0.062266793,
0.039288133,
0.015045174,
0.10891948,
0.028573189,
-0.00526265,
0.025080558,
0.023595005,
-0.019659871,
-0.00854193,
-0.029173732,
0.0014697491,
-0.02226749,
-0.0395726,
-0.0118212085,
0.0026076196,
-0.009426939,
0.02912632,
-0.038245086,
-0.05607172,
-0.002234256,
0.022551958,
-0.03261895,
-0.038023833,
-0.021540517,
-0.0027873872,
-0.016111927,
0.016356885,
0.0066573317,
-0.01910674,
-0.02697701,
-0.022441331,
0.009189883,
-0.07415122,
0.004132682,
0.033314314,
0.052057568,
-0.05025594,
-0.056419402,
0.019296385,
-0.0025957667,
0.011734288,
0.019043524,
-0.023768848,
-0.016815195,
-0.022457136,
0.0140495375,
-0.039920285,
-0.038624376,
-0.036253814,
-0.05231043,
0.0084155,
0.004065516,
-0.007087984,
0.06264608,
0.013441093,
0.016111927,
-0.0054404424,
-0.015432366,
-0.028731225,
-0.069473304,
0.054364916,
-0.014729099,
-0.010138108,
-0.025538867,
-0.029474003,
-0.010130207,
-0.034199324,
0.014784412,
0.020718722,
0.0108492775,
-0.028193898,
0.037897404,
-0.004567285,
0.008439205,
0.032903418,
0.04772734,
-0.0180953,
0.05875836,
-0.048675563,
-0.0041445345,
0.02474868,
0.012643004,
-0.0033721263,
-0.019296385,
-0.029821685,
-0.007886074,
-0.0060014757,
-0.0021552371,
0.002840725,
0.048391096,
-0.0012188646,
0.004061565,
-0.06688149,
0.008913318,
0.03312467,
-0.0124770645,
0.007143297,
-0.0075620967,
0.043175858,
-0.03178135,
0.0036131334,
0.032302875,
-0.009079257,
-0.00045114782,
0.04541999,
0.01532174,
-0.005535265,
0.00854193,
0.0102724405,
0.025349222,
0.008937024,
0.010256637,
0.020118179,
0.0053693256,
0.011655269,
-0.0010865082,
0.012872159,
0.048264667,
0.03347235,
0.005776272,
0.014120655,
-0.04810663,
-0.037138823,
0.0067956145,
-0.02206204,
0.046905544,
0.0056933025,
0.021587929,
-0.0065427544,
-0.01999175,
0.0025997176,
0.027624963,
-0.0131329205,
-0.00837599,
-0.03524237,
0.012729924,
-0.032097425,
0.04519874,
-0.018853879,
0.03758133,
-0.036000952,
0.0037257352,
0.008344382,
-0.019312188,
-0.022789015,
0.0051915334,
0.012935373,
0.036601495,
0.021651143,
0.05066684,
0.033662,
0.018506197,
-0.023310538,
-0.007032671,
0.01532174,
-0.016104026,
0.0068035163,
0.021777574,
-0.0059659174,
0.006574362,
0.013346271,
-0.025191184,
0.0011141647,
0.003182481,
0.02955302,
0.026155215,
-0.03039062,
0.03152849,
-0.025349222,
0.03438897,
0.0044764136,
-0.02474868,
-0.002382416,
0.0015240746,
-0.013441093,
0.04254371,
-0.013646542,
-0.004958428,
-0.050413977,
-0.053985626,
0.03021678,
0.036727928,
-0.010161814,
0.039414562,
0.019628264,
0.024005903,
-0.014760707,
-0.0017038423,
0.017542168,
-0.025807532,
0.029821685,
-0.0029434492,
-0.024969932,
0.032966632,
0.0063056983,
0.033788428,
0.035368804,
-0.00032323616,
-0.0033563224,
0.0020149788,
0.015274329,
0.04390283,
0.017937262,
0.027419515,
0.009426939,
0.007151199,
0.019407012,
0.03985707,
0.033662,
0.019217366,
0.046399824,
0.044598196,
0.0025365027,
-0.0038541406,
-0.016356885,
0.0049979375,
0.016783588,
0.05139381,
0.024559034,
-0.0021196785,
-0.024543231,
0.013188234,
-0.008739476,
-0.00534562,
-0.04339711,
0.046273395,
0.030153563,
-0.010809768,
-0.039699033,
-0.010288244,
-0.0022994464,
0.03454701,
-0.016910018,
-0.062266793,
-0.0049307714,
0.036064167,
0.022077845,
-0.0076924777,
0.014895039,
0.027198263,
0.029805882,
0.008462911,
-0.035748094,
-0.06315181,
-0.029616237,
-0.04933932,
-0.04813824,
-0.0057525667,
0.006997112,
-0.05749406,
-0.031117592,
-0.033061456,
0.023674024,
-0.013504309,
-0.018000476,
-0.013101312,
-0.030027134,
0.0011773797,
-0.011102138,
0.022220079,
-0.024954129,
0.030785713,
0.0052033863,
0.04554642,
-0.03562166,
-0.009987973,
-0.0067956145,
-0.0193596,
0.0102724405,
0.0030876587,
-0.0008163627,
0.011694779,
0.006167415,
-0.034452185,
0.011726386,
-0.009908955,
0.023832062,
0.029110515,
-0.022156864,
0.028509973,
0.016862607,
-0.016910018,
0.030690892,
0.035368804,
-0.04937093,
-0.032524128,
0.011639466,
0.04605214,
-0.0357797,
0.03909849,
0.06966295,
0.033409137,
-0.033187885,
-0.024179745,
-0.051709887,
-0.0014312275,
0.010628025,
-0.032650556,
0.015187408,
0.05648262,
-0.025349222,
-0.07472015,
0.0062148264,
-0.044756234,
-0.0500979,
-0.0034689242,
-0.050445586,
0.017573776,
0.019628264,
-0.0017147074,
-0.010248735,
-0.00035706608,
-0.0036052316,
0.02277321,
-0.01022503,
-0.0408369,
0.02277321,
0.03375682,
0.026913794,
-0.009940562,
0.020386843,
-0.025112167,
-0.012856354,
-0.0019705307,
0.025712708,
0.02748273,
0.010003776,
0.0005639965,
-0.0019813958,
-0.0038995764,
-0.010872983,
0.0088026915,
0.013701855,
-0.0016821121,
0.012232106,
0.04380801,
0.013899402,
-0.0125560835,
-0.0227258,
-0.039762247,
-0.0114261145,
0.05316383,
0.00037212903,
-0.026818972,
0.022283293,
0.024574839,
-0.05117256,
0.034831475,
-0.036727928,
-0.04121619,
0.052468464,
0.040457614,
0.02722987,
-0.020292021,
-0.019185757,
0.0032279168,
0.008747378,
0.0039094537,
0.05746245,
0.028968282,
-0.017573776,
-0.042606924,
0.030722499,
0.010296146,
-0.001109226,
-0.011141647,
0.019375402,
0.008976533,
-0.030517051,
-0.027372103,
0.020402648,
0.039762247,
0.01081767,
-0.0077043306,
0.079587705,
0.023105089,
0.01380458,
0.042828176,
0.004270965,
-0.029078908,
-0.01103102,
0.04608375,
-0.0027873872,
0.04453498,
-0.037202038,
-0.023452772,
-0.025286008,
0.019770497,
-0.013204037,
0.019233169,
-0.06466896,
-0.028841853,
0.035874523,
0.038403124,
-0.06808258,
-0.016435904,
-0.02176177,
0.030248387,
0.016688764,
-0.05787335,
0.0016001301,
-0.024922522,
-0.0041603385,
-0.017273504,
-0.021777574,
-0.014247085,
-0.014452534,
-0.02697701,
-0.024100726,
0.053732764,
0.039382957,
-0.00080204057,
0.027798804,
-0.05227882,
-0.0030916096,
0.022536155,
-0.005341669,
0.0042749154,
0.04390283,
0.026281644,
0.049086463,
0.04301782,
0.0028308476,
-0.016230457,
-0.0065229996,
-0.029047301,
-0.009245196,
-0.03833991,
0.008873808,
-0.038055442,
0.011086334,
-0.019027721,
0.020513274,
0.04579928,
-0.016593942,
0.020987386,
0.023421165,
-0.012405948,
-0.055818863,
-0.0068825353,
0.0011783674,
-0.029948115,
0.009213589,
-0.0021177032,
-0.002289569,
0.004555432,
0.010675436,
0.01203456,
-0.003931184,
-0.041563876,
0.004654206,
0.011038923,
-0.06884115,
-0.014104851,
-0.0023093238,
0.029647844,
0.008344382,
-0.0062780418,
-0.02259937,
-0.082938105,
-0.023199912,
-0.007084033,
-0.02715085,
0.012579788,
0.01788985,
-0.009087159,
0.026455486,
-0.031085985,
-0.0517731,
-0.05657744,
-0.008794789,
-0.040173143,
0.053732764,
0.031133397,
0.047853768,
-0.025538867,
-0.004393444,
0.03514755,
-0.020766133,
-0.034230933,
-0.05047719,
-0.021698555,
0.021461498,
-0.021445695,
0.006384717,
0.041089762,
0.0057920762,
-0.014997764,
0.044440158,
-0.00021730163,
-0.014160164,
-0.009505958,
-0.023057679,
0.05771531,
-0.011268077,
-0.056893516,
-0.021477303,
0.009837837,
0.01338578,
0.026692541,
0.01986532,
-0.006779811,
-0.008763182,
-0.033820037,
0.03426254,
-0.047284834,
-0.014270791,
-0.023942688,
-0.025412437,
0.0046502547,
0.021461498,
-0.020102376,
-0.06688149,
-0.013393682,
-0.04940254,
-0.01022503,
-0.010604319,
-0.029742666,
-0.030169368,
0.0010558884,
-0.024290372,
0.009577075,
0.016435904,
-0.0032081623,
-0.019438619,
0.0007077119,
0.036127385,
0.036095776,
-0.038118657,
-0.026171017,
0.008352284,
-0.009529664,
0.025412437,
-0.017573776,
-0.029679451,
0.07307656,
-0.041058153,
0.011102138,
-0.046526253,
-0.012263713,
-0.042417277,
-0.0070524253,
0.032808594,
-0.020845152,
-0.04301782,
-0.011331292,
0.056767087,
0.015629914,
0.031133397,
-0.052215606,
-0.0041682404,
-0.013330467,
-0.020860957,
-0.010153912,
-0.015053077,
-0.0050651035,
-0.010066992,
0.016704569,
0.05063523,
-0.063815564,
0.013322565,
0.057652097,
-0.01649912,
0.013362074,
-0.06795614,
-0.008684163,
-0.011015217,
-0.030817322,
-0.010066992,
0.025602082,
-0.083696686,
0.036380243,
-0.028525777,
-0.049781825,
-0.041690305,
0.014571061,
0.0749098,
-0.08584599,
0.030027134,
-0.02239392,
-0.015795853,
-0.026234232,
0.067703284,
0.016941626,
0.0042907195,
0.030169368,
-0.033156276,
0.0069694556,
0.005867144,
-0.009474351,
-0.027767196,
0.00644003,
0.05863193,
0.010003776,
-0.03359878,
0.06808258,
0.009490155,
-0.01401793,
-0.04722162,
0.014270791,
0.009987973,
-0.019707281,
-0.027751394,
-0.0051875827,
0.024179745,
-0.026091998,
0.014326104,
0.005811831,
-0.02100319,
-0.022789015,
0.045988925,
0.01637269,
-0.015037272,
0.05189953,
0.06953652,
-0.032555733,
0.01675198,
-0.025712708,
-0.024543231,
0.0056300876,
-0.03388325,
0.051994354,
-0.0025858893,
0.007139346,
-0.0022204276,
-0.022409724,
0.08015665,
-0.022789015,
-0.010375165,
0.019628264,
-0.048264667,
-0.029236946,
0.027846215,
0.0004400358,
-0.014089047,
0.0131329205,
-0.008016455,
0.020829348,
0.011094236,
0.050793268,
0.00812313,
-0.050066296,
0.021682752,
-0.0079967,
-0.014278692,
-0.012358536,
-0.055060282,
0.026076196,
0.015772147,
0.0018589166,
-0.034483794,
0.025349222,
0.023579203,
-0.058537107,
0.004717421,
-0.02866801,
0.027624963,
-0.020102376,
-0.005207337,
0.028320327,
-0.04902325,
-0.025823334,
-0.03233448,
-0.0361906,
-0.010446282,
-0.0040181046,
0.019691478,
-0.02234651,
0.020181395,
-0.019596655,
-0.002605644,
-0.023847865,
0.0113470955,
0.0019636166,
0.018332355,
0.037012395,
-0.007901877,
-0.010651731,
-0.018680038,
-0.020608095,
-0.0075462926,
0.016143536,
0.06587005,
-0.03524237,
0.026581915,
-0.015819559,
0.01342529,
-0.04175352,
-0.020766133,
-0.019075131,
-0.010714945,
0.010833474,
0.006629675,
0.048011806,
0.048707172,
-0.02466966,
0.028478365,
0.024890913,
0.007368501,
0.011212764,
0.010035384,
0.032129034,
-0.028652208,
0.004938673,
-0.014223379,
-0.008241658,
0.05749406,
-0.005286356,
0.026423877,
0.021477303,
-0.002516748,
-0.037233647,
0.014310299,
0.041184586,
0.03944617,
0.066691846,
-0.057083163,
0.016341083,
0.02239392,
-0.029347572,
-0.01973889,
-0.032935023,
-0.07219155,
0.01910674,
-0.019248974,
0.016309476,
-0.016846802,
-0.026913794,
0.0018223705,
-0.020355236,
0.017573776,
0.011686876,
0.018632626,
-0.032287072,
-0.02049747,
-0.035716485,
-0.020971583,
0.009584977,
0.006463736,
-0.043112643,
-0.02403751,
0.06561719,
0.07933485,
-0.0054404424,
-0.010422576,
-0.03780258,
0.006056789,
0.018932898,
0.020513274,
-0.02685058,
0.016420102,
-0.05916926,
-0.0054325406,
-0.029157927,
-0.0152585255,
-0.0077635944,
0.024005903,
0.018616823,
0.0035064581,
-0.009450645,
0.016672961,
0.05316383,
-0.01494245,
-0.02171436,
0.0037810483,
0.031955194,
-0.012216303,
-0.0027202212,
-0.017573776,
-0.00090180174,
0.04541999,
0.013125018,
-0.04052083,
0.05281615,
0.017605383,
-0.0017927384,
0.0021058503,
0.046241786,
-0.0065309014,
-0.025286008,
-0.015155801,
-0.015456072,
-0.000837599,
0.015843265,
-0.012785237,
0.037107214,
-0.0052033863,
-0.01570103,
-0.0043460326,
-0.037328467,
0.008241658,
0.0090397475,
-0.035590056,
-0.034104504,
0.0265187,
0.013077607,
-0.0037020296,
0.026376467,
0.007676674,
0.03821348,
0.032460913,
0.046526253,
0.01751056,
-0.009102963,
-0.005997525,
0.010414674,
0.008557733,
-0.0042037987,
0.009853641,
-0.021983022,
-0.021935612,
-0.052089177,
0.022409724,
-0.03982546,
-0.02895248,
-0.008194246,
-0.007858417,
-0.037391685,
-0.035337195,
0.012224204,
-0.0475693,
0.009332117,
0.028826049,
-0.043491933,
-0.04121619,
0.02163534,
-0.019138347,
0.009181982,
0.04541999,
0.013749267,
0.004752979,
0.041405838,
-0.019264776,
0.00014470312,
0.048738778,
0.017447345,
0.010612221,
-0.05202596,
-0.022915443,
0.003927233,
-0.009426939,
-0.009577075,
-0.002621448,
-0.008660457,
0.03223966,
0.011260175,
-0.034294147,
0.01380458,
0.023626612,
0.00049608975,
-0.003885748,
0.057177983,
0.005476001,
0.009505958,
-0.02016559,
0.00279924,
-0.05752567,
-0.02558628,
-0.009229393,
0.01890129,
-0.04491427,
-0.03026419,
-0.027972646,
-0.013243547,
-0.017162878,
-0.021319265,
-0.027909432,
-0.0395726,
0.013567523,
0.023674024,
0.036633104,
0.028841853,
-0.016657157,
-0.043175858,
0.06153982,
0.03435736,
-0.02403751,
0.06833544,
0.031085985,
0.0108492775,
0.02950561,
0.022093648,
0.022836426,
0.0128958635,
-0.016910018,
-0.00854193,
-0.023041874,
-0.017984673,
-0.060844455,
-0.009355823,
0.018964505,
0.027498534,
-0.037739366,
-0.042322453,
-0.017968869,
-0.058442283,
0.020481667,
-0.028905068,
0.0129748825,
0.022804817,
-0.0019339845,
0.013528014,
-0.049528968,
0.29812202,
0.07326621,
0.041469052,
0.05189953,
0.015985498,
0.023832062,
0.00008043864,
-0.06485861,
0.005906653,
-0.027530141,
0.0105253,
-0.036885962,
0.006594117,
0.020671312,
-0.05025594,
0.039762247,
-0.026423877,
0.01619885,
-0.006866731,
0.0006336318,
-0.05964337,
0.049465753,
0.003945012,
0.050540406,
0.020639703,
-0.019075131,
-0.0012998588,
-0.0013778899,
-0.030374816,
-0.041848343,
-0.011394507,
-0.04339711,
0.037739366,
0.0065427544,
-0.03818187,
0.05319544,
0.022789015,
-0.058442283,
-0.03236609,
0.014460435,
-0.023342146,
-0.03203421,
0.012508672,
0.0067205466,
-0.05000308,
0.042701744,
-0.00420775,
0.02133507,
0.049781825,
-0.058347464,
0.037391685,
-0.013851991,
0.022820622,
-0.032808594,
-0.04971861,
-0.033440746,
-0.035084337,
-0.025823334,
-0.008636752,
0.008210051,
0.025665298,
0.040015105,
-0.025444046,
0.016530728,
-0.036791142,
0.04949736,
0.0057802233,
0.07257084,
-0.05875836,
0.012563985,
0.01468959,
-0.0014213502,
0.011497231,
0.013433191,
0.014981959,
0.028841853,
0.026250036,
0.03416772,
0.01494245,
-0.022330705,
0.03039062,
-0.013417387,
-0.017779224,
-0.0054522953,
0.020386843,
0.07465693,
-0.015945988,
-0.0046265493,
0.0016672962,
0.063120194,
0.017526364,
0.03223966,
-0.009316313,
-0.05787335,
0.011710582
] |
SentencePiece
All tokenization algorithms described so far have the same problem: It is assumed that the input text uses spaces to
separate words. However, not all languages use spaces to separate words. One possible solution is to use language
specific pre-tokenizers, e.g. XLM uses a specific Chinese, Japanese, and Thai pre-tokenizer).
To solve this problem more generally, SentencePiece: A simple and language independent subword tokenizer and
detokenizer for Neural Text Processing (Kudo et al., 2018) treats the input
as a raw input stream, thus including the space in the set of characters to use. It then uses the BPE or unigram
algorithm to construct the appropriate vocabulary.
The [XLNetTokenizer] uses SentencePiece for example, which is also why in the example earlier the
"▁" character was included in the vocabulary. Decoding with SentencePiece is very easy since all tokens can just be
concatenated and "▁" is replaced by a space.
All transformers models in the library that use SentencePiece use it in combination with unigram. Examples of models
using SentencePiece are ALBERT, XLNet, Marian, and T5. |
[
0.008040757,
-0.006451646,
-0.053692926,
0.0077624796,
-0.0012394337,
0.00095200224,
-0.011314181,
-0.006653031,
-0.011240949,
0.055157542,
0.0049247807,
-0.000009768893,
0.034682173,
-0.08125705,
0.014214125,
0.034945805,
-0.010223039,
0.003870255,
-0.06842699,
0.02120768,
0.020504663,
0.002925576,
-0.06678662,
-0.02428338,
-0.022262206,
0.010684394,
0.04929907,
-0.028135328,
0.061689746,
0.004606226,
-0.013342678,
-0.0052689663,
0.030317608,
-0.057413056,
-0.011614427,
0.0074988483,
-0.0029438839,
0.017282503,
-0.059258476,
-0.05436665,
0.03269029,
-0.044348657,
-0.022818761,
-0.026114153,
-0.05779386,
-0.025660122,
0.027080802,
0.01173892,
0.006638385,
-0.021295557,
0.0035938083,
0.019611245,
0.0037713933,
-0.01567142,
0.029878223,
-0.0013126646,
0.018029457,
0.024078334,
0.006535861,
-0.014053018,
0.03723061,
0.0070374934,
-0.011160395,
-0.07475414,
0.016857762,
0.011065195,
0.008399589,
0.014529019,
-0.036058914,
-0.040745694,
-0.03154789,
-0.0364983,
0.002125528,
-0.03154789,
-0.036937688,
0.057676688,
0.038167965,
0.0557141,
-0.034565005,
0.0061953375,
0.033979155,
0.04836171,
-0.035326604,
-0.011607104,
-0.058643337,
-0.058028195,
0.018586013,
-0.055040374,
-0.023785409,
-0.039017446,
0.013437877,
0.020006692,
0.015319913,
0.02582123,
0.016579485,
-0.009314976,
-0.0019497738,
0.023785409,
0.001377657,
0.008494789,
-0.021617774,
0.044465825,
-0.011629073,
0.024708118,
-0.053663634,
0.012830061,
0.024298025,
0.0033613,
-0.025176797,
-0.0069532776,
-0.0028322067,
0.021720298,
-0.04349918,
0.029248437,
0.0014664496,
0.01694564,
-0.011211657,
-0.0049980115,
0.010252331,
-0.0043023177,
-0.003789701,
-0.03318826,
-0.006854416,
0.04279616,
-0.0019259737,
-0.06391597,
-0.0114093805,
0.018747121,
-0.017809765,
-0.0043206257,
0.028237851,
-0.0063088457,
0.001256826,
0.028311081,
0.04795162,
0.0012705568,
-0.0046611493,
0.019494075,
0.045520354,
-0.0035352237,
0.015188097,
-0.036849808,
0.0089854365,
0.08365902,
-0.049738456,
-0.042093143,
-0.0050236424,
0.009307653,
-0.01609616,
0.0161401,
-0.027798465,
0.006989893,
-0.010281624,
-0.025747998,
-0.02546972,
-0.034828637,
-0.024957104,
0.05216972,
0.037494242,
0.020841526,
0.00582186,
-0.019933462,
-0.0053641666,
0.035883162,
-0.048888974,
0.04906473,
-0.036088206,
-0.051935382,
-0.020768294,
-0.00622463,
0.019303676,
-0.016125454,
-0.00013490512,
-0.002222559,
0.03661547,
0.0060964758,
0.04007197,
-0.012485875,
0.020299617,
0.021222327,
-0.014089633,
-0.004532995,
0.010523286,
0.024605596,
0.022804115,
-0.010882118,
-0.02804745,
-0.0054300744,
-0.054395944,
0.009717746,
-0.007564756,
0.020182448,
-0.03204586,
0.024078334,
-0.027637357,
-0.007718541,
-0.04004268,
0.009717746,
-0.0053458586,
-0.039281078,
0.016491607,
0.026831817,
-0.026861109,
-0.012676275,
-0.044290073,
0.0026710986,
0.01060384,
0.057881735,
-0.00804808,
-0.0044853953,
0.057149425,
-0.018688535,
-0.0035150852,
0.01081621,
0.026597477,
-0.0014710265,
-0.06913001,
-0.029072683,
-0.007689249,
-0.0063820765,
0.03365694,
0.023082392,
0.04783445,
-0.030610533,
0.034242786,
-0.031489305,
-0.021720298,
0.044788044,
0.03898815,
0.021061217,
0.0011268411,
0.077566214,
-0.025923753,
0.04795162,
-0.0025484366,
-0.0009904485,
-0.021354143,
0.016930994,
-0.020226385,
0.013928525,
-0.004210779,
-0.009080636,
0.016930994,
0.012837384,
0.051320244,
-0.0015625652,
-0.009227099,
-0.02220362,
-0.057881735,
0.027842402,
-0.039105322,
0.036439717,
0.00499435,
-0.035912454,
-0.023961164,
0.004144871,
0.027110094,
0.017648656,
-0.03638113,
0.024986397,
0.0059060752,
0.030346902,
-0.005979306,
-0.047658697,
0.030112563,
0.031225672,
0.029263083,
-0.010786917,
0.032602414,
-0.01898146,
-0.012947231,
-0.050470766,
-0.04537389,
-0.059112016,
-0.01775118,
0.0034546696,
-0.00774051,
-0.04461229,
0.047424357,
0.0041558556,
0.021808174,
0.02213039,
0.0086046355,
-0.022481898,
0.035678115,
0.013584339,
-0.040335603,
0.008860944,
-0.033246845,
0.011197011,
-0.036674056,
-0.022613714,
-0.0036816855,
0.0025282982,
-0.0027846065,
0.00008324298,
0.016608777,
-0.024869228,
-0.022481898,
-0.0046757953,
0.002231713,
-0.035707407,
-0.02009457,
-0.00423641,
-0.016564839,
0.008890236,
0.011570488,
-0.02174959,
0.04004268,
0.050119255,
-0.034067035,
0.029717116,
0.005367828,
0.032807462,
-0.016535547,
0.039368954,
0.01898146,
-0.03550236,
-0.03931037,
-0.04042348,
-0.010076578,
-0.014572957,
-0.011885381,
-0.0852994,
-0.02965853,
0.046135493,
-0.0075281407,
-0.027988866,
0.029131267,
-0.017238563,
-0.026099507,
0.044758752,
0.025791937,
-0.015876468,
0.01832238,
0.024444487,
-0.06614219,
0.019816292,
-0.022115745,
0.012105075,
-0.008099342,
-0.008963467,
0.06004937,
0.02908733,
0.029863577,
-0.009952085,
0.0368791,
-0.030874165,
0.011292211,
-0.027959572,
0.026524246,
0.024341965,
0.018776413,
-0.004540318,
0.015202743,
0.0059683216,
-0.024561657,
0.017912287,
0.019992046,
0.019332968,
0.035883162,
0.025777292,
0.040013384,
-0.0028486836,
0.0037475934,
-0.0025520984,
-0.00023845825,
0.04584257,
0.032836754,
-0.048478883,
0.031518597,
-0.015568898,
-0.0029036067,
0.020607186,
-0.004690442,
-0.008099342,
0.04683851,
-0.0019570969,
0.03834372,
-0.03178223,
-0.04584257,
0.027490895,
0.018205212,
-0.031635765,
0.0368791,
0.029058037,
-0.0149976965,
0.017209271,
-0.022145037,
-0.001971743,
0.009673807,
0.013437877,
-0.019962754,
-0.016579485,
0.0105965175,
-0.04256182,
0.05779386,
0.015495667,
-0.0051774275,
-0.006894693,
0.099066816,
-0.05190609,
0.016784532,
0.018351674,
-0.0051993965,
-0.03945683,
-0.034447834,
0.01304243,
0.018732475,
0.030024685,
-0.0032203307,
-0.019845584,
-0.031899396,
-0.013716155,
-0.017267855,
-0.01739967,
-0.03509227,
-0.044553705,
-0.017970873,
0.058467582,
-0.0071143857,
-0.029907515,
-0.056417115,
0.017472902,
0.045051675,
-0.05006067,
-0.014536342,
-0.015978992,
-0.0019918815,
0.013284093,
-0.022906639,
-0.023448547,
-0.04598903,
0.02667071,
-0.047072846,
0.019611245,
0.03318826,
0.014441141,
0.017941581,
-0.045783985,
-0.019552661,
-0.0046465034,
0.015583544,
0.015539605,
0.015319913,
0.02293593,
-0.012573753,
-0.0050822273,
0.0007863172,
0.017926933,
0.021222327,
-0.03787504,
0.02582123,
-0.019699123,
-0.0063234917,
-0.033100385,
0.0141994795,
-0.021412726,
0.02570406,
0.03646901,
-0.017121393,
-0.027022216,
0.05255052,
-0.064501815,
-0.05099803,
0.044582997,
-0.04329413,
0.0075281407,
0.06719671,
-0.0042949948,
-0.02347784,
0.016184038,
0.04115579,
-0.019625891,
0.030493364,
-0.011958612,
0.011445996,
-0.011900027,
-0.01775118,
-0.013862617,
-0.032866046,
0.07135623,
-0.0025758983,
0.008926852,
0.026597477,
-0.06420889,
-0.04440724,
0.039017446,
-0.0058950908,
0.0062758913,
-0.024927812,
-0.0062539224,
0.025601536,
0.005415428,
-0.0013273108,
0.014770681,
-0.008831651,
0.024503073,
0.027944926,
0.05003138,
0.014280033,
-0.029233791,
-0.029380253,
0.054806035,
-0.05474745,
0.0081945425,
-0.0026546216,
0.024810642,
-0.013921201,
0.00008993675,
-0.013130307,
0.0122222435,
-0.02120768,
0.005107858,
0.045901153,
0.007872326,
-0.022115745,
-0.030229732,
-0.033774108,
0.052257597,
0.0033924233,
-0.042093143,
-0.027798465,
0.015978992,
-0.0017493041,
-0.0146022495,
0.0006233784,
-0.038548768,
-0.03945683,
-0.018468844,
0.050587934,
-0.055333298,
-0.0023543746,
-0.04695568,
-0.06192408,
-0.009966731,
0.00055701286,
0.022891993,
-0.049357653,
0.0048808423,
-0.04115579,
0.0063491226,
-0.07053604,
-0.0074658943,
-0.035180144,
-0.0076013715,
0.010706363,
0.041272957,
-0.024005102,
0.004364564,
0.036556885,
0.026875755,
-0.0010279793,
0.016652716,
-0.07323094,
-0.0044670873,
0.009981377,
-0.025001043,
0.03143072,
0.004858873,
-0.029189853,
0.035062972,
-0.037787165,
0.002085251,
-0.013393939,
0.0044670873,
-0.029848931,
-0.073699616,
0.01860066,
-0.024107626,
-0.007513494,
0.028149974,
0.0005002589,
0.03933966,
0.04376281,
-0.0010746641,
0.001962589,
0.00026477562,
-0.07744904,
0.008487466,
-0.0036523931,
0.014785327,
0.033861987,
-0.0110066105,
0.03368623,
-0.047424357,
0.03538519,
0.027564125,
0.08447921,
-0.006158722,
-0.018190565,
0.006605431,
0.034213495,
-0.0072938018,
0.0017282502,
-0.019215798,
-0.04018914,
0.007421956,
-0.044055734,
-0.05594844,
-0.003756747,
0.0048039495,
0.05167175,
-0.02508892,
0.04229819,
-0.015583544,
-0.058145367,
-0.020416787,
0.021149095,
-0.0051334887,
-0.0032953923,
0.052491937,
0.008538728,
0.0005199397,
0.0137967095,
-0.015891114,
-0.019596599,
0.004229087,
0.046487,
-0.018234504,
-0.037494242,
0.0097982995,
0.0031049917,
-0.014660834,
-0.05782315,
0.038197257,
0.019992046,
0.014155541,
-0.04440724,
-0.020929402,
-0.051788922,
-0.031694353,
-0.037787165,
0.03503368,
0.01739967,
0.0027424986,
0.045725398,
0.009820269,
-0.092974,
0.020255677,
0.040013384,
-0.03295392,
-0.015363852,
-0.0322802,
-0.027564125,
-0.025542952,
-0.06127965,
0.02835502,
-0.025982337,
-0.0149830505,
0.0353559,
0.034359958,
0.04487592,
-0.020241031,
0.0052030585,
0.014719419,
-0.021193035,
-0.046399124,
-0.0027260217,
0.028311081,
0.017238563,
0.0010050946,
-0.016960286,
-0.0039141937,
0.014111602,
0.004631857,
-0.05386868,
-0.05017784,
-0.0057010287,
-0.03977905,
-0.04601832,
0.018337028,
-0.013569693,
0.011863412,
0.012522491,
-0.021544542,
-0.025967691,
-0.02070971,
-0.010186424,
-0.06602502,
0.005155458,
-0.031049918,
0.0052323504,
-0.06590784,
0.0075867255,
-0.008297065,
0.0014032879,
0.0018216196,
0.03576599,
-0.035443775,
0.03500439,
0.040892158,
-0.020123862,
-0.018219858,
0.017648656,
-0.023638947,
0.044290073,
-0.07088755,
0.025909107,
0.00062658224,
0.04133154,
0.04891827,
-0.03810938,
-0.020651124,
-0.034096327,
-0.018703181,
-0.022643007,
0.018996106,
0.040159848,
0.011467965,
-0.010384147,
-0.008655897,
0.053839386,
-0.011160395,
-0.025176797,
-0.01936226,
-0.03872452,
-0.01663807,
0.024605596,
0.045549646,
0.023302086,
0.017590072,
0.022643007,
0.055538345,
0.014873204,
-0.0150123425,
-0.011050548,
-0.010237685,
0.01621333,
-0.049855623,
-0.058965553,
0.009820269,
0.014067664,
0.0007890634,
0.052462645,
0.032338783,
-0.013101015,
-0.0019094967,
0.014660834,
-0.017033517,
0.058321122,
0.020607186,
0.00082155963,
-0.002345221,
0.0056387824,
-0.0737582,
-0.012866676,
-0.017209271,
0.015422436,
-0.034301374,
-0.019391553,
-0.01659413,
-0.0368791,
0.0063564456,
0.038431596,
0.0029512069,
0.02828179,
-0.0076526334,
-0.038255844,
0.015349205,
0.020299617,
-0.051788922,
-0.03453571,
-0.011248272,
0.020856172,
-0.056241363,
-0.020123862,
0.043059792,
0.08002677,
-0.030171147,
0.014536342,
-0.05471816,
-0.022027867,
0.021236973,
0.047395065,
-0.045051675,
0.024034394,
0.00019772354,
0.023214208,
-0.018351674,
0.005122504,
0.021983929,
0.04651629,
0.04004268,
0.026070215,
-0.02513286,
-0.02047537,
0.008912206,
-0.024722766,
-0.004672134,
-0.013386616,
0.011299534,
-0.0019497738,
0.017487548,
-0.011021256,
0.073055185,
0.0011167718,
0.06930576,
-0.0067226,
0.013350001,
0.029365607,
-0.030434778,
0.03723061,
-0.011892704,
0.028486835,
0.009761685,
0.033744816,
-0.018029457,
0.031694353,
0.007487864,
-0.010091224,
0.02090011,
0.0035681776,
0.0009867869,
0.018703181,
-0.0049321037,
0.023111684,
-0.0059609986,
-0.033569064,
0.01050864,
0.015158804,
0.043176964,
0.007033832,
-0.0063088457,
-0.0035315622,
0.02082688,
0.03784575,
0.006257584,
0.0265096,
-0.00025951213,
0.030844873,
-0.019420845,
0.040716402,
0.012280828,
0.013218185,
-0.031401426,
-0.008736451,
-0.008707159,
0.056007024,
-0.0077551566,
-0.034213495,
-0.005591182,
-0.022628361,
-0.013833324,
-0.030405486,
0.013020461,
-0.032631706,
-0.03339331,
0.020387493,
-0.022789469,
0.002021174,
0.006989893,
0.010515963,
-0.0071583246,
0.043469887,
0.027227264,
-0.037054855,
0.058028195,
0.035443775,
0.031254966,
0.042239606,
-0.020680418,
-0.030259024,
0.0075061712,
-0.01659413,
0.022643007,
-0.0145949265,
-0.0028633298,
-0.013928525,
0.03895886,
0.029365607,
0.024180856,
-0.04809808,
0.029438838,
0.034096327,
-0.026597477,
0.013291416,
0.10287482,
0.018644597,
0.0008481058,
-0.017853703,
-0.039896216,
-0.06866133,
0.012251536,
-0.011680335,
0.060459465,
-0.0149976965,
-0.04065782,
0.0034894543,
-0.052257597,
-0.048303127,
-0.004785642,
0.007074109,
-0.03623467,
0.05451311,
0.056739334,
0.0043096407,
0.061455406,
0.007176632,
-0.024986397,
0.03412562,
0.04721931,
-0.0071034012,
0.03626396,
0.045080967,
0.0001063565,
-0.025308613,
0.013957817,
-0.0043425946,
0.012068459,
-0.025953045,
-0.011599781,
-0.0010133331,
-0.023272792,
-0.035209436,
0.016564839,
0.025455074,
0.007209586,
-0.00056342053,
-0.017839057,
-0.029394899,
-0.023697533,
-0.008341004,
-0.033481184,
0.012537137,
-0.019040044,
-0.014323972,
-0.0033191924,
-0.022716237,
0.25449216,
0.06649369,
0.04399715,
0.00018021677,
0.04168305,
0.065790676,
0.0048698573,
0.009314976,
0.02769594,
-0.02478135,
0.027666649,
-0.023097038,
0.019157214,
-0.006078168,
0.006660354,
0.032573123,
-0.009190483,
0.048859682,
-0.014807296,
-0.04314767,
-0.016271915,
0.0011158565,
-0.00804808,
0.0008366635,
0.00096207147,
0.012888646,
-0.016081514,
-0.0399548,
0.055772685,
-0.01751684,
-0.009358915,
0.009131898,
0.05290203,
0.0054447204,
0.023331378,
0.037025563,
0.0025978675,
-0.017590072,
0.0034693158,
0.0063564456,
0.020402139,
-0.0568565,
0.0027150372,
-0.030522656,
-0.0004137548,
0.044348657,
-0.0015222882,
-0.027725235,
0.0037073162,
-0.04932836,
0.026377784,
-0.06221701,
-0.010530609,
-0.00627223,
-0.05114449,
-0.004144871,
-0.029848931,
-0.02220362,
0.03427208,
0.0122149205,
0.09121646,
0.014543665,
-0.0295853,
-0.00001171409,
0.016579485,
0.013818678,
-0.038402304,
0.045959737,
-0.024854582,
-0.046194077,
0.025118213,
-0.015773945,
-0.016930994,
0.0045696106,
0.01898146,
0.0014545495,
-0.002085251,
0.015378498,
-0.011680335,
-0.054395944,
0.019830938,
-0.0015177112,
-0.003917855,
-0.039105322,
0.00683977,
0.020958696,
-0.04449512,
-0.005939029,
-0.008428881,
0.00783571,
-0.0118121505,
0.08395195,
0.028457543,
-0.014214125,
0.035941746
] | DeepSpeed
DeepSpeed is a PyTorch optimization library that makes distributed training memory-efficient and fast. At it's core is the Zero Redundancy Optimizer (ZeRO) which enables training large models at scale. ZeRO works in several stages:
ZeRO-1, optimizer state partioning across GPUs
ZeRO-2, gradient partitioning across GPUs
ZeRO-3, parameteter partitioning across GPUs |
Subsets and Splits