modelId stringlengths 4 81 | tags list | pipeline_tag stringclasses 17 values | config dict | downloads int64 0 59.7M | first_commit timestamp[ns, tz=UTC] | card stringlengths 51 438k | embedding list |
|---|---|---|---|---|---|---|---|
BigSalmon/InformalToFormalLincoln16 | [
"pytorch",
"gpt2",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 8 | null | ---
license: apache-2.0
tags:
- generated_from_keras_callback
model-index:
- name: Rocketknight1/marian-finetuned-kde4-en-to-fr
results: []
---
<!-- This model card has been generated automatically according to the information Keras had access to. You should
probably proofread and complete it, then remove this comment. -->
# Rocketknight1/marian-finetuned-kde4-en-to-fr
This model is a fine-tuned version of [Helsinki-NLP/opus-mt-en-fr](https://huggingface.co/Helsinki-NLP/opus-mt-en-fr) on an unknown dataset.
It achieves the following results on the evaluation set:
- Train Loss: 0.6862
- Validation Loss: 0.8050
- Epoch: 2
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 5e-05, 'decay_steps': 17733, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
- training_precision: float32
### Training results
| Train Loss | Validation Loss | Epoch |
|:----------:|:---------------:|:-----:|
| 1.0615 | 0.8832 | 0 |
| 0.7983 | 0.8211 | 1 |
| 0.6862 | 0.8050 | 2 |
### Framework versions
- Transformers 4.16.0.dev0
- TensorFlow 2.7.0
- Datasets 1.17.0
- Tokenizers 0.10.3
| [
-0.03126738220453262,
-0.018569111824035645,
0.0038528747390955687,
0.019635949283838272,
0.034281175583601,
-0.001750435447320342,
-0.015050518326461315,
-0.008305947296321392,
-0.03109688311815262,
0.058285076171159744,
0.016773538663983345,
-0.014298191294074059,
0.032636161893606186,
0.041705891489982605,
-0.05066283419728279,
-0.03744058683514595,
-0.005706431809812784,
-0.011949109844863415,
-0.023453867062926292,
0.018462494015693665,
-0.015123192220926285,
0.006880044937133789,
-0.03211592882871628,
0.0066541689448058605,
-0.013321525417268276,
0.003330923616886139,
-0.015051585622131824,
0.017122430726885796,
0.040018945932388306,
-0.057238008826971054,
0.0023012582678347826,
-0.05758575722575188,
-0.034625809639692307,
-0.018869200721383095,
-0.03412190079689026,
0.011227673850953579,
-0.0009524390334263444,
0.019880332052707672,
0.031327202916145325,
0.054288771003484726,
-0.016519030556082726,
0.01220623217523098,
-0.030283108353614807,
-0.00251959846355021,
0.032121941447257996,
0.009729564189910889,
-0.04332337900996208,
-0.005660662893205881,
0.0571775883436203,
-0.01737048104405403,
-0.05455183610320091,
-0.03666047006845474,
-0.011606098152697086,
0.042166680097579956,
-0.011986947618424892,
-0.005559464916586876,
-0.058174919337034225,
0.004816911183297634,
0.05429353937506676,
-0.047013670206069946,
-0.049601342529058456,
0.02967761643230915,
-0.06374292820692062,
0.03811527416110039,
0.04933541640639305,
-0.03469070792198181,
0.0072832265868783,
-0.056475259363651276,
0.04141005501151085,
-0.02228112705051899,
0.06541753560304642,
-0.03603443503379822,
0.010789819993078709,
-0.08790949732065201,
-0.027419477701187134,
-0.0023827191907912493,
0.04061507433652878,
0.03943220525979996,
-0.03552278131246567,
0.06523285061120987,
0.033785272389650345,
0.0006646521505899727,
0.040578629821538925,
-0.039304547011852264,
-0.004904712550342083,
0.049794696271419525,
-0.033853672444820404,
0.022352587431669235,
0.00913294218480587,
0.007047486957162619,
-0.05345624312758446,
-0.026239683851599693,
-0.015065034851431847,
-0.025772687047719955,
-0.01115761324763298,
0.012780102901160717,
0.05041225999593735,
-0.009795439429581165,
0.043181221932172775,
0.013442077673971653,
0.023480579257011414,
0.03871345892548561,
-0.00837215781211853,
0.07946919649839401,
-0.017781177535653114,
-0.032461486756801605,
-0.025432748720049858,
-0.02033655159175396,
-0.04266587272286415,
0.016001936048269272,
0.021279960870742798,
-0.05612386018037796,
-0.03974109888076782,
0.04526844620704651,
0.0191353652626276,
-0.01710072159767151,
0.08271048218011856,
-0.0031715682707726955,
-0.04772024601697922,
-0.05798942595720291,
0.026804877445101738,
0.019044695422053337,
0.005111361853778362,
-0.01512086484581232,
-0.04438600689172745,
-0.004214172251522541,
-0.04274873062968254,
-0.05466040223836899,
0.009960596449673176,
0.012977485544979572,
-0.01359010860323906,
0.040410321205854416,
0.014579000882804394,
-0.07555858790874481,
-0.018820419907569885,
-0.001711769844405353,
-0.02915799245238304,
0.03486904129385948,
0.010511099360883236,
0.12313245981931686,
-0.039676275104284286,
-0.07812514901161194,
0.005703469272702932,
0.0044133784249424934,
-0.028454553335905075,
0.017444413155317307,
-0.017547454684972763,
-0.05877290666103363,
-0.0174765195697546,
-0.006256574299186468,
0.03208145499229431,
-0.0628032460808754,
-0.017773078754544258,
0.048649173229932785,
-0.0019893229473382235,
0.03051617741584778,
-0.05229826644062996,
-0.01658308133482933,
-0.0027800409588962793,
-0.0173181165009737,
-0.016239264979958534,
0.028832528740167618,
-0.011345278471708298,
0.011313515715301037,
-0.0489468052983284,
-0.06344183534383774,
0.002392463618889451,
0.08443933725357056,
-0.015085607767105103,
-0.01974756084382534,
-0.015812505036592484,
0.025200316682457924,
0.01766549050807953,
0.01957753300666809,
-0.032186560332775116,
0.04196883365511894,
0.036046866327524185,
0.033030010759830475,
-0.02547990344464779,
0.04494667425751686,
0.015212262980639935,
-0.008469966240227222,
-0.03433114290237427,
0.026486065238714218,
0.012700804509222507,
-0.025487598031759262,
0.0053185876458883286,
0.022072741761803627,
0.007897652685642242,
-0.0466282032430172,
-0.05540117248892784,
0.04858089238405228,
0.013321823440492153,
-0.016464583575725555,
0.019333187490701675,
-0.007391012739390135,
-0.017933743074536324,
0.05814048647880554,
-0.022757867351174355,
0.015122391283512115,
-0.0354459173977375,
-0.02022792398929596,
0.05062907561659813,
0.023926787078380585,
0.024189068004488945,
0.05531135946512222,
-0.007493593730032444,
0.08862385898828506,
-0.021354075521230698,
0.023721251636743546,
-0.024414807558059692,
-0.058303382247686386,
0.019608858972787857,
0.06994955241680145,
0.035498593002557755,
0.03515365347266197,
0.001991293393075466,
-0.05529927462339401,
0.04004755988717079,
0.0601058304309845,
0.052395716309547424,
0.02249869517982006,
-0.036958642303943634,
-0.02554282732307911,
0.027281496673822403,
0.026321515440940857,
-0.04646582156419754,
-0.04127068072557449,
0.01438338216394186,
0.06877511739730835,
-0.006521495990455151,
0.012095951475203037,
-0.006118725519627333,
0.03476355969905853,
-0.038666751235723495,
-0.07701881974935532,
0.04369788244366646,
0.027255527675151825,
-0.02472279779613018,
0.03810102492570877,
0.009746004827320576,
0.01324502658098936,
0.030238406732678413,
0.0074469889514148235,
-0.004061304032802582,
-0.042977817356586456,
0.013008532114326954,
0.008699039928615093,
0.053517211228609085,
-0.03627873957157135,
0.05444178357720375,
-0.032020214945077896,
0.0018252009758725762,
0.029763735830783844,
-0.06651060283184052,
0.01518616359680891,
0.05788128450512886,
0.02747070975601673,
-0.03519592434167862,
0.015129131264984608,
0.044341396540403366,
0.04006578400731087,
0.06126951426267624,
-0.013723676092922688,
0.05910516157746315,
0.007626774255186319,
0.06970479339361191,
0.07049767673015594,
0.025672730058431625,
0.017791438847780228,
0.015542653389275074,
0.07823055982589722,
0.010051899589598179,
-0.03341044485569,
0.06536173075437546,
-0.07496486604213715,
0.011762718670070171,
-0.022896580398082733,
0.012809501960873604,
-0.011228835210204124,
0.011389318853616714,
0.03538484498858452,
0.03301963210105896,
-0.01994691975414753,
-0.0037014628760516644,
-0.002504721749573946,
-0.01629030890762806,
0.010930586606264114,
0.011863058432936668,
-0.0036763139069080353,
-0.015048282220959663,
-0.00997965782880783,
-0.008414656855165958,
-0.06127597391605377,
-0.043611280620098114,
-0.0009282110841013491,
-0.032576605677604675,
-0.03555284067988396,
-0.07741908729076385,
-0.011406300589442253,
-0.06515088677406311,
-0.013768956996500492,
0.040661074221134186,
0.004995355848222971,
0.002871657023206353,
-0.07014373689889908,
0.01549976784735918,
-0.034136079251766205,
-0.029710132628679276,
-0.04909548535943031,
-0.019483745098114014,
-0.03631969541311264,
-0.08189849555492401,
0.045175448060035706,
0.02602088265120983,
0.0008016417268663645,
0.013537844642996788,
0.024889091029763222,
0.007263943087309599,
-0.027282310649752617,
0.058483805507421494,
0.06282280385494232,
-0.0317721962928772,
-0.0407102033495903,
0.041409917175769806,
-0.024271270260214806,
-0.006338991224765778,
-0.03873924911022186,
-0.03995673358440399,
0.08983294665813446,
0.05988412722945213,
0.014549540355801582,
0.01575862430036068,
-0.007630369625985622,
-0.050986673682928085,
-0.06067463383078575,
-0.034761786460876465,
-0.03509131073951721,
-0.013474123552441597,
-0.02738400362432003,
-0.034431468695402145,
-0.010803312994539738,
-0.04568793624639511,
0.004701667465269566,
-0.017145784571766853,
0.022507967427372932,
0.020880645141005516,
0.05552670359611511,
0.024307837709784508,
0.02145070768892765,
-0.03838268667459488,
-0.07246853411197662,
0.06607462465763092,
0.009292763657867908,
0.008175257593393326,
-0.06033140793442726,
-0.02516433224081993,
0.020000478252768517,
0.02192608080804348,
-0.0015176991000771523,
0.0005680380272679031,
0.08437683433294296,
-0.0025536874309182167,
0.0010456921299919486,
0.037965256720781326,
-0.02323664352297783,
-0.027002554386854172,
0.005753168836236,
0.006684398744255304,
-0.026092156767845154,
-0.04292019456624985,
-0.0109013756737113,
0.0028531779535114765,
0.05509183928370476,
-0.04333166405558586,
-0.028462590649724007,
-0.004176135174930096,
0.03500921279191971,
0.04231317341327667,
0.015693403780460358,
-0.05569598078727722,
-0.017933355644345284,
-0.05842864513397217,
-0.003587859682738781,
0.03592048957943916,
0.03929907828569412,
0.01839265413582325,
0.047407716512680054,
0.015869222581386566,
-0.019029170274734497,
0.031079597771167755,
0.03100435435771942,
0.07061465829610825,
-0.00109975622035563,
-0.056613996624946594,
0.01795332133769989,
-0.03275516629219055,
0.013235270045697689,
-0.014370408840477467,
-0.02270602434873581,
-0.03902285546064377,
-0.09480401873588562,
-0.01185456570237875,
0.003857916686683893,
-0.011220292188227177,
-0.010629873722791672,
0.043114736676216125,
-0.011076620779931545,
-0.007264158688485622,
-0.0023838013876229525,
0.013280478306114674,
0.06356509774923325,
-0.06068979576230049,
0.06781370937824249,
-0.01822936162352562,
0.0007189028547145426,
-0.033236004412174225,
0.009728717617690563,
0.015202973037958145,
-0.027676157653331757,
0.04888559877872467,
0.07323957234621048,
0.014219818636775017,
0.05240876227617264,
0.09652327746152878,
0.024123862385749817,
-0.03406887874007225,
0.04039052501320839,
0.041251637041568756,
-0.010690259747207165,
-0.07293251156806946,
0.004279213957488537,
-0.00649601873010397,
-0.02597953751683235,
-0.003046911908313632,
-0.0009544472559355199,
0.043516386300325394,
0.04781702160835266,
-0.026336252689361572,
0.008084401488304138,
-0.0035677445121109486,
-0.014913545921444893,
-0.01712622307240963,
-0.05809244140982628,
0.0017500210087746382,
0.0019504106603562832,
-0.014253159053623676,
0.009232758544385433,
0.027027446776628494,
0.00567801995202899,
0.06018757075071335,
0.03426753357052803,
-0.009691540151834488,
-0.025471793487668037,
0.02042303793132305,
0.009809000417590141,
-0.039415135979652405,
-0.061308830976486206,
-0.03214258700609207,
0.034712690860033035,
0.053954415023326874,
-0.01989225670695305,
-0.06665509939193726,
-0.004005803260952234,
0.0667344182729721,
-0.024997824802994728,
0.04912007972598076,
-0.014449101872742176,
0.025569943711161613,
0.045212067663669586,
-0.0051815505139529705,
0.02542593888938427,
-0.018554095178842545,
0.004066773224622011,
0.017663946375250816,
0.03010457754135132,
-0.012073674239218235,
-0.031437747180461884,
-0.06305867433547974,
0.006659323815256357,
0.032528091222047806,
0.0568912997841835,
0.05740591138601303,
-0.03623000159859657,
-0.04183569550514221,
-0.01651318557560444,
0.043273646384477615,
-0.039991073310375214,
0.012623465619981289,
0.03262428939342499,
0.02893095649778843,
-0.045380137860774994,
-0.05139510706067085,
-0.03096611797809601,
-0.014373589307069778,
0.021494660526514053,
0.009284703992307186,
-0.053252045065164566,
-0.03107588365674019,
0.03423907235264778,
-0.012704347260296345,
-0.013371097855269909,
-0.08553937077522278,
0.02851126529276371,
-0.015002078376710415,
-0.0205893162637949,
0.04060480371117592,
0.025215305387973785,
0.019437570124864578,
0.04672279208898544,
0.02395015023648739,
0.021942799910902977,
-0.011261559091508389,
0.05315331369638443,
-0.03616003692150116,
-0.0278830137103796,
0.016490163281559944,
-0.03765484690666199,
-0.031070834025740623,
-0.029110632836818695,
-0.03366592526435852,
-0.05050428584218025,
-0.022033335641026497,
0.017861895263195038,
-0.0063226004131138325,
-0.013627630658447742,
-0.028350846841931343,
0.044542860239744186,
-0.0178122129291296,
-0.04419172182679176,
-0.026453141123056412,
-0.036747585982084274,
-0.053159598261117935,
-0.05161786824464798,
0.020497197285294533,
0.013881918042898178,
0.019238384440541267,
0.029192021116614342,
-0.011015493422746658,
0.005648904480040073,
-0.0016537809278815985,
-0.03777178376913071,
0.030711714178323746,
-0.025375869125127792,
-0.005547899752855301,
-0.02711724117398262,
0.023993343114852905,
0.03556900843977928,
0.027354219928383827,
-0.028710441663861275,
0.02881370112299919,
0.018324878066778183,
-0.005688404198735952,
-0.008609852753579617,
0.03812908008694649,
0.036401234567165375,
-0.051663871854543686,
-0.03986373171210289,
0.010319222696125507,
-0.05065363645553589,
0.025284118950366974,
-0.03590967878699303,
0.0004712571681011468,
-0.011751832440495491,
-0.015220540575683117,
0.026080215349793434,
0.001674409955739975,
-0.03363075852394104,
0.030348682776093483,
-0.008427439257502556,
0.015221497043967247,
-0.04584105685353279,
0.06015707924962044,
-0.03917776420712471,
0.035450078547000885,
-0.015827910974621773,
-0.008753602392971516,
-0.05928538367152214,
0.05526250973343849,
0.00036721210926771164,
-0.02157936617732048,
0.007615252397954464,
0.037792716175317764,
-0.03654845803976059,
0.043361082673072815,
-0.006952083203941584,
0.028785331174731255,
-0.04898644611239433,
0.08335113525390625,
-0.033586133271455765,
0.008689019829034805,
-0.031041191890835762,
0.01424749568104744,
-0.019839297980070114,
0.01819491945207119,
-0.029010869562625885,
-0.03075946867465973,
0.009914546273648739,
0.07219896465539932,
0.04950151592493057,
0.02652224898338318,
-0.02749527059495449,
0.008116189390420914,
0.02073400840163231,
-0.059452664107084274,
-0.011390660889446735,
0.010335632599890232,
0.005376421380788088,
0.005632039159536362,
0.06271784752607346,
0.028036605566740036,
-0.045102886855602264,
-0.07831159234046936,
0.029692918062210083,
0.021716801449656487,
0.0011907217558473349,
-0.014504869468510151,
0.03640985116362572,
0.041400715708732605,
0.03169146925210953,
-0.02708379551768303,
-0.015530248172581196,
-0.0005305391969159245,
-0.04943365976214409,
0.049276191741228104,
-0.011552350595593452,
0.02606724575161934,
0.025708474218845367,
-0.021745501086115837,
-0.017210930585861206,
0.06123993918299675,
0.03250610828399658,
0.022591345012187958,
-0.011608372442424297,
-0.050282906740903854,
0.016899660229682922,
0.019387109205126762,
-0.05983636900782585,
-0.005645921919494867,
0.027459867298603058,
-0.04050144925713539,
0.0638405978679657,
-0.0171046182513237,
0.019478440284729004,
0.056503038853406906,
0.03511280193924904,
-0.002678871853277087,
0.06796717643737793,
-0.006686935666948557,
0.018920527771115303,
0.05791403725743294,
-0.07420802116394043,
-0.02211039885878563,
-0.030261851847171783,
0.07898861914873123,
-0.06360457092523575,
0.021077847108244896,
0.02505316212773323,
0.00664686830714345,
0.021030470728874207,
-0.029007170349359512,
-0.048784900456666946,
0.016181981191039085,
-0.040145013481378555,
0.06382237374782562,
0.03212577477097511,
-0.05173739790916443,
0.054465241730213165,
0.003018263028934598,
-0.07147657126188278,
0.06546197831630707,
0.0332813635468483,
0.03366667032241821,
0.009184540249407291,
0.020272817462682724,
-0.06399621069431305,
0.018067916855216026,
-0.04957607388496399,
0.036749087274074554,
-0.056681275367736816,
-0.020451581105589867,
0.022347956895828247,
-0.04370719939470291,
-0.008623803965747356,
0.04657619819045067,
-0.014276698231697083,
-0.009305192157626152,
0.04638785496354103,
-0.02717861905694008,
-0.020596789196133614,
0.022455526515841484,
0.00959488470107317,
-0.023799609392881393,
0.015895996242761612,
-0.044272519648075104,
0.007512329146265984,
0.020714912563562393,
0.017037859186530113,
-0.02302180603146553,
0.0017346282256767154,
0.043437659740448,
-0.03089010715484619,
-0.038704946637153625,
0.04712936282157898,
0.00005086713281343691,
-0.041715823113918304,
0.025990134105086327,
0.044844262301921844,
0.029009681195020676,
0.028525246307253838,
-0.02194073051214218,
0.03449174761772156,
-0.05244535580277443,
-0.025729799643158913,
0.0036819293163716793,
-0.015294212847948074,
0.038263048976659775,
-0.006994579453021288,
0.02826313115656376,
0.04073943942785263,
0.019556906074285507,
0.0072349486872553825,
-0.04057398438453674,
-0.037036918103694916,
0.022380216047167778,
-0.006398238241672516,
0.015344154089689255,
-0.0144881010055542,
-0.04278481379151344,
-0.05450006574392319,
-0.014378690160810947,
-0.05203316733241081,
0.011768998578190804,
-0.06641174107789993,
0.006885042879730463,
0.0237758569419384,
-0.013415115885436535,
-0.059605054557323456,
-0.07798919826745987,
-0.00427581463009119,
-0.023304682224988937,
0.003554693888872862,
0.01319108810275793,
-0.04686838760972023,
0.020509304478764534,
-0.04224913567304611,
-0.050828445702791214,
0.05767587572336197,
0.0018978207372128963,
-0.012539117597043514,
0.04611371457576752,
0.031855616718530655,
-0.02789188362658024,
0.016209591180086136,
0.035729505121707916,
-0.03555034473538399,
0.02156062237918377,
0.0072226873598992825,
0.01550399512052536,
0.017362825572490692,
0.0014445637352764606,
-0.03439773619174957,
-0.02296614460647106,
-0.07364092022180557,
-0.05392369627952576,
-0.04174366965889931,
0.008630101568996906,
0.06459970772266388
] |
BigSalmon/InformalToFormalLincoln20 | [
"pytorch",
"gpt2",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 8 | 2021-12-14T14:43:47Z | ---
license: apache-2.0
tags:
- generated_from_keras_callback
model-index:
- name: model_card_test2
results: []
---
<!-- This model card has been generated automatically according to the information Keras had access to. You should
probably proofread and complete it, then remove this comment. -->
# model_card_test2
This model is a fine-tuned version of [distilbert-base-cased](https://huggingface.co/distilbert-base-cased) on an unknown dataset.
It achieves the following results on the evaluation set:
- Train Loss: 0.0031
- Train Accuracy: 1.0
- Validation Loss: 0.0000
- Validation Accuracy: 1.0
- Epoch: 1
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'Adam', 'learning_rate': 0.001, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
- training_precision: float32
### Training results
| Train Loss | Train Accuracy | Validation Loss | Validation Accuracy | Epoch |
|:----------:|:--------------:|:---------------:|:-------------------:|:-----:|
| 0.4647 | 0.6406 | 0.0057 | 1.0 | 0 |
| 0.0031 | 1.0 | 0.0000 | 1.0 | 1 |
### Framework versions
- Transformers 4.14.0.dev0
- TensorFlow 2.6.0
- Datasets 1.16.2.dev0
- Tokenizers 0.10.3
| [
-0.032274745404720306,
-0.013307350687682629,
-0.010673759505152702,
0.030413800850510597,
0.032906316220760345,
0.015355220064520836,
-0.011944502592086792,
-0.01694161258637905,
-0.03979618474841118,
0.05258071795105934,
0.02720867097377777,
-0.01989671401679516,
0.008444985374808311,
0.04235389456152916,
-0.03544805198907852,
-0.03836049139499664,
-0.012412733398377895,
-0.015088562853634357,
-0.031391359865665436,
0.008594169281423092,
0.0070906165055930614,
-0.0087682344019413,
-0.011071170680224895,
0.005752127151936293,
-0.02317705564200878,
0.019668463617563248,
0.0022033797577023506,
0.012616525404155254,
0.034037645906209946,
-0.08328535407781601,
0.009691320359706879,
-0.06186269223690033,
-0.06079297885298729,
-0.012312483042478561,
-0.014521446079015732,
0.009675921872258186,
0.006882930174469948,
0.007513901684433222,
0.033243827521800995,
0.04354880005121231,
-0.001579116564244032,
0.026515623554587364,
-0.016898833215236664,
-0.021692531183362007,
0.056823037564754486,
-0.0014808205887675285,
-0.04402808099985123,
-0.007458509877324104,
0.04268026351928711,
-0.012666112743318081,
-0.07661768049001694,
-0.03547173738479614,
-0.02724752016365528,
0.026141466572880745,
-0.025567838922142982,
-0.01030461024492979,
-0.053051386028528214,
-0.006058639846742153,
0.06489172577857971,
-0.03742401674389839,
-0.03905297815799713,
0.01113113109022379,
-0.06855727732181549,
0.01559930108487606,
0.04975583031773567,
-0.025451114401221275,
0.015372024849057198,
-0.038773927837610245,
0.036064956337213516,
-0.018323378637433052,
0.050012972205877304,
-0.01570908911526203,
0.007122139912098646,
-0.10246113687753677,
-0.013547251001000404,
-0.007303403224796057,
0.05282720923423767,
0.04614657908678055,
-0.026582850143313408,
0.05226631462574005,
0.022312402725219727,
0.008866782300174236,
0.04282587766647339,
-0.017015745863318443,
-0.009518477134406567,
0.051397573202848434,
-0.0387214794754982,
0.006827830336987972,
0.008280097506940365,
0.02857762761414051,
-0.03708658739924431,
-0.019167182967066765,
-0.03734157234430313,
-0.03965049237012863,
-0.03273192420601845,
0.018329594284296036,
0.052476927638053894,
0.0018361289985477924,
0.04644535854458809,
0.03140391409397125,
0.036728303879499435,
0.03384038060903549,
-0.020230403169989586,
0.06122921407222748,
0.007518474943935871,
-0.02827659249305725,
-0.010430777445435524,
-0.022735806182026863,
-0.0343550443649292,
0.02673911117017269,
0.020219044759869576,
-0.023881500586867332,
-0.04461633786559105,
0.038696251809597015,
0.0004475853929761797,
-0.0053237974643707275,
0.08607548475265503,
-0.016484318301081657,
-0.04777037352323532,
-0.030440282076597214,
0.030941784381866455,
0.01836998201906681,
-0.010015688836574554,
0.0027123086620122194,
-0.05108601599931717,
-0.018784746527671814,
-0.025576168671250343,
-0.03655730187892914,
-0.000025718843971844763,
-0.003316977759823203,
0.0017882895190268755,
0.06700357794761658,
0.02835189364850521,
-0.09527364373207092,
-0.004716297145932913,
0.02415510080754757,
-0.03139045089483261,
0.03788616508245468,
-0.005109150428324938,
0.09547232836484909,
-0.06696624308824539,
-0.07143916934728622,
0.023750241845846176,
0.0004869620897807181,
-0.026000048965215683,
0.017271246761083603,
0.02598808892071247,
-0.04349507763981819,
-0.006706034764647484,
0.00371769187040627,
0.049142688512802124,
-0.0686170682311058,
-0.015570300631225109,
0.06588034331798553,
0.002546414267271757,
0.024318063631653786,
-0.05901160463690758,
-0.017912406474351883,
0.011927969753742218,
-0.00147682533133775,
-0.021293582394719124,
0.05061614140868187,
-0.031241362914443016,
0.006275867577642202,
-0.04248639568686485,
-0.02557259052991867,
0.008451820351183414,
0.06116243451833725,
-0.008641003631055355,
-0.012768557295203209,
-0.03897176682949066,
0.03997263312339783,
0.043837688863277435,
0.028957370668649673,
-0.031241677701473236,
0.038863714784383774,
0.058781400322914124,
0.041291315108537674,
-0.02270638942718506,
0.034748125821352005,
0.009611685760319233,
-0.03794899955391884,
-0.0561562106013298,
0.03483787178993225,
0.011168492957949638,
-0.03124636970460415,
0.02475420944392681,
0.015825888141989708,
0.0003577594761736691,
-0.04427065700292587,
-0.0307784304022789,
0.04625588655471802,
0.00462189968675375,
-0.0007453557918779552,
0.02047906629741192,
0.007332406938076019,
-0.025672977790236473,
0.03324553370475769,
-0.014691895805299282,
0.018294401466846466,
-0.02310357429087162,
-0.026177557185292244,
0.030895434319972992,
0.004777347669005394,
0.029597198590636253,
0.050727080553770065,
0.00045697815949097276,
0.08713579922914505,
-0.038274139165878296,
0.022556228563189507,
-0.04163510352373123,
-0.04884292557835579,
0.011292140930891037,
0.05720409005880356,
0.04510055482387543,
0.05421531945466995,
0.009237677790224552,
-0.054882969707250595,
0.04330223426222801,
0.06729719787836075,
0.03745395317673683,
0.007109880447387695,
-0.022410091012716293,
-0.013116946443915367,
0.03914694860577583,
0.039327818900346756,
-0.05414523556828499,
-0.02429177239537239,
0.0156131312251091,
0.06064707785844803,
0.003325940342620015,
0.021622829139232635,
-0.0049499268643558025,
0.05625880882143974,
-0.03791038691997528,
-0.06134673207998276,
0.02603970654308796,
0.034577421844005585,
-0.005423476919531822,
0.039533935487270355,
0.014617858454585075,
0.013421322219073772,
0.014391466043889523,
0.00263051874935627,
-0.002594476565718651,
-0.0256191436201334,
0.013083324767649174,
0.008882418274879456,
0.04534873366355896,
-0.05702868476510048,
0.0444742776453495,
-0.01139654777944088,
0.012035861611366272,
0.045921001583337784,
-0.04334167018532753,
0.04440366476774216,
0.04920142516493797,
0.041023608297109604,
-0.037137262523174286,
0.018997371196746826,
0.017737383022904396,
0.03884952515363693,
0.03985980898141861,
0.004436135292053223,
0.06527850031852722,
-0.002583099529147148,
0.059512827545404434,
0.06834784150123596,
0.021382641047239304,
0.016152262687683105,
0.021070824936032295,
0.08228146284818649,
0.017762362957000732,
-0.031521476805210114,
0.04480272904038429,
-0.06573259830474854,
0.021978357806801796,
-0.049242857843637466,
0.01025787740945816,
-0.01806468889117241,
-0.0011620419099926949,
0.03802908957004547,
0.026394328102469444,
-0.028243467211723328,
0.0005750673590227962,
-0.01582118682563305,
-0.02222135104238987,
0.019116448238492012,
0.0021637766622006893,
-0.0015041528968140483,
-0.020168302580714226,
-0.0183749720454216,
-0.0227670781314373,
-0.075184665620327,
-0.03295218199491501,
-0.029449358582496643,
-0.045774541795253754,
-0.023861249908804893,
-0.09223935753107071,
-0.008456342853605747,
-0.07495353370904922,
-0.03638075664639473,
0.02778048999607563,
-0.010024706833064556,
-0.014654477126896381,
-0.05709991604089737,
0.018053879961371422,
-0.04008287563920021,
-0.05082836374640465,
-0.04863230139017105,
-0.04719718545675278,
-0.055274054408073425,
-0.07184421271085739,
0.024411851540207863,
0.024619080126285553,
-0.00661959545686841,
0.013718843460083008,
0.009172284975647926,
0.003057940397411585,
-0.016953425481915474,
0.04017229378223419,
0.06161638721823692,
-0.04722025245428085,
-0.046531617641448975,
0.03650757670402527,
-0.02288690023124218,
0.03221685811877251,
-0.007209582719951868,
-0.027547631412744522,
0.10252904146909714,
0.057879794389009476,
0.010981370694935322,
0.022461965680122375,
-0.018915483728051186,
-0.05483922362327576,
-0.050858646631240845,
-0.020947305485606194,
-0.029427750036120415,
-0.015328002162277699,
-0.051737356930971146,
-0.04943303391337395,
-0.024375349283218384,
-0.04640832170844078,
0.005676859524101019,
0.004142532125115395,
0.039146337658166885,
0.03402481600642204,
0.039402104914188385,
0.01533589232712984,
0.017659718170762062,
-0.020193232223391533,
-0.058866146951913834,
0.05919581279158592,
-0.0055316416546702385,
0.0014855882618576288,
-0.08738657832145691,
-0.029120303690433502,
0.01963833160698414,
0.019069643691182137,
0.005356184672564268,
-0.017964089289307594,
0.06576348841190338,
-0.0203391220420599,
0.011226525530219078,
0.025492189452052116,
-0.013528800569474697,
-0.030969826504588127,
0.0053235432133078575,
0.005134600680321455,
-0.021788354963064194,
-0.04703496769070625,
-0.016430940479040146,
0.006376421079039574,
0.04211505874991417,
-0.04988780617713928,
-0.054760340601205826,
-0.02368760108947754,
0.05145898461341858,
0.04430843144655228,
0.0024350802414119244,
-0.054796550422906876,
-0.016969697549939156,
-0.06828656792640686,
-0.021199297159910202,
0.04084077477455139,
0.02259729988873005,
0.006642657797783613,
0.043760549277067184,
0.004768562503159046,
-0.03653869032859802,
0.051688242703676224,
0.04506896436214447,
0.059791598469018936,
0.009210390038788319,
-0.05811702087521553,
-0.00043185491813346744,
-0.025380875915288925,
0.028432562947273254,
-0.007876216433942318,
-0.01847677491605282,
-0.022922346368432045,
-0.105526864528656,
-0.01663968153297901,
0.015861516818404198,
-0.00038924740510992706,
0.0009070698288269341,
0.03395757079124451,
-0.0013330300571396947,
-0.03276975825428963,
0.006924768444150686,
0.01847395859658718,
0.04321011155843735,
-0.04165837541222572,
0.04908888414502144,
-0.014865567907691002,
0.017950456589460373,
-0.05201457440853119,
0.00672539509832859,
-0.03205437958240509,
-0.028286324813961983,
0.011430447921156883,
0.06051822006702423,
-0.012931003235280514,
0.05468960851430893,
0.08861042559146881,
0.027056461200118065,
-0.04534735903143883,
0.04333515837788582,
0.0771377831697464,
-0.04558955505490303,
-0.043900713324546814,
0.01953718438744545,
-0.00444782292470336,
-0.019415264949202538,
-0.013509336858987808,
-0.006765199359506369,
0.0594540499150753,
0.051976703107357025,
0.005000126548111439,
0.024351779371500015,
-0.0009876842377707362,
-0.01587739959359169,
-0.029125157743692398,
-0.05548151209950447,
-0.023786038160324097,
-0.0006259104120545089,
-0.03928621485829353,
0.014222883619368076,
0.019260665401816368,
0.010691149160265923,
0.07202529162168503,
0.018884915858507156,
-0.025370333343744278,
-0.0169533658772707,
0.035762667655944824,
0.016612814739346504,
-0.031783025711774826,
-0.06339370459318161,
-0.03282211720943451,
0.04674573987722397,
0.03539213910698891,
-0.020627977326512337,
-0.06013248488306999,
0.008063437417149544,
0.03837710991501808,
-0.03517099842429161,
0.05668572708964348,
-0.01581159606575966,
0.0425352118909359,
0.05399129539728165,
-0.01639687642455101,
0.043210338801145554,
-0.029847217723727226,
-0.003539422992616892,
0.005709931720048189,
0.03269351273775101,
-0.008645717054605484,
-0.03382152318954468,
-0.06153649836778641,
0.012592474929988384,
0.028743956238031387,
0.0473165288567543,
0.049868594855070114,
-0.037054941058158875,
-0.04381122440099716,
0.005102815106511116,
0.026956090703606606,
-0.03247855231165886,
0.005632163491100073,
0.02925575152039528,
0.03136076405644417,
-0.0488734245300293,
-0.029761139303445816,
-0.04777216538786888,
-0.018613599240779877,
0.023469844833016396,
-0.002443114295601845,
-0.044624969363212585,
-0.029039982706308365,
0.03986754268407822,
-0.007235439494252205,
-0.02101297304034233,
-0.07994703203439713,
0.06126159057021141,
0.0004777438298333436,
-0.016891440376639366,
0.04524470865726471,
0.030023496598005295,
0.03567950800061226,
0.06955956667661667,
0.024843990802764893,
0.018111074343323708,
-0.0369560681283474,
0.05864480137825012,
-0.047322534024715424,
-0.033764567226171494,
-0.0036573412362486124,
-0.0479307696223259,
-0.01958552561700344,
-0.011658389121294022,
-0.035454027354717255,
-0.04261932149529457,
-0.015275178477168083,
0.01779766008257866,
0.005256365519016981,
-0.014645119197666645,
-0.011450350284576416,
0.04408649355173111,
-0.0325993150472641,
-0.05103716626763344,
-0.041984591633081436,
-0.03887259215116501,
-0.07276101410388947,
-0.05754758045077324,
0.018507657572627068,
-0.0025927762035280466,
0.04206168279051781,
0.022833755239844322,
0.0202510766685009,
0.015970703214406967,
-0.006753395777195692,
-0.034406889230012894,
0.020758340135216713,
-0.002359467325732112,
-0.017620684579014778,
-0.032358359545469284,
0.03290106728672981,
0.010821481235325336,
0.03095562756061554,
-0.039355237036943436,
0.031460754573345184,
0.02632078155875206,
-0.009735167026519775,
-0.023597747087478638,
0.03123127855360508,
0.028175443410873413,
-0.04671424627304077,
-0.02711745910346508,
-0.006895861122757196,
-0.03928869217634201,
0.023722760379314423,
-0.016202818602323532,
-0.019691014662384987,
-0.014654848724603653,
0.01483542937785387,
0.03444085270166397,
-0.020438846200704575,
-0.017672322690486908,
0.03473973274230957,
-0.03348184749484062,
0.017090709879994392,
-0.0398777574300766,
0.06123848259449005,
-0.03453066200017929,
0.01975424215197563,
-0.01533374935388565,
0.0185515359044075,
-0.04598124325275421,
0.042422909289598465,
-0.026612699031829834,
-0.03652070835232735,
-0.0022254930809140205,
0.049679845571517944,
-0.03145107254385948,
0.03756926581263542,
-0.015300428494811058,
0.02123560942709446,
-0.045960310846567154,
0.06890102475881577,
-0.036730799823999405,
0.029644496738910675,
-0.04059458523988724,
0.01927431859076023,
-0.030406169593334198,
0.024616412818431854,
-0.0044144559651613235,
-0.02256227284669876,
0.03076535277068615,
0.05370683595538139,
0.03692298009991646,
0.03124632127583027,
-0.004651748575270176,
-0.016371335834264755,
0.021797122433781624,
-0.0453316867351532,
-0.021796561777591705,
-0.0010265992023050785,
0.0032350283581763506,
0.003333203261718154,
0.055282264947891235,
0.03768488019704819,
-0.03874989598989487,
-0.07434811443090439,
0.044466760009527206,
0.018432650715112686,
-0.011030782014131546,
0.014567098580300808,
0.031382396817207336,
0.03828134387731552,
0.03141705319285393,
-0.01230472233146429,
-0.004081184044480324,
-0.0028217907529324293,
-0.05238250643014908,
0.03831048309803009,
-0.013174206018447876,
0.026603341102600098,
-0.007868640124797821,
-0.040707528591156006,
-0.019568320363759995,
0.05991522595286369,
0.014112190343439579,
0.02790314517915249,
-0.012155981734395027,
-0.0493934340775013,
0.02257886342704296,
-0.00032775592990219593,
-0.04082764685153961,
0.020884014666080475,
0.011454137973487377,
-0.031347520649433136,
0.06683440506458282,
0.0007106075645424426,
0.00252920133061707,
0.03843050077557564,
0.03925652429461479,
-0.015030842274427414,
0.06107151508331299,
-0.017025727778673172,
0.003785568056628108,
0.0389188751578331,
-0.05839952453970909,
-0.015216133557260036,
-0.033922769129276276,
0.06399925798177719,
-0.05786382034420967,
0.03218412399291992,
0.028237298130989075,
-0.003144126618281007,
0.02369449846446514,
-0.01909015141427517,
-0.07083912193775177,
0.013818031176924706,
-0.06284918636083603,
0.0758081004023552,
0.0077958605252206326,
-0.04564761742949486,
0.05773188918828964,
0.007915845140814781,
-0.06629553437232971,
0.03679531067609787,
0.030642960220575333,
0.03767414391040802,
0.03038734570145607,
0.042586781084537506,
-0.04036078602075577,
0.013228637166321278,
-0.040552426129579544,
0.020884931087493896,
-0.0457393042743206,
-0.024814395233988762,
0.0484311543405056,
-0.030661266297101974,
-0.019638577476143837,
0.03672843053936958,
-0.01946396566927433,
-0.034151989966630936,
0.0573558434844017,
-0.04743123799562454,
-0.01628454588353634,
0.006481350399553776,
0.0060180192813277245,
-0.03564314916729927,
0.02965892292559147,
-0.04163196310400963,
0.028844522312283516,
0.00464728893712163,
-0.0063337343744933605,
-0.018540455028414726,
0.0157919954508543,
0.03734603524208069,
-0.03732790797948837,
-0.046231139451265335,
0.03238213062286377,
-0.00435346644371748,
-0.01703011617064476,
0.0355900302529335,
0.02874099463224411,
0.01160539872944355,
0.018333805724978447,
-0.0024817048106342554,
0.0020080730319023132,
-0.03326881676912308,
-0.005489708390086889,
0.01422257162630558,
-0.01397070474922657,
0.042471423745155334,
0.002576247090473771,
0.03541122376918793,
0.05450239032506943,
0.02143089286983013,
-0.020417634397745132,
-0.024144841358065605,
-0.02767123654484749,
0.03595989942550659,
-0.029469797387719154,
0.0041671618819236755,
-0.0065730479545891285,
-0.04052450880408287,
-0.03499024361371994,
-0.004414814990013838,
-0.04453406110405922,
0.02793879248201847,
-0.06904385983943939,
0.006339434999972582,
0.02138194628059864,
-0.011485075578093529,
-0.057622652500867844,
-0.1050926074385643,
-0.01793261431157589,
-0.05248913913965225,
-0.005543392617255449,
0.04184615612030029,
-0.037676066160202026,
0.03868231922388077,
-0.05404438078403473,
-0.04046690836548805,
0.047744229435920715,
0.04084400460124016,
-0.03723161667585373,
0.05132357031106949,
0.03693127632141113,
-0.03784262388944626,
0.010405191220343113,
0.022116130217909813,
-0.04851926863193512,
0.008392794989049435,
0.02050904743373394,
0.004492550622671843,
0.02791961096227169,
0.014402834698557854,
-0.05140949413180351,
-0.010869734920561314,
-0.07730557024478912,
-0.04405316337943077,
-0.058018699288368225,
0.008696756325662136,
0.04637188836932182
] |
BigSalmon/InformalToFormalLincoln22 | [
"pytorch",
"gpt2",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 6 | 2021-09-15T19:26:20Z | ---
license: apache-2.0
tags:
- generated_from_keras_callback
model-index:
- name: Rocketknight1/t5-small-finetuned-xsum
results: []
---
<!-- This model card has been generated automatically according to the information Keras had access to. You should
probably proofread and complete it, then remove this comment. -->
# Rocketknight1/t5-small-finetuned-xsum
This model is a fine-tuned version of [t5-small](https://huggingface.co/t5-small) on an unknown dataset.
It achieves the following results on the evaluation set:
- Train Loss: 2.7172
- Validation Loss: 2.3977
- Train Rouge1: 28.7469
- Train Rouge2: 7.9005
- Train Rougel: 22.5917
- Train Rougelsum: 22.6162
- Train Gen Len: 18.875
- Epoch: 0
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': 2e-05, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False, 'weight_decay_rate': 0.01}
- training_precision: float32
### Training results
| Train Loss | Validation Loss | Train Rouge1 | Train Rouge2 | Train Rougel | Train Rougelsum | Train Gen Len | Epoch |
|:----------:|:---------------:|:------------:|:------------:|:------------:|:---------------:|:-------------:|:-----:|
| 2.7172 | 2.3977 | 28.7469 | 7.9005 | 22.5917 | 22.6162 | 18.875 | 0 |
### Framework versions
- Transformers 4.16.0.dev0
- TensorFlow 2.8.0-rc0
- Datasets 1.17.0
- Tokenizers 0.11.0
| [
-0.01946195401251316,
-0.01790716126561165,
0.011626380495727062,
0.01228030864149332,
0.030835498124361038,
-0.012391927652060986,
-0.025804216042160988,
-0.010777182877063751,
-0.030435584485530853,
0.05191962793469429,
0.02010110393166542,
-0.009504817426204681,
0.016073070466518402,
0.042435575276613235,
-0.03668835386633873,
-0.049177512526512146,
-0.014661531895399094,
-0.02336321771144867,
-0.02676187828183174,
0.012572931125760078,
0.006023474968969822,
0.019002361223101616,
-0.02245953492820263,
-0.0028886913787573576,
-0.010008206591010094,
0.014485391788184643,
-0.013189409859478474,
0.028824878856539726,
0.051923174411058426,
-0.07183997333049774,
0.019491219893097878,
-0.05439581722021103,
-0.04239407181739807,
-0.05298081785440445,
-0.009908794425427914,
-0.004771256819367409,
-0.012287846766412258,
0.006302461493760347,
0.017123593017458916,
0.054804958403110504,
-0.00042859651148319244,
0.02524755708873272,
-0.0200016088783741,
-0.0031649526208639145,
0.04515986517071724,
-0.003956214524805546,
-0.04470852017402649,
0.005472136195749044,
0.047896068543195724,
-0.014835362322628498,
-0.07171232253313065,
-0.05738452821969986,
-0.021272074431180954,
0.030236976221203804,
-0.0234879981726408,
-0.019156383350491524,
-0.04971475154161453,
0.018016552552580833,
0.07194656878709793,
-0.03810075297951698,
-0.06062627211213112,
0.01004887092858553,
-0.06546724587678909,
0.038130514323711395,
0.030580170452594757,
-0.023912424221634865,
0.022111892700195312,
-0.045201193541288376,
0.04911119490861893,
-0.016180606558918953,
0.057012200355529785,
-0.014734533615410328,
0.013729662634432316,
-0.08718043565750122,
0.001938598114065826,
-0.008794974535703659,
0.023990172892808914,
0.035117972642183304,
-0.04917691648006439,
0.06067190319299698,
0.04790341481566429,
0.00016361915913876146,
0.04152684658765793,
-0.02622259221971035,
-0.000716063950676471,
0.04451951012015343,
-0.032339368015527725,
0.01734054461121559,
0.004033214878290892,
0.02456708997488022,
-0.04319063201546669,
-0.04049237072467804,
-0.04338326305150986,
-0.026938145980238914,
-0.02688436023890972,
0.022424008697271347,
0.04349283128976822,
-0.007972723804414272,
0.037530358880758286,
0.012152652256190777,
0.03440871462225914,
0.026494355872273445,
-0.024961533024907112,
0.06182342395186424,
0.002928058849647641,
-0.02554446831345558,
-0.0017390885623171926,
-0.02949758805334568,
-0.0263766311109066,
0.04062895104289055,
0.006954174488782883,
-0.052934881299734116,
-0.04784620553255081,
0.021724829450249672,
0.015678096562623978,
-0.005797105375677347,
0.0684274211525917,
-0.022825149819254875,
-0.0526881217956543,
-0.03722749277949333,
0.030457640066742897,
0.026427792385220528,
0.013369904831051826,
-0.004161714110523462,
-0.03595820441842079,
-0.02419784665107727,
-0.022955123335123062,
-0.042030543088912964,
-0.003934461157768965,
0.01815026067197323,
0.0004675233503803611,
0.05134561285376549,
0.010244110599160194,
-0.07451438158750534,
-0.03654133528470993,
0.009221963584423065,
-0.04207760468125343,
0.05093192309141159,
0.00879833847284317,
0.12126044929027557,
-0.05043071508407593,
-0.08556342124938965,
0.002783318515866995,
-0.0075990064069628716,
-0.029521703720092773,
0.02008676342666149,
-0.005802741274237633,
-0.06476213037967682,
-0.012955600395798683,
-0.010358314961194992,
0.03721599280834198,
-0.06845928728580475,
-0.01079088356345892,
0.045198626816272736,
0.011339499615132809,
0.003947383724153042,
-0.05188024044036865,
0.0037846865598112345,
0.015379659831523895,
-0.014441307634115219,
-0.013946384191513062,
0.028797656297683716,
-0.018560154363512993,
-0.0028821013402193785,
-0.05388064309954643,
-0.063697449862957,
-0.0005573761882260442,
0.08971258252859116,
0.0004553833859972656,
-0.013600646518170834,
-0.014932877384126186,
0.02287408709526062,
0.03802094608545303,
0.0418396070599556,
-0.01721622236073017,
0.041703712195158005,
0.03024902194738388,
0.04483220353722572,
-0.031001148745417595,
0.034479014575481415,
0.026141013950109482,
-0.011559086851775646,
-0.03839029371738434,
0.021831395104527473,
0.008002986200153828,
-0.03813536465167999,
0.02723710611462593,
0.02779952995479107,
0.019334807991981506,
-0.03877362236380577,
-0.040904272347688675,
0.04238903522491455,
0.004424064885824919,
-0.005003106780350208,
0.0010798972798511386,
-0.003558877855539322,
-0.025381511077284813,
0.057416096329689026,
-0.009397987276315689,
0.010854113847017288,
-0.030335282906889915,
-0.03765923157334328,
0.033732201904058456,
0.01494414359331131,
0.023639608174562454,
0.062232401221990585,
-0.017795342952013016,
0.07969344407320023,
-0.01686573587357998,
0.031019574031233788,
-0.025166966021060944,
-0.05963798239827156,
0.025977589190006256,
0.07579164206981659,
0.027396589517593384,
0.037119075655937195,
0.00767233083024621,
-0.04576913267374039,
0.012479924596846104,
0.06024206802248955,
0.040248800069093704,
0.01628526672720909,
-0.03388753905892372,
-0.024785181507468224,
0.03892720118165016,
0.0438578799366951,
-0.04892316460609436,
-0.032713185995817184,
0.020476216450333595,
0.055775031447410583,
-0.0010446999222040176,
0.018738895654678345,
-0.010648977011442184,
0.025518011301755905,
-0.05458131805062294,
-0.05198156461119652,
0.038476500660181046,
-0.0003280017990618944,
-0.013545876368880272,
0.024875842034816742,
-0.0045391712337732315,
0.0037877149879932404,
0.0273062102496624,
-0.000329017813783139,
0.005134030245244503,
-0.04491525888442993,
0.010446456260979176,
-0.004841919057071209,
0.0352795235812664,
-0.035665322095155716,
0.034420087933540344,
-0.03330785036087036,
0.009807564318180084,
0.04390377923846245,
-0.051927030086517334,
0.01612721011042595,
0.07275137305259705,
0.04664301872253418,
-0.01527400128543377,
0.023234756663441658,
0.05706705525517464,
0.052896976470947266,
0.048885244876146317,
-0.010906078852713108,
0.060445401817560196,
-0.010554509237408638,
0.05785277858376503,
0.09347805380821228,
-0.012081867083907127,
0.020015763118863106,
0.014835339970886707,
0.07917449623346329,
0.02894436940550804,
-0.004236277658492327,
0.06205673888325691,
-0.06701129674911499,
0.020095696672797203,
-0.018791701644659042,
-0.01161257829517126,
-0.024288177490234375,
0.006938139908015728,
0.02649570442736149,
0.025652067735791206,
-0.033603813499212265,
-0.0016864279750734568,
-0.01681634597480297,
-0.03422367572784424,
-0.004705806262791157,
-0.0012367155868560076,
-0.0004912927397526801,
0.004934839438647032,
-0.022429831326007843,
-0.010918756015598774,
-0.052557382732629776,
-0.02652021124958992,
-0.01229089591652155,
-0.035269830375909805,
-0.033401910215616226,
-0.08485865592956543,
-0.004139957018196583,
-0.08654502034187317,
-0.024149460718035698,
0.019700247794389725,
0.004508206620812416,
-0.008699028752744198,
-0.0704163983464241,
0.03372616693377495,
-0.04277955740690231,
-0.049512285739183426,
-0.04404273256659508,
-0.03108084388077259,
-0.022741686552762985,
-0.07825090736150742,
0.04536990076303482,
0.03596583381295204,
0.017892833799123764,
0.018177557736635208,
0.029548052698373795,
0.0021706067491322756,
-0.02634579874575138,
0.06124277412891388,
0.05177624151110649,
-0.04174983501434326,
-0.04924870654940605,
0.03542829304933548,
-0.017943808808922768,
0.000436680595157668,
-0.03023335710167885,
-0.033518724143505096,
0.08314986526966095,
0.06845900416374207,
0.006964042317122221,
0.022282864898443222,
-0.019695844501256943,
-0.06174125522375107,
-0.07047435641288757,
-0.023142626509070396,
-0.027151484042406082,
-0.026857484132051468,
-0.033076878637075424,
-0.04123026505112648,
-0.01478653959929943,
-0.038377679884433746,
0.0038528423756361008,
-0.01336328312754631,
0.0002781044167932123,
0.035633385181427,
0.03525807335972786,
0.04074922204017639,
0.00934633333235979,
-0.03890008106827736,
-0.050973594188690186,
0.05220453068614006,
0.0100101288408041,
-0.01604278013110161,
-0.07742622494697571,
-0.02687600627541542,
0.020340222865343094,
0.022632621228694916,
0.02222767286002636,
0.013531544245779514,
0.07218430191278458,
-0.004796421620994806,
-0.00817254837602377,
0.03667232394218445,
-0.024291198700666428,
-0.01184224896132946,
0.009693697094917297,
0.023670611903071404,
-0.01996147818863392,
-0.051474109292030334,
-0.0045085446909070015,
-0.009233562275767326,
0.05130525678396225,
-0.028186053037643433,
-0.047520603984594345,
-0.0005511175841093063,
0.03016548603773117,
0.05103567615151405,
0.0034442797768861055,
-0.0568891279399395,
-0.029706358909606934,
-0.058694131672382355,
-0.013501089997589588,
0.048989493399858475,
0.018885409459471703,
0.006546474527567625,
0.04449738934636116,
0.028521018102765083,
-0.004389585927128792,
0.03362498804926872,
0.0394161157310009,
0.07502803951501846,
0.006035295780748129,
-0.056065019220113754,
0.006791213061660528,
-0.023169610649347305,
0.03145395591855049,
0.003243112238124013,
-0.016618911176919937,
-0.03132569044828415,
-0.0985863208770752,
-0.02970660664141178,
-0.003577598137781024,
0.0013588039437308908,
-0.0034887080546468496,
0.053568873554468155,
0.0010123956017196178,
-0.01198584958910942,
-0.006259270943701267,
0.0034751230850815773,
0.0539097785949707,
-0.04964694008231163,
0.06396465003490448,
-0.017471080645918846,
-0.0058721983805298805,
-0.048021215945482254,
-0.00787348486483097,
-0.015818415209650993,
-0.018989892676472664,
0.025264164432883263,
0.060636889189481735,
0.006729908287525177,
0.06163385137915611,
0.08146519958972931,
0.00860704854130745,
-0.042499102652072906,
0.025548798963427544,
0.06631750613451004,
-0.015194574370980263,
-0.05639664828777313,
0.022163372486829758,
0.001714637503027916,
-0.010873035527765751,
-0.015993688255548477,
-0.009835178963840008,
0.04429466277360916,
0.053045064210891724,
-0.016142306849360466,
0.008663395419716835,
0.01006276998668909,
-0.01606808789074421,
-0.03273317962884903,
-0.04312721639871597,
-0.010663879103958607,
0.005190194584429264,
-0.021993571892380714,
0.0015150316758081317,
0.04165920987725258,
0.025661665946245193,
0.07003964483737946,
0.04020477458834648,
-0.02481972426176071,
-0.029227109625935555,
0.03759976103901863,
0.011362478137016296,
-0.02209017239511013,
-0.07888137549161911,
-0.02901679091155529,
0.027416884899139404,
0.027441633865237236,
-0.02009979635477066,
-0.053440406918525696,
0.010523294098675251,
0.05464203283190727,
-0.03575127571821213,
0.05565446615219116,
-0.0015116686699911952,
0.03857184201478958,
0.05191288888454437,
0.00013369016232900321,
0.03012910671532154,
0.0009878510609269142,
0.00035347018274478614,
0.009781734086573124,
0.030722299590706825,
-0.008630797266960144,
-0.016072582453489304,
-0.0762375220656395,
0.01602853089570999,
0.021968087181448936,
0.037814054638147354,
0.03872799873352051,
-0.032261621206998825,
-0.04065657779574394,
0.013529322110116482,
0.05526527389883995,
-0.03506304323673248,
0.031021611765027046,
0.03958563879132271,
0.03274870663881302,
-0.04172298684716225,
-0.04134485870599747,
-0.024296725168824196,
-0.013666349463164806,
0.03404334560036659,
-0.015545480884611607,
-0.044960543513298035,
-0.023544231429696083,
0.03412375971674919,
0.00904418621212244,
-0.01737149991095066,
-0.07952377200126648,
0.04697834700345993,
-0.011082611978054047,
-0.00893496721982956,
0.05405445769429207,
0.0429215282201767,
0.011012510396540165,
0.04882729798555374,
0.026625951752066612,
0.030881665647029877,
-0.011493890546262264,
0.05081048980355263,
-0.0456603541970253,
-0.029971959069371223,
0.0020625796169042587,
-0.041584890335798264,
-0.04379960522055626,
-0.01672886125743389,
-0.04876595735549927,
-0.042394932359457016,
-0.03951859846711159,
0.018328169360756874,
0.011318236589431763,
-0.009230074472725391,
-0.01373215764760971,
0.029235199093818665,
-0.019719194620847702,
-0.032152723520994186,
-0.012926578521728516,
-0.028397977352142334,
-0.0494491346180439,
-0.03503989800810814,
0.02889309823513031,
0.022597691044211388,
0.03014424256980419,
0.023921502754092216,
-0.0018203958170488477,
0.008972269482910633,
0.006087868474423885,
-0.02936406247317791,
0.027341550216078758,
-0.011898836120963097,
-0.0001613488420844078,
-0.03255046159029007,
0.019847091287374496,
0.023500222712755203,
0.04456578940153122,
-0.021611005067825317,
0.04348466545343399,
0.031898874789476395,
0.0027941775042563677,
0.00009519528248347342,
0.019579781219363213,
0.02217799797654152,
-0.06345797330141068,
-0.04647725075483322,
0.023546727374196053,
-0.030792919918894768,
0.011322453618049622,
-0.05453047156333923,
-0.004174740053713322,
0.00015531129611190408,
-0.00603799382224679,
0.03424450755119324,
-0.00813707523047924,
-0.021590132266283035,
0.03265870735049248,
-0.020625334233045578,
0.0024311253800988197,
-0.046065572649240494,
0.05133429542183876,
-0.03571609407663345,
0.026826264336705208,
-0.023642100393772125,
0.0009032068774104118,
-0.040245018899440765,
0.041480548679828644,
-0.005493071861565113,
-0.008717887103557587,
0.001208642148412764,
0.06007100269198418,
-0.020675523206591606,
0.026857374235987663,
-0.009338335134088993,
0.01481353398412466,
-0.033804330974817276,
0.08328168839216232,
-0.025958595797419548,
0.02350098453462124,
-0.0329565554857254,
0.007256631273776293,
-0.025821981951594353,
0.008668214082717896,
-0.015134078450500965,
-0.04240822046995163,
0.04502870887517929,
0.07911232113838196,
0.04355185478925705,
0.029996365308761597,
-0.029068386182188988,
-0.006659084465354681,
0.010302325710654259,
-0.05057527869939804,
-0.032342273741960526,
0.009185446426272392,
0.010554324835538864,
-0.007290929090231657,
0.051869288086891174,
0.04243408888578415,
-0.041341278702020645,
-0.06150469928979874,
0.03613173961639404,
0.025124231353402138,
-0.002333406126126647,
-0.01553416345268488,
0.03096790611743927,
0.03250366076827049,
0.036123596131801605,
-0.02505636028945446,
0.009028111584484577,
-0.007176517508924007,
-0.0277913436293602,
0.04788971692323685,
-0.01632012240588665,
0.04010290279984474,
0.016780713573098183,
-0.020062675699591637,
-0.007866399362683296,
0.057422198355197906,
0.03811527416110039,
0.036320529878139496,
-0.006335275713354349,
-0.0434514544904232,
0.026614917442202568,
0.009674240835011005,
-0.0375683531165123,
0.030343063175678253,
0.025773542001843452,
-0.022736039012670517,
0.057509634643793106,
-0.011440107598900795,
0.007000047247856855,
0.05530345439910889,
0.0358709953725338,
-0.014087509363889694,
0.07233704626560211,
-0.0162443146109581,
0.027587201446294785,
0.04918360710144043,
-0.0634879395365715,
-0.0049719237722456455,
-0.0440722294151783,
0.07884782552719116,
-0.06192561611533165,
0.032582443207502365,
0.027565715834498405,
-0.004134879447519779,
0.022637516260147095,
-0.01159689761698246,
-0.04459063336253166,
0.003769126022234559,
-0.05057612806558609,
0.06919154524803162,
0.017178690060973167,
-0.06869649142026901,
0.05825044959783554,
-0.0031514065340161324,
-0.0547783300280571,
0.046739645302295685,
0.02702454663813114,
0.04003920033574104,
0.025322645902633667,
0.02117571420967579,
-0.061343707144260406,
0.010622236877679825,
-0.039666783064603806,
0.05380530655384064,
-0.0462152473628521,
-0.03311710059642792,
0.04326961189508438,
-0.0408872552216053,
-0.022835593670606613,
0.05293697118759155,
0.01129736565053463,
-0.019247982650995255,
0.05547264963388443,
-0.036566294729709625,
-0.020937858149409294,
0.03314044699072838,
0.024495162069797516,
-0.03285590931773186,
0.013955452479422092,
-0.04305705428123474,
0.02278599515557289,
0.016521118581295013,
0.005801578983664513,
-0.013462349772453308,
0.008413445204496384,
0.03735041990876198,
-0.041725944727659225,
-0.045758917927742004,
0.02744356356561184,
-0.011304628103971481,
-0.023540953174233437,
0.027876265347003937,
0.0396508127450943,
0.04552988335490227,
0.006314694415777922,
-0.01065641175955534,
0.045810453593730927,
-0.04439360275864601,
-0.03323282673954964,
0.0007245216402225196,
-0.0011248948285356164,
0.05191930755972862,
-0.003158482490107417,
0.049296312034130096,
0.044083476066589355,
0.017182182520627975,
0.011413779109716415,
-0.019986869767308235,
-0.04178932309150696,
0.03155450150370598,
-0.017551375553011894,
0.020725654438138008,
-0.0017694325651973486,
-0.03406842052936554,
-0.04639218747615814,
-0.015361437574028969,
-0.05138685926795006,
0.02126890979707241,
-0.07463115453720093,
0.008195414207875729,
0.03663373365998268,
-0.007084766868501902,
-0.07738363742828369,
-0.10962739586830139,
-0.021363457664847374,
-0.040392834693193436,
-0.0002543239970691502,
0.02702982723712921,
-0.046872578561306,
0.024894552305340767,
-0.04699402302503586,
-0.06880182027816772,
0.054872605949640274,
0.020173249766230583,
-0.029493145644664764,
0.04655337706208229,
0.04540557786822319,
-0.02834819070994854,
0.0037359450943768024,
0.02521599270403385,
-0.038397498428821564,
0.026623498648405075,
0.022147733718156815,
0.012210872024297714,
0.03212476149201393,
-0.0005000453093089163,
-0.037571292370557785,
-0.017544791102409363,
-0.06288772821426392,
-0.04329580068588257,
-0.04174920544028282,
0.015471769496798515,
0.062198836356401443
] |
BigSalmon/MrLincoln11 | [
"pytorch",
"gpt2",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 9 | 2022-01-12T17:31:01Z | ---
license: apache-2.0
tags:
- generated_from_keras_callback
model-index:
- name: transformers-qa
results: []
---
<!-- This model card has been generated automatically according to the information Keras had access to. You should
probably proofread and complete it, then remove this comment. -->
# transformers-qa
This model is a fine-tuned version of [distilbert-base-cased](https://huggingface.co/distilbert-base-cased) on an unknown dataset.
It achieves the following results on the evaluation set:
- Train Loss: 0.9300
- Validation Loss: 1.1437
- Epoch: 1
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- optimizer: {'name': 'Adam', 'learning_rate': 5e-05, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-07, 'amsgrad': False}
- training_precision: mixed_float16
### Training results
| Train Loss | Validation Loss | Epoch |
|:----------:|:---------------:|:-----:|
| 1.5145 | 1.1500 | 0 |
| 0.9300 | 1.1437 | 1 |
### Framework versions
- Transformers 4.16.0.dev0
- TensorFlow 2.6.0
- Datasets 1.16.2.dev0
- Tokenizers 0.10.3
| [
-0.042128801345825195,
-0.012140287086367607,
-0.011846688576042652,
0.036148324608802795,
0.042713336646556854,
0.014812751673161983,
-0.005377203691750765,
-0.01024684403091669,
-0.050293270498514175,
0.0496344156563282,
0.010581500828266144,
-0.022554729133844376,
0.0037073264829814434,
0.04767429083585739,
-0.02331812120974064,
-0.04305387660861015,
-0.018797576427459717,
-0.007675406988710165,
-0.017230557277798653,
-0.00877737533301115,
-0.0033139819279313087,
-0.016924194991588593,
-0.0007086793193593621,
0.00105523900128901,
-0.0186019204556942,
0.026758061721920967,
-0.008373023942112923,
0.012236041948199272,
0.03347988799214363,
-0.08056312054395676,
0.013331507332623005,
-0.0591893196105957,
-0.04473390802741051,
-0.009262079373002052,
-0.01825052872300148,
0.01156188640743494,
0.00751342112198472,
0.005004572216421366,
0.04018085449934006,
0.04106368124485016,
-0.0011970804771408439,
0.01783641427755356,
-0.010921084322035313,
-0.029716091230511665,
0.05798617750406265,
-0.008142899721860886,
-0.04704226180911064,
-0.00698231253772974,
0.032001644372940063,
-0.014537980780005455,
-0.07185391336679459,
-0.047773007303476334,
-0.040842026472091675,
0.024687176570296288,
-0.03277784585952759,
-0.004986102692782879,
-0.06634346395730972,
-0.01844591461122036,
0.058348361402750015,
-0.04610631242394447,
-0.015967287123203278,
0.03212546557188034,
-0.061594221740961075,
0.03318989276885986,
0.05568728595972061,
-0.01887238584458828,
0.020095862448215485,
-0.025491122156381607,
0.03351699560880661,
-0.01794007234275341,
0.05569633096456528,
-0.026121949777007103,
0.01137493085116148,
-0.0962466225028038,
0.009631671942770481,
-0.007693188264966011,
0.04156118631362915,
0.05319589748978615,
-0.022716348990797997,
0.05337104573845863,
0.02361370623111725,
0.012447342276573181,
0.02937648817896843,
-0.01133633404970169,
0.0031853618565946817,
0.04454391822218895,
-0.05137258768081665,
0.005676062311977148,
0.0033070193603634834,
0.041386786848306656,
-0.04243244230747223,
-0.02385924942791462,
-0.03847382590174675,
-0.028911806643009186,
-0.028276318684220314,
0.030877327546477318,
0.05804750695824623,
-0.007450792472809553,
0.042950958013534546,
0.04183615744113922,
0.03840356692671776,
0.035707782953977585,
-0.014951512217521667,
0.04744236171245575,
-0.0009650571155361831,
-0.026564564555883408,
0.006781730800867081,
-0.01162595022469759,
-0.032121699303388596,
0.02692757174372673,
0.02935250662267208,
-0.03332299366593361,
-0.029353592544794083,
0.03136087954044342,
0.027865499258041382,
-0.00137695437297225,
0.09125163406133652,
-0.01761622168123722,
-0.051479049026966095,
-0.022619348019361496,
0.04411759600043297,
0.017956186085939407,
-0.011988470330834389,
-0.00033099809661507607,
-0.026178184896707535,
-0.015597861260175705,
-0.03397749364376068,
-0.0358460396528244,
-0.00023793414584361017,
0.008895641192793846,
0.015241162851452827,
0.061204567551612854,
0.022650599479675293,
-0.08179211616516113,
0.01158992201089859,
0.027787480503320694,
-0.046292684972286224,
0.04258233681321144,
0.009180176071822643,
0.10000237077474594,
-0.09212516993284225,
-0.06632205843925476,
0.015348464250564575,
0.0010842598276212811,
-0.02410871908068657,
0.023734431713819504,
0.014225611463189125,
-0.036843232810497284,
-0.009371988475322723,
0.00400477834045887,
0.056531377136707306,
-0.06048135831952095,
-0.010537531226873398,
0.05658210441470146,
-0.01289444137364626,
0.043481435626745224,
-0.0415567010641098,
-0.00009158332250081003,
0.010861101560294628,
-0.01660476066172123,
-0.03962487727403641,
0.057604409754276276,
-0.025684434920549393,
0.000028833299438701943,
-0.04138980060815811,
-0.018102316185832024,
0.014239450916647911,
0.08334418386220932,
0.008330538868904114,
-0.01528917159885168,
-0.023903822526335716,
0.02847903035581112,
0.017604559659957886,
0.03183390200138092,
-0.0346633680164814,
0.03141031041741371,
0.03950612619519234,
0.012726168148219585,
-0.008672523312270641,
0.02082209475338459,
0.03175727650523186,
-0.029294446110725403,
-0.03604992479085922,
0.03573901578783989,
-0.0064235166646540165,
-0.050193965435028076,
0.024582473561167717,
0.01455649733543396,
0.0029801754280924797,
-0.038596611469984055,
-0.026559727266430855,
0.04488544911146164,
0.002143682213500142,
0.007896452210843563,
0.018215645104646683,
0.004252624697983265,
-0.01084516104310751,
0.054549310356378555,
-0.01948525384068489,
0.023860175162553787,
-0.03646005317568779,
-0.024152886122465134,
0.04240807890892029,
0.0012735427590087056,
0.025688830763101578,
0.04041358828544617,
-0.013666213490068913,
0.09326241165399551,
-0.028997665271162987,
0.014377630315721035,
-0.04009217768907547,
-0.042298924177885056,
0.02212674356997013,
0.03961053118109703,
0.038822952657938004,
0.03915095701813698,
0.008978729136288166,
-0.06045178323984146,
0.036663081496953964,
0.07569456845521927,
0.03393111750483513,
0.01240016520023346,
-0.021646523848176003,
-0.011776347644627094,
0.029716089367866516,
0.05399315059185028,
-0.051095299422740936,
-0.014683308079838753,
0.01783815398812294,
0.05587714537978172,
0.004752711858600378,
0.03259290009737015,
-0.015947626903653145,
0.035147663205862045,
-0.04841037839651108,
-0.07071244716644287,
0.038261283189058304,
0.03498402237892151,
-0.012396931648254395,
0.041485998779535294,
0.012204424478113651,
0.01599639095366001,
0.005076211411505938,
0.009409903548657894,
-0.0033339092042297125,
-0.03318627551198006,
0.013065184466540813,
0.013846390880644321,
0.04176042228937149,
-0.0629778504371643,
0.03839182108640671,
0.012890520505607128,
0.02167600952088833,
0.045637454837560654,
-0.030462080612778664,
0.03763904049992561,
0.056586891412734985,
0.024679461494088173,
-0.023368913680315018,
0.01808439940214157,
0.010278893634676933,
0.03719436377286911,
0.05285060778260231,
0.0048175291158258915,
0.060549505054950714,
-0.007782374508678913,
0.04440227150917053,
0.07459303736686707,
0.010338960215449333,
0.030077585950493813,
0.03266124427318573,
0.09259045869112015,
0.025227755308151245,
-0.017143113538622856,
0.033446501940488815,
-0.053081609308719635,
0.03199148550629616,
-0.03552909195423126,
0.014712309464812279,
-0.015005765482783318,
-0.004690591711550951,
0.043739717453718185,
0.02105635032057762,
-0.017661552876234055,
-0.004803281743079424,
-0.022833826020359993,
-0.014831434935331345,
0.03248767554759979,
0.00419265404343605,
-0.008674516342580318,
-0.011533737182617188,
-0.015437157824635506,
-0.030700713396072388,
-0.07694041728973389,
-0.03329675644636154,
-0.027273831889033318,
-0.03676539286971092,
-0.026598043739795685,
-0.07076805084943771,
-0.015720050781965256,
-0.0839582309126854,
-0.035699449479579926,
0.04736560583114624,
-0.00580491591244936,
-0.009657562710344791,
-0.06524625420570374,
0.00737607991322875,
-0.038374532014131546,
-0.03720250353217125,
-0.058632127940654755,
-0.042915716767311096,
-0.040905289351940155,
-0.07766062766313553,
0.03991660475730896,
0.02428111620247364,
-0.002221830189228058,
0.006323865614831448,
0.002564017428085208,
-0.009501426480710506,
-0.021384283900260925,
0.05218341574072838,
0.04484029859304428,
-0.02525612898170948,
-0.05394359305500984,
0.032441653311252594,
-0.021128065884113312,
0.023694727569818497,
-0.006361874286085367,
-0.026844153180718422,
0.10793289542198181,
0.061365287750959396,
0.01935146562755108,
0.01517612673342228,
-0.022954043000936508,
-0.05162584409117699,
-0.05942223221063614,
-0.029952701181173325,
-0.014832358807325363,
-0.01726987026631832,
-0.037315428256988525,
-0.05234433710575104,
-0.018921062350273132,
-0.03384051099419594,
-0.00027430959744378924,
0.010213932022452354,
0.02572621963918209,
0.03032783977687359,
0.058461494743824005,
0.0284731388092041,
0.02713785134255886,
-0.021408535540103912,
-0.04183283448219299,
0.058370910584926605,
0.009637956507503986,
0.009351341985166073,
-0.09467757493257523,
-0.029914358630776405,
0.041040513664484024,
0.026375779882073402,
0.018124153837561607,
-0.009707709774374962,
0.062453921884298325,
-0.025190500542521477,
0.0003759675018955022,
0.035336606204509735,
-0.011549320071935654,
-0.014360022731125355,
0.0036745050456374884,
-0.0052367025054991245,
-0.03481763228774071,
-0.06046687811613083,
-0.026861032471060753,
0.0005996330874040723,
0.051834795624017715,
-0.059361640363931656,
-0.05474340543150902,
-0.03527551144361496,
0.04608948156237602,
0.03079991601407528,
-0.0018485374748706818,
-0.046360764652490616,
-0.002007249044254422,
-0.061401352286338806,
-0.02630431391298771,
0.04841206222772598,
0.03317558392882347,
0.002931978553533554,
0.03841789811849594,
0.006034904159605503,
-0.029119325801730156,
0.03501489385962486,
0.04536815732717514,
0.06923512369394302,
0.010240158066153526,
-0.05764714255928993,
-0.005289629101753235,
-0.019756287336349487,
0.026514582335948944,
-0.0006304134149104357,
-0.01228804886341095,
-0.02387910708785057,
-0.09983161836862564,
-0.023044664412736893,
0.019847117364406586,
-0.012496337294578552,
-0.0005794799071736634,
0.032006457448005676,
0.006047363858669996,
-0.033330533653497696,
0.008455458097159863,
0.011237162165343761,
0.05574652925133705,
-0.030523478984832764,
0.046633899211883545,
-0.01202760823071003,
0.031049082055687904,
-0.039967115968465805,
0.015216647647321224,
-0.010947274044156075,
-0.0068708122707903385,
0.009528780356049538,
0.058067675679922104,
0.012636087834835052,
0.054937444627285004,
0.0783657506108284,
0.018639586865901947,
-0.04434935748577118,
0.03485328331589699,
0.06826459616422653,
-0.03502212464809418,
-0.028543829917907715,
0.02229345217347145,
-0.014143715612590313,
-0.03123258799314499,
-0.011838668957352638,
-0.02105037495493889,
0.0513947419822216,
0.06057790294289589,
0.014789127744734287,
0.011769426986575127,
0.006759642623364925,
-0.0013561839004978538,
-0.03306465223431587,
-0.043115340173244476,
-0.005550229921936989,
0.018476007506251335,
-0.025890490040183067,
0.010462628677487373,
0.03957486152648926,
0.017073605209589005,
0.06113221123814583,
0.021370183676481247,
-0.025437859818339348,
-0.0329744890332222,
0.03779863193631172,
0.014993266202509403,
-0.044766537845134735,
-0.07079386711120605,
-0.052189454436302185,
0.04068639874458313,
0.03656129911541939,
-0.03015931323170662,
-0.062400393187999725,
0.0005341584328562021,
0.04304130747914314,
-0.040080707520246506,
0.06531298160552979,
-0.021934857591986656,
0.02620733343064785,
0.06271552294492722,
-0.024951210245490074,
0.03232259303331375,
-0.03125618398189545,
-0.015298798680305481,
-0.0035399110056459904,
0.05186467617750168,
-0.011822869069874287,
-0.03283566236495972,
-0.06712108105421066,
0.0012162730563431978,
0.04525437578558922,
0.043634478002786636,
0.04522400721907616,
-0.022904876619577408,
-0.046682845801115036,
0.007917705923318863,
0.03055555373430252,
-0.03856169432401657,
0.019939018413424492,
0.03207254782319069,
0.023050114512443542,
-0.058938514441251755,
-0.027766361832618713,
-0.017047129571437836,
-0.01773097738623619,
0.018177224323153496,
0.0008090858464129269,
-0.03806360065937042,
-0.03731755539774895,
0.04426195099949837,
-0.021719548851251602,
-0.029549788683652878,
-0.07042308151721954,
0.06986365467309952,
0.010068348608911037,
-0.009971007704734802,
0.058744680136442184,
0.03163328021764755,
0.021165398880839348,
0.05586553364992142,
-0.001588517683558166,
0.020598789677023888,
-0.03275810182094574,
0.060735512524843216,
-0.043884385377168655,
-0.042648591101169586,
-0.00544391805306077,
-0.03902845084667206,
-0.01605159416794777,
-0.01573052629828453,
-0.052978478372097015,
-0.0354771614074707,
-0.026272457093000412,
0.022604450583457947,
0.0020377577748149633,
-0.003702946472913027,
-0.010601220652461052,
0.051352594047784805,
-0.03646865114569664,
-0.038702405989170074,
-0.04703158885240555,
-0.03793056681752205,
-0.07166671007871628,
-0.04545134678483009,
0.00961233302950859,
0.013841037638485432,
0.028893761336803436,
0.028322579339146614,
0.005438799038529396,
0.011431131511926651,
-0.016387294977903366,
-0.047468334436416626,
0.00850328803062439,
-0.000464662880403921,
-0.014443394728004932,
-0.038311634212732315,
0.037167828530073166,
0.019333936274051666,
0.03868517279624939,
-0.024413397535681725,
0.030843239277601242,
0.012774355709552765,
0.0047935680486261845,
-0.025830570608377457,
0.013196095824241638,
0.02039530500769615,
-0.06354499608278275,
-0.03234958276152611,
-0.009978637099266052,
-0.037232689559459686,
0.020974382758140564,
-0.01685982756316662,
-0.01839422807097435,
-0.0039565409533679485,
0.019010310992598534,
0.038280293345451355,
-0.010953226126730442,
-0.014845775440335274,
0.02817292883992195,
-0.030301418155431747,
0.020247187465429306,
-0.0489211305975914,
0.06408960372209549,
-0.019312668591737747,
0.024575242772698402,
-0.012742279097437859,
0.006089084781706333,
-0.05128178000450134,
0.046202223747968674,
-0.028567887842655182,
-0.03030329942703247,
-0.01595318876206875,
0.05773553252220154,
-0.03601539134979248,
0.037540268152952194,
-0.006253235973417759,
0.022817716002464294,
-0.048946913331747055,
0.05854800343513489,
-0.03187599778175354,
0.029994692653417587,
-0.022587338462471962,
0.017094340175390244,
-0.021111179143190384,
0.0038078194484114647,
-0.005007266066968441,
-0.020125510171055794,
0.01880524307489395,
0.056816961616277695,
0.02804766781628132,
0.022931313142180443,
-0.0022218208760023117,
-0.0019233990460634232,
0.017711646854877472,
-0.04875564202666283,
-0.017047036439180374,
0.004930946510285139,
0.005454732570797205,
-0.0075180139392614365,
0.05792774260044098,
0.029217764735221863,
-0.04090406000614166,
-0.07531334459781647,
0.0378764383494854,
0.008808791637420654,
-0.0035884070675820112,
0.010145456530153751,
0.022166069597005844,
0.03561469539999962,
0.03954090178012848,
-0.006377202458679676,
0.0012094787089154124,
-0.01126333698630333,
-0.046883124858140945,
0.03729201480746269,
-0.01650906354188919,
0.03376011550426483,
-0.00935317948460579,
-0.036005064845085144,
-0.015103618614375591,
0.06479105353355408,
0.017888905480504036,
0.03423111513257027,
-0.016324283555150032,
-0.04182197153568268,
0.03458490967750549,
0.0023796791210770607,
-0.03077945113182068,
0.01205806527286768,
0.0030858595855534077,
-0.041251737624406815,
0.07299912720918655,
0.007754175923764706,
0.0009421619470231235,
0.03810984268784523,
0.03531210497021675,
-0.010810192674398422,
0.08277970552444458,
-0.014588946476578712,
-0.00530629837885499,
0.03337031602859497,
-0.048271629959344864,
-0.029699351638555527,
-0.03130970895290375,
0.0668371170759201,
-0.04780379682779312,
0.03262462839484215,
0.02232482098042965,
-0.0024160395842045546,
0.021044617518782616,
-0.037054404616355896,
-0.05991797894239426,
0.008400584571063519,
-0.06487265974283218,
0.06428930163383484,
-0.0001855881419032812,
-0.06549451500177383,
0.04607142508029938,
0.03434859216213226,
-0.07477652281522751,
0.030249623581767082,
0.03210294991731644,
0.0457705482840538,
0.03147226199507713,
0.04411286488175392,
-0.05580255389213562,
0.008258562535047531,
-0.03421172872185707,
0.018293485045433044,
-0.03864847123622894,
-0.01424948126077652,
0.042887404561042786,
-0.027090320363640785,
-0.028291719034314156,
0.028086885809898376,
0.004183162469416857,
-0.009690419770777225,
0.03567779064178467,
-0.061766985803842545,
-0.014708259142935276,
0.006127308122813702,
0.020011616870760918,
-0.04352395609021187,
0.0470331609249115,
-0.04740801826119423,
0.025259923189878464,
0.014559267088770866,
0.004224743694067001,
-0.015439901500940323,
0.016197171062231064,
0.02737579308450222,
-0.049574777483940125,
-0.040000587701797485,
0.02600872330367565,
-0.018747810274362564,
-0.032443031668663025,
0.03210610896348953,
0.004060766659677029,
0.0311924796551466,
0.014017250388860703,
0.0025571470614522696,
0.004339176695793867,
-0.04140857979655266,
-0.006114202085882425,
0.0038727421779185534,
-0.005406720098108053,
0.04160642996430397,
0.0060344841331243515,
0.034434206783771515,
0.04606900364160538,
0.01083152461796999,
-0.01907181367278099,
-0.03558088839054108,
-0.03796306625008583,
0.04408116638660431,
-0.012798071838915348,
0.006603891029953957,
0.0007130910526029766,
-0.03740524500608444,
-0.037649430334568024,
-0.012786845676600933,
-0.040366917848587036,
0.03304676339030266,
-0.05299389734864235,
0.01219571940600872,
0.037643980234861374,
-0.015071297064423561,
-0.05925675854086876,
-0.09686599671840668,
-0.017100568860769272,
-0.047863297164440155,
-0.007038876414299011,
0.06559200584888458,
-0.048663053661584854,
0.027097610756754875,
-0.07758995145559311,
-0.05332282558083534,
0.059899598360061646,
0.04510826990008354,
-0.04000188410282135,
0.05972793698310852,
0.029432199895381927,
-0.03545904532074928,
0.010224036872386932,
0.013242207467556,
-0.05456274002790451,
0.010079607367515564,
0.006920283660292625,
0.01721116155385971,
0.03593086078763008,
0.020669106394052505,
-0.03557782992720604,
-0.029141321778297424,
-0.07016715407371521,
-0.038155898451805115,
-0.06246570125222206,
0.006107100285589695,
0.06751439720392227
] |
BigSalmon/MrLincoln13 | [
"pytorch",
"gpt2",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 9 | 2022-02-05T18:29:10Z | ---
title: CLIP-Guided-Diffusion
emoji: 💩
colorFrom: purple
colorTo: red
sdk: gradio
app_file: app.py
pinned: false
---
# Configuration
`title`: _string_
Display title for the Space
`emoji`: _string_
Space emoji (emoji-only character allowed)
`colorFrom`: _string_
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
`colorTo`: _string_
Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
`sdk`: _string_
Can be either `gradio` or `streamlit`
`app_file`: _string_
Path to your main application file (which contains either `gradio` or `streamlit` Python code).
Path is relative to the root of the repository.
`pinned`: _boolean_
Whether the Space stays on top of your list. | [
-0.007046781945973635,
-0.016399500891566277,
-0.019927673041820526,
0.03295579552650452,
0.07186004519462585,
-0.0006996674928814173,
0.013359890319406986,
0.024193625897169113,
-0.015037458389997482,
0.0374155193567276,
0.01686088927090168,
0.005306263454258442,
0.050159938633441925,
0.02939831279218197,
-0.018784837797284126,
-0.039704352617263794,
-0.05477025732398033,
-0.008569934405386448,
-0.021243596449494362,
0.008330263197422028,
0.03753726929426193,
-0.008231553249061108,
0.0177425816655159,
0.03485200181603432,
0.012706266716122627,
0.014462522231042385,
0.00464215874671936,
-0.03949926421046257,
0.051512591540813446,
-0.05698497220873833,
0.0071195377968251705,
-0.012906420044600964,
-0.017293214797973633,
-0.01949799805879593,
-0.047070469707250595,
0.0065881842747330666,
0.03351784497499466,
0.003936718218028545,
-0.009871908463537693,
0.031315162777900696,
-0.014948558993637562,
0.0002426139690214768,
-0.0071430932730436325,
-0.03332012891769409,
0.05930290371179581,
0.00958928745239973,
-0.009039029479026794,
-0.002886194037273526,
0.03548601269721985,
-0.013144416734576225,
-0.06869161874055862,
-0.0673365518450737,
-0.04452862963080406,
-0.006155553739517927,
0.004265978932380676,
-0.018087325617671013,
-0.0833854153752327,
0.0001302689779549837,
0.04769931361079216,
-0.04786631092429161,
-0.050576068460941315,
0.018123192712664604,
-0.06435167789459229,
-0.004576853942126036,
0.00817541778087616,
-0.029805267229676247,
0.020464997738599777,
-0.023594237864017487,
0.02012723870575428,
-0.025928044691681862,
0.0364307276904583,
-0.0717715173959732,
0.005777727346867323,
-0.0699615329504013,
-0.0346878282725811,
-0.011628961190581322,
0.0317363403737545,
0.0453067384660244,
-0.03545615077018738,
0.0565846748650074,
-0.026271110400557518,
0.01866856962442398,
0.03742169588804245,
-0.011435704305768013,
-0.0230263639241457,
0.05579126253724098,
-0.034526530653238297,
0.016860229894518852,
0.002173486864194274,
0.06637589633464813,
-0.046473681926727295,
-0.07217768579721451,
-0.03149733692407608,
-0.044993702322244644,
0.0008111681090667844,
0.04153844714164734,
0.04199913889169693,
-0.005686623044312,
0.01667070761322975,
0.040022145956754684,
0.019202223047614098,
0.05672592669725418,
0.008825779892504215,
0.03145938366651535,
0.008442793972790241,
0.005010651890188456,
-0.03474809229373932,
-0.030369730666279793,
-0.08573254197835922,
0.029460182413458824,
0.01861940696835518,
-0.022374311462044716,
-0.015530901029706001,
0.04484502598643303,
-0.02131195366382599,
-0.014061259105801582,
0.03759240359067917,
-0.025975795462727547,
-0.028872322291135788,
-0.052625417709350586,
0.05619100108742714,
0.05207034572958946,
-0.01238374225795269,
0.005421591456979513,
-0.002818777458742261,
0.033110037446022034,
-0.04572292044758797,
-0.011622789315879345,
-0.04136909171938896,
0.019495265558362007,
0.0024779639206826687,
0.06009170785546303,
0.008387699723243713,
-0.052636049687862396,
-0.004850027151405811,
0.008827279321849346,
-0.05671251565217972,
0.03326527029275894,
0.016374099999666214,
0.06880412250757217,
-0.08723480999469757,
-0.053284723311662674,
0.01708545722067356,
0.03122333250939846,
-0.030434604734182358,
-0.011251487769186497,
0.0005141504807397723,
-0.05260050296783447,
-0.037996556609869,
-0.01467967126518488,
0.0370890349149704,
-0.01267863716930151,
-0.047030285000801086,
0.04482360556721687,
-0.013753809966146946,
0.020752936601638794,
-0.046774398535490036,
-0.008466709405183792,
0.0022614654153585434,
-0.00959810335189104,
-0.034723758697509766,
0.01799377053976059,
-0.020257441326975822,
-0.07952157407999039,
-0.03487532585859299,
-0.019090017303824425,
0.00212310254573822,
0.08998677879571915,
-0.018931230530142784,
-0.025711771100759506,
-0.036194752901792526,
0.010088164359331131,
-0.005060454364866018,
0.027262672781944275,
0.004747939296066761,
0.013517049141228199,
0.06717942655086517,
0.06993833929300308,
-0.05159616470336914,
0.03564313426613808,
0.0016708077164366841,
-0.024835757911205292,
-0.04883924871683121,
0.019618632271885872,
0.006829013116657734,
-0.00893319956958294,
0.011619079858064651,
0.03277921304106712,
-0.005629554856568575,
-0.04039427265524864,
-0.0006085596396587789,
0.07743971049785614,
-0.005147317890077829,
-0.046826574951410294,
0.00642854580655694,
-0.00018562823242973536,
0.0003686342388391495,
0.038195669651031494,
-0.0582071952521801,
-0.031089184805750847,
-0.03228383883833885,
0.009447329677641392,
0.01265063788741827,
0.0022268234752118587,
0.033265937119722366,
-0.006037435494363308,
0.01173391006886959,
0.10650376975536346,
-0.035733696073293686,
0.024463146924972534,
-0.06220574304461479,
-0.08072967082262039,
-0.004185558762401342,
0.05094806104898453,
0.06162559986114502,
0.041489213705062866,
-0.01032242737710476,
-0.029062867164611816,
0.012468916364014149,
0.04822699725627899,
0.023259757086634636,
-0.01352784689515829,
-0.02685217186808586,
0.007404550444334745,
0.04811227321624756,
0.046680301427841187,
-0.01157686859369278,
-0.043408170342445374,
0.05284377187490463,
0.02742583118379116,
-0.019459888339042664,
-0.012502292171120644,
-0.01628955453634262,
0.024766309186816216,
-0.05550519749522209,
-0.059780318289995193,
0.049197856336832047,
0.01494327001273632,
0.01775996945798397,
0.002436016220599413,
-0.0008611378143541515,
-0.003984274808317423,
0.0029883128590881824,
0.015555457212030888,
0.04409531131386757,
-0.0416710190474987,
0.03355550393462181,
0.04100446775555611,
0.05670677870512009,
-0.03632049635052681,
0.05310945212841034,
-0.0015018960693851113,
0.01993526704609394,
0.017114700749516487,
-0.0330098420381546,
0.030793022364377975,
0.038877975195646286,
0.036102429032325745,
-0.025860916823148727,
0.040095292031764984,
0.029681773856282234,
-0.004971151240170002,
0.05564219504594803,
-0.0025057813618332148,
0.0530652292072773,
-0.03141782432794571,
0.027579881250858307,
0.06617555022239685,
0.005879862699657679,
0.020875103771686554,
0.02913736179471016,
0.04442582651972771,
-0.026629049330949783,
-0.006079646293073893,
0.06853087991476059,
-0.08813472092151642,
0.006231998093426228,
-0.011621404439210892,
0.007843523286283016,
-0.0037616656627506018,
-0.002589636016637087,
0.026080410927534103,
0.008268201723694801,
-0.04825403913855553,
-0.001387844909913838,
0.021931275725364685,
0.026117276400327682,
0.030698496848344803,
-0.05673089623451233,
-0.01582283340394497,
-0.022987043485045433,
-0.022648194804787636,
0.007332958281040192,
-0.07053811848163605,
-0.0661696121096611,
-0.04836301878094673,
-0.026383820921182632,
0.03000963106751442,
-0.056663788855075836,
-0.033449191600084305,
-0.07738329470157623,
0.010008216835558414,
0.049735285341739655,
0.018362613394856453,
-0.0072288233786821365,
-0.03024780936539173,
0.024258697405457497,
-0.02406778186559677,
-0.036830835044384,
-0.05515586584806442,
-0.029498571529984474,
-0.03322770074009895,
-0.08304440975189209,
0.02827163226902485,
0.017532894387841225,
0.03970028832554817,
0.021868692710995674,
-0.0034778236877173185,
-0.057116877287626266,
-0.03668946400284767,
0.07508062571287155,
0.023494379594922066,
-0.01798889972269535,
-0.037856459617614746,
0.012887915596365929,
-0.005454595200717449,
0.005792408250272274,
0.020692890509963036,
-0.05156790837645531,
0.07797877490520477,
0.06098855286836624,
-0.0012539118761196733,
0.0045361327938735485,
0.035299986600875854,
-0.031067797914147377,
-0.02836873009800911,
-0.04543755576014519,
-0.04393630102276802,
-0.02620135247707367,
-0.03405401110649109,
-0.045009274035692215,
-0.050724517554044724,
-0.061562247574329376,
0.006983950734138489,
-0.015345068648457527,
-0.005541869439184666,
0.014207350090146065,
0.04355250298976898,
0.055497780442237854,
0.055365290492773056,
-0.03665311262011528,
-0.045134954154491425,
0.03558528795838356,
-0.003763764863833785,
-0.024526163935661316,
-0.07879120111465454,
-0.04491150751709938,
0.012370388954877853,
-0.017472850158810616,
-0.030861347913742065,
-0.014028051868081093,
0.058707550168037415,
0.02883250266313553,
-0.016055697575211525,
0.01083856076002121,
-0.0221650842577219,
0.01481570117175579,
-0.008207350037992,
-0.007443375885486603,
-0.031083030626177788,
-0.016005748882889748,
0.005328057799488306,
-0.027289090678095818,
0.03300156444311142,
-0.06600441038608551,
-0.07569523900747299,
-0.01895744353532791,
0.020996198058128357,
0.01769469678401947,
-0.005372168961912394,
-0.05509785935282707,
-0.009699607267975807,
-0.08410990238189697,
0.004950409289449453,
0.028047939762473106,
-0.017084624618291855,
0.018780143931508064,
0.06394251435995102,
0.00697124982252717,
0.0017438108334317803,
0.0212738998234272,
0.015266157686710358,
0.017272820696234703,
0.004313926212489605,
-0.025004440918564796,
0.0352194644510746,
-0.02444632723927498,
0.04520783945918083,
0.0011357283219695091,
-0.010501109063625336,
0.003809082554653287,
-0.09050759673118591,
-0.016874119639396667,
0.015887491405010223,
0.030349718406796455,
0.0008719735196791589,
0.020052030682563782,
-0.03922763094305992,
-0.04367928206920624,
0.00906665250658989,
-0.012927704490721226,
0.053210802376270294,
-0.05098700895905495,
0.0770052894949913,
-0.02568524144589901,
0.055308401584625244,
-0.02525436505675316,
-0.008450762368738651,
-0.025794439017772675,
-0.01514645665884018,
0.021548910066485405,
0.05282505974173546,
-0.0023353123106062412,
0.02632826752960682,
0.05167928338050842,
0.025056222453713417,
-0.020942898467183113,
0.062255579978227615,
0.02833183854818344,
0.008887973614037037,
-0.04012461379170418,
0.028134671971201897,
0.0025377636775374413,
0.006384395062923431,
0.002136384602636099,
0.008418891578912735,
0.024985678493976593,
0.024116894230246544,
-0.015105398371815681,
0.03218995779752731,
0.006506923120468855,
-0.050577014684677124,
-0.03140661120414734,
-0.05333727225661278,
-0.011004096828401089,
-0.004351564683020115,
0.0033983883913606405,
-0.017846236005425453,
0.050881221890449524,
-0.01623176410794258,
0.05685718357563019,
0.027522824704647064,
-0.016663918271660805,
-0.07104610651731491,
0.04308508336544037,
0.033090852200984955,
-0.036669183522462845,
-0.08088446408510208,
-0.022762443870306015,
0.01379938330501318,
0.03994709625840187,
0.018098777160048485,
-0.053166620433330536,
0.03663969784975052,
0.050201695412397385,
-0.03650288283824921,
0.06434676796197891,
0.0582449845969677,
0.03244342654943466,
0.0485137477517128,
0.0020711079705506563,
0.028105156496167183,
-0.0038206300232559443,
0.0024638965260237455,
-0.030947260558605194,
0.040573060512542725,
-0.01934380643069744,
-0.041932281106710434,
-0.021490996703505516,
0.03712150827050209,
0.024085190147161484,
0.003912334330379963,
0.05056307092308998,
-0.04491918906569481,
-0.05475963279604912,
-0.00934713613241911,
0.04743596911430359,
-0.029577983543276787,
0.03859608620405197,
0.034120798110961914,
0.032338451594114304,
-0.039868179708719254,
-0.031103041023015976,
-0.0023326894734054804,
-0.022679748013615608,
0.038635119795799255,
-0.018941055983304977,
-0.03723463788628578,
-0.04150945320725441,
0.03789182007312775,
0.034806180745363235,
-0.05237741023302078,
-0.0906868502497673,
0.015158361755311489,
-0.004555280786007643,
-0.03124755620956421,
0.08350721001625061,
-0.0008281536283902824,
0.051291659474372864,
0.05623236298561096,
0.021618880331516266,
0.030253704637289047,
-0.044816188514232635,
0.06147076562047005,
-0.044583044946193695,
-0.021579846739768982,
-0.007188808638602495,
-0.020409727469086647,
-0.04387827217578888,
-0.006033459212630987,
-0.0728493332862854,
-0.029815372079610825,
-0.021121229976415634,
0.040153808891773224,
0.02002907358109951,
-0.030165277421474457,
0.015678804367780685,
0.001492712297476828,
-0.006512838881462812,
-0.035736676305532455,
-0.0479784794151783,
-0.04032695293426514,
-0.05976749584078789,
-0.04061514511704445,
0.022179407998919487,
0.009089453145861626,
0.032049376517534256,
-0.002070935210213065,
0.025263870134949684,
0.04327234625816345,
0.019297176972031593,
-0.005330878775566816,
0.04926585406064987,
0.031241552904248238,
-0.027058998122811317,
-0.022576050832867622,
0.006927166134119034,
0.023054691031575203,
0.02133568935096264,
-0.005367851350456476,
0.03061560168862343,
-0.0013432742562144995,
-0.012344377115368843,
-0.0342826284468174,
0.04061261937022209,
0.007117745000869036,
-0.027826381847262383,
-0.03398213908076286,
-0.0025631478056311607,
-0.017893357202410698,
0.0328030101954937,
-0.04392295703291893,
-0.034331876784563065,
0.01339372806251049,
0.030289610847830772,
0.046379223465919495,
-0.030174894258379936,
-0.02431344799697399,
0.029660139232873917,
-0.03390148654580116,
0.014540713280439377,
-0.06736612319946289,
0.0067724063992500305,
-0.007230811752378941,
-0.023496905341744423,
-0.018345655873417854,
0.03756587207317352,
-0.030851896852254868,
0.07168613374233246,
-0.009320437908172607,
-0.0021987713407725096,
-0.01669757440686226,
0.00607102969661355,
-0.01911807432770729,
0.06843771040439606,
-0.009963853284716606,
0.012617095373570919,
-0.046572811901569366,
0.03142441064119339,
-0.0617375522851944,
-0.004103849176317453,
-0.02957160584628582,
-0.01318325288593769,
-0.013871759176254272,
-0.016487838700413704,
-0.02745293639600277,
-0.03411990404129028,
0.012878833338618279,
0.059845805168151855,
-0.02500702440738678,
-0.01967303454875946,
-0.012213682755827904,
0.002486281096935272,
0.031164783984422684,
-0.07460407167673111,
-0.03666219487786293,
0.00006723239494021982,
-0.013499549590051174,
0.002109495224431157,
0.026237957179546356,
0.04196863994002342,
-0.0654711127281189,
-0.031358227133750916,
0.05144962668418884,
0.026473714038729668,
0.009607026353478432,
-0.001567647559568286,
0.029834430664777756,
0.052986156195402145,
0.038114264607429504,
-0.04807903990149498,
-0.004530442412942648,
0.0030310999136418104,
0.012861817143857479,
0.021738728508353233,
-0.014159522950649261,
0.04511864483356476,
-0.007433475460857153,
-0.011124354787170887,
-0.01169505249708891,
0.10614340007305145,
0.0611908920109272,
0.01997290551662445,
-0.000048272318963427097,
-0.06287341564893723,
0.03444899618625641,
-0.01732613518834114,
-0.02390185557305813,
0.0190002229064703,
0.009818541817367077,
-0.024253934621810913,
0.0652940571308136,
-0.014045757241547108,
0.011473631486296654,
0.03361133113503456,
0.03385753557085991,
-0.007035663351416588,
0.07407518476247787,
-0.032368287444114685,
0.027518589049577713,
0.040486741811037064,
-0.035522785037755966,
0.004451349377632141,
-0.043406255543231964,
0.045666225254535675,
-0.0627189502120018,
0.06096521392464638,
-0.009336358867585659,
-0.012266287580132484,
0.04102438688278198,
-0.011127169243991375,
-0.06512630730867386,
0.06521791219711304,
-0.04267152026295662,
0.05272974073886871,
0.0028658288065344095,
-0.06530208140611649,
0.060951199382543564,
0.017941920086741447,
-0.07405691593885422,
0.01255696453154087,
0.07274633646011353,
-0.020641785115003586,
0.04036889225244522,
0.06362298130989075,
-0.03525596484541893,
0.01498932670801878,
-0.018093515187501907,
0.039996176958084106,
-0.044912002980709076,
-0.03536418080329895,
0.0033861645497381687,
-0.01156096812337637,
-0.016087282449007034,
0.029968347400426865,
0.012193766422569752,
0.015841295942664146,
0.024782694876194,
-0.04989902302622795,
-0.019348645582795143,
0.006506253499537706,
0.04010029137134552,
-0.0034322980791330338,
-0.014997588470578194,
-0.0019480891060084105,
0.022187305614352226,
0.016436848789453506,
0.02174019254744053,
-0.001321924850344658,
0.031550370156764984,
0.024438468739390373,
-0.0851701945066452,
-0.04646602272987366,
0.03816492483019829,
0.005356095731258392,
-0.0390937440097332,
0.032226186245679855,
0.022113583981990814,
0.043678853660821915,
0.007170173339545727,
-0.027244163677096367,
-0.016217874363064766,
-0.04249497130513191,
-0.005071188788861036,
0.0011580204591155052,
0.010470760054886341,
0.007412608712911606,
-0.012084757909178734,
0.02687736041843891,
0.04653635993599892,
0.036554645746946335,
-0.00020326959202066064,
0.0019429991953074932,
-0.016451818868517876,
0.000781795650254935,
-0.04120183363556862,
0.028669238090515137,
0.009050938300788403,
-0.05376942828297615,
-0.05213429406285286,
0.0065444158390164375,
0.010935330763459206,
0.06747390329837799,
-0.0330122746527195,
0.01118125393986702,
0.03239478915929794,
-0.013387618586421013,
-0.049106232821941376,
-0.08309613913297653,
-0.05213131755590439,
-0.013871688395738602,
0.05268483608961105,
0.05459288880228996,
-0.029613761231303215,
0.021795185282826424,
-0.013487128540873528,
-0.028099538758397102,
0.03563960641622543,
0.029044294729828835,
-0.06093917414546013,
0.030791299417614937,
0.06612887233495712,
-0.028321167454123497,
0.04677365720272064,
-0.0070057581178843975,
-0.020579105243086815,
0.02140357345342636,
0.009321032091975212,
0.02333289198577404,
0.0204476248472929,
0.008307481184601784,
-0.01221513096243143,
-0.01279319915920496,
0.0007470946293324232,
-0.008557459339499474,
-0.015917791053652763,
0.027454061433672905,
0.05639816075563431
] |
BigSalmon/NEO125InformalToFormalLincoln | [
"pytorch",
"gpt_neo",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPTNeoForCausalLM"
],
"model_type": "gpt_neo",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 8 | null | ---
license: apache-2.0
tags:
- automatic-speech-recognition
- NbAiLab/NPSC
- generated_from_trainer
model-index:
- name: ''
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
#
This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the NBAILAB/NPSC - 16K_MP3 dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1957
- Wer: 0.1697
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 7.5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 2000
- num_epochs: 20.0
- mixed_precision_training: Native AMP
### Training results
| Training Loss | Epoch | Step | Validation Loss | Wer |
|:-------------:|:-----:|:-----:|:---------------:|:------:|
| 4.4527 | 0.28 | 250 | 4.0144 | 1.0 |
| 3.1828 | 0.56 | 500 | 3.1369 | 1.0 |
| 2.9927 | 0.85 | 750 | 3.0183 | 1.0 |
| 2.9591 | 1.13 | 1000 | 2.9991 | 1.0 |
| 2.8989 | 1.41 | 1250 | 2.9000 | 1.0000 |
| 2.4286 | 1.69 | 1500 | 1.7688 | 0.9550 |
| 1.6765 | 1.98 | 1750 | 0.6842 | 0.4855 |
| 1.4521 | 2.26 | 2000 | 0.5096 | 0.3736 |
| 1.3589 | 2.54 | 2250 | 0.4479 | 0.3335 |
| 1.3136 | 2.82 | 2500 | 0.4056 | 0.3123 |
| 1.2856 | 3.11 | 2750 | 0.3870 | 0.2987 |
| 1.2283 | 3.39 | 3000 | 0.3646 | 0.2828 |
| 1.2053 | 3.67 | 3250 | 0.3499 | 0.2748 |
| 1.2087 | 3.95 | 3500 | 0.3345 | 0.2603 |
| 1.2002 | 4.24 | 3750 | 0.3320 | 0.2523 |
| 1.1383 | 4.52 | 4000 | 0.3117 | 0.2439 |
| 1.1364 | 4.8 | 4250 | 0.3198 | 0.2383 |
| 1.158 | 5.08 | 4500 | 0.3071 | 0.2342 |
| 1.108 | 5.37 | 4750 | 0.3011 | 0.2314 |
| 1.1025 | 5.65 | 5000 | 0.2875 | 0.2289 |
| 1.0697 | 5.93 | 5250 | 0.2926 | 0.2256 |
| 1.0904 | 6.21 | 5500 | 0.2695 | 0.2245 |
| 1.0802 | 6.5 | 5750 | 0.2602 | 0.2189 |
| 1.0882 | 6.78 | 6000 | 0.2603 | 0.2168 |
| 1.0881 | 7.06 | 6250 | 0.2540 | 0.2293 |
| 1.0378 | 7.34 | 6500 | 0.2614 | 0.2193 |
| 1.0397 | 7.63 | 6750 | 0.2707 | 0.2104 |
| 1.0296 | 7.91 | 7000 | 0.2483 | 0.2119 |
| 1.0249 | 8.19 | 7250 | 0.2483 | 0.2047 |
| 1.013 | 8.47 | 7500 | 0.2487 | 0.2042 |
| 1.0064 | 8.76 | 7750 | 0.2456 | 0.2016 |
| 1.0668 | 9.04 | 8000 | 0.2397 | 0.1995 |
| 1.0129 | 9.32 | 8250 | 0.2374 | 0.1994 |
| 1.0164 | 9.6 | 8500 | 0.2206 | 0.1992 |
| 0.975 | 9.89 | 8750 | 0.2247 | 0.1973 |
| 0.9849 | 10.17 | 9000 | 0.2325 | 0.1953 |
| 0.9826 | 10.45 | 9250 | 0.2301 | 0.1934 |
| 0.9835 | 10.73 | 9500 | 0.2192 | 0.1942 |
| 0.9676 | 11.02 | 9750 | 0.2266 | 0.1913 |
| 0.9627 | 11.3 | 10000 | 0.2193 | 0.1921 |
| 0.976 | 11.58 | 10250 | 0.2309 | 0.1882 |
| 0.969 | 11.86 | 10500 | 0.2268 | 0.1886 |
| 0.9611 | 12.15 | 10750 | 0.2322 | 0.1863 |
| 0.9397 | 12.43 | 11000 | 0.2197 | 0.1844 |
| 0.9601 | 12.71 | 11250 | 0.2211 | 0.1871 |
| 0.9718 | 12.99 | 11500 | 0.2079 | 0.1898 |
| 0.9347 | 13.28 | 11750 | 0.2054 | 0.1843 |
| 0.9377 | 13.56 | 12000 | 0.2031 | 0.1842 |
| 0.934 | 13.84 | 12250 | 0.2059 | 0.1806 |
| 0.9295 | 14.12 | 12500 | 0.2122 | 0.1861 |
| 0.935 | 14.41 | 12750 | 0.2072 | 0.1787 |
| 0.9021 | 14.69 | 13000 | 0.2105 | 0.1781 |
| 0.9193 | 14.97 | 13250 | 0.2035 | 0.1786 |
| 0.9214 | 15.25 | 13500 | 0.2035 | 0.1766 |
| 0.9048 | 15.54 | 13750 | 0.1964 | 0.1758 |
| 0.9006 | 15.82 | 14000 | 0.1984 | 0.1757 |
| 0.9027 | 16.1 | 14250 | 0.2022 | 0.1743 |
| 0.9083 | 16.38 | 14500 | 0.1969 | 0.1744 |
| 0.9761 | 16.67 | 14750 | 0.1963 | 0.1728 |
| 0.9311 | 16.95 | 15000 | 0.1960 | 0.1737 |
| 0.886 | 17.23 | 15250 | 0.1929 | 0.1726 |
| 0.8969 | 17.51 | 15500 | 0.1928 | 0.1734 |
| 0.9084 | 17.8 | 15750 | 0.1937 | 0.1713 |
| 0.8795 | 18.08 | 16000 | 0.1978 | 0.1709 |
| 0.8883 | 18.36 | 16250 | 0.1956 | 0.1703 |
| 0.8901 | 18.64 | 16500 | 0.1933 | 0.1705 |
| 0.8922 | 18.93 | 16750 | 0.1962 | 0.1711 |
| 0.8765 | 19.21 | 17000 | 0.1962 | 0.1711 |
| 0.8992 | 19.49 | 17250 | 0.1965 | 0.1703 |
| 0.8778 | 19.77 | 17500 | 0.1957 | 0.1699 |
### Framework versions
- Transformers 4.17.0.dev0
- Pytorch 1.10.0+cu113
- Datasets 1.18.1
- Tokenizers 0.11.0
| [
-0.03430122882127762,
-0.006247556768357754,
-0.024984396994113922,
0.03793755918741226,
0.03564129397273064,
0.024786798283457756,
-0.00799776054918766,
0.008206050843000412,
-0.028461642563343048,
0.044285040348768234,
0.035846903920173645,
-0.021624146029353142,
0.011115687899291515,
0.024002036079764366,
-0.041107796132564545,
-0.05705026909708977,
-0.036823615431785583,
-0.015173276886343956,
-0.030637193471193314,
-0.0074517978355288506,
0.007139202207326889,
0.014212715439498425,
-0.01706034131348133,
0.020046701654791832,
0.001590951345860958,
0.01854086108505726,
-0.020351668819785118,
0.016166802495718002,
0.0127340629696846,
-0.04011089354753494,
0.0007273451192304492,
-0.05532727763056755,
-0.043948397040367126,
-0.034120362251996994,
0.005961733404546976,
0.02069476619362831,
-0.002790420316159725,
0.03231199458241463,
0.030878135934472084,
0.04696295037865639,
0.00176465162076056,
0.013799713924527168,
-0.032139960676431656,
-0.008149216882884502,
0.035552117973566055,
0.0017607493791729212,
-0.026011746376752853,
-0.035976555198431015,
0.03558068722486496,
-0.045812103897333145,
-0.05183083936572075,
-0.05586885288357735,
-0.0015550039242953062,
0.02037806622684002,
-0.031152546405792236,
-0.04409157857298851,
-0.046449869871139526,
-0.02021314576268196,
0.07789617031812668,
-0.06852969527244568,
-0.02957327291369438,
0.016457775607705116,
-0.0596415176987648,
0.01730177365243435,
0.021979201585054398,
-0.051965344697237015,
0.020896393805742264,
-0.04670056700706482,
0.030370835214853287,
-0.0167249608784914,
0.04668489471077919,
-0.035250380635261536,
0.017829757183790207,
-0.08479554206132889,
-0.00034147483529523015,
-0.011224639602005482,
0.03868704289197922,
0.07216615229845047,
-0.043181389570236206,
0.06191273778676987,
0.046002864837646484,
0.01203631516546011,
0.037517059594392776,
-0.02825818583369255,
0.024205362424254417,
0.053149525076150894,
-0.04799019545316696,
0.03896821290254593,
0.018029317259788513,
0.011828772723674774,
-0.02635570429265499,
-0.027428505942225456,
-0.012543604709208012,
-0.062066636979579926,
-0.025531239807605743,
0.03448813781142235,
0.030742134898900986,
-0.006352642551064491,
0.02790859341621399,
0.037954218685626984,
0.0217625442892313,
0.014700599014759064,
-0.03563984856009483,
0.0648227110505104,
-0.015593883581459522,
-0.011094990186393261,
-0.010895532555878162,
-0.01950378343462944,
-0.05108959600329399,
0.008090009912848473,
0.024623805657029152,
-0.038517121225595474,
-0.04020430147647858,
0.04758456349372864,
0.007902413606643677,
-0.013214106671512127,
0.03967715799808502,
-0.04605374485254288,
-0.02735094167292118,
-0.032309770584106445,
0.03311007842421532,
0.01609778217971325,
0.007839488796889782,
-0.0027015255764126778,
-0.06337302923202515,
0.0024837302044034004,
-0.03512858599424362,
-0.05902776122093201,
-0.010964843444526196,
0.005006133113056421,
0.009835912846028805,
0.06349462270736694,
0.036626629531383514,
-0.054432451725006104,
-0.01194082759320736,
0.008975556120276451,
-0.05153162404894829,
0.01261575985699892,
-0.0007446876843459904,
0.07659545540809631,
-0.05824112147092819,
-0.0747411921620369,
0.004728524014353752,
-0.0015615676529705524,
-0.011698529124259949,
0.023901456966996193,
0.013709100894629955,
-0.01107282005250454,
-0.024775903671979904,
-0.016701500862836838,
0.03932679444551468,
-0.0557643324136734,
-0.010608947835862637,
0.07245021313428879,
-0.026616791263222694,
0.04966627433896065,
-0.02016415446996689,
-0.00569195719435811,
0.005290918052196503,
-0.016621598973870277,
-0.021815575659275055,
0.03385341912508011,
-0.016928108409047127,
-0.017840007320046425,
-0.02815675549209118,
-0.0486704520881176,
-0.010795467533171177,
0.07282450050115585,
-0.012181466445326805,
-0.018953362479805946,
-0.048403769731521606,
0.022900985553860664,
0.05682157725095749,
0.023416126146912575,
-0.03918103873729706,
0.026652565225958824,
0.05266634374856949,
0.03587299957871437,
-0.038679338991642,
0.06492331624031067,
0.03211177885532379,
-0.02233092486858368,
-0.0512416698038578,
0.0060012247413396835,
0.00809922069311142,
-0.06534451991319656,
-0.002207310637459159,
0.03583896905183792,
0.020637596026062965,
-0.04042106494307518,
-0.05398417264223099,
0.06832820922136307,
-0.015678515657782555,
-0.027538906782865524,
-0.0006823577568866313,
-0.0023263785988092422,
-0.027128662914037704,
0.0421316996216774,
-0.030470149591565132,
0.003974542021751404,
-0.026574376970529556,
-0.04740558937191963,
0.005165762268006802,
0.011107715778052807,
0.025060798972845078,
0.04375041276216507,
-0.007944933138787746,
0.09936828166246414,
-0.031227929517626762,
0.020313113927841187,
-0.034454166889190674,
-0.04981062561273575,
-0.005847273860126734,
0.07131947576999664,
0.03242764621973038,
0.07391273230314255,
-0.0027141347527503967,
-0.06334973126649857,
0.04232298955321312,
0.08734951168298721,
0.07050047814846039,
-0.0029407155234366655,
-0.030442826449871063,
-0.018739918246865273,
0.0310642272233963,
0.055149517953395844,
-0.07291606068611145,
-0.01931377500295639,
0.016444718465209007,
0.03936101496219635,
-0.011506453156471252,
0.012554675340652466,
-0.028352027758955956,
0.043789979070425034,
-0.06085725873708725,
-0.06027865409851074,
0.05526704341173172,
0.035955674946308136,
0.0023306533694267273,
0.05098654329776764,
-0.014001462608575821,
-0.004531395621597767,
0.018952950835227966,
0.016988679766654968,
-0.008211269043385983,
-0.029282495379447937,
0.009540615603327751,
0.010949619114398956,
0.039838727563619614,
-0.06620876491069794,
0.04059304669499397,
-0.02822597697377205,
0.005364583805203438,
0.025374285876750946,
-0.03858600929379463,
0.043629150837659836,
0.05466703325510025,
0.005201391410082579,
-0.03497067093849182,
0.005257466342300177,
0.01328863576054573,
0.03874393180012703,
0.012930463999509811,
0.00022082295618019998,
0.08188829571008682,
0.01612953282892704,
0.045291345566511154,
0.07524047791957855,
0.03936002776026726,
0.004225574433803558,
0.03224419429898262,
0.08586893230676651,
0.010496259666979313,
-0.01590820588171482,
0.06636518985033035,
-0.05410221219062805,
0.02470243163406849,
-0.029381029307842255,
-0.011651176027953625,
-0.028189027681946754,
-0.001149210031144321,
0.023156678304076195,
0.0074056824669241905,
-0.006046010181307793,
-0.015314724296331406,
-0.022917425259947777,
-0.030103331431746483,
0.03200025483965874,
-0.023269744589924812,
-0.02801685966551304,
-0.022734487429261208,
-0.0070213139988482,
-0.010769248008728027,
-0.07305566966533661,
-0.0260643120855093,
-0.02060910128057003,
-0.025376606732606888,
0.012024574913084507,
-0.07594867050647736,
-0.014082293957471848,
-0.0668865442276001,
-0.020310621708631516,
0.03131589666008949,
0.01023664977401495,
0.023854272440075874,
-0.05707253888249397,
0.022717585787177086,
-0.0483730211853981,
-0.03800150007009506,
-0.06152667477726936,
-0.03669200465083122,
-0.028427913784980774,
-0.06526453793048859,
0.03882342576980591,
0.04473516717553139,
0.031429722905159,
0.01218581385910511,
0.0012218105839565396,
-0.009304304607212543,
-0.048698581755161285,
0.03915077820420265,
0.06778612732887268,
-0.03011815994977951,
-0.06191416084766388,
0.01795615442097187,
-0.016794918105006218,
0.005936658941209316,
-0.015828482806682587,
-0.021624255925416946,
0.06855177879333496,
0.05826466158032417,
0.017882296815514565,
0.03500984609127045,
-0.03567035123705864,
-0.05220509693026543,
-0.057503294199705124,
-0.04411391541361809,
-0.04759346321225166,
-0.020528821274638176,
-0.05012505128979683,
-0.03807180002331734,
-0.02617182582616806,
-0.013090917840600014,
0.009422149509191513,
-0.0176988635212183,
-0.012796715833246708,
0.030392669141292572,
0.029634634032845497,
0.01807139441370964,
0.022540245205163956,
-0.022548794746398926,
-0.050812941044569016,
0.05678681656718254,
0.014764264225959778,
-0.0006712260073982179,
-0.08658035099506378,
-0.013334834016859531,
0.0153117123991251,
0.02957872487604618,
0.004964832216501236,
-0.010082580149173737,
0.11060917377471924,
-0.004554455634206533,
-0.0072770011611282825,
0.0024587397929280996,
-0.030609846115112305,
-0.015688350424170494,
-0.02141575701534748,
-0.006830202415585518,
-0.01421960350126028,
-0.06982455402612686,
0.009667905978858471,
-0.00538199208676815,
0.050073232501745224,
-0.056801412254571915,
-0.03408428654074669,
-0.021102920174598694,
0.04348818212747574,
0.0604504719376564,
-0.011067082174122334,
-0.04224057123064995,
-0.002660252619534731,
-0.057047635316848755,
-0.024315109476447105,
0.023399896919727325,
0.019564373418688774,
0.013889969326555729,
0.04667158052325249,
0.014890461228787899,
-0.028523722663521767,
0.05599140748381615,
0.039118386805057526,
0.06693822145462036,
0.03547900542616844,
-0.05876849591732025,
0.011698853224515915,
-0.015147407539188862,
0.033289846032857895,
-0.028660019859671593,
-0.02523750066757202,
-0.026035459712147713,
-0.08958248794078827,
-0.021725112572312355,
0.005133751314133406,
0.0085648437961936,
-0.013876195065677166,
0.040057141333818436,
-0.018556896597146988,
-0.01672467216849327,
0.0028609102591872215,
0.027494439855217934,
0.0245779100805521,
-0.03841463848948479,
0.033979374915361404,
-0.008540283888578415,
0.029237959533929825,
-0.0658455565571785,
0.01968349702656269,
-0.021068332716822624,
-0.016539620235562325,
0.023466018959879875,
0.06183112785220146,
-0.007338502909988165,
0.03930936008691788,
0.09141959995031357,
0.034186720848083496,
-0.045695435255765915,
0.03099817968904972,
0.05899132415652275,
-0.035222720354795456,
-0.03787076100707054,
0.021776562556624413,
-0.009405305609107018,
-0.019896328449249268,
-0.028409598395228386,
-0.025382013991475105,
0.04265788197517395,
0.046129364520311356,
-0.020689528435468674,
0.006354478187859058,
0.025045273825526237,
-0.008454992435872555,
-0.0023703931365162134,
-0.06489233672618866,
-0.026133615523576736,
0.003325510071590543,
-0.034891944378614426,
0.025835731998085976,
0.007519902661442757,
0.011255618184804916,
0.034018028527498245,
0.03697901964187622,
-0.06628064811229706,
-0.013002807274460793,
0.030874039977788925,
0.020243806764483452,
-0.03998975455760956,
-0.059475768357515335,
-0.0063347346149384975,
0.06123025715351105,
0.03455072268843651,
-0.02407599613070488,
-0.06634798645973206,
-0.024967078119516373,
0.049058206379413605,
-0.04853777587413788,
0.041862089186906815,
0.003984660375863314,
0.039560653269290924,
0.056943442672491074,
-0.008721724152565002,
0.046609409153461456,
-0.003973697312176228,
0.01929270103573799,
-0.004505435936152935,
0.015432287007570267,
-0.019918611273169518,
-0.03426441550254822,
-0.060360562056303024,
0.009071226231753826,
0.04041001945734024,
0.03958606719970703,
0.06542646884918213,
-0.013220091350376606,
-0.0234098918735981,
0.0024415955413132906,
0.0284428708255291,
-0.020349469035863876,
0.009667538106441498,
0.017858581617474556,
0.04143279418349266,
-0.030692661181092262,
-0.010043587535619736,
-0.02349327690899372,
0.004822701681405306,
0.018733063712716103,
0.01845592074096203,
-0.043963465839624405,
-0.02815084345638752,
0.032720234245061874,
0.017141535878181458,
-0.02576327510178089,
-0.07080935686826706,
0.032863449305295944,
-0.011011016555130482,
-0.012884381227195263,
0.041691891849040985,
0.025709202513098717,
0.052255138754844666,
0.05292462185025215,
0.023388808593153954,
0.01379567664116621,
-0.027612624689936638,
0.04937790334224701,
-0.029205897822976112,
-0.03397473320364952,
0.001271627377718687,
-0.020756250247359276,
-0.009983357042074203,
-0.025737693533301353,
-0.04775242507457733,
-0.046250153332948685,
-0.000388090789783746,
0.03599829226732254,
-0.01963737979531288,
-0.009700904600322247,
-0.013197299093008041,
0.04248940199613571,
-0.015182983130216599,
-0.03176230937242508,
-0.03582683950662613,
-0.02875351533293724,
-0.05653589591383934,
-0.05531846731901169,
0.05359097942709923,
-0.01945517212152481,
0.029508568346500397,
0.028777029365301132,
0.006595070008188486,
0.02228180319070816,
0.002958230674266815,
-0.04062287136912346,
0.02255035564303398,
-0.016313040629029274,
-0.0395716167986393,
-0.025688739493489265,
0.007502526510506868,
0.013965979218482971,
0.031420692801475525,
-0.02278481051325798,
0.010241017676889896,
0.018876684829592705,
-0.016231851652264595,
-0.007567278109490871,
0.025445200502872467,
0.018450111150741577,
-0.06913802027702332,
-0.04035177454352379,
-0.015298791229724884,
-0.04518653824925423,
0.0325625017285347,
-0.02498658001422882,
0.005948093719780445,
0.011223661713302135,
0.022295664995908737,
0.04045571759343147,
-0.026756668463349342,
-0.024169892072677612,
0.031574591994285583,
-0.027158476412296295,
0.014370972290635109,
-0.060962896794080734,
0.054452937096357346,
-0.03158995881676674,
0.019273122772574425,
-0.01147847156971693,
0.02158062532544136,
-0.05928943306207657,
0.03198074921965599,
-0.028160518035292625,
-0.010388810187578201,
-0.002358833560720086,
0.03660374507308006,
-0.01690676249563694,
0.01722518727183342,
-0.01844608411192894,
0.02487964555621147,
-0.06822454184293747,
0.06374514847993851,
-0.02304891124367714,
0.01230253092944622,
-0.01664557307958603,
0.011975782923400402,
-0.035633865743875504,
0.007136376574635506,
-0.0169467031955719,
-0.042564671486616135,
0.023360321298241615,
0.06943058967590332,
0.056235261261463165,
0.04879080504179001,
-0.03978544473648071,
-0.0013554997276514769,
0.023751648142933846,
-0.02416176162660122,
-0.00584524217993021,
0.011409460566937923,
0.02501959167420864,
0.007852241396903992,
0.047581110149621964,
0.021921765059232712,
-0.05716032534837723,
-0.060048799961805344,
0.014056321233510971,
0.022294292226433754,
0.011748346500098705,
0.025113537907600403,
0.015422893688082695,
0.032171979546546936,
0.05538546293973923,
-0.024328157305717468,
-0.003789685433730483,
-0.019702907651662827,
-0.04057136923074722,
0.037068139761686325,
0.003986674826592207,
0.015071704052388668,
0.034344952553510666,
-0.03789684921503067,
-0.030018150806427002,
0.0529831200838089,
0.028463095426559448,
0.02438826486468315,
-0.010737272910773754,
-0.05450480058789253,
0.01063442975282669,
-0.01390165463089943,
-0.06643213331699371,
0.012738948687911034,
-0.011114750057458878,
-0.02894619107246399,
0.06485005468130112,
-0.008035587146878242,
0.022644512355327606,
0.036541908979415894,
0.02850133180618286,
-0.025750093162059784,
0.06205037608742714,
-0.0002504967851564288,
-0.0007917626644484699,
0.05928245559334755,
-0.06403394043445587,
-0.014804022386670113,
-0.028538478538393974,
0.0769428089261055,
-0.06534940749406815,
0.023032639175653458,
0.05589206516742706,
-0.0063004158437252045,
0.0163982342928648,
-0.029822831973433495,
-0.055490631610155106,
0.02588888816535473,
-0.04863334074616432,
0.09229527413845062,
0.009115351364016533,
-0.0600360669195652,
0.024884257465600967,
0.01793273538351059,
-0.057477742433547974,
0.03162366896867752,
0.03594792261719704,
0.03413238376379013,
0.02348645031452179,
0.03189683333039284,
-0.043913546949625015,
-0.0020220503211021423,
-0.04847459867596626,
0.02117873914539814,
-0.050797007977962494,
-0.00718342512845993,
0.028043026104569435,
-0.03987012431025505,
-0.02210390754044056,
0.03364091366529465,
-0.009951148182153702,
-0.021195759996771812,
0.053311027586460114,
-0.04583262652158737,
-0.028205830603837967,
-0.010113993659615517,
0.014855084009468555,
-0.03911790996789932,
0.013902181759476662,
-0.021505987271666527,
-0.0008404062245972455,
0.024885499849915504,
0.020997362211346626,
-0.018055997788906097,
-0.006337526720017195,
0.0081594567745924,
-0.06359440088272095,
-0.03573419898748398,
0.04342537373304367,
-0.014536585658788681,
-0.021545851603150368,
0.030265364795923233,
0.009264802560210228,
0.013297967612743378,
0.02092983014881611,
0.008462655358016491,
0.033694639801979065,
-0.06313762813806534,
-0.032477062195539474,
-0.00044432946015149355,
0.00966807920485735,
0.01640191860496998,
-0.017579738050699234,
0.04776586592197418,
0.036833833903074265,
0.00026620400603860617,
0.015647824853658676,
-0.022217923775315285,
-0.027518419548869133,
0.03423633798956871,
-0.026183459907770157,
0.009199177846312523,
0.00274060876108706,
-0.051694355905056,
-0.05055175721645355,
-0.009638494811952114,
-0.03489270806312561,
0.03247056156396866,
-0.05941937118768692,
-0.00008948684262577444,
0.04131526127457619,
-0.03051632083952427,
-0.05481031909584999,
-0.08051744848489761,
-0.041530683636665344,
-0.03553636744618416,
0.04301954060792923,
0.03470812737941742,
-0.03196233510971069,
0.038225580006837845,
-0.03979087620973587,
-0.041610974818468094,
0.0316895991563797,
0.007533663418143988,
-0.025210916996002197,
0.03912431374192238,
0.040548332035541534,
-0.06852523237466812,
0.015049295499920845,
0.05943344533443451,
-0.032879095524549484,
0.017712397500872612,
0.023610685020685196,
0.025782069191336632,
0.04899820312857628,
0.0042349607683718204,
-0.046179644763469696,
-0.0423584058880806,
-0.07038196176290512,
-0.036831654608249664,
-0.03152390196919441,
0.0031841390300542116,
0.052476249635219574
] |
BigSalmon/Neo | [
"pytorch",
"gpt_neo",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPTNeoForCausalLM"
],
"model_type": "gpt_neo",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 13 | null | ---
tags:
- generated_from_trainer
model-index:
- name: ''
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
#
This model was trained from scratch on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2965
- Wer: 0.3144
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0001
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 8
- total_train_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 1000
- num_epochs: 20.0
- mixed_precision_training: Native AMP
### Training results
| Training Loss | Epoch | Step | Validation Loss | Wer |
|:-------------:|:-----:|:-----:|:---------------:|:------:|
| 2.888 | 0.51 | 400 | 3.7320 | 0.9440 |
| 3.1636 | 1.02 | 800 | 2.9188 | 1.1916 |
| 2.773 | 1.53 | 1200 | 2.3347 | 1.0134 |
| 0.7198 | 2.04 | 1600 | 0.6678 | 0.4826 |
| 0.5255 | 2.55 | 2000 | 0.4605 | 0.4135 |
| 0.3961 | 3.06 | 2400 | 0.4266 | 0.3955 |
| 0.3424 | 3.57 | 2800 | 0.3786 | 0.3741 |
| 0.3858 | 4.08 | 3200 | 0.3161 | 0.3552 |
| 0.3218 | 4.59 | 3600 | 0.3029 | 0.3510 |
| 0.199 | 5.1 | 4000 | 0.2988 | 0.3418 |
| 0.2054 | 5.61 | 4400 | 0.2873 | 0.3434 |
| 0.1704 | 6.12 | 4800 | 0.3129 | 0.3432 |
| 0.1805 | 6.63 | 5200 | 0.2963 | 0.3413 |
| 0.2091 | 7.14 | 5600 | 0.2755 | 0.3329 |
| 0.1971 | 7.65 | 6000 | 0.2706 | 0.3309 |
| 0.1237 | 8.16 | 6400 | 0.2823 | 0.3270 |
| 0.123 | 8.67 | 6800 | 0.2754 | 0.3246 |
| 0.103 | 9.18 | 7200 | 0.2917 | 0.3272 |
| 0.1143 | 9.69 | 7600 | 0.2885 | 0.3305 |
| 0.156 | 10.2 | 8000 | 0.2810 | 0.3288 |
| 0.167 | 10.71 | 8400 | 0.2689 | 0.3232 |
| 0.0815 | 11.22 | 8800 | 0.2899 | 0.3236 |
| 0.0844 | 11.73 | 9200 | 0.2798 | 0.3225 |
| 0.0775 | 12.24 | 9600 | 0.2894 | 0.3224 |
| 0.0677 | 12.75 | 10000 | 0.2838 | 0.3204 |
| 0.1383 | 13.27 | 10400 | 0.2959 | 0.3211 |
| 0.1233 | 13.77 | 10800 | 0.2922 | 0.3213 |
| 0.0688 | 14.29 | 11200 | 0.2903 | 0.3209 |
| 0.0655 | 14.8 | 11600 | 0.2868 | 0.3182 |
| 0.0449 | 15.31 | 12000 | 0.2959 | 0.3172 |
| 0.0421 | 15.82 | 12400 | 0.2966 | 0.3180 |
| 0.0858 | 16.33 | 12800 | 0.2941 | 0.3164 |
| 0.0859 | 16.84 | 13200 | 0.2980 | 0.3165 |
| 0.0561 | 17.35 | 13600 | 0.2965 | 0.3165 |
| 0.0506 | 17.86 | 14000 | 0.2935 | 0.3148 |
| 0.0312 | 18.37 | 14400 | 0.2964 | 0.3154 |
| 0.0403 | 18.88 | 14800 | 0.2967 | 0.3160 |
| 0.0924 | 19.39 | 15200 | 0.2955 | 0.3147 |
| 0.0585 | 19.9 | 15600 | 0.2965 | 0.3144 |
### Framework versions
- Transformers 4.17.0.dev0
- Pytorch 1.10.0+cu113
- Datasets 1.18.1
- Tokenizers 0.11.0
| [
-0.025009552016854286,
-0.002961148973554373,
-0.009552497416734695,
0.035932183265686035,
0.03308273106813431,
0.01161575224250555,
-0.011467997916042805,
-0.004625773523002863,
-0.04259439930319786,
0.05951183661818504,
0.015177270397543907,
-0.03784135356545448,
-0.004323731642216444,
0.03887007758021355,
-0.038356952369213104,
-0.04811105877161026,
-0.013409169390797615,
-0.01185858529061079,
-0.02367384359240532,
0.012163879349827766,
0.016574043780565262,
-0.004310997668653727,
-0.007986890152096748,
0.014545530080795288,
0.001625379896722734,
0.007981032133102417,
0.007089949678629637,
0.008367322385311127,
0.031305886805057526,
-0.05526713281869888,
-0.00604669377207756,
-0.05442328006029129,
-0.07132545858621597,
-0.02466823346912861,
-0.0059445081278681755,
0.008797524496912956,
-0.0036024462897330523,
0.018950393423438072,
0.041128501296043396,
0.06299890577793121,
0.009232119657099247,
0.030210591852664948,
-0.027553901076316833,
-0.01624341867864132,
0.04743785783648491,
0.006760911084711552,
-0.030154351145029068,
-0.015239921398460865,
0.03818045184016228,
-0.025544872507452965,
-0.07525620609521866,
-0.04186030849814415,
-0.009090524166822433,
0.022786106914281845,
-0.043012138456106186,
-0.023661676794290543,
-0.055557023733854294,
0.003742530010640621,
0.07084888964891434,
-0.04502890631556511,
-0.05086551234126091,
0.027407899498939514,
-0.08073476701974869,
0.022449862211942673,
0.03643185645341873,
-0.0337829627096653,
0.017636483535170555,
-0.043199095875024796,
0.017987122759222984,
-0.011507648043334484,
0.057032261043787,
-0.005624992307275534,
0.008072967641055584,
-0.090494304895401,
-0.019069334492087364,
-0.00137450045440346,
0.038209930062294006,
0.05306660756468773,
-0.045064717531204224,
0.05200687795877457,
0.053430479019880295,
-0.0104595385491848,
0.05247709900140762,
-0.02119053713977337,
0.019363999366760254,
0.04227247089147568,
-0.047208674252033234,
-0.004303617402911186,
0.016527099534869194,
0.048295821994543076,
-0.03271941468119621,
-0.024265743792057037,
-0.029241066426038742,
-0.030474158003926277,
-0.03704654425382614,
0.015575977973639965,
0.030839143320918083,
0.008741947822272778,
0.04491093009710312,
0.008249565958976746,
0.03875013440847397,
0.03477611020207405,
-0.013199063949286938,
0.0697430670261383,
-0.015706896781921387,
-0.02641814574599266,
-0.02662382461130619,
-0.01310295145958662,
-0.031540680676698685,
0.021556315943598747,
0.016993116587400436,
-0.037817832082509995,
-0.033857498317956924,
0.04511769488453865,
0.012735594063997269,
0.010275930166244507,
0.07331399619579315,
-0.025999313220381737,
-0.05330897122621536,
-0.037415239959955215,
0.028436480090022087,
0.023947875946760178,
-0.018292805179953575,
0.0003552628622855991,
-0.04959883540868759,
-0.009805000387132168,
-0.021671758964657784,
-0.03248561546206474,
0.01474432460963726,
0.007829864509403706,
-0.0039221420884132385,
0.07292144745588303,
0.026646608486771584,
-0.07774750888347626,
-0.013868480920791626,
0.003682361915707588,
-0.049957357347011566,
0.03469841182231903,
-0.0032233328092843294,
0.09679210931062698,
-0.05985289439558983,
-0.08497630804777145,
0.012757343240082264,
-0.005547364708036184,
-0.021917639300227165,
0.021578079089522362,
0.015250678174197674,
-0.028728701174259186,
-0.0056748888455331326,
-0.013966947793960571,
0.05022874101996422,
-0.04935787245631218,
-0.03052397072315216,
0.06246500834822655,
0.011966798454523087,
0.04741867631673813,
-0.04041972756385803,
-0.031044909730553627,
0.019224854186177254,
-0.017048092558979988,
-0.0011640943121165037,
0.026454191654920578,
-0.0352213978767395,
-0.0032810738775879145,
-0.027643822133541107,
-0.04193270951509476,
-0.00970486644655466,
0.07701270282268524,
-0.014399629086256027,
-0.019772076979279518,
-0.02798914909362793,
0.018056077882647514,
0.04193951562047005,
0.037147436290979385,
-0.0354328379034996,
0.041846808046102524,
0.04400233179330826,
0.041995637118816376,
-0.04339985176920891,
0.044202253222465515,
0.032408133149147034,
-0.027293816208839417,
-0.025624826550483704,
0.02369583211839199,
0.009227634407579899,
-0.04496243968605995,
0.0064821732230484486,
0.02144412137567997,
0.016074001789093018,
-0.0573853999376297,
-0.03701106086373329,
0.04668202996253967,
-0.004429306834936142,
-0.01092421356588602,
0.009513773955404758,
0.001060214126482606,
-0.03145299106836319,
0.03245452418923378,
-0.009182130917906761,
0.0060099344700574875,
-0.017675358802080154,
-0.042737238109111786,
0.021166358143091202,
0.011774280108511448,
0.015159164555370808,
0.06030958518385887,
-0.0030087761115282774,
0.09028161317110062,
-0.03694353625178337,
0.03293476998806,
-0.03257471323013306,
-0.04659528657793999,
0.012624859809875488,
0.06036645546555519,
0.03779270872473717,
0.05905810371041298,
0.0047119720838963985,
-0.04126473143696785,
0.034471411257982254,
0.0646875649690628,
0.03754810243844986,
-0.0016293927328661084,
-0.03419738635420799,
-0.013050791807472706,
0.02667919173836708,
0.04789392650127411,
-0.054870374500751495,
-0.035009291023015976,
0.025523193180561066,
0.04542594403028488,
-0.029183054342865944,
0.02211139351129532,
-0.02236621081829071,
0.047951698303222656,
-0.054486434906721115,
-0.0567457415163517,
0.040930215269327164,
0.034727104008197784,
-0.011896954849362373,
0.02809215895831585,
0.010975152254104614,
0.0025663224514573812,
0.013354115188121796,
0.013946590013802052,
-0.0025653403718024492,
-0.036383312195539474,
0.021556047722697258,
0.020907312631607056,
0.03664473816752434,
-0.044465988874435425,
0.03972683101892471,
-0.027991725131869316,
0.013828028924763203,
0.04005856812000275,
-0.04305693134665489,
0.0312457624822855,
0.05762748792767525,
0.02786838635802269,
-0.037406086921691895,
0.00579787278547883,
0.01389151532202959,
0.015492254868149757,
0.025434521958231926,
-0.011769836768507957,
0.07523363083600998,
0.013377517461776733,
0.043991412967443466,
0.0794021487236023,
0.021241366863250732,
0.024984192103147507,
0.03604354336857796,
0.08731067180633545,
-0.00029449889552779496,
-0.014221809804439545,
0.046154558658599854,
-0.057727470993995667,
0.012176036834716797,
-0.04512714222073555,
0.015375151298940182,
-0.017686668783426285,
0.005623778328299522,
0.035051699727773666,
0.021980173885822296,
-0.026798799633979797,
-0.014026818796992302,
-0.0173646192997694,
-0.017769772559404373,
0.00682090176269412,
0.0013790869852527976,
-0.00963557418435812,
-0.007778668310493231,
0.00006106632645241916,
-0.010904969647526741,
-0.06621170043945312,
-0.027243487536907196,
-0.028246894478797913,
-0.030485806986689568,
-0.02416827902197838,
-0.08584732562303543,
-0.003369165351614356,
-0.06959443539381027,
-0.020296672359108925,
0.025282662361860275,
-0.006770984269678593,
-0.009189173579216003,
-0.047061316668987274,
0.021768148988485336,
-0.046151142567396164,
-0.047303102910518646,
-0.05204583704471588,
-0.057496871799230576,
-0.04966489225625992,
-0.08085007220506668,
0.039035312831401825,
0.03550691157579422,
0.014295329339802265,
0.0046829781495034695,
0.012781793251633644,
0.007059917785227299,
-0.03519982844591141,
0.04195179045200348,
0.058644238859415054,
-0.03428741917014122,
-0.038981907069683075,
0.039565470069646835,
-0.014305351302027702,
0.019257066771388054,
-0.0015195792075246572,
-0.01550363190472126,
0.08902204036712646,
0.0549188107252121,
0.00946566741913557,
0.010250525549054146,
-0.02682751603424549,
-0.05641139671206474,
-0.060697734355926514,
-0.030825989320874214,
-0.0291857048869133,
-0.01526441890746355,
-0.03943103551864624,
-0.04036245867609978,
-0.035578686743974686,
-0.04228263720870018,
0.007957851514220238,
-0.002894009230658412,
0.011062158271670341,
0.01945304498076439,
0.02685021609067917,
0.027186645194888115,
0.02027920074760914,
-0.0337211899459362,
-0.06248090788722038,
0.05063307657837868,
0.009702940471470356,
0.017386196181178093,
-0.0749468058347702,
-0.015012461692094803,
0.029523661360144615,
0.02203916199505329,
0.010767342522740364,
-0.0126768434420228,
0.07913576066493988,
-0.01721818745136261,
-0.0009555353317409754,
0.020683227106928825,
-0.005886703263968229,
-0.03177029266953468,
-0.009538242593407631,
-0.0017846781993284822,
-0.018956607207655907,
-0.041723206639289856,
-0.00415340531617403,
-0.018400967121124268,
0.04737843573093414,
-0.05562181770801544,
-0.0594845749437809,
-0.01813391223549843,
0.04225330799818039,
0.04593081399798393,
-0.002491404302418232,
-0.031840335577726364,
-0.01638873852789402,
-0.0636938288807869,
-0.004932500887662172,
0.05655136704444885,
0.02165239304304123,
0.006930126342922449,
0.043537437915802,
0.008302508853375912,
-0.019898345693945885,
0.051164813339710236,
0.030946746468544006,
0.053460340946912766,
0.013779607601463795,
-0.06846361607313156,
0.009812582284212112,
-0.017654387280344963,
0.024352598935365677,
-0.012374365702271461,
-0.007122657261788845,
-0.024998480454087257,
-0.11481570452451706,
-0.0258465725928545,
0.01541533786803484,
-0.008734524250030518,
0.00002404281076451298,
0.03492419421672821,
-0.007084942888468504,
-0.01491418294608593,
-0.012437988072633743,
0.00940681342035532,
0.039286430925130844,
-0.05384787544608116,
0.02697635628283024,
-0.009359315037727356,
0.0015844195149838924,
-0.07185371965169907,
0.008142261765897274,
-0.02798118069767952,
-0.015095178037881851,
0.008167731575667858,
0.05568865314126015,
-0.01758974976837635,
0.05018341913819313,
0.08555029332637787,
0.030801907181739807,
-0.03748797997832298,
0.02652931399643421,
0.07315026968717575,
-0.041662875562906265,
-0.04839935898780823,
0.02321399189531803,
-0.004005267284810543,
-0.01853744313120842,
-0.008684055879712105,
-0.006710031535476446,
0.053462956100702286,
0.042795225977897644,
-0.005069693084806204,
0.015788225457072258,
0.0016967767151072621,
-0.013081971555948257,
-0.018014872446656227,
-0.0353713296353817,
-0.01889004372060299,
-0.014127361588180065,
-0.034176699817180634,
0.02677793800830841,
0.02266651950776577,
0.016118047758936882,
0.052491195499897,
0.0259020384401083,
-0.046852957457304,
-0.013095731846988201,
0.02392321452498436,
0.00436549074947834,
-0.015770403668284416,
-0.07236351072788239,
-0.004461576230823994,
0.04809162765741348,
0.03578275442123413,
-0.03252418711781502,
-0.06182374805212021,
-0.011381941847503185,
0.08088969439268112,
-0.0439661405980587,
0.04020417854189873,
0.0039157080464065075,
0.035612333565950394,
0.056711070239543915,
-0.026366904377937317,
0.050476785749197006,
-0.014516717754304409,
0.01598604954779148,
-0.01437167264521122,
0.03214095160365105,
0.0005631270469166338,
-0.034981805831193924,
-0.05806697905063629,
0.03648556023836136,
0.03697110712528229,
0.036890383809804916,
0.054203279316425323,
-0.03000303916633129,
-0.0296417698264122,
0.004805015400052071,
0.03882436454296112,
-0.03984716162085533,
0.010554579086601734,
0.02577332593500614,
0.03221941366791725,
-0.04358818382024765,
-0.023008691146969795,
-0.030197637155652046,
-0.023229029029607773,
0.02605537138879299,
-0.009577786549925804,
-0.035018425434827805,
-0.02947596088051796,
0.04432879388332367,
0.012342042289674282,
-0.014994113706052303,
-0.06747297942638397,
0.048812560737133026,
-0.021673651412129402,
-0.02219991944730282,
0.04790053889155388,
0.02528291754424572,
0.022578341886401176,
0.07562033832073212,
0.03651469200849533,
0.026683876290917397,
-0.03323567286133766,
0.048427511006593704,
-0.046345021575689316,
-0.014827010221779346,
0.011447864584624767,
-0.027707969769835472,
-0.015566541813313961,
-0.027777040377259254,
-0.042648836970329285,
-0.03309157118201256,
-0.03667662665247917,
0.027118174359202385,
0.006752547342330217,
-0.01906321570277214,
-0.0038166430313140154,
0.041910987347364426,
-0.009435604326426983,
-0.04234478250145912,
-0.02120734564960003,
-0.03212164714932442,
-0.07203276455402374,
-0.06735587120056152,
0.039401475340127945,
0.012249584309756756,
0.027945484966039658,
0.03881806880235672,
0.016344375908374786,
0.016708670184016228,
0.00006677299825241789,
-0.02918563038110733,
0.032065827399492264,
-0.0035058739595115185,
-0.021015873178839684,
-0.029227696359157562,
0.0390692763030529,
0.005295379087328911,
0.028958411887288094,
-0.030839350074529648,
0.02861689403653145,
0.022856293246150017,
-0.006914139725267887,
-0.006563981529325247,
0.016070468351244926,
0.0323009230196476,
-0.07001936435699463,
-0.02542254887521267,
-0.0010347847128286958,
-0.043397556990385056,
0.026446517556905746,
-0.024674315005540848,
-0.01522350125014782,
-0.022022830322384834,
0.008545240387320518,
0.036553505808115005,
-0.018186328932642937,
-0.027548737823963165,
0.012965108267962933,
-0.024113278836011887,
0.018904803320765495,
-0.056010566651821136,
0.05137931928038597,
-0.03790087625384331,
0.001663889386691153,
-0.014782045036554337,
0.009916176088154316,
-0.048193927854299545,
0.04609399661421776,
-0.03146882355213165,
-0.020604131743311882,
-0.0011871554888784885,
0.05709019675850868,
-0.023806501179933548,
0.030422618612647057,
-0.00022274386719800532,
0.040556732565164566,
-0.03634704649448395,
0.07246040552854538,
-0.03392297402024269,
0.017640674486756325,
-0.007692272309213877,
0.011173386126756668,
-0.02655274048447609,
0.022902926430106163,
-0.021428700536489487,
-0.02757098898291588,
0.01754642091691494,
0.07410313934087753,
0.0345553383231163,
0.03373571112751961,
-0.01691344380378723,
-0.019748255610466003,
0.025278035551309586,
-0.039755016565322876,
-0.02708170749247074,
-0.006090131122618914,
-0.01200187299400568,
-0.011654780246317387,
0.053383968770504,
0.05057872086763382,
-0.06455724686384201,
-0.0688287541270256,
0.050308600068092346,
0.0058305230922997,
-0.0013819662854075432,
0.011706078425049782,
0.027820849791169167,
0.030149992555379868,
0.05334920436143875,
-0.037063196301460266,
-0.00031262467382475734,
-0.017644383013248444,
-0.03866935521364212,
0.04874809458851814,
-0.01122695580124855,
0.03817156329751015,
0.019706139340996742,
-0.043277557939291,
-0.01591481640934944,
0.050219595432281494,
0.0347781628370285,
0.02309448830783367,
-0.01793581247329712,
-0.03593491390347481,
0.037463460117578506,
-0.0004090757865924388,
-0.05443030595779419,
0.013681581243872643,
0.0056639909744262695,
-0.01986919716000557,
0.056845951825380325,
-0.02268127351999283,
0.01741187646985054,
0.06735969334840775,
0.04654063284397125,
-0.020592857152223587,
0.07086953520774841,
-0.005903525743633509,
0.0010485320817679167,
0.06562739610671997,
-0.07583113759756088,
0.00958356261253357,
-0.04326152428984642,
0.07877786457538605,
-0.05860763415694237,
0.01705518737435341,
0.03954334557056427,
0.009206951595842838,
0.01408442948013544,
-0.03310534730553627,
-0.06505416333675385,
0.023452460765838623,
-0.045266907662153244,
0.08692409098148346,
0.020701445639133453,
-0.04275119677186012,
0.055479761213064194,
0.0011676180874928832,
-0.07349594682455063,
0.03767537325620651,
0.033325910568237305,
0.03775832802057266,
0.04277792572975159,
0.03916264697909355,
-0.04718399420380592,
0.011754320934414864,
-0.0311106126755476,
0.03437371551990509,
-0.0404510423541069,
-0.020145747810602188,
0.04184552654623985,
-0.025050407275557518,
-0.028906265273690224,
0.04087080433964729,
-0.004870199132710695,
-0.03323682025074959,
0.0654611811041832,
-0.04430374130606651,
-0.03969583660364151,
0.011456451378762722,
0.018321095034480095,
-0.05037258565425873,
0.00717915641143918,
-0.0378899946808815,
0.019673515111207962,
0.010290242731571198,
0.00795306358486414,
-0.023370694369077682,
0.0015599664766341448,
0.03641798719763756,
-0.07706528902053833,
-0.026565896347165108,
0.019603515043854713,
-0.011902178637683392,
-0.022693386301398277,
0.028223996981978416,
0.025278424844145775,
0.015067760832607746,
0.017796475440263748,
-0.0037138592451810837,
0.0024649198167026043,
-0.04212817922234535,
-0.027011455968022346,
0.01083363313227892,
-0.01002510730177164,
0.03404451534152031,
-0.0012426153989508748,
0.042520686984062195,
0.020415818318724632,
0.005995196755975485,
-0.010954453609883785,
-0.021951429545879364,
-0.04595623165369034,
0.021474428474903107,
-0.03096224181354046,
-0.0016048839315772057,
-0.0069394707679748535,
-0.053068857640028,
-0.04434983432292938,
-0.025471238419413567,
-0.038293298333883286,
0.00847073644399643,
-0.056037042289972305,
-0.009737146086990833,
0.029951922595500946,
-0.02264946699142456,
-0.07160482555627823,
-0.09592730551958084,
-0.02153233252465725,
-0.04318543151021004,
0.007896649651229382,
0.038060884922742844,
-0.03563917800784111,
0.04083952307701111,
-0.03815802186727524,
-0.04353681951761246,
0.03793656453490257,
0.015263478271663189,
-0.029653122648596764,
0.0315738208591938,
0.05840153247117996,
-0.04165021702647209,
0.029560990631580353,
0.03902480751276016,
-0.047998517751693726,
0.01772509329020977,
0.01176669541746378,
0.015444609336555004,
0.0462300106883049,
0.010473346337676048,
-0.02966221794486046,
-0.01751801371574402,
-0.0862717404961586,
-0.0370546318590641,
-0.05477829650044441,
0.020902268588542938,
0.058486029505729675
] |
BigSalmon/Robertsy | [
"pytorch",
"roberta",
"fill-mask",
"transformers",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"RobertaForMaskedLM"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 4 | null | ---
language: protein
tags:
- protein language model
datasets:
- Uniref100
---
# ProtBert model
Pretrained model on protein sequences using a masked language modeling (MLM) objective. It was introduced in
[this paper](https://doi.org/10.1101/2020.07.12.199554) and first released in
[this repository](https://github.com/agemagician/ProtTrans). This model is trained on uppercase amino acids: it only works with capital letter amino acids.
## Model description
ProtBert is based on Bert model which pretrained on a large corpus of protein sequences in a self-supervised fashion.
This means it was pretrained on the raw protein sequences only, with no humans labelling them in any way (which is why it can use lots of
publicly available data) with an automatic process to generate inputs and labels from those protein sequences.
One important difference between our Bert model and the original Bert version is the way of dealing with sequences as separate documents.
This means the Next sentence prediction is not used, as each sequence is treated as a complete document.
The masking follows the original Bert training with randomly masks 15% of the amino acids in the input.
At the end, the feature extracted from this model revealed that the LM-embeddings from unlabeled data (only protein sequences) captured important biophysical properties governing protein
shape.
This implied learning some of the grammar of the language of life realized in protein sequences.
## Intended uses & limitations
The model could be used for protein feature extraction or to be fine-tuned on downstream tasks.
We have noticed in some tasks you could gain more accuracy by fine-tuning the model rather than using it as a feature extractor.
### How to use
You can use this model directly with a pipeline for masked language modeling:
```python
>>> from transformers import BertForMaskedLM, BertTokenizer, pipeline
>>> tokenizer = BertTokenizer.from_pretrained("Rostlab/prot_bert", do_lower_case=False )
>>> model = BertForMaskedLM.from_pretrained("Rostlab/prot_bert")
>>> unmasker = pipeline('fill-mask', model=model, tokenizer=tokenizer)
>>> unmasker('D L I P T S S K L V V [MASK] D T S L Q V K K A F F A L V T')
[{'score': 0.11088453233242035,
'sequence': '[CLS] D L I P T S S K L V V L D T S L Q V K K A F F A L V T [SEP]',
'token': 5,
'token_str': 'L'},
{'score': 0.08402521163225174,
'sequence': '[CLS] D L I P T S S K L V V S D T S L Q V K K A F F A L V T [SEP]',
'token': 10,
'token_str': 'S'},
{'score': 0.07328339666128159,
'sequence': '[CLS] D L I P T S S K L V V V D T S L Q V K K A F F A L V T [SEP]',
'token': 8,
'token_str': 'V'},
{'score': 0.06921856850385666,
'sequence': '[CLS] D L I P T S S K L V V K D T S L Q V K K A F F A L V T [SEP]',
'token': 12,
'token_str': 'K'},
{'score': 0.06382402777671814,
'sequence': '[CLS] D L I P T S S K L V V I D T S L Q V K K A F F A L V T [SEP]',
'token': 11,
'token_str': 'I'}]
```
Here is how to use this model to get the features of a given protein sequence in PyTorch:
```python
from transformers import BertModel, BertTokenizer
import re
tokenizer = BertTokenizer.from_pretrained("Rostlab/prot_bert", do_lower_case=False )
model = BertModel.from_pretrained("Rostlab/prot_bert")
sequence_Example = "A E T C Z A O"
sequence_Example = re.sub(r"[UZOB]", "X", sequence_Example)
encoded_input = tokenizer(sequence_Example, return_tensors='pt')
output = model(**encoded_input)
```
## Training data
The ProtBert model was pretrained on [Uniref100](https://www.uniprot.org/downloads), a dataset consisting of 217 million protein sequences.
## Training procedure
### Preprocessing
The protein sequences are uppercased and tokenized using a single space and a vocabulary size of 21. The rare amino acids "U,Z,O,B" were mapped to "X".
The inputs of the model are then of the form:
```
[CLS] Protein Sequence A [SEP] Protein Sequence B [SEP]
```
Furthermore, each protein sequence was treated as a separate document.
The preprocessing step was performed twice, once for a combined length (2 sequences) of less than 512 amino acids, and another time using a combined length (2 sequences) of less than 2048 amino acids.
The details of the masking procedure for each sequence followed the original Bert model as following:
- 15% of the amino acids are masked.
- In 80% of the cases, the masked amino acids are replaced by `[MASK]`.
- In 10% of the cases, the masked amino acids are replaced by a random amino acid (different) from the one they replace.
- In the 10% remaining cases, the masked amino acids are left as is.
### Pretraining
The model was trained on a single TPU Pod V3-512 for 400k steps in total.
300K steps using sequence length 512 (batch size 15k), and 100K steps using sequence length 2048 (batch size 2.5k).
The optimizer used is Lamb with a learning rate of 0.002, a weight decay of 0.01, learning rate warmup for 40k steps and linear decay of the learning rate after.
## Evaluation results
When fine-tuned on downstream tasks, this model achieves the following results:
Test results :
| Task/Dataset | secondary structure (3-states) | secondary structure (8-states) | Localization | Membrane |
|:-----:|:-----:|:-----:|:-----:|:-----:|
| CASP12 | 75 | 63 | | |
| TS115 | 83 | 72 | | |
| CB513 | 81 | 66 | | |
| DeepLoc | | | 79 | 91 |
### BibTeX entry and citation info
```bibtex
@article {Elnaggar2020.07.12.199554,
author = {Elnaggar, Ahmed and Heinzinger, Michael and Dallago, Christian and Rehawi, Ghalia and Wang, Yu and Jones, Llion and Gibbs, Tom and Feher, Tamas and Angerer, Christoph and Steinegger, Martin and BHOWMIK, DEBSINDHU and Rost, Burkhard},
title = {ProtTrans: Towards Cracking the Language of Life{\textquoteright}s Code Through Self-Supervised Deep Learning and High Performance Computing},
elocation-id = {2020.07.12.199554},
year = {2020},
doi = {10.1101/2020.07.12.199554},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Computational biology and bioinformatics provide vast data gold-mines from protein sequences, ideal for Language Models (LMs) taken from Natural Language Processing (NLP). These LMs reach for new prediction frontiers at low inference costs. Here, we trained two auto-regressive language models (Transformer-XL, XLNet) and two auto-encoder models (Bert, Albert) on data from UniRef and BFD containing up to 393 billion amino acids (words) from 2.1 billion protein sequences (22- and 112 times the entire English Wikipedia). The LMs were trained on the Summit supercomputer at Oak Ridge National Laboratory (ORNL), using 936 nodes (total 5616 GPUs) and one TPU Pod (V3-512 or V3-1024). We validated the advantage of up-scaling LMs to larger models supported by bigger data by predicting secondary structure (3-states: Q3=76-84, 8 states: Q8=65-73), sub-cellular localization for 10 cellular compartments (Q10=74) and whether a protein is membrane-bound or water-soluble (Q2=89). Dimensionality reduction revealed that the LM-embeddings from unlabeled data (only protein sequences) captured important biophysical properties governing protein shape. This implied learning some of the grammar of the language of life realized in protein sequences. The successful up-scaling of protein LMs through HPC to larger data sets slightly reduced the gap between models trained on evolutionary information and LMs. Availability ProtTrans: \<a href="https://github.com/agemagician/ProtTrans"\>https://github.com/agemagician/ProtTrans\</a\>Competing Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554},
eprint = {https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554.full.pdf},
journal = {bioRxiv}
}
```
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.023693514987826347,
-0.01756151020526886,
-0.00767053896561265,
0.05779005214571953,
0.05328243970870972,
0.015936775133013725,
-0.005579811055213213,
-0.031136738136410713,
-0.02237992361187935,
0.052714671939611435,
0.01656517945230007,
0.012051130644977093,
-0.021892430260777473,
0.06144116818904877,
-0.02129398286342621,
-0.036943212151527405,
-0.02632201462984085,
-0.015290978364646435,
-0.02962607890367508,
0.014131669886410236,
-0.004237077198922634,
-0.005201554857194424,
-0.005395575892180204,
0.015394888818264008,
0.012703528627753258,
0.02712896838784218,
-0.035313501954078674,
0.03867476060986519,
0.02590586617588997,
-0.05840324983000755,
-0.00010630876204231754,
-0.012114394456148148,
-0.05572983995079994,
0.010650121606886387,
-0.01688927784562111,
-0.025597359985113144,
0.0045002843253314495,
-0.0033474673982709646,
0.013751587830483913,
0.05756164714694023,
0.007913177832961082,
0.007025280501693487,
-0.0031657186336815357,
-0.03886178135871887,
0.03063887730240822,
0.014577225781977177,
-0.04071791097521782,
-0.03521544113755226,
0.03745250031352043,
-0.024638433009386063,
-0.05844854563474655,
-0.0823884978890419,
-0.018923042342066765,
0.019276313483715057,
-0.010923530906438828,
-0.0138462008908391,
-0.06857658177614212,
0.004138007760047913,
0.04935579374432564,
-0.053090959787368774,
-0.0245044007897377,
0.012650049291551113,
-0.0740707516670227,
0.010256381705403328,
0.022565314546227455,
-0.02209789864718914,
-0.0043416512198746204,
-0.043710965663194656,
0.015315786004066467,
-0.014196264557540417,
0.05022434890270233,
-0.01426982507109642,
0.013593148440122604,
-0.08789951354265213,
-0.011746792122721672,
-0.017577027902007103,
0.0471559502184391,
0.03815554827451706,
-0.034475795924663544,
0.04359966143965721,
0.015849672257900238,
-0.0043502203188836575,
0.029136190190911293,
-0.007220475003123283,
-0.00022669165628030896,
0.03286334499716759,
-0.037331998348236084,
-0.006065679248422384,
-0.0008965384331531823,
0.04986811429262161,
-0.04358431696891785,
-0.011444264091551304,
-0.04570002481341362,
-0.038190994411706924,
-0.026288192719221115,
0.022699153050780296,
0.009267724119126797,
0.017529787495732307,
0.019877279177308083,
0.004174139350652695,
0.02118643932044506,
0.030703764408826828,
-0.005754687823355198,
0.04927387461066246,
-0.010411223396658897,
0.00510683748871088,
0.010984542779624462,
-0.044252242892980576,
-0.03943402320146561,
0.024405462667346,
0.022950395941734314,
-0.03457052260637283,
-0.035773150622844696,
0.05296742171049118,
0.0027831990737468004,
-0.0391555018723011,
0.032612863928079605,
-0.012817243114113808,
-0.038145117461681366,
-0.03368716314435005,
0.030754612758755684,
-0.018528256565332413,
0.017113996669650078,
-0.006006906274706125,
-0.06252075731754303,
0.017220739275217056,
-0.04737291485071182,
-0.014209716580808163,
0.002650733571499586,
0.027033867314457893,
-0.019899867475032806,
0.0630636140704155,
-0.0010846289806067944,
-0.05841193348169327,
0.011438257992267609,
0.016848836094141006,
-0.08446220308542252,
0.04933057725429535,
0.05149207264184952,
0.12156539410352707,
-0.054510388523340225,
-0.04968754202127457,
0.039251137524843216,
0.012093317694962025,
-0.022139616310596466,
0.005503093358129263,
0.003509006928652525,
-0.0502031110227108,
-0.016703519970178604,
-0.026436038315296173,
0.07368926703929901,
-0.06060304120182991,
-0.004899440798908472,
0.04249256104230881,
-0.016756659373641014,
0.06650663912296295,
-0.0381106361746788,
0.006305113434791565,
-0.02205951139330864,
-0.010699904523789883,
-0.03560923412442207,
0.02130505070090294,
-0.022205820307135582,
-0.019069688394665718,
-0.03979717567563057,
-0.04715041443705559,
0.0007692936342209578,
0.08785202354192734,
0.006562431342899799,
-0.014898376539349556,
-0.0157112255692482,
0.0030489941127598286,
0.046589646488428116,
0.05922102928161621,
-0.0401366762816906,
0.03346278890967369,
0.0626717209815979,
0.023795129731297493,
-0.03522660210728645,
0.06740724295377731,
-0.010100889019668102,
-0.030651571229100227,
-0.031799040734767914,
0.025878818705677986,
-0.019385961815714836,
-0.018621522933244705,
0.03617141395807266,
0.03533055633306503,
-0.0001162294574896805,
-0.004044173751026392,
-0.021598191931843758,
0.058174580335617065,
0.00533218402415514,
0.009258161298930645,
0.006042885594069958,
0.00669207563623786,
-0.02314276248216629,
0.04120282456278801,
-0.04030023515224457,
0.00043518090387806296,
0.010012883692979813,
-0.016338936984539032,
0.016560519114136696,
0.027645111083984375,
0.04616183787584305,
0.04666794463992119,
-0.005924345459789038,
0.08237268775701523,
-0.0033336575143039227,
0.026735445484519005,
-0.059657368808984756,
-0.031450774520635605,
-0.007864495739340782,
0.04596059396862984,
0.028667056933045387,
0.04747213423252106,
0.019852254539728165,
-0.03867828845977783,
0.032084155827760696,
0.06424582004547119,
0.05821437016129494,
0.018808959051966667,
-0.057101644575595856,
-0.02532544732093811,
0.033517416566610336,
0.05755917727947235,
-0.02987031452357769,
-0.04095180332660675,
0.04370122030377388,
0.05117666348814964,
-0.024779757484793663,
0.014520972035825253,
-0.016254296526312828,
0.030845070257782936,
-0.04342186078429222,
-0.06834840774536133,
0.048290349543094635,
0.015329285524785519,
-0.011919829994440079,
0.04186636954545975,
0.001123082940466702,
-0.004961148835718632,
0.02682509832084179,
0.011823205277323723,
0.0032230564393103123,
-0.05011420324444771,
0.006921711843460798,
0.01652325689792633,
0.04666919261217117,
-0.03622916713356972,
0.04017556458711624,
0.016068117693066597,
-0.03448963165283203,
0.020817507058382034,
-0.013505407609045506,
0.02381257712841034,
0.02006937749683857,
0.010131173767149448,
-0.013997665606439114,
0.030136678367853165,
0.007426232565194368,
0.04543977975845337,
0.06250141561031342,
-0.0037607497069984674,
0.07607673853635788,
-0.0033722531516104937,
0.05574936792254448,
0.08461099117994308,
0.010882224887609482,
0.013746388256549835,
0.03568996116518974,
0.0662560909986496,
-0.007011700887233019,
-0.013684310019016266,
0.05078607425093651,
-0.03671638295054436,
0.0236086156219244,
-0.05162482708692551,
0.010211891494691372,
-0.01672598347067833,
-0.011039313860237598,
0.04485929384827614,
0.0348452664911747,
-0.015314755961298943,
0.015360730700194836,
-0.0009514004923403263,
-0.013619594275951385,
0.06554167717695236,
0.0014320568880066276,
0.03694160655140877,
0.013242390006780624,
0.013288234360516071,
0.011568689718842506,
-0.06049511954188347,
-0.04824395105242729,
-0.017683105543255806,
-0.03365159034729004,
-0.013719062320888042,
-0.07900088280439377,
-0.03530655801296234,
-0.07291723042726517,
-0.01647978276014328,
0.02630014158785343,
0.018102901056408882,
-0.00420394167304039,
-0.026430269703269005,
0.012755025178194046,
-0.04032845050096512,
-0.018236439675092697,
-0.032505519688129425,
-0.020411429926753044,
-0.03652898967266083,
-0.07898081094026566,
0.04698731377720833,
-0.0036239554174244404,
0.027518652379512787,
0.0013246649177744985,
-0.0032824852969497442,
-0.012287021614611149,
-0.018924284726381302,
0.045500747859478,
0.021659594029188156,
-0.03905760496854782,
-0.04944084584712982,
0.02767953835427761,
-0.023229321464896202,
0.017006518319249153,
-0.021841958165168762,
-0.03296806290745735,
0.07765750586986542,
0.08636030554771423,
0.025710638612508774,
-0.021512923762202263,
-0.02057361602783203,
-0.05570610612630844,
-0.055805038660764694,
-0.006831812672317028,
-0.03657010197639465,
-0.015607288107275963,
-0.03142121434211731,
-0.0513487309217453,
0.010684923268854618,
-0.06901952624320984,
-0.025421345606446266,
-0.025327032431960106,
0.014499473385512829,
0.03503399342298508,
0.0348723940551281,
0.018180763348937035,
0.04369037598371506,
-0.024968115612864494,
-0.022816618904471397,
0.07077529281377792,
0.00558849610388279,
0.009157364256680012,
-0.08829876035451889,
-0.034528948366642,
0.05511817708611488,
0.01852382719516754,
-0.006922983098775148,
-0.007846178486943245,
0.08214389532804489,
0.01330504659563303,
-0.010945922695100307,
0.003507241839542985,
-0.017524125054478645,
-0.011008888483047485,
-0.018880249932408333,
-0.01571562886238098,
-0.03524656966328621,
-0.06322983652353287,
-0.03968911990523338,
-0.002327920403331518,
0.04664168506860733,
-0.05485168844461441,
-0.043731119483709335,
-0.012802612036466599,
0.05648984760046005,
0.020917953923344612,
0.009515362791717052,
-0.053796347230672836,
-0.008308102376759052,
-0.0585688017308712,
-0.011239093728363514,
-0.0036667371168732643,
0.002703676000237465,
-0.022482173517346382,
0.035139795392751694,
0.03907923027873039,
-0.04468565806746483,
0.04045875370502472,
0.0458630807697773,
0.04698975011706352,
0.0023308522067964077,
-0.06386453658342361,
0.033791981637477875,
-0.012154889293015003,
0.04016175493597984,
-0.0020153834484517574,
-0.030511587858200073,
-0.05200818181037903,
-0.07314297556877136,
0.0013101919321343303,
0.012827903032302856,
-0.012186704203486443,
0.011743051931262016,
0.04287917539477348,
-0.006731443572789431,
-0.010593231767416,
-0.006868152879178524,
0.029261931777000427,
0.033585019409656525,
-0.018772540614008904,
0.04596252366900444,
-0.005286206491291523,
0.04057184234261513,
-0.035443421453237534,
0.02905062772333622,
-0.028867090120911598,
-0.025756705552339554,
0.017625879496335983,
0.04750317707657814,
0.007860454730689526,
0.05421924963593483,
0.08390038460493088,
0.010958985425531864,
-0.05181428790092468,
0.043838951736688614,
0.061493366956710815,
-0.006460700184106827,
-0.05433465167880058,
0.012172680348157883,
-0.009844059124588966,
-0.01992112211883068,
-0.020304614678025246,
-0.013905607163906097,
0.005189731251448393,
0.037283845245838165,
0.002873722929507494,
-0.010037808679044247,
-0.0024163599591702223,
-0.025989525020122528,
-0.03498676419258118,
-0.05520971864461899,
0.008443336002528667,
-0.012476720847189426,
-0.02239690162241459,
0.04054504260420799,
0.031797248870134354,
0.021548183634877205,
0.06316834688186646,
0.0640057846903801,
-0.033869314938783646,
-0.038499101996421814,
0.039263736456632614,
0.029612435027956963,
-0.04789924621582031,
-0.049061112105846405,
-0.04277997091412544,
0.050207316875457764,
0.07850471884012222,
-0.010716143995523453,
-0.0843033418059349,
0.0053698052652180195,
0.04670553281903267,
-0.021189792081713676,
0.06693916022777557,
0.016888534650206566,
0.04617474973201752,
0.07150458544492722,
-0.010316927917301655,
0.03343205526471138,
-0.017456620931625366,
0.006213480606675148,
-0.0011454245541244745,
0.05360765755176544,
-0.017726756632328033,
-0.02421610988676548,
-0.03502214327454567,
0.029762785881757736,
0.0318756029009819,
0.03061320073902607,
0.04870541766285896,
-0.014082328416407108,
-0.05653488636016846,
0.013022564351558685,
0.009380432777106762,
-0.03604015335440636,
-0.0068366676568984985,
0.026947055011987686,
0.04957444220781326,
-0.059216778725385666,
-0.04128406569361687,
-0.06509299576282501,
-0.0009217407205142081,
0.02147625759243965,
0.0061392029747366905,
-0.05848594009876251,
-0.059768274426460266,
-0.016067547723650932,
-0.030317651107907295,
-0.0018662904622033238,
-0.08262801170349121,
0.03834456205368042,
-0.006315387785434723,
-0.034121401607990265,
0.045245129615068436,
0.041326411068439484,
0.0585470050573349,
0.03961116820573807,
0.0025809865910559893,
-0.00043029029620811343,
-0.04044380411505699,
0.050188980996608734,
-0.009475848637521267,
-0.014416360296308994,
-0.012680581770837307,
-0.02922489121556282,
-0.002687459345906973,
-0.030204230919480324,
-0.05127641558647156,
-0.05932534486055374,
-0.02324575185775757,
0.0018687440315261483,
0.009811262600123882,
0.0163120087236166,
-0.004233710002154112,
0.037547141313552856,
-0.010787419974803925,
-0.03425370156764984,
-0.014313082210719585,
-0.03371268883347511,
-0.09231877326965332,
-0.05051041021943092,
0.002746653277426958,
-0.008061402477324009,
0.022543970495462418,
-0.015071947127580643,
-0.004233445972204208,
0.00889748428016901,
0.002106298226863146,
-0.015260928310453892,
0.04622747004032135,
0.013641571626067162,
-0.041303008794784546,
-0.0391337014734745,
0.03157057613134384,
0.02050035633146763,
0.015217683278024197,
-0.019119618460536003,
0.029016364365816116,
0.01824350841343403,
-0.03024495765566826,
-0.004150839522480965,
0.023748567327857018,
-0.01731155440211296,
-0.07445425540208817,
-0.015238090418279171,
-0.04557909443974495,
-0.06142488867044449,
0.058091115206480026,
-0.0028279065154492855,
-0.00853157602250576,
0.005964533891528845,
0.01477215625345707,
0.03776144981384277,
0.010327770374715328,
-0.04245352745056152,
0.012983090244233608,
-0.013238044455647469,
0.033681679517030716,
-0.057961177080869675,
0.06572108715772629,
-0.045159224420785904,
0.011831334792077541,
-0.0037332256324589252,
-0.021539591252803802,
-0.04107581451535225,
0.0180783923715353,
-0.01899401657283306,
-0.007666861172765493,
-0.01723504066467285,
0.018895559012889862,
-0.023901794105768204,
0.05670389160513878,
-0.03845641389489174,
0.0012766893487423658,
-0.019708866253495216,
0.04852809011936188,
-0.027513859793543816,
-0.00992810819298029,
-0.02055211365222931,
-0.028948567807674408,
-0.011733273975551128,
-0.03801232948899269,
0.008802849799394608,
-0.02089199237525463,
0.04760343208909035,
0.04394754767417908,
0.020474141463637352,
0.043063510209321976,
-0.005329052451997995,
0.014529963955283165,
0.010898517444729805,
-0.06582680344581604,
-0.03625955805182457,
-0.0014102692948654294,
0.013417002744972706,
0.00699248630553484,
0.07880674302577972,
0.04338129609823227,
-0.045379284769296646,
-0.048450447618961334,
0.03906392306089401,
0.02132420241832733,
0.015903938561677933,
0.015878163278102875,
0.031577251851558685,
0.051817215979099274,
0.02818816527724266,
-0.04166143760085106,
-0.01372030470520258,
-0.005434070713818073,
-0.030390044674277306,
0.028779027983546257,
0.020271357148885727,
0.022646842524409294,
0.0036872883792966604,
-0.03942616656422615,
-0.03404370695352554,
0.07196109741926193,
0.04325776919722557,
-0.005296960007399321,
-0.004729746840894222,
-0.04735608026385307,
0.02960042655467987,
0.01182807981967926,
-0.06022558733820915,
-0.007550597190856934,
-0.0006878131534904242,
-0.05465883016586304,
0.07156652957201004,
-0.012650400400161743,
0.013087906874716282,
0.037491194903850555,
0.015653036534786224,
-0.009118203073740005,
0.056146226823329926,
-0.03814447298645973,
0.018520664423704147,
0.02898314781486988,
-0.04132740572094917,
-0.01088997907936573,
-0.008452503941953182,
0.07350728660821915,
-0.054325543344020844,
0.036335788667201996,
0.03808636963367462,
-0.0017803527880460024,
0.004283763002604246,
-0.021884044632315636,
-0.020644914358854294,
0.01936700940132141,
-0.04434671252965927,
0.06470511108636856,
-0.001795247895643115,
-0.06568295508623123,
0.058877166360616684,
0.03248676285147667,
-0.08589745312929153,
0.03393914923071861,
0.03208519518375397,
0.02012355625629425,
0.04138420149683952,
0.03141014277935028,
-0.04649000242352486,
0.03067641705274582,
-0.04026670753955841,
0.0363825187087059,
-0.04870842397212982,
-0.019002404063940048,
0.03978097066283226,
-0.04122169315814972,
-0.01840016432106495,
0.062458399683237076,
-0.022192083299160004,
-0.009536485187709332,
0.02526913210749626,
-0.06334345042705536,
-0.04042491689324379,
-0.008543027564883232,
0.008448835462331772,
-0.03164659067988396,
0.01403043419122696,
-0.03570022061467171,
0.04287414252758026,
0.01023226510733366,
0.00452686520293355,
-0.04192553088068962,
0.018641337752342224,
0.01186970341950655,
-0.06094688922166824,
-0.03136267513036728,
0.05071500316262245,
0.009887075051665306,
-0.017345642670989037,
-0.001033131149597466,
0.0001852227869676426,
0.00878848135471344,
0.02825557440519333,
-0.011495973914861679,
0.03197692707180977,
-0.018904441967606544,
0.021337462589144707,
0.025395467877388,
-0.011521009728312492,
0.040195923298597336,
-0.002948828972876072,
0.030363425612449646,
0.052361518144607544,
0.045838240534067154,
-0.001076420652680099,
-0.03798139467835426,
-0.010868393816053867,
0.018882613629102707,
-0.058276187628507614,
-0.002459994750097394,
-0.000057617864513304085,
-0.04944095015525818,
-0.018447929993271828,
-0.002971481764689088,
-0.026667941361665726,
0.05645661801099777,
-0.06392423808574677,
0.0013400603784248233,
0.0403045192360878,
-0.02364901453256607,
-0.037166744470596313,
-0.09510068595409393,
-0.03876699507236481,
-0.04832607880234718,
0.01684953272342682,
0.003632068634033203,
-0.04423537477850914,
0.004985431674867868,
-0.031501688063144684,
-0.051871929317712784,
0.06296897679567337,
0.01439776923507452,
-0.020614810287952423,
0.056129638105630875,
0.029437975957989693,
-0.03564656898379326,
-0.0076967645436525345,
0.034943677484989166,
-0.036956559866666794,
-0.00692089693620801,
0.033007360994815826,
0.008293986320495605,
0.028079088777303696,
0.06120342016220093,
-0.039055533707141876,
-0.018241485580801964,
-0.06610366702079773,
-0.01146767009049654,
-0.04411812499165535,
-0.011096960864961147,
0.06305134296417236
] |
BigSalmon/prepositions | [
"pytorch",
"roberta",
"fill-mask",
"transformers",
"autotrain_compatible",
"has_space"
] | fill-mask | {
"architectures": [
"RobertaForMaskedLM"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 7 | null | ---
language: protein
tags:
- protein language model
datasets:
- BFD
---
# ProtT5-XL-BFD model
Pretrained model on protein sequences using a masked language modeling (MLM) objective. It was introduced in
[this paper](https://doi.org/10.1101/2020.07.12.199554) and first released in
[this repository](https://github.com/agemagician/ProtTrans). This model is trained on uppercase amino acids: it only works with capital letter amino acids.
## Model description
ProtT5-XL-BFD is based on the `t5-3b` model and was pretrained on a large corpus of protein sequences in a self-supervised fashion.
This means it was pretrained on the raw protein sequences only, with no humans labelling them in any way (which is why it can use lots of
publicly available data) with an automatic process to generate inputs and labels from those protein sequences.
One important difference between this T5 model and the original T5 version is the denosing objective.
The original T5-3B model was pretrained using a span denosing objective, while this model was pre-trained with a Bart-like MLM denosing objective.
The masking probability is consistent with the original T5 training by randomly masking 15% of the amino acids in the input.
It has been shown that the features extracted from this self-supervised model (LM-embeddings) captured important biophysical properties governing protein shape.
shape.
This implied learning some of the grammar of the language of life realized in protein sequences.
## Intended uses & limitations
The model could be used for protein feature extraction or to be fine-tuned on downstream tasks.
We have noticed in some tasks on can gain more accuracy by fine-tuning the model rather than using it as a feature extractor.
We have also noticed that for feature extraction, its better to use the feature extracted from the encoder not from the decoder.
### How to use
Here is how to use this model to extract the features of a given protein sequence in PyTorch:
```python
from transformers import T5Tokenizer, T5Model
import re
import torch
tokenizer = T5Tokenizer.from_pretrained('Rostlab/prot_t5_xl_bfd', do_lower_case=False)
model = T5Model.from_pretrained("Rostlab/prot_t5_xl_bfd")
sequences_Example = ["A E T C Z A O","S K T Z P"]
sequences_Example = [re.sub(r"[UZOB]", "X", sequence) for sequence in sequences_Example]
ids = tokenizer.batch_encode_plus(sequences_Example, add_special_tokens=True, padding=True)
input_ids = torch.tensor(ids['input_ids'])
attention_mask = torch.tensor(ids['attention_mask'])
with torch.no_grad():
embedding = model(input_ids=input_ids,attention_mask=attention_mask,decoder_input_ids=None)
# For feature extraction we recommend to use the encoder embedding
encoder_embedding = embedding[2].cpu().numpy()
decoder_embedding = embedding[0].cpu().numpy()
```
## Training data
The ProtT5-XL-BFD model was pretrained on [BFD](https://bfd.mmseqs.com/), a dataset consisting of 2.1 billion protein sequences.
## Training procedure
### Preprocessing
The protein sequences are uppercased and tokenized using a single space and a vocabulary size of 21. The rare amino acids "U,Z,O,B" were mapped to "X".
The inputs of the model are then of the form:
```
Protein Sequence [EOS]
```
The preprocessing step was performed on the fly, by cutting and padding the protein sequences up to 512 tokens.
The details of the masking procedure for each sequence are as follows:
- 15% of the amino acids are masked.
- In 90% of the cases, the masked amino acids are replaced by `[MASK]` token.
- In 10% of the cases, the masked amino acids are replaced by a random amino acid (different) from the one they replace.
### Pretraining
The model was trained on a single TPU Pod V3-1024 for 1.2 million steps in total, using sequence length 512 (batch size 4k).
It has a total of approximately 3B parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
When the model is used for feature etraction, this model achieves the following results:
Test results :
| Task/Dataset | secondary structure (3-states) | secondary structure (8-states) | Localization | Membrane |
|:-----:|:-----:|:-----:|:-----:|:-----:|
| CASP12 | 77 | 66 | | |
| TS115 | 85 | 74 | | |
| CB513 | 84 | 71 | | |
| DeepLoc | | | 77 | 91 |
### BibTeX entry and citation info
```bibtex
@article {Elnaggar2020.07.12.199554,
author = {Elnaggar, Ahmed and Heinzinger, Michael and Dallago, Christian and Rehawi, Ghalia and Wang, Yu and Jones, Llion and Gibbs, Tom and Feher, Tamas and Angerer, Christoph and Steinegger, Martin and BHOWMIK, DEBSINDHU and Rost, Burkhard},
title = {ProtTrans: Towards Cracking the Language of Life{\textquoteright}s Code Through Self-Supervised Deep Learning and High Performance Computing},
elocation-id = {2020.07.12.199554},
year = {2020},
doi = {10.1101/2020.07.12.199554},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Computational biology and bioinformatics provide vast data gold-mines from protein sequences, ideal for Language Models (LMs) taken from Natural Language Processing (NLP). These LMs reach for new prediction frontiers at low inference costs. Here, we trained two auto-regressive language models (Transformer-XL, XLNet) and two auto-encoder models (Bert, Albert) on data from UniRef and BFD containing up to 393 billion amino acids (words) from 2.1 billion protein sequences (22- and 112 times the entire English Wikipedia). The LMs were trained on the Summit supercomputer at Oak Ridge National Laboratory (ORNL), using 936 nodes (total 5616 GPUs) and one TPU Pod (V3-512 or V3-1024). We validated the advantage of up-scaling LMs to larger models supported by bigger data by predicting secondary structure (3-states: Q3=76-84, 8 states: Q8=65-73), sub-cellular localization for 10 cellular compartments (Q10=74) and whether a protein is membrane-bound or water-soluble (Q2=89). Dimensionality reduction revealed that the LM-embeddings from unlabeled data (only protein sequences) captured important biophysical properties governing protein shape. This implied learning some of the grammar of the language of life realized in protein sequences. The successful up-scaling of protein LMs through HPC to larger data sets slightly reduced the gap between models trained on evolutionary information and LMs. Availability ProtTrans: \<a href="https://github.com/agemagician/ProtTrans"\>https://github.com/agemagician/ProtTrans\</a\>Competing Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554},
eprint = {https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554.full.pdf},
journal = {bioRxiv}
}
```
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.0310937762260437,
-0.023661060258746147,
0.003637136658653617,
0.04314262047410011,
0.0544351302087307,
0.009708044119179249,
-0.0038350841496139765,
-0.017196444794535637,
-0.015471318736672401,
0.04407408460974693,
0.020171111449599266,
0.020430084317922592,
-0.03536778315901756,
0.06861773878335953,
-0.031322579830884933,
-0.04149005934596062,
-0.024465009570121765,
-0.019931187853217125,
-0.03097332827746868,
0.026359999552369118,
0.006808815989643335,
-0.00817395094782114,
0.002737795002758503,
0.020439699292182922,
0.016417210921645164,
0.023788494989275932,
-0.027512691915035248,
0.041043441742658615,
0.029089299961924553,
-0.06454207003116608,
0.007370843086391687,
-0.025975724682211876,
-0.06135990470647812,
0.00855258759111166,
-0.013758189976215363,
-0.025650762021541595,
0.009934299625456333,
-0.011562131345272064,
0.008863157592713833,
0.04989749565720558,
0.010985230095684528,
0.009698191657662392,
-0.00398599449545145,
-0.050668176263570786,
0.0388340950012207,
0.007715633604675531,
-0.03506496176123619,
-0.03130755573511124,
0.02435523271560669,
-0.026947157457470894,
-0.05711693316698074,
-0.09134437143802643,
-0.02456108294427395,
0.008428787812590599,
-0.02547261491417885,
-0.014949019998311996,
-0.08242232352495193,
0.000020057705114595592,
0.05191831290721893,
-0.05399966612458229,
-0.014499842189252377,
0.016662461683154106,
-0.08329402655363083,
0.009820125065743923,
0.02322963811457157,
-0.014151464216411114,
-0.002099604345858097,
-0.04162776842713356,
0.009705621749162674,
-0.006195128429681063,
0.03594909608364105,
-0.01248048897832632,
0.003210257738828659,
-0.0761268362402916,
-0.0035329812671989202,
-0.023383397608995438,
0.03656236454844475,
0.029527030885219574,
-0.04448679834604263,
0.03589126467704773,
0.022076943889260292,
-0.023548675701022148,
0.03304796293377876,
-0.006419678218662739,
-0.0019778062123805285,
0.033382099121809006,
-0.03237113729119301,
-0.004690049681812525,
-0.002486355369910598,
0.05453095957636833,
-0.04878654330968857,
-0.012814192101359367,
-0.050646115094423294,
-0.027445724233984947,
-0.021717095747590065,
0.033464983105659485,
0.007860756479203701,
0.030130771920084953,
0.012832856737077236,
0.0032745797652751207,
0.03940119221806526,
0.0294308140873909,
0.002453806111589074,
0.03947312757372856,
-0.010786832310259342,
0.010599221102893353,
0.021122269332408905,
-0.06020985171198845,
-0.028949186205863953,
0.027150100097060204,
0.01787519082427025,
-0.024241603910923004,
-0.03726845234632492,
0.048781998455524445,
0.002383801154792309,
-0.04661562293767929,
0.029875580221414566,
-0.01876552775502205,
-0.0306413434445858,
-0.015620800666511059,
0.028399314731359482,
-0.01806008443236351,
0.018557151779532433,
-0.017946410924196243,
-0.05131356418132782,
0.002724461490288377,
-0.04330672696232796,
-0.02460767701268196,
0.002142899436876178,
0.027433032169938087,
-0.009968251921236515,
0.05520453676581383,
-0.00023060807143338025,
-0.05620470643043518,
0.01155935786664486,
0.024232016876339912,
-0.07949122041463852,
0.06047070398926735,
0.043910544365644455,
0.11920008808374405,
-0.05591234192252159,
-0.06250505149364471,
0.029681209474802017,
0.0034090594854205847,
-0.022076023742556572,
0.00790743064135313,
-0.01652703806757927,
-0.05846967175602913,
-0.013359126634895802,
-0.031825724989175797,
0.08110380917787552,
-0.0556468702852726,
0.00011434189946157858,
0.026005961000919342,
-0.022863583639264107,
0.04883681982755661,
-0.034117162227630615,
0.0009384347940795124,
-0.01788993366062641,
-0.012537465430796146,
-0.035623230040073395,
0.02753572352230549,
-0.012225640937685966,
-0.010859960690140724,
-0.05385394021868706,
-0.04828518629074097,
0.009866530075669289,
0.08213479071855545,
0.020471423864364624,
-0.009618578478693962,
-0.005701866466552019,
0.0059720841236412525,
0.046460866928100586,
0.05306752026081085,
-0.027896491810679436,
0.03622401878237724,
0.05980895832180977,
0.019408339634537697,
-0.029836194589734077,
0.06439435482025146,
0.001258308533579111,
-0.03334730118513107,
-0.029021810740232468,
0.02057606540620327,
-0.025696124881505966,
-0.024662772193551064,
0.029015276581048965,
0.04236273095011711,
0.0022951948922127485,
-0.009285827167332172,
-0.014307976700365543,
0.0634077787399292,
0.008670966140925884,
0.026486042886972427,
0.00010990436567226425,
0.001615810440853238,
-0.025363413617014885,
0.038586195558309555,
-0.03175012022256851,
0.0032163504511117935,
0.0049530318938195705,
-0.004355649463832378,
0.01103190891444683,
0.023668857291340828,
0.0524739995598793,
0.042043525725603104,
-0.0035860794596374035,
0.07906612753868103,
-0.007859287783503532,
0.023518245667219162,
-0.05925445631146431,
-0.04403163492679596,
-0.006472419947385788,
0.049111951142549515,
0.018901068717241287,
0.03771020844578743,
0.02001955173909664,
-0.0420224666595459,
0.03620721027255058,
0.06908447295427322,
0.05985920876264572,
0.010911884717643261,
-0.06359852850437164,
-0.017727050930261612,
0.03843982517719269,
0.054913248866796494,
-0.020856792107224464,
-0.036945641040802,
0.04610668495297432,
0.04256569594144821,
-0.025313792750239372,
0.01779177226126194,
-0.019813721999526024,
0.0377652682363987,
-0.051060017198324203,
-0.05653248727321625,
0.04981942102313042,
0.013656186871230602,
-0.009387413039803505,
0.038885027170181274,
-0.010643860325217247,
-0.005112689919769764,
0.024383533746004105,
-0.007439710199832916,
-0.0044476683251559734,
-0.04826508089900017,
0.008766299113631248,
0.007013517431914806,
0.033146828413009644,
-0.04157629609107971,
0.03726160526275635,
0.018055370077490807,
-0.04253165423870087,
0.03324294462800026,
-0.020666399970650673,
0.0055895233526825905,
0.01952965371310711,
0.016451269388198853,
-0.012803402729332447,
0.03245073929429054,
0.016968395560979843,
0.04764300957322121,
0.05942779779434204,
-0.001426848117262125,
0.0754561722278595,
-0.010892121121287346,
0.04890195280313492,
0.08763611316680908,
0.004222502466291189,
0.01325767021626234,
0.047186706215143204,
0.06272594630718231,
-0.008291357196867466,
-0.010427895933389664,
0.04665351286530495,
-0.038176681846380234,
0.024850158020853996,
-0.04817595332860947,
0.00830888468772173,
-0.029110146686434746,
-0.0051793865859508514,
0.046391021460294724,
0.036221232265233994,
-0.025734251365065575,
0.017426054924726486,
-0.013957984745502472,
-0.015276460908353329,
0.0615096390247345,
0.0037270470056682825,
0.021340273320674896,
0.014777468517422676,
0.01884297840297222,
0.013750911690294743,
-0.05210213363170624,
-0.04483167454600334,
-0.02334107644855976,
-0.04017837718129158,
-0.01832951232790947,
-0.07262303680181503,
-0.04348999261856079,
-0.05992119014263153,
-0.030627509579062462,
0.03418372943997383,
0.012981857173144817,
-0.0069875093176960945,
-0.03367375582456589,
0.011692400090396404,
-0.04771249368786812,
-0.027066703885793686,
-0.046703219413757324,
-0.03854277357459068,
-0.030902300029993057,
-0.08314605057239532,
0.05210930109024048,
0.0011402651434764266,
0.021477149799466133,
0.0010455212322995067,
0.005428657867014408,
-0.0029126363806426525,
-0.01879071071743965,
0.045570146292448044,
0.01515182014554739,
-0.04518499597907066,
-0.05481827259063721,
0.02385767176747322,
-0.013545392081141472,
0.01006819773465395,
-0.02563493698835373,
-0.021365029737353325,
0.07731060683727264,
0.07633602619171143,
0.01788352057337761,
-0.014910036697983742,
-0.021816907450556755,
-0.059533122926950455,
-0.046057213097810745,
0.00004724542668554932,
-0.03568807616829872,
-0.010233567096292973,
-0.02119278535246849,
-0.04677187651395798,
0.009180878289043903,
-0.07802323251962662,
-0.02135542221367359,
-0.0180938933044672,
0.019138822332024574,
0.04048360884189606,
0.040961671620607376,
0.018583020195364952,
0.044226422905921936,
-0.028090400621294975,
-0.024686606600880623,
0.055168621242046356,
-0.008141803555190563,
0.0035838198382407427,
-0.0869126170873642,
-0.04130944982171059,
0.05640121549367905,
0.022853415459394455,
-0.0080802533775568,
0.00843541044741869,
0.08679314702749252,
0.00794848520308733,
-0.025709476321935654,
0.0029273859690874815,
-0.024070415645837784,
0.0053797634318470955,
-0.004502174444496632,
-0.005455274600535631,
-0.03093656338751316,
-0.0561472587287426,
-0.038225214928388596,
0.0005887624574825168,
0.04507102444767952,
-0.04764748364686966,
-0.04400235787034035,
-0.01198593433946371,
0.04999985918402672,
0.020020481199026108,
0.01441049575805664,
-0.06466331332921982,
-0.010754716582596302,
-0.06658384948968887,
-0.009590648114681244,
-0.001392429112456739,
0.012952539138495922,
-0.015445445664227009,
0.03878098353743553,
0.0372297428548336,
-0.05195700004696846,
0.046454545110464096,
0.048416536301374435,
0.048957839608192444,
0.015308443456888199,
-0.05241544544696808,
0.02649315819144249,
-0.01798977144062519,
0.04176636412739754,
-0.002529589692130685,
-0.029904650524258614,
-0.040534887462854385,
-0.07433494180440903,
-0.016428066417574883,
0.015075580216944218,
-0.013029244728386402,
0.01198607962578535,
0.043664757162332535,
0.007953512482345104,
-0.01787474751472473,
-0.01456539798527956,
0.025631580501794815,
0.040030334144830704,
-0.022523829713463783,
0.044536057859659195,
0.011604052037000656,
0.041537459939718246,
-0.02993985265493393,
0.032857414335012436,
-0.01828847825527191,
-0.022270003333687782,
0.021053705364465714,
0.025101540610194206,
0.009826472029089928,
0.06824015080928802,
0.08374785631895065,
-0.005277819465845823,
-0.05620814487338066,
0.0482502356171608,
0.07733868807554245,
-0.013845708221197128,
-0.06282394379377365,
0.012304284609854221,
-0.015260414220392704,
-0.015213606879115105,
-0.009586253203451633,
-0.017316145822405815,
0.002530825324356556,
0.05485829710960388,
-0.0019238332752138376,
-0.007664915174245834,
-0.0009210360585711896,
-0.016746409237384796,
-0.031237151473760605,
-0.050976816564798355,
0.0035748814698308706,
-0.0018765967106446624,
-0.025347251445055008,
0.035963594913482666,
0.022258808836340904,
0.028628187254071236,
0.05465260148048401,
0.059277113527059555,
-0.04661023989319801,
-0.05865368992090225,
0.022976504638791084,
0.02960309013724327,
-0.04499499127268791,
-0.0530705526471138,
-0.03918081521987915,
0.05432797223329544,
0.07273820042610168,
-0.016741348430514336,
-0.06950822472572327,
0.007985780946910381,
0.0511506050825119,
-0.02272728644311428,
0.06736139953136444,
0.017518242821097374,
0.03871918097138405,
0.06489423662424088,
-0.009990472346544266,
0.02884652093052864,
-0.023658156394958496,
0.015617640689015388,
-0.005611990578472614,
0.05975199118256569,
-0.013393944129347801,
-0.014762477949261665,
-0.04265551641583443,
0.03229665011167526,
0.030276969075202942,
0.02022518217563629,
0.05372431501746178,
-0.008880824781954288,
-0.06804106384515762,
0.017218098044395447,
0.011134649626910686,
-0.035021841526031494,
-0.0013853198615834117,
0.033593080937862396,
0.035711538046598434,
-0.046742070466279984,
-0.04290148988366127,
-0.07204548269510269,
0.001498549827374518,
0.0146236103028059,
0.0005631748354062438,
-0.06769944727420807,
-0.05599476024508476,
-0.021072307601571083,
-0.03312922269105911,
-0.0008867576834745705,
-0.07654212415218353,
0.03144995495676994,
-0.003751209704205394,
-0.03278563544154167,
0.05472106859087944,
0.03738943859934807,
0.05402921885251999,
0.035200998187065125,
0.009846074506640434,
0.010732993483543396,
-0.047359589487314224,
0.059048861265182495,
-0.0042116460390388966,
-0.010961851105093956,
-0.017923861742019653,
-0.04626425355672836,
-0.01250150054693222,
-0.019999556243419647,
-0.04882387816905975,
-0.0566130094230175,
-0.02759539522230625,
-0.008240990340709686,
0.00923960842192173,
0.024462778121232986,
-0.004964218474924564,
0.03446871042251587,
-0.008424803614616394,
-0.019371366128325462,
-0.025814466178417206,
-0.03236209973692894,
-0.09494201838970184,
-0.0544029138982296,
0.006309679709374905,
-0.00630959402769804,
0.03487321361899376,
-0.020621512085199356,
0.0036755604669451714,
0.008940348401665688,
-0.004756064619868994,
0.001162140630185604,
0.03608916699886322,
0.017822453752160072,
-0.03449113294482231,
-0.02365211397409439,
0.02687332034111023,
0.020432621240615845,
0.022965865209698677,
-0.008710645139217377,
0.03264244273304939,
0.015767287462949753,
-0.017895258963108063,
-0.009455280378460884,
0.010079464875161648,
-0.01350924838334322,
-0.07854877412319183,
-0.012106663547456264,
-0.039911914616823196,
-0.05621446669101715,
0.04280334711074829,
-0.014692012220621109,
-0.0008924661087803543,
-0.0016064185183495283,
0.004026768263429403,
0.033775534480810165,
0.002385516185313463,
-0.03920986130833626,
0.014553893357515335,
-0.023501355201005936,
0.03230428323149681,
-0.04596899822354317,
0.050604935735464096,
-0.0381520576775074,
0.00957323145121336,
-0.005210126284509897,
-0.027174247428774834,
-0.03899238631129265,
0.018510274589061737,
-0.021195808425545692,
-0.004011048469692469,
-0.024946821853518486,
0.023923084139823914,
-0.018147338181734085,
0.06158241629600525,
-0.0298675037920475,
-0.007817832753062248,
-0.02975466661155224,
0.043069660663604736,
-0.015985382720828056,
-0.00007295198156498373,
-0.0197826586663723,
-0.021345309913158417,
-0.010714085772633553,
-0.04439731314778328,
0.0028661945834755898,
-0.021449439227581024,
0.0485551543533802,
0.05732975900173187,
0.0175996832549572,
0.04132276773452759,
-0.015137916430830956,
0.014351222664117813,
0.014086587354540825,
-0.073069728910923,
-0.04814396798610687,
0.005011236295104027,
0.01835997775197029,
-0.008773742243647575,
0.06433218717575073,
0.02847283147275448,
-0.025667019188404083,
-0.04039430990815163,
0.03202107921242714,
0.025145303457975388,
0.014716055244207382,
0.018975937739014626,
0.02565133571624756,
0.040707819163799286,
0.03091309405863285,
-0.04836001247167587,
-0.01558147743344307,
-0.0026609492488205433,
-0.021611569449305534,
0.03748142719268799,
0.018945936113595963,
0.0274506788700819,
0.005529868416488171,
-0.04395430162549019,
-0.026818808168172836,
0.06993328034877777,
0.05153566598892212,
-0.002762580057606101,
-0.0027370473835617304,
-0.04546355828642845,
0.03099684603512287,
0.012705388478934765,
-0.06896626204252243,
-0.008612002246081829,
0.006850437726825476,
-0.060611359775066376,
0.06984806060791016,
-0.01116836816072464,
0.008555091917514801,
0.031955428421497345,
0.02111932635307312,
-0.012088836170732975,
0.057961005717515945,
-0.04046513885259628,
0.01695374771952629,
0.0251056719571352,
-0.04308729246258736,
-0.005050924606621265,
-0.006374492775648832,
0.08448092639446259,
-0.04013996943831444,
0.04161439836025238,
0.036452945321798325,
0.00015600424376316369,
-0.0026772464625537395,
-0.014165401458740234,
-0.02154230698943138,
0.01249256357550621,
-0.03805571049451828,
0.056940335780382156,
-0.010072116740047932,
-0.07650414109230042,
0.058106135576963425,
0.026804232969880104,
-0.08517666161060333,
0.03243429958820343,
0.0432785227894783,
0.016599217429757118,
0.04114186763763428,
0.027619175612926483,
-0.04476284608244896,
0.024647854268550873,
-0.04082141071557999,
0.03788178786635399,
-0.0410931296646595,
-0.024885419756174088,
0.04525966942310333,
-0.047186072915792465,
-0.022742755711078644,
0.06553129851818085,
-0.018391750752925873,
0.0018719451036304235,
0.028129208832979202,
-0.06419393420219421,
-0.028926342725753784,
-0.0121981306001544,
0.007223889231681824,
-0.028924541547894478,
0.02296488732099533,
-0.03684458136558533,
0.05425042286515236,
0.01141316071152687,
0.0013545281253755093,
-0.03738676384091377,
0.033497557044029236,
-0.00006628948176512495,
-0.06961721926927567,
-0.03617611527442932,
0.03894352540373802,
0.009935559704899788,
-0.017019128426909447,
0.0034398026764392853,
-0.0061769331805408,
0.018410706892609596,
0.027438320219516754,
-0.0029325028881430626,
0.05069699510931969,
-0.027607396245002747,
0.02560611441731453,
0.02188381552696228,
-0.006845567375421524,
0.02513411082327366,
0.00019962403166573495,
0.037650153040885925,
0.046946749091148376,
0.045920927077531815,
-0.0004985262057743967,
-0.020546723157167435,
-0.007162874098867178,
0.025102563202381134,
-0.06081543490290642,
0.001345379976555705,
0.002245181705802679,
-0.050391968339681625,
-0.012828031554818153,
-0.010842952877283096,
-0.027534225955605507,
0.05327099189162254,
-0.06196051463484764,
-0.0037915564607828856,
0.046811044216156006,
-0.010004376992583275,
-0.03997316211462021,
-0.0997367575764656,
-0.037103425711393356,
-0.04220789298415184,
0.014516767114400864,
0.008075417950749397,
-0.04908718541264534,
0.009977518580853939,
-0.029237499460577965,
-0.06403699517250061,
0.06802412867546082,
0.013121038675308228,
-0.006728384643793106,
0.06227066367864609,
0.0414181612432003,
-0.03587764501571655,
-0.003676639636978507,
0.03377506509423256,
-0.05135602504014969,
0.0031219208613038063,
0.04182591661810875,
0.0037353306543082,
0.025710953399538994,
0.06422040611505508,
-0.032228440046310425,
-0.02474198117852211,
-0.058048613369464874,
-0.008282319642603397,
-0.045703306794166565,
-0.004591269418597221,
0.06990689784288406
] |
BigTooth/DialoGPT-Megumin | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 16 | null | ---
tags:
- protein language model
datasets:
- UniRef50
---
# ProtT5-XL-UniRef50 model
Pretrained model on protein sequences using a masked language modeling (MLM) objective. It was introduced in
[this paper](https://doi.org/10.1101/2020.07.12.199554) and first released in
[this repository](https://github.com/agemagician/ProtTrans). This model is trained on uppercase amino acids: it only works with capital letter amino acids.
## Model description
ProtT5-XL-UniRef50 is based on the `t5-3b` model and was pretrained on a large corpus of protein sequences in a self-supervised fashion.
This means it was pretrained on the raw protein sequences only, with no humans labelling them in any way (which is why it can use lots of
publicly available data) with an automatic process to generate inputs and labels from those protein sequences.
One important difference between this T5 model and the original T5 version is the denosing objective.
The original T5-3B model was pretrained using a span denosing objective, while this model was pre-trained with a Bart-like MLM denosing objective.
The masking probability is consistent with the original T5 training by randomly masking 15% of the amino acids in the input.
It has been shown that the features extracted from this self-supervised model (LM-embeddings) captured important biophysical properties governing protein shape.
shape.
This implied learning some of the grammar of the language of life realized in protein sequences.
## Intended uses & limitations
The model could be used for protein feature extraction or to be fine-tuned on downstream tasks.
We have noticed in some tasks on can gain more accuracy by fine-tuning the model rather than using it as a feature extractor.
We have also noticed that for feature extraction, its better to use the feature extracted from the encoder not from the decoder.
### How to use
Here is how to use this model to extract the features of a given protein sequence in PyTorch:
```python
sequence_examples = ["PRTEINO", "SEQWENCE"]
# this will replace all rare/ambiguous amino acids by X and introduce white-space between all amino acids
sequence_examples = [" ".join(list(re.sub(r"[UZOB]", "X", sequence))) for sequence in sequence_examples]
# tokenize sequences and pad up to the longest sequence in the batch
ids = tokenizer.batch_encode_plus(sequence_examples, add_special_tokens=True, padding="longest")
input_ids = torch.tensor(ids['input_ids']).to(device)
attention_mask = torch.tensor(ids['attention_mask']).to(device)
# generate embeddings
with torch.no_grad():
embedding_repr = model(input_ids=input_ids,attention_mask=attention_mask)
# extract embeddings for the first ([0,:]) sequence in the batch while removing padded & special tokens ([0,:7])
emb_0 = embedding_repr.last_hidden_state[0,:7] # shape (7 x 1024)
print(f"Shape of per-residue embedding of first sequences: {emb_0.shape}")
# do the same for the second ([1,:]) sequence in the batch while taking into account different sequence lengths ([1,:8])
emb_1 = embedding_repr.last_hidden_state[1,:8] # shape (8 x 1024)
# if you want to derive a single representation (per-protein embedding) for the whole protein
emb_0_per_protein = emb_0.mean(dim=0) # shape (1024)
print(f"Shape of per-protein embedding of first sequences: {emb_0_per_protein.shape}")
```
## Training data
The ProtT5-XL-UniRef50 model was pretrained on [UniRef50](https://www.uniprot.org/help/uniref), a dataset consisting of 45 million protein sequences.
## Training procedure
### Preprocessing
The protein sequences are uppercased and tokenized using a single space and a vocabulary size of 21. The rare amino acids "U,Z,O,B" were mapped to "X".
The inputs of the model are then of the form:
```
Protein Sequence [EOS]
```
The preprocessing step was performed on the fly, by cutting and padding the protein sequences up to 512 tokens.
The details of the masking procedure for each sequence are as follows:
- 15% of the amino acids are masked.
- In 90% of the cases, the masked amino acids are replaced by `[MASK]` token.
- In 10% of the cases, the masked amino acids are replaced by a random amino acid (different) from the one they replace.
### Pretraining
The model was trained on a single TPU Pod V2-256 for 991.5 thousand steps in total, using sequence length 512 (batch size 2k).
It was trained using ProtT5-XL-BFD model as an initial checkpoint, rather than training from scratch.
It has a total of approximately 3B parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
When the model is used for feature extraction, this model achieves the following results:
Test results :
| Task/Dataset | secondary structure (3-states) | secondary structure (8-states) | Localization | Membrane |
|:-----:|:-----:|:-----:|:-----:|:-----:|
| CASP12 | 81 | 70 | | |
| TS115 | 87 | 77 | | |
| CB513 | 86 | 74 | | |
| DeepLoc | | | 81 | 91 |
### BibTeX entry and citation info
```bibtex
@article {Elnaggar2020.07.12.199554,
author = {Elnaggar, Ahmed and Heinzinger, Michael and Dallago, Christian and Rehawi, Ghalia and Wang, Yu and Jones, Llion and Gibbs, Tom and Feher, Tamas and Angerer, Christoph and Steinegger, Martin and BHOWMIK, DEBSINDHU and Rost, Burkhard},
title = {ProtTrans: Towards Cracking the Language of Life{\textquoteright}s Code Through Self-Supervised Deep Learning and High Performance Computing},
elocation-id = {2020.07.12.199554},
year = {2020},
doi = {10.1101/2020.07.12.199554},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Computational biology and bioinformatics provide vast data gold-mines from protein sequences, ideal for Language Models (LMs) taken from Natural Language Processing (NLP). These LMs reach for new prediction frontiers at low inference costs. Here, we trained two auto-regressive language models (Transformer-XL, XLNet) and two auto-encoder models (Bert, Albert) on data from UniRef and BFD containing up to 393 billion amino acids (words) from 2.1 billion protein sequences (22- and 112 times the entire English Wikipedia). The LMs were trained on the Summit supercomputer at Oak Ridge National Laboratory (ORNL), using 936 nodes (total 5616 GPUs) and one TPU Pod (V3-512 or V3-1024). We validated the advantage of up-scaling LMs to larger models supported by bigger data by predicting secondary structure (3-states: Q3=76-84, 8 states: Q8=65-73), sub-cellular localization for 10 cellular compartments (Q10=74) and whether a protein is membrane-bound or water-soluble (Q2=89). Dimensionality reduction revealed that the LM-embeddings from unlabeled data (only protein sequences) captured important biophysical properties governing protein shape. This implied learning some of the grammar of the language of life realized in protein sequences. The successful up-scaling of protein LMs through HPC to larger data sets slightly reduced the gap between models trained on evolutionary information and LMs. Availability ProtTrans: \<a href="https://github.com/agemagician/ProtTrans"\>https://github.com/agemagician/ProtTrans\</a\>Competing Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554},
eprint = {https://www.biorxiv.org/content/early/2020/07/21/2020.07.12.199554.full.pdf},
journal = {bioRxiv}
}
```
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.031017528846859932,
-0.019574983045458794,
0.00495097367092967,
0.04441095516085625,
0.05732697620987892,
0.008175435476005077,
-0.003086232114583254,
-0.019914299249649048,
-0.0204100850969553,
0.039667759090662,
0.01772467978298664,
0.013432050123810768,
-0.03373833745718002,
0.06160372123122215,
-0.03557606041431427,
-0.045464128255844116,
-0.02880641631782055,
-0.016774585470557213,
-0.031886108219623566,
0.025696877390146255,
0.009960220195353031,
-0.005964172072708607,
-0.0027504831086844206,
0.020243698731064796,
0.010544494725763798,
0.01999323070049286,
-0.023149263113737106,
0.0397518128156662,
0.025004900991916656,
-0.06391401588916779,
0.002832644386216998,
-0.023608878254890442,
-0.0622788742184639,
0.0047970921732485294,
-0.017625950276851654,
-0.026986220851540565,
0.004007321782410145,
-0.013398698531091213,
0.012622028589248657,
0.05450180545449257,
0.011484397575259209,
0.012212373316287994,
-0.0069597382098436356,
-0.03982243314385414,
0.033953066915273666,
0.00686417892575264,
-0.03292356804013252,
-0.040716223418712616,
0.02730906382203102,
-0.03161674737930298,
-0.05918477475643158,
-0.08817794919013977,
-0.020336700603365898,
0.0063757989555597305,
-0.02400144748389721,
-0.013627852313220501,
-0.08090759813785553,
-0.010461783036589622,
0.05840350314974785,
-0.05060059204697609,
-0.016597243025898933,
0.016122078523039818,
-0.08582813292741776,
0.007078873459249735,
0.02387886866927147,
-0.00870243739336729,
-0.002655657706782222,
-0.0437876358628273,
0.0077079604379832745,
-0.004139259457588196,
0.03817153722047806,
-0.018770836293697357,
0.007817857898771763,
-0.0784684270620346,
-0.007133651990443468,
-0.020313182845711708,
0.03344045579433441,
0.03207550197839737,
-0.048738040030002594,
0.03539227694272995,
0.023624984547495842,
-0.02644088864326477,
0.033985335379838943,
-0.0038718874566257,
-0.002924684900790453,
0.03491528704762459,
-0.035671696066856384,
-0.0055523826740682125,
-0.002948146779090166,
0.05204053595662117,
-0.04215339198708534,
-0.019190914928913116,
-0.049647197127342224,
-0.031607285141944885,
-0.021224303171038628,
0.03273478150367737,
0.010510469786822796,
0.027150731533765793,
0.01984875462949276,
0.004892741329967976,
0.03534528613090515,
0.027897685766220093,
0.00166693318169564,
0.03748072683811188,
-0.011304040439426899,
0.01332753337919712,
0.024332119151949883,
-0.06584614515304565,
-0.033038754016160965,
0.02587147057056427,
0.017557989805936813,
-0.025294417515397072,
-0.0361790657043457,
0.04647741839289665,
-0.0031906638760119677,
-0.04701119288802147,
0.02926463820040226,
-0.02228356897830963,
-0.03051072172820568,
-0.02259005606174469,
0.025445157662034035,
-0.013041418045759201,
0.02056020312011242,
-0.016050031408667564,
-0.052407484501600266,
0.007601100020110607,
-0.04383554682135582,
-0.024412527680397034,
0.006389119196683168,
0.029479149729013443,
-0.0103378314524889,
0.05873683840036392,
0.0002232987608294934,
-0.05902615934610367,
0.01121132168918848,
0.025864917784929276,
-0.0794348493218422,
0.061901774257421494,
0.04667440429329872,
0.11206559091806412,
-0.05748689919710159,
-0.06374792009592056,
0.03509879112243652,
0.012770055793225765,
-0.01955363154411316,
0.003360145725309849,
-0.018041124567389488,
-0.05733117833733559,
-0.00967269204556942,
-0.02776806801557541,
0.07540261745452881,
-0.0525614432990551,
0.0041377246379852295,
0.03440970182418823,
-0.02398214489221573,
0.053373776376247406,
-0.03601441904902458,
0.004613656550645828,
-0.01940542459487915,
-0.004704716615378857,
-0.02979055419564247,
0.019827615469694138,
-0.013149223290383816,
-0.007894478738307953,
-0.052179187536239624,
-0.05134833604097366,
0.0021775972563773394,
0.07836755365133286,
0.017816178500652313,
-0.017046377062797546,
-0.005975187290459871,
0.0013235840015113354,
0.042765192687511444,
0.06006687507033348,
-0.027717389166355133,
0.03961171954870224,
0.05189891532063484,
0.02448602207005024,
-0.02888166718184948,
0.0672248974442482,
0.00274173473007977,
-0.034196097403764725,
-0.028245506808161736,
0.026551509276032448,
-0.021235346794128418,
-0.020752165466547012,
0.026361988857388496,
0.04123669117689133,
0.004293038044124842,
-0.005836826283484697,
-0.02113736793398857,
0.06093079596757889,
0.006515531335026026,
0.018234455958008766,
0.004273544996976852,
0.008387106470763683,
-0.023791586980223656,
0.042323216795921326,
-0.03222185745835304,
0.0048637003637850285,
0.008696092292666435,
-0.009296569041907787,
0.013946030288934708,
0.02798931486904621,
0.04340045526623726,
0.04517589509487152,
-0.005138965789228678,
0.08088027685880661,
-0.0035236531402915716,
0.024690397083759308,
-0.062098126858472824,
-0.03680912405252457,
-0.004754093009978533,
0.05112076550722122,
0.024231335148215294,
0.0417027547955513,
0.019569240510463715,
-0.04630153998732567,
0.042758285999298096,
0.06892804056406021,
0.060260605067014694,
0.012238020077347755,
-0.0631607323884964,
-0.01911839470267296,
0.046998314559459686,
0.05625322833657265,
-0.024450039491057396,
-0.03383679687976837,
0.047820087522268295,
0.04350366070866585,
-0.026219567283988,
0.014559406787157059,
-0.024485301226377487,
0.03834359347820282,
-0.049881961196660995,
-0.05624719336628914,
0.038226619362831116,
0.012454945594072342,
-0.006315573584288359,
0.03686642274260521,
-0.008785008452832699,
-0.002279997570440173,
0.025254542008042336,
0.0006429608329199255,
0.0006283349357545376,
-0.04980966076254845,
0.0157187357544899,
0.0025284839794039726,
0.032879315316677094,
-0.04382423311471939,
0.0414663590490818,
0.026663316413760185,
-0.047843582928180695,
0.024981407448649406,
-0.017064811661839485,
0.0015896768309175968,
0.01956215687096119,
0.01603609509766102,
-0.01790936477482319,
0.023955779150128365,
0.014159739948809147,
0.047412749379873276,
0.06719378381967545,
-0.0028118856716901064,
0.07231162488460541,
-0.01083694864064455,
0.047585371881723404,
0.09005247056484222,
0.0073557267896831036,
0.005727358628064394,
0.048561543226242065,
0.06531447172164917,
0.00008781332144280896,
-0.010965523310005665,
0.05038423091173172,
-0.04255814105272293,
0.01704489067196846,
-0.04862260818481445,
0.005626313388347626,
-0.029924949631094933,
-0.009550992399454117,
0.0469486229121685,
0.03608618304133415,
-0.020359108224511147,
0.020515959709882736,
-0.016211876645684242,
-0.01513292919844389,
0.0577317513525486,
-0.005308500491082668,
0.02200218476355076,
0.012098148465156555,
0.02431141771376133,
0.011171716265380383,
-0.04922910034656525,
-0.044232893735170364,
-0.030564194545149803,
-0.041155148297548294,
-0.01977580226957798,
-0.07529359310865402,
-0.04583544284105301,
-0.0585835836827755,
-0.03219572827219963,
0.034718915820121765,
0.01089272927492857,
-0.007264825515449047,
-0.03258369863033295,
0.004045591223984957,
-0.043360330164432526,
-0.027869025245308876,
-0.04725130274891853,
-0.039939429610967636,
-0.029148364439606667,
-0.08482172340154648,
0.050471313297748566,
0.005606475286185741,
0.02213476225733757,
0.009060484357178211,
0.006340246647596359,
-0.006179612595587969,
-0.01809718646109104,
0.04038425534963608,
0.01321712601929903,
-0.0391816683113575,
-0.05607549101114273,
0.029983071610331535,
-0.01713484898209572,
0.013989078812301159,
-0.021975165233016014,
-0.029139874503016472,
0.08024892210960388,
0.08027847856283188,
0.024208467453718185,
-0.014279579743742943,
-0.018553731963038445,
-0.055444490164518356,
-0.04896078258752823,
-0.0003467545611783862,
-0.04120177403092384,
-0.010552110150456429,
-0.023597201332449913,
-0.044639699161052704,
0.007194809149950743,
-0.07554163783788681,
-0.022705283015966415,
-0.018306566402316093,
0.018944026902318,
0.04217270016670227,
0.03583207726478577,
0.022684209048748016,
0.04030705615878105,
-0.026724549010396004,
-0.02584504894912243,
0.057429466396570206,
-0.0016534083988517523,
0.00344449607655406,
-0.08996383100748062,
-0.03720904886722565,
0.05875152349472046,
0.015195081941783428,
-0.00222505209967494,
0.0005088672041893005,
0.08030549436807632,
0.008831162005662918,
-0.026580756530165672,
0.008800954557955265,
-0.022629480808973312,
0.0019282500725239515,
-0.005014692433178425,
-0.010546675883233547,
-0.034121427685022354,
-0.057637207210063934,
-0.03793426230549812,
0.00025415077107027173,
0.05055655166506767,
-0.0484202578663826,
-0.04221193492412567,
-0.005067146848887205,
0.046888768672943115,
0.024220295250415802,
0.016252748668193817,
-0.062184810638427734,
-0.010518710128962994,
-0.06844516098499298,
-0.005980321671813726,
0.0010104008251801133,
0.011890496127307415,
-0.01588478684425354,
0.038845669478178024,
0.03856898099184036,
-0.051049958914518356,
0.051294829696416855,
0.047828711569309235,
0.051594268530607224,
0.01013658195734024,
-0.0518050454556942,
0.021063249558210373,
-0.019369596615433693,
0.04346581920981407,
-0.001796290511265397,
-0.02850194089114666,
-0.04334304854273796,
-0.07230345159769058,
-0.01914721354842186,
0.015402798540890217,
-0.008007006719708443,
0.01052053365856409,
0.04308386147022247,
0.009931123815476894,
-0.016360051929950714,
-0.017360404133796692,
0.023230258375406265,
0.039710965007543564,
-0.026063358411192894,
0.03621206432580948,
0.01457082387059927,
0.04376387596130371,
-0.02968410961329937,
0.03151010721921921,
-0.015121018514037132,
-0.024906134232878685,
0.01898316480219364,
0.027002284303307533,
0.010259360074996948,
0.07233253866434097,
0.0849040225148201,
-0.00975816324353218,
-0.04582754895091057,
0.050611015409231186,
0.07504235208034515,
-0.017448818311095238,
-0.06361861526966095,
0.007241684012115002,
-0.010959920473396778,
-0.010771875269711018,
-0.007705937139689922,
-0.013763640075922012,
0.010698985308408737,
0.04927954450249672,
-0.007444712333381176,
-0.005468400195240974,
-0.006266441661864519,
-0.015782931819558144,
-0.027209008112549782,
-0.05024245008826256,
0.00547781540080905,
-0.0021238939370959997,
-0.02261706441640854,
0.031169027090072632,
0.02593635581433773,
0.023711491376161575,
0.058745793998241425,
0.06761027872562408,
-0.043688394129276276,
-0.05859649181365967,
0.026954403147101402,
0.033023856580257416,
-0.047965534031391144,
-0.0500127375125885,
-0.04032101482152939,
0.05474110692739487,
0.06981094926595688,
-0.014733553864061832,
-0.07420480996370316,
0.004492052365094423,
0.05442865565419197,
-0.02647792547941208,
0.06303336471319199,
0.01728176325559616,
0.036645907908678055,
0.06373324990272522,
-0.008850696496665478,
0.030767329037189484,
-0.02092115581035614,
0.015901561826467514,
-0.003797404933720827,
0.061151087284088135,
-0.004437707830220461,
-0.01173913199454546,
-0.041507937014102936,
0.0358697883784771,
0.030244939029216766,
0.02084401808679104,
0.047955069690942764,
-0.008407865650951862,
-0.06289781630039215,
0.01589864306151867,
0.016492851078510284,
-0.036381397396326065,
0.001356513355858624,
0.035442132502794266,
0.04053889960050583,
-0.045832615345716476,
-0.043064139783382416,
-0.06831946969032288,
-0.002069688867777586,
0.018105851486325264,
-0.00011279276077402756,
-0.06921087950468063,
-0.05954653397202492,
-0.020712265744805336,
-0.028831535950303078,
-0.0008527949103154242,
-0.07797598838806152,
0.031790368258953094,
0.0005822303937748075,
-0.036576058715581894,
0.05449004843831062,
0.03727275878190994,
0.05547778680920601,
0.03647950664162636,
0.0077751013450324535,
0.01019885204732418,
-0.04624282196164131,
0.060276709496974945,
-0.004124336410313845,
-0.012062324211001396,
-0.021048983559012413,
-0.039117731153964996,
-0.007546211127191782,
-0.016746262088418007,
-0.04854820668697357,
-0.05610398203134537,
-0.030437134206295013,
-0.008595343679189682,
0.011544212698936462,
0.018039871007204056,
-0.004354093689471483,
0.040810298174619675,
-0.004223628435283899,
-0.023317614570260048,
-0.019566865637898445,
-0.03486526012420654,
-0.08632290363311768,
-0.05180332809686661,
0.0046943435445427895,
-0.007399954367429018,
0.031872041523456573,
-0.022656643763184547,
0.0007913663284853101,
0.00553870340809226,
0.009988248348236084,
0.003885674988850951,
0.04021433740854263,
0.01427386049181223,
-0.028823725879192352,
-0.02644459344446659,
0.026024721562862396,
0.017964137718081474,
0.02168954536318779,
-0.006743178702890873,
0.0340864397585392,
0.017898133024573326,
-0.01692880317568779,
-0.005307125858962536,
0.012356339022517204,
-0.021059565246105194,
-0.08067372441291809,
-0.005005254875868559,
-0.038341108709573746,
-0.060948923230171204,
0.0389525443315506,
-0.008072908036410809,
-0.0028464156202971935,
-0.0007794153061695397,
0.006259158719331026,
0.03146156668663025,
-0.0003380510024726391,
-0.03792806342244148,
0.012166029773652554,
-0.017593897879123688,
0.028995418921113014,
-0.04437502473592758,
0.05867605656385422,
-0.03846485912799835,
0.011307171545922756,
-0.006802378688007593,
-0.021945932880043983,
-0.041330911219120026,
0.022067422047257423,
-0.02353683114051819,
-0.0066740564070641994,
-0.017010174691677094,
0.02906755544245243,
-0.017383424565196037,
0.062155887484550476,
-0.030704813078045845,
-0.0032193835359066725,
-0.025131113827228546,
0.05049176141619682,
-0.02039504610002041,
0.0028157278429716825,
-0.021736638620495796,
-0.02460593916475773,
-0.010497763752937317,
-0.04561089724302292,
-0.003579338314011693,
-0.018741469830274582,
0.04877900332212448,
0.06026611849665642,
0.023121770471334457,
0.041335903108119965,
-0.017312610521912575,
0.014162980951368809,
0.005646089091897011,
-0.06942654401063919,
-0.04671284556388855,
0.003334128763526678,
0.020847631618380547,
-0.008128453977406025,
0.06798333674669266,
0.03202587366104126,
-0.031085429713129997,
-0.04055438190698624,
0.03311711922287941,
0.019851364195346832,
0.015552893280982971,
0.019503245130181313,
0.023626970127224922,
0.03789366036653519,
0.026240438222885132,
-0.04962737858295441,
-0.016142765060067177,
-0.00019198920927010477,
-0.030556192621588707,
0.04033816605806351,
0.016864778473973274,
0.026140836998820305,
0.006089950446039438,
-0.043462809175252914,
-0.024586385115981102,
0.06536304205656052,
0.05380064621567726,
-0.006356019992381334,
-0.005032381974160671,
-0.045399751514196396,
0.03540746495127678,
0.0092229675501585,
-0.06283172219991684,
-0.009800314903259277,
0.0008370356517843902,
-0.06170392781496048,
0.06793652474880219,
-0.011318381875753403,
0.006798032205551863,
0.03224767744541168,
0.02438104897737503,
-0.01940891146659851,
0.06202924624085426,
-0.038338109850883484,
0.02185850217938423,
0.031783945858478546,
-0.047104768455028534,
-0.006962863728404045,
-0.005028262734413147,
0.08281676471233368,
-0.04109172150492668,
0.03759263455867767,
0.03697660565376282,
-0.0008900636457838118,
-0.006437597796320915,
-0.012848608195781708,
-0.01795913465321064,
0.014776771888136864,
-0.03422677144408226,
0.061071015894412994,
0.0005251778638921678,
-0.06940972805023193,
0.056308045983314514,
0.029712090268731117,
-0.0891505777835846,
0.02809200994670391,
0.047020841389894485,
0.01696189120411873,
0.04527565464377403,
0.0272721815854311,
-0.047806572169065475,
0.019653141498565674,
-0.032723262906074524,
0.03818582743406296,
-0.04048249498009682,
-0.017896506935358047,
0.04579038545489311,
-0.04708930850028992,
-0.01869354583323002,
0.06605607271194458,
-0.020487012341618538,
-0.00003875866605085321,
0.026039479300379753,
-0.06326460838317871,
-0.03238130733370781,
-0.019774843007326126,
0.008507913909852505,
-0.025112757459282875,
0.01988595724105835,
-0.037196602672338486,
0.05172474682331085,
0.007892651483416557,
0.0026923862751573324,
-0.03399526700377464,
0.02689320035278797,
-0.003521406790241599,
-0.06929759681224823,
-0.03436829149723053,
0.04769052937626839,
0.013280307874083519,
-0.022697098553180695,
0.010261057876050472,
-0.007865321822464466,
0.023750316351652145,
0.030375981703400612,
-0.004265658091753721,
0.05296999588608742,
-0.025936145335435867,
0.020755410194396973,
0.029564552009105682,
-0.009622015058994293,
0.029955023899674416,
0.0003585300873965025,
0.04273511469364166,
0.04416635259985924,
0.0389724001288414,
-0.005021828226745129,
-0.018190903589129448,
-0.010076197795569897,
0.01817460171878338,
-0.05972377955913544,
-0.0037817792035639286,
-0.0006266333512030542,
-0.052203770726919174,
-0.012214837595820427,
-0.014828598126769066,
-0.029424088075757027,
0.05581003054976463,
-0.06332415342330933,
-0.0031232088804244995,
0.03950595483183861,
-0.008682215586304665,
-0.04465972259640694,
-0.09857887029647827,
-0.03947572037577629,
-0.0357000008225441,
0.016052667051553726,
0.006475658621639013,
-0.04549544304609299,
0.013531855307519436,
-0.029443014413118362,
-0.06859952956438065,
0.06992863118648529,
0.014439624734222889,
-0.006748978979885578,
0.06145467609167099,
0.03997918218374252,
-0.03261536359786987,
0.0004645865992642939,
0.03785271570086479,
-0.043731287121772766,
-0.00018788818852044642,
0.03918116167187691,
-0.0019733125809580088,
0.024961065500974655,
0.06228537857532501,
-0.03256295248866081,
-0.02493446134030819,
-0.05313276872038841,
-0.012125957757234573,
-0.04561766982078552,
-0.002390623092651367,
0.06345300376415253
] |
Bilz/DialoGPT-small-harrypotter | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
license: apache-2.0
tags:
- generated_from_trainer
model-index:
- name: distilroberta-base-finetuned-wikitext2
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# distilroberta-base-finetuned-wikitext2
This model is a fine-tuned version of [distilroberta-base](https://huggingface.co/distilroberta-base) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 2.2005
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3.0
### Training results
| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:-----:|:----:|:---------------:|
| No log | 1.0 | 58 | 2.2650 |
| No log | 2.0 | 116 | 2.2408 |
| No log | 3.0 | 174 | 2.1696 |
### Framework versions
- Transformers 4.12.3
- Pytorch 1.9.0+cu111
- Datasets 1.15.1
- Tokenizers 0.10.3
| [
-0.028787191957235336,
-0.01495306845754385,
-0.01302411686629057,
0.016852477565407753,
0.041835933923721313,
0.023982709273695946,
-0.015629898756742477,
-0.017611386254429817,
-0.04891684278845787,
0.0609910823404789,
0.03342272713780403,
-0.027868900448083878,
0.0018193444702774286,
0.044484708458185196,
-0.04413136839866638,
-0.04254481941461563,
-0.009949328377842903,
-0.015634754672646523,
-0.03352690860629082,
-0.017723673954606056,
0.011010217480361462,
-0.01173545140773058,
0.011760860681533813,
-0.0013986830599606037,
-0.0070335171185433865,
0.0047563728876411915,
-0.014581812545657158,
0.013236693106591702,
0.045267753303050995,
-0.06468532979488373,
0.0015183794312179089,
-0.0407579131424427,
-0.040410980582237244,
-0.009778630919754505,
-0.018435776233673096,
-0.02201163023710251,
0.005714905448257923,
0.02601904608309269,
0.016979623585939407,
0.04806274175643921,
0.008450026623904705,
0.035721272230148315,
-0.011953584849834442,
-0.026012443006038666,
0.06569157540798187,
-0.009913744404911995,
-0.05343827232718468,
0.0037118166219443083,
0.04870912432670593,
-0.027313826605677605,
-0.0714104026556015,
-0.059744250029325485,
-0.027375124394893646,
0.032655175775289536,
-0.026742858812212944,
-0.004391132388263941,
-0.06826363503932953,
0.011061595752835274,
0.0681212991476059,
-0.04080966114997864,
-0.03447512909770012,
0.010271538980305195,
-0.0795716792345047,
0.017371386289596558,
0.03315930441021919,
-0.03389636054635048,
0.016499239951372147,
-0.05179152637720108,
0.044547345489263535,
-0.01712612994015217,
0.06705816835165024,
-0.01493871584534645,
0.015337594784796238,
-0.07202765345573425,
-0.018331844359636307,
-0.004909966606646776,
0.027409229427576065,
0.053608231246471405,
-0.01994197815656662,
0.03892142325639725,
0.016359739005565643,
-0.006576727144420147,
0.0373758040368557,
-0.015642870217561722,
0.01234652753919363,
0.03154272213578224,
-0.04897630959749222,
0.000919936690479517,
0.022060221061110497,
0.022605761885643005,
-0.048968080431222916,
-0.036699067801237106,
-0.027209050953388214,
-0.015099696815013885,
0.002101538237184286,
0.048386648297309875,
0.0267195962369442,
0.01678043231368065,
0.03189224377274513,
0.005088576581329107,
0.010549970902502537,
0.032667942345142365,
-0.035787880420684814,
0.07362513989210129,
-0.006242760457098484,
-0.012456895783543587,
-0.0013933541486039758,
-0.015788007527589798,
-0.04242976754903793,
0.03151733800768852,
0.01486601959913969,
-0.03190197795629501,
-0.025558114051818848,
0.027915405109524727,
0.011736102402210236,
-0.014343068934977055,
0.06341126561164856,
-0.037397876381874084,
-0.032191336154937744,
-0.037028875201940536,
0.04715500399470329,
0.03530186787247658,
0.0013038896722719073,
0.003814286319538951,
-0.022520525380969048,
-0.01718377321958542,
-0.024158969521522522,
-0.02235754020512104,
-0.0022245750296860933,
0.020542114973068237,
-0.014443672262132168,
0.04912203550338745,
0.024723634123802185,
-0.06752468645572662,
-0.007614722475409508,
0.019766930490732193,
-0.050202272832393646,
0.05026239901781082,
0.026179686188697815,
0.12002014368772507,
-0.05333928391337395,
-0.06749186664819717,
-0.0042657083831727505,
0.0010278091067448258,
-0.021025242283940315,
0.0036435609217733145,
-0.013796156272292137,
-0.05011558532714844,
0.0003642367955762893,
0.006686711683869362,
0.05781971663236618,
-0.03931422531604767,
-0.027066204696893692,
0.05464036017656326,
-0.006267952732741833,
0.03621692955493927,
-0.04696188494563103,
-0.03745919466018677,
0.019017746672034264,
-0.01761971414089203,
-0.03376471623778343,
0.04623185843229294,
0.0012553499545902014,
-0.01134813018143177,
-0.024501504376530647,
-0.026598097756505013,
0.00652437936514616,
0.10073649883270264,
-0.009361810982227325,
-0.04417872428894043,
-0.0012900657020509243,
0.022086992859840393,
0.04746689274907112,
0.04839864373207092,
-0.013185516931116581,
0.04044956713914871,
0.047772571444511414,
0.05588798224925995,
-0.020892778411507607,
0.028275297954678535,
0.03088166005909443,
-0.018865155056118965,
-0.02498234435915947,
0.018205562606453896,
0.008885368704795837,
-0.062438782304525375,
0.03017205186188221,
0.014311779290437698,
-0.00010207681043539196,
-0.05800117552280426,
-0.05356336757540703,
0.050494082272052765,
-0.009732469916343689,
0.007874485105276108,
-0.0016952084843069315,
0.004820539150387049,
-0.025658084079623222,
0.051143329590559006,
-0.00794313382357359,
0.001687313080765307,
-0.02165946364402771,
-0.0179379153996706,
0.011944728903472424,
-0.018257271498441696,
0.02476232498884201,
0.05046752467751503,
-0.0068128835409879684,
0.09922315925359726,
-0.036166962236166,
0.021734919399023056,
-0.04455048590898514,
-0.043846432119607925,
0.024602564051747322,
0.057675741612911224,
0.031344253569841385,
0.05187449976801872,
0.0015043611638247967,
-0.03766563907265663,
0.03640415146946907,
0.05898671597242355,
0.058697108179330826,
0.02939543128013611,
-0.034529317170381546,
-0.00198075152002275,
0.035236455500125885,
0.04067063331604004,
-0.029956310987472534,
-0.019669469445943832,
-0.001380729372613132,
0.03461555391550064,
-0.006197063252329826,
0.014729552902281284,
-0.013262376189231873,
0.041098594665527344,
-0.04787317290902138,
-0.05568864196538925,
0.05740361288189888,
0.016061512753367424,
-0.00115156767424196,
0.02204313687980175,
0.013606417924165726,
0.0048671807162463665,
0.0030455030500888824,
0.010449678637087345,
0.0006555416039191186,
-0.060911763459444046,
0.017551181837916374,
0.010960321873426437,
0.06612719595432281,
-0.05002982169389725,
0.0444047786295414,
-0.017649633809924126,
0.010659473016858101,
0.038508400321006775,
-0.05361371487379074,
0.0095173055306077,
0.06264599412679672,
0.03702240064740181,
-0.038586076349020004,
0.018411818891763687,
0.017187245190143585,
0.04799005389213562,
0.03587320074439049,
0.018687991425395012,
0.0603470578789711,
0.007345493882894516,
0.03663845360279083,
0.0804581344127655,
0.014525976032018661,
0.03326066583395004,
0.03301484137773514,
0.056551046669483185,
-0.002156007569283247,
-0.0009595376905053854,
0.054589249193668365,
-0.052639491856098175,
0.02673470228910446,
-0.05750042572617531,
-0.018204210326075554,
-0.04209738224744797,
-0.009717104025185108,
0.05256881192326546,
0.025591600686311722,
-0.028520673513412476,
-0.01396743580698967,
-0.0031057395972311497,
-0.015228806994855404,
0.015975290909409523,
0.00526620214805007,
0.006343662738800049,
-0.014547821134328842,
0.001765735330991447,
-0.016406292095780373,
-0.07592938095331192,
-0.04308715835213661,
-0.0029385359957814217,
-0.022171054035425186,
-0.047416411340236664,
-0.08173572272062302,
-0.010515093803405762,
-0.06131577491760254,
-0.041488274931907654,
0.029284531250596046,
0.022958457469940186,
-0.019290940836071968,
-0.01856035552918911,
0.004979406483471394,
-0.05578465759754181,
-0.05536442622542381,
-0.05015137791633606,
-0.05466998741030693,
-0.03614199534058571,
-0.06963930279016495,
0.029158396646380424,
0.029223555698990822,
0.031105495989322662,
0.016877811402082443,
0.02536245994269848,
0.005799810867756605,
-0.036085858941078186,
0.05007866770029068,
0.06579934805631638,
-0.02459111250936985,
-0.033347759395837784,
0.029527096077799797,
-0.0020760365296155214,
0.02407720871269703,
0.03661869838833809,
-0.027671609073877335,
0.08040057867765427,
0.05249544605612755,
0.01802169904112816,
0.01547457929700613,
-0.00609084777534008,
-0.058641817420721054,
-0.05356839671730995,
-0.0341271348297596,
-0.04932958632707596,
-0.0188757237046957,
-0.0413188561797142,
-0.04151016101241112,
-0.014967622235417366,
-0.03196090832352638,
0.009833733551204205,
-0.012858366593718529,
0.011799882166087627,
0.03940507769584656,
0.031722541898489,
0.033668577671051025,
0.0243127029389143,
-0.03224550932645798,
-0.048052724450826645,
0.0413491390645504,
0.014970589429140091,
0.0036098810378462076,
-0.07606387138366699,
-0.01364890020340681,
0.03666897490620613,
0.0195306446403265,
-0.0003421890432946384,
0.0022993905004113913,
0.06852604448795319,
-0.00012201575736980885,
0.0035048818681389093,
0.01563907042145729,
-0.039027683436870575,
-0.017733009532094002,
0.023988906294107437,
-0.011217964813113213,
-0.011566225439310074,
-0.02990197017788887,
-0.02197049930691719,
-0.006008322350680828,
0.04681785777211189,
-0.07996830344200134,
-0.04631529375910759,
-0.01068541407585144,
0.01773845963180065,
0.06404531002044678,
0.009196712635457516,
-0.049047376960515976,
-0.013124452903866768,
-0.07072977721691132,
-0.005520438309758902,
0.06472715735435486,
0.01675955206155777,
-0.0028544990345835686,
0.04929737374186516,
0.025959765538573265,
-0.016223397105932236,
0.039068255573511124,
0.054083868861198425,
0.07274594902992249,
0.014413795433938503,
-0.06269511580467224,
-0.004789764992892742,
-0.034280285239219666,
0.035482656210660934,
-0.01033815648406744,
-0.004490537568926811,
-0.03231644630432129,
-0.07691961526870728,
-0.036896150559186935,
-0.01553280744701624,
0.003730015130713582,
-0.01800861954689026,
0.03147943317890167,
-0.004322468768805265,
-0.02755986899137497,
0.002606624038890004,
0.012363956309854984,
0.06365510821342468,
-0.03648413345217705,
0.07396110147237778,
-0.002836804138496518,
0.017246531322598457,
-0.05465150997042656,
0.002136512193828821,
-0.051398735493421555,
-0.02414586953818798,
0.008180501870810986,
0.0464681051671505,
-0.01718750037252903,
0.05679003894329071,
0.08447584509849548,
0.026786578819155693,
-0.046443305909633636,
0.04154583811759949,
0.06121595948934555,
-0.036370258778333664,
-0.04800768196582794,
0.002364091807976365,
-0.010540701448917389,
-0.030033428221940994,
-0.003470570780336857,
-0.02180793695151806,
0.058621592819690704,
0.023017745465040207,
0.008642435073852539,
0.011306986212730408,
-0.006311367731541395,
-0.00041900682845152915,
-0.038977108895778656,
-0.05369184911251068,
-0.01760750077664852,
-0.004963089246302843,
-0.020395785570144653,
-0.008899715729057789,
0.03414582833647728,
0.026370355859398842,
0.08214742690324783,
0.03412634879350662,
-0.04292779415845871,
-0.0231411661952734,
0.013462977483868599,
0.016979752108454704,
-0.016038505360484123,
-0.07861089706420898,
-0.05450587719678879,
0.017731519415974617,
0.049578957259655,
-0.03458557650446892,
-0.0800827145576477,
0.01563188247382641,
0.033072974532842636,
-0.061434756964445114,
0.057797256857156754,
-0.002174562308937311,
0.027985159307718277,
0.054262444376945496,
-0.025829896330833435,
0.03350743278861046,
-0.011913387104868889,
0.0013379594311118126,
0.004720696248114109,
0.051520198583602905,
-0.0017445288831368089,
-0.033138129860162735,
-0.031384386122226715,
0.026208458468317986,
0.03834213316440582,
0.02969944477081299,
0.024764275178313255,
-0.03601178526878357,
-0.057762566953897476,
0.0015940102748572826,
0.02894369699060917,
-0.044632259756326675,
0.017861908301711082,
0.02560395374894142,
0.022931747138500214,
-0.0457259826362133,
-0.03460472822189331,
-0.01956523209810257,
-0.02263289876282215,
0.03630732744932175,
-0.0020700476597994566,
-0.025743583217263222,
-0.039523426443338394,
0.03948831930756569,
-0.0036473197396844625,
-0.013200557790696621,
-0.074696846306324,
0.04153776541352272,
0.007371558807790279,
-0.011572110466659069,
0.07371366024017334,
0.02398771047592163,
0.0313369557261467,
0.04726041480898857,
0.03577643260359764,
0.03439929336309433,
-0.036461763083934784,
0.03132431209087372,
-0.04399033635854721,
-0.011801485903561115,
0.009582596831023693,
-0.04116661474108696,
-0.04317689687013626,
-0.023827776312828064,
-0.056856535375118256,
-0.04500246047973633,
-0.00982343778014183,
0.012042779475450516,
0.009676042944192886,
-0.01219655480235815,
-0.00686096865683794,
0.038080185651779175,
-0.010391411371529102,
-0.018389305099844933,
-0.04098212346434593,
-0.023068787530064583,
-0.052928220480680466,
-0.03812422230839729,
0.008737382479012012,
0.02544577047228813,
0.03524141386151314,
0.02540576457977295,
0.017929306253790855,
0.020918555557727814,
0.018626311793923378,
-0.056912679225206375,
0.0022627448197454214,
0.012157573364675045,
-0.019839156419038773,
-0.03877563402056694,
0.030449263751506805,
0.02707003615796566,
0.00424749031662941,
-0.03885636851191521,
0.03514796867966652,
0.009466380812227726,
0.0021982237230986357,
-0.022102115675807,
0.008126110769808292,
0.029522910714149475,
-0.06627923995256424,
-0.040296029299497604,
0.014494958333671093,
-0.03676595166325569,
0.025569962337613106,
-0.03775443136692047,
-0.01490793190896511,
0.001046929508447647,
-0.00589232100173831,
0.02636580727994442,
-0.02851349115371704,
-0.010907036252319813,
0.019006459042429924,
-0.015856867656111717,
0.029110297560691833,
-0.04728556051850319,
0.055023252964019775,
-0.027738260105252266,
0.011169685050845146,
-0.025612786412239075,
0.008538109250366688,
-0.02827913500368595,
0.03928535059094429,
0.007364075630903244,
-0.025013143196702003,
-0.019588500261306763,
0.04502072557806969,
-0.03578931838274002,
0.018222279846668243,
-0.011822923086583614,
0.02517036348581314,
-0.01641116291284561,
0.08408539742231369,
-0.040226273238658905,
0.01379298698157072,
-0.04009143263101578,
0.022884558886289597,
-0.024126892909407616,
-0.0012348705204203725,
-0.02809223346412182,
-0.025931356474757195,
0.024931399151682854,
0.05901253595948219,
0.038343098014593124,
0.01246142853051424,
-0.0021986730862408876,
-0.003405815688893199,
0.016444409266114235,
-0.057515282183885574,
-0.020296623930335045,
-0.006742106284946203,
-0.010157241486012936,
-0.010421552695333958,
0.06297430396080017,
0.04134291410446167,
-0.03981584683060646,
-0.07227125018835068,
0.0350765697658062,
0.018972016870975494,
0.015720799565315247,
0.0005270327674224973,
0.04655419662594795,
0.020280594006180763,
0.03235512971878052,
-0.028130674734711647,
0.003911313600838184,
-0.008326103910803795,
-0.041750598698854446,
0.025899767875671387,
-0.008378253318369389,
0.030754582956433296,
0.007696658372879028,
-0.04646008089184761,
-0.01511309202760458,
0.03609555959701538,
0.021475305780768394,
0.026854010298848152,
0.0007063517114147544,
-0.058009322732686996,
0.02549348957836628,
-0.0014671600656583905,
-0.05163321644067764,
0.010004962794482708,
0.01947333663702011,
-0.036684613674879074,
0.055740367621183395,
-0.006240811198949814,
0.0018666399409994483,
0.051358845084905624,
0.02992587722837925,
-0.016464224085211754,
0.055449023842811584,
-0.03031264618039131,
0.024757908657193184,
0.051143575459718704,
-0.09047049283981323,
-0.012497242540121078,
-0.03838041424751282,
0.06625953316688538,
-0.04422803968191147,
0.01927940733730793,
0.04762496426701546,
0.012920110486447811,
0.02691519260406494,
-0.04307549074292183,
-0.03492758050560951,
-0.006028346251696348,
-0.03758903965353966,
0.07716654986143112,
0.003388364100828767,
-0.06735702604055405,
0.059491079300642014,
0.004977017175406218,
-0.06993214040994644,
0.0552205815911293,
0.027896368876099586,
0.05801996961236,
0.031168559566140175,
0.04508202150464058,
-0.04736338555812836,
0.003820346901193261,
-0.02748454362154007,
0.012235670350492,
-0.05542713776230812,
-0.00550095597282052,
0.04361812770366669,
-0.0379365012049675,
-0.02733471803367138,
0.030720552429556847,
-0.017177030444145203,
-0.0015499864239245653,
0.044077109545469284,
-0.05113920569419861,
-0.043100617825984955,
0.02865627221763134,
0.012753263115882874,
-0.036261655390262604,
-0.020742367953062057,
-0.028942162171006203,
0.010005515068769455,
0.020822729915380478,
-0.0019552691373974085,
-0.021838223561644554,
-0.005007071886211634,
0.02960490994155407,
-0.050365693867206573,
-0.04337925463914871,
0.03713121637701988,
-0.005818767938762903,
-0.021116580814123154,
0.04409727826714516,
0.017613809555768967,
0.025151561945676804,
0.02822531759738922,
-0.014611529186367989,
0.024129945784807205,
-0.06269100308418274,
-0.012597165070474148,
0.016528546810150146,
-0.01535769272595644,
0.05756722018122673,
0.004207616206258535,
0.03150825947523117,
0.036588191986083984,
0.014127369038760662,
0.005159557797014713,
-0.051683735102415085,
-0.028514385223388672,
0.026514515280723572,
-0.04086008295416832,
0.0022780392318964005,
0.0056533608585596085,
-0.05403551831841469,
-0.04742855578660965,
-0.008497243747115135,
-0.04588315635919571,
0.028690841048955917,
-0.07097559422254562,
0.02348390966653824,
0.04090644046664238,
-0.010516057722270489,
-0.052594054490327835,
-0.09401409327983856,
-0.028084218502044678,
-0.024829214438796043,
-0.025018859654664993,
0.02084939181804657,
-0.0333511084318161,
0.04813794419169426,
-0.039310257881879807,
-0.04732119292020798,
0.04728616774082184,
0.032550010830163956,
-0.04108276590704918,
0.05442903935909271,
0.046504393219947815,
-0.04973205551505089,
0.010569592006504536,
0.03492997586727142,
-0.03564867749810219,
-0.004971181508153677,
-0.0008083385764621198,
-0.006228760816156864,
0.025088952854275703,
-0.006621564272791147,
-0.0776091068983078,
-0.025333477184176445,
-0.07827300578355789,
-0.049057114869356155,
-0.043341949582099915,
0.008866622112691402,
0.06719253957271576
] |
Bimal/my_bot_model | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 10 | null | ---
license: mit
tags:
- generated_from_trainer
model-index:
- name: japanese-roberta-base-finetuned-wikitext2
results: []
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# japanese-roberta-base-finetuned-wikitext2
This model is a fine-tuned version of [rinna/japanese-roberta-base](https://huggingface.co/rinna/japanese-roberta-base) on the None dataset.
It achieves the following results on the evaluation set:
- Loss: 3.2302
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3.0
### Training results
| Training Loss | Epoch | Step | Validation Loss |
|:-------------:|:-----:|:----:|:---------------:|
| No log | 1.0 | 18 | 3.4128 |
| No log | 2.0 | 36 | 3.1374 |
| No log | 3.0 | 54 | 3.2285 |
### Framework versions
- Transformers 4.12.3
- Pytorch 1.9.0+cu111
- Datasets 1.15.1
- Tokenizers 0.10.3
| [
-0.025244060903787613,
-0.035617366433143616,
0.013231780380010605,
0.03265606239438057,
0.020251860842108727,
0.023092763498425484,
-0.0027518626302480698,
-0.015365329571068287,
-0.047338325530290604,
0.06484915316104889,
0.022847015410661697,
-0.029564743861556053,
0.027749009430408478,
0.035403165966272354,
-0.04999270662665367,
-0.03699171543121338,
-0.012658245861530304,
-0.02125716209411621,
-0.03246317058801651,
-0.01761000230908394,
0.008142292499542236,
-0.001455262303352356,
0.011920378543436527,
0.006101581733673811,
0.002565037924796343,
-0.00010191325418418273,
-0.019640402868390083,
-0.0012925371993333101,
0.037443608045578,
-0.05508792772889137,
-0.01340190228074789,
-0.046815384179353714,
-0.027537040412425995,
-0.022863218560814857,
-0.014117680490016937,
-0.03108653612434864,
0.009393659420311451,
0.012925905175507069,
0.02491544559597969,
0.06509067118167877,
0.014606649056077003,
0.029148530215024948,
-0.017113449051976204,
-0.01846127025783062,
0.043779484927654266,
0.0021861460991203785,
-0.03457094356417656,
0.010132298804819584,
0.04734053462743759,
-0.023417191579937935,
-0.05467242747545242,
-0.06279357522726059,
-0.031577084213495255,
0.03236483782529831,
-0.012247932143509388,
0.004566845949739218,
-0.0629267618060112,
0.0023856486659497023,
0.0759497806429863,
-0.04890158399939537,
-0.06388892233371735,
0.009864936582744122,
-0.07305055856704712,
0.032278966158628464,
0.032277241349220276,
-0.03595539927482605,
0.013010078109800816,
-0.04477997124195099,
0.0412709005177021,
-0.016252681612968445,
0.06177463009953499,
-0.007717776577919722,
0.015009725466370583,
-0.09217953681945801,
-0.0382336750626564,
0.0005820267251692712,
0.03930424898862839,
0.04900899901986122,
-0.026970472186803818,
0.04898211359977722,
0.01765204779803753,
-0.007083401083946228,
0.035676028579473495,
-0.004121347330510616,
0.0021504624746739864,
0.031929854303598404,
-0.04327673465013504,
0.006435554474592209,
0.015054174698889256,
0.03424888476729393,
-0.04898280277848244,
-0.02820494957268238,
-0.03234736993908882,
-0.0037566290702670813,
-0.02316005900502205,
0.035691432654857635,
0.03772298991680145,
0.018506130203604698,
0.05644352734088898,
0.004377597477287054,
0.016580723226070404,
0.04007485508918762,
-0.01480512972921133,
0.048326656222343445,
-0.013645168393850327,
-0.001312557142227888,
-0.010784000158309937,
-0.016299502924084663,
-0.021006470546126366,
0.026495011523365974,
0.018574317917227745,
-0.03510117903351784,
-0.04233269765973091,
0.035591743886470795,
0.02099423110485077,
-0.03529413789510727,
0.03736294433474541,
-0.03300593048334122,
-0.030589113011956215,
-0.05421328544616699,
0.07334768772125244,
0.02626841887831688,
-0.00922226719558239,
0.005072151310741901,
-0.041939932852983475,
-0.0008676344295963645,
-0.01511427666991949,
-0.029673293232917786,
0.013916349038481712,
0.00809386931359768,
-0.03246096149086952,
0.028378425166010857,
0.008290601894259453,
-0.04944830760359764,
-0.018748847767710686,
0.011437848210334778,
-0.05776660516858101,
0.04601410776376724,
0.011244559660553932,
0.12243200838565826,
-0.05115494877099991,
-0.04573829472064972,
0.0008324665832333267,
0.006599040701985359,
-0.011786623857915401,
0.01055164448916912,
0.0035242391750216484,
-0.05740185081958771,
0.0017750737024471164,
0.00037863870966248214,
0.0444609560072422,
-0.03763284161686897,
-0.020725052803754807,
0.06390891224145889,
-0.011141464114189148,
0.03910141810774803,
-0.050661031156778336,
-0.023561403155326843,
0.016660084947943687,
-0.0294354148209095,
-0.022186458110809326,
0.042792726308107376,
-0.009072533808648586,
-0.013612093403935432,
-0.03780414164066315,
-0.034923721104860306,
-0.0022186534479260445,
0.09838639199733734,
-0.02150859870016575,
-0.03968889266252518,
0.006109076086431742,
0.0221721101552248,
0.052667904645204544,
0.041433222591876984,
-0.02850288525223732,
0.05294795706868172,
0.04507526010274887,
0.060141172260046005,
-0.02348233573138714,
0.04699810966849327,
0.03144565969705582,
-0.017884399741888046,
-0.04137727618217468,
0.03848681598901749,
0.012688232585787773,
-0.06370048969984055,
0.028471624478697777,
0.017839539796113968,
0.009352931752800941,
-0.04655998945236206,
-0.03400886058807373,
0.06735193729400635,
-0.0107505451887846,
0.00274782907217741,
0.006959821563214064,
-0.0004999756347388029,
-0.028211714699864388,
0.059499673545360565,
-0.014011099934577942,
-0.010254865512251854,
-0.024913445115089417,
-0.026742052286863327,
0.02381715551018715,
0.007715137209743261,
0.028819262981414795,
0.051766183227300644,
-0.016358353197574615,
0.08070465177297592,
-0.02563641592860222,
0.03715323284268379,
-0.030280297622084618,
-0.04132735729217529,
0.040176670998334885,
0.06677068769931793,
0.04282442107796669,
0.04133608192205429,
0.002071497030556202,
-0.03139834851026535,
0.019625870510935783,
0.0716606006026268,
0.05158250033855438,
0.02509099803864956,
-0.04674046114087105,
0.001744415843859315,
0.0186834167689085,
0.03347531333565712,
-0.043725501745939255,
-0.0314854197204113,
0.016458064317703247,
0.047349054366350174,
-0.011980095878243446,
0.021305475383996964,
-0.0027033428195863962,
0.018295012414455414,
-0.05570092797279358,
-0.09148357063531876,
0.043906211853027344,
0.026616038754582405,
0.003445664420723915,
0.03372419998049736,
0.010707549750804901,
0.01803755946457386,
0.009351370856165886,
0.01731525920331478,
0.0016318480484187603,
-0.06801506876945496,
0.01205292996019125,
0.017245877534151077,
0.06377439945936203,
-0.040753863751888275,
0.044190630316734314,
-0.014325365424156189,
0.017826775088906288,
0.028914809226989746,
-0.0424814373254776,
0.005889790132641792,
0.03138689324259758,
0.0223399568349123,
-0.04721460118889809,
0.013205490075051785,
0.04451277479529381,
0.04247670620679855,
0.0422096773982048,
0.009151380509138107,
0.055803075432777405,
0.01299047190696001,
0.03536330163478851,
0.08458562195301056,
0.019535589963197708,
0.04499901831150055,
0.023171022534370422,
0.06113260239362717,
0.008255968801677227,
-0.011682297103106976,
0.06442872434854507,
-0.02935076132416725,
0.02036515809595585,
-0.04303222522139549,
0.009089614264667034,
-0.03232154622673988,
-0.012793066911399364,
0.029583629220724106,
0.019402416422963142,
-0.014725524000823498,
-0.020640471950173378,
-0.006566420663148165,
-0.01329423300921917,
0.02477516420185566,
0.003966523800045252,
0.00032247297349385917,
0.005538332741707563,
0.011976341716945171,
-0.01274759229272604,
-0.08261844515800476,
-0.0472903735935688,
0.015247290022671223,
-0.021439965814352036,
-0.029622366651892662,
-0.09115252643823624,
-0.0017564380541443825,
-0.05327816680073738,
-0.03726038336753845,
0.021453775465488434,
0.011020529083907604,
-0.014688437804579735,
-0.03816758096218109,
0.0052095274440944195,
-0.056372322142124176,
-0.045549921691417694,
-0.0375579297542572,
-0.06327973306179047,
-0.030936460942029953,
-0.0623631589114666,
0.024798478931188583,
0.04142226278781891,
0.03556620702147484,
0.012418846599757671,
0.02010359801352024,
0.014830363914370537,
-0.04672609642148018,
0.05118514969944954,
0.0351233072578907,
-0.020973877981305122,
-0.03220469504594803,
0.033449187874794006,
-0.01622372679412365,
0.01950889639556408,
0.029724152758717537,
-0.007774417754262686,
0.0725448876619339,
0.05465002357959747,
0.0026137572713196278,
0.019599832594394684,
-0.014807927422225475,
-0.04289786517620087,
-0.05747400224208832,
-0.03832195699214935,
-0.06445654481649399,
-0.023183049634099007,
-0.04346628487110138,
-0.038638751953840256,
-0.012421012856066227,
-0.026145225390791893,
0.021366162225604057,
-0.014905842952430248,
0.008700432255864143,
0.027361206710338593,
0.03022269532084465,
0.04436107724905014,
0.018070925027132034,
-0.025084614753723145,
-0.03989462926983833,
0.04951353743672371,
0.007588688749819994,
0.0008659315062686801,
-0.07918918877840042,
-0.008036253042519093,
0.04548805207014084,
0.02929588221013546,
0.003226823639124632,
-0.021566029638051987,
0.07072566449642181,
0.002911430085077882,
-0.0026142927818000317,
0.013034961186349392,
-0.03350017964839935,
-0.03172392025589943,
0.00242572370916605,
-0.0054914033971726894,
-0.0065056318417191505,
-0.03625325486063957,
-0.020996011793613434,
-0.003635944100096822,
0.036261267960071564,
-0.054891373962163925,
-0.04925984889268875,
-0.01627292111515999,
0.012470308691263199,
0.0441729761660099,
0.00047621826524846256,
-0.023471811786293983,
-0.012543009594082832,
-0.052782729268074036,
-0.022184347733855247,
0.043036915361881256,
0.007758546620607376,
0.004606955219060183,
0.05671016499400139,
0.02858937345445156,
-0.023856425657868385,
0.02681094966828823,
0.0278187058866024,
0.06493494659662247,
0.022267596796154976,
-0.05143182724714279,
0.022553320974111557,
-0.03367608040571213,
0.029222408309578896,
-0.014904436655342579,
-0.011653263121843338,
-0.04189446195960045,
-0.07256452739238739,
-0.008852938190102577,
-0.012881999835371971,
-0.009991530328989029,
-0.011210792697966099,
0.04493585601449013,
-0.009754199534654617,
0.0006257614586502314,
-0.010570486076176167,
0.013746004551649094,
0.06270120292901993,
-0.04882943630218506,
0.07355540245771408,
0.007893092930316925,
0.03095213510096073,
-0.06315738707780838,
-0.01637165993452072,
-0.03643922135233879,
-0.021416379138827324,
0.01021009311079979,
0.06869224458932877,
-0.003384094452485442,
0.04644949361681938,
0.08835352957248688,
0.03644018992781639,
-0.04882153868675232,
0.050358016043901443,
0.0629146620631218,
0.0051902406848967075,
-0.042062968015670776,
0.005920949392020702,
-0.021520840004086494,
-0.041691653430461884,
-0.00826909951865673,
-0.026920612901449203,
0.05508105456829071,
0.02875133790075779,
-0.011712024919688702,
0.018626060336828232,
-0.0018271912122145295,
-0.0003806545864790678,
-0.024393608793616295,
-0.07108602672815323,
0.0032956465147435665,
-0.013176790438592434,
-0.02841431461274624,
-0.00021761242533102632,
0.029678959399461746,
0.005217581521719694,
0.05784384161233902,
0.04264067858457565,
-0.034893911331892014,
-0.035572588443756104,
0.026594027876853943,
0.026699377223849297,
-0.03247169405221939,
-0.0750252902507782,
-0.045707374811172485,
0.03683747351169586,
0.049609217792749405,
-0.027065971866250038,
-0.08257775753736496,
0.01732940599322319,
0.035141535103321075,
-0.059433236718177795,
0.05514642223715782,
-0.005030148662626743,
0.06203273683786392,
0.06774330139160156,
-0.03401518985629082,
0.037854865193367004,
-0.002910947659984231,
-0.016069285571575165,
-0.0005415550549514592,
0.025008829310536385,
-0.011002736166119576,
-0.019884295761585236,
-0.05336968973278999,
0.02465691976249218,
0.03971249610185623,
0.027631210163235664,
0.028083166107535362,
-0.01711188070476055,
-0.049849461764097214,
0.008307993412017822,
0.024717845022678375,
-0.05602237582206726,
0.0075165587477386,
0.03659931197762489,
0.02616165205836296,
-0.0397791713476181,
-0.048132382333278656,
-0.02861095778644085,
-0.01205468736588955,
0.036367859691381454,
0.02809225395321846,
-0.029773719608783722,
-0.03814364969730377,
0.029188308864831924,
-0.000976651906967163,
-0.015502260997891426,
-0.08059797435998917,
0.04718450456857681,
0.0037569315172731876,
-0.0009697565692476928,
0.06724661588668823,
0.0140834990888834,
0.013655150309205055,
0.03650742024183273,
0.024784894660115242,
0.017578568309545517,
-0.059522952884435654,
0.013249481096863747,
-0.032896582037210464,
-0.012203066609799862,
-0.0042759389616549015,
-0.04888906329870224,
-0.028835879638791084,
-0.025586415082216263,
-0.0410366989672184,
-0.051640626043081284,
-0.006372176576405764,
0.020360387861728668,
-0.011935453861951828,
-0.0036847444716840982,
-0.006892881356179714,
0.0354352667927742,
-0.029063213616609573,
-0.028434941545128822,
-0.021170055493712425,
-0.033378057181835175,
-0.06224004924297333,
-0.04211681708693504,
0.03204226493835449,
0.03030269220471382,
0.03289413079619408,
0.025836272165179253,
0.005905003286898136,
0.0306620504707098,
-0.00010286494216416031,
-0.05403023585677147,
-0.00042395832133479416,
0.0011893674964085221,
-0.012272997759282589,
-0.043853968381881714,
0.026112498715519905,
0.02319590002298355,
0.00022685175645165145,
-0.05416637286543846,
0.02970377542078495,
0.014918927103281021,
0.0030499366112053394,
-0.01864801160991192,
-0.0006546748336404562,
0.029271408915519714,
-0.07074297964572906,
-0.04391298070549965,
0.018636777997016907,
-0.04130242019891739,
0.02858857810497284,
-0.058115795254707336,
-0.006638702470809221,
0.013631192967295647,
0.0018807523883879185,
0.027177169919013977,
-0.009346445091068745,
-0.007349726743996143,
0.03462095558643341,
-0.027850227430462837,
0.017236340790987015,
-0.04843750223517418,
0.04635091871023178,
-0.03090760111808777,
0.0017788003897294402,
-0.02479582093656063,
-0.00039411854231730103,
-0.045749858021736145,
0.03967539966106415,
0.012528891675174236,
-0.02830483950674534,
-0.0072417836636304855,
0.044285260140895844,
-0.034858375787734985,
0.043416500091552734,
0.0012819728581234813,
0.02799241989850998,
-0.012573217041790485,
0.06512720882892609,
-0.037441037595272064,
0.015091605484485626,
-0.02777635119855404,
0.020455313846468925,
-0.040879059582948685,
-0.004469779320061207,
-0.02630670741200447,
-0.03663775697350502,
0.022524073719978333,
0.05028892681002617,
0.04923750460147858,
0.01416015625,
-0.005741932429373264,
-0.005988850258290768,
0.033306483179330826,
-0.04906260222196579,
-0.020346704870462418,
-0.006617915816605091,
-0.016058681532740593,
-0.003465455723926425,
0.05747341364622116,
0.048515576869249344,
-0.044939156621694565,
-0.06471017748117447,
0.04087445139884949,
0.00820304173976183,
0.012697885744273663,
-0.0022265519946813583,
0.04232559725642204,
0.028996950015425682,
0.042894307523965836,
-0.03987802565097809,
0.007961158640682697,
-0.016513468697667122,
-0.04352633282542229,
0.04270026832818985,
-0.0026802606880664825,
0.020123809576034546,
0.007706675212830305,
-0.03573661297559738,
-0.025066081434488297,
0.04361331835389137,
0.022694692015647888,
0.032237567007541656,
-0.0024948404170572758,
-0.0630347803235054,
0.01996924914419651,
0.0030326093547046185,
-0.06067546829581261,
-0.00382792460732162,
0.011120700277388096,
-0.020137200132012367,
0.055513687431812286,
-0.018119502812623978,
0.011508656665682793,
0.04883996397256851,
0.025446752086281776,
-0.01446764450520277,
0.049842484295368195,
-0.028146376833319664,
0.020312106236815453,
0.05919400602579117,
-0.0786043331027031,
-0.023236926645040512,
-0.040482595562934875,
0.0765777975320816,
-0.05441724509000778,
0.029987867921590805,
0.047120608389377594,
0.012670840136706829,
0.017687875777482986,
-0.029567057266831398,
-0.04837183654308319,
0.004883035086095333,
-0.027032017707824707,
0.0716112032532692,
0.009455774910748005,
-0.07891053706407547,
0.05864744260907173,
0.005059077404439449,
-0.07349558919668198,
0.04883674904704094,
0.020082086324691772,
0.05804317817091942,
0.0258290097117424,
0.05017920210957527,
-0.05507468059659004,
0.02495514787733555,
-0.053723908960819244,
0.040271077305078506,
-0.0530942901968956,
-0.013457098044455051,
0.041205354034900665,
-0.042138632386922836,
-0.022255629301071167,
0.017481248825788498,
-0.0026275741402059793,
0.012960133142769337,
0.0491177961230278,
-0.046135496348142624,
-0.05815621092915535,
0.014492982998490334,
0.0074699390679597855,
-0.023048335686326027,
0.0006021913141012192,
-0.04415557160973549,
0.014264662750065327,
0.02617412433028221,
-0.009648824110627174,
-0.04024563357234001,
0.00014173211820889264,
0.0421527698636055,
-0.07091352343559265,
-0.04540611803531647,
0.04386943578720093,
-0.0009250192670151591,
-0.026329834014177322,
0.05133819580078125,
0.015708455815911293,
0.014490497298538685,
0.03617921471595764,
-0.0009949436644092202,
0.029353970661759377,
-0.06437484920024872,
-0.00889674760401249,
0.008996396325528622,
-0.012508757412433624,
0.05997433140873909,
0.008107981644570827,
0.015870289877057076,
0.019086763262748718,
0.010054240934550762,
-0.012872284278273582,
-0.05349113419651985,
-0.05548083037137985,
0.042319055646657944,
-0.018115507438778877,
0.013144129887223244,
0.004474599380046129,
-0.0439644493162632,
-0.07076092064380646,
-0.016670014709234238,
-0.03489943966269493,
0.017455752938985825,
-0.061216626316308975,
0.010853194631636143,
0.028166839852929115,
-0.02016284503042698,
-0.03862612694501877,
-0.07772372663021088,
-0.02558453008532524,
-0.01030273549258709,
-0.022120514884591103,
0.005621545948088169,
-0.023481687530875206,
0.040736593306064606,
-0.03779011592268944,
-0.05872005224227905,
0.03981319069862366,
0.010667553171515465,
-0.02945716492831707,
0.04654639586806297,
0.051932863891124725,
-0.032766491174697876,
-0.003356196219101548,
0.03935898467898369,
-0.0435340590775013,
0.01299713272601366,
0.004741618875414133,
0.0037116468884050846,
0.03318914398550987,
0.004214022774249315,
-0.05952524021267891,
-0.03172574192285538,
-0.08196848630905151,
-0.05030307546257973,
-0.03760368376970291,
0.0031846361234784126,
0.08305959403514862
] |
Biniam/en_ti_translate | [
"pytorch",
"marian",
"text2text-generation",
"transformers",
"translation",
"autotrain_compatible"
] | translation | {
"architectures": [
"MarianMTModel"
],
"model_type": "marian",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 14 | null | ---
tags:
- conversational
---
# Almas DialoGPT Model | [
-0.04228675365447998,
0.020848488435149193,
0.018887005746364594,
0.02040128968656063,
0.014100678265094757,
0.008903216570615768,
-0.0006974778370931745,
0.027478259056806564,
-0.015851091593503952,
0.01756395772099495,
0.030872171744704247,
-0.039618585258722305,
0.003499705111607909,
0.03430044278502464,
-0.050698328763246536,
-0.02306455560028553,
-0.023749472573399544,
-0.00041662988951429725,
-0.028788099065423012,
-0.02297273650765419,
0.026700621470808983,
-0.007259998470544815,
-0.032414134591817856,
0.01976523920893669,
-0.006366990972310305,
0.03686462715268135,
0.0006351841730065644,
0.010432310402393341,
0.023184876888990402,
-0.022781256586313248,
0.011219278909265995,
-0.04185683652758598,
-0.014615718275308609,
-0.03757750988006592,
-0.03444039449095726,
-0.040177471935749054,
0.02690284140408039,
-0.019875919446349144,
-0.015944797545671463,
0.028743131086230278,
-0.03421741724014282,
-0.0039919717237353325,
0.009636849164962769,
-0.030922027304768562,
0.0724034383893013,
-0.0020756833255290985,
-0.05040699243545532,
-0.033486250787973404,
0.021248623728752136,
-0.028062039986252785,
-0.04908980429172516,
-0.06128332391381264,
-0.05932535603642464,
-0.0231338981539011,
0.008353815414011478,
-0.057437144219875336,
-0.06427988409996033,
-0.01600709930062294,
0.09840424358844757,
-0.01677689328789711,
-0.013973107561469078,
0.002835273975506425,
-0.08843908458948135,
0.010287624783813953,
0.03218342736363411,
-0.06166524440050125,
0.01823480986058712,
-0.04616521671414375,
0.023064926266670227,
-0.0374876968562603,
0.05163026601076126,
-0.051876939833164215,
0.01990666054189205,
-0.06641136854887009,
-0.012566606514155865,
0.0023167943581938744,
0.04407886415719986,
0.05697941780090332,
-0.04697076231241226,
0.050954967737197876,
0.045392636209726334,
0.008703716099262238,
0.058969005942344666,
-0.0008879823726601899,
-0.03935685381293297,
0.05611967667937279,
-0.06306607276201248,
-0.0004875530139543116,
0.005507493391633034,
0.019170718267560005,
-0.019597027450799942,
-0.06091368943452835,
-0.02232571691274643,
-0.01131958793848753,
0.01422255951911211,
0.05020064488053322,
0.024784572422504425,
-0.045383255928754807,
0.02576458267867565,
0.03191386163234711,
0.03450803831219673,
0.04414582625031471,
-0.026571549475193024,
0.034880660474300385,
-0.012932272627949715,
0.02224244736135006,
0.021545419469475746,
-0.02443041279911995,
-0.04097532853484154,
0.02175399474799633,
0.014952477067708969,
-0.04727400094270706,
-0.027601810172200203,
0.04466201737523079,
0.0033742175437510014,
-0.01327226310968399,
0.06780686229467392,
-0.02571095898747444,
-0.03556543588638306,
-0.0609017089009285,
0.04634132608771324,
-0.010719409212470055,
-0.017667561769485474,
-0.0021898848935961723,
-0.04823905974626541,
-0.013245700858533382,
-0.03743043169379234,
-0.01593931019306183,
-0.011630135588347912,
-0.003527129767462611,
0.021790416911244392,
0.023428358137607574,
-0.02686096541583538,
-0.07146113365888596,
0.009548777714371681,
0.03026719205081463,
-0.07490840554237366,
0.0005818341160193086,
0.041057441383600235,
0.08058398216962814,
-0.07241664081811905,
-0.03643735125660896,
-0.015290460549294949,
0.01075179036706686,
-0.029057729989290237,
-0.01909174583852291,
0.0008459376986138523,
0.0020870387088507414,
-0.03676167502999306,
-0.012486950494349003,
0.03825296834111214,
-0.054546620696783066,
-0.004694342613220215,
0.04145188257098198,
0.003475325647741556,
0.026996636763215065,
-0.018241912126541138,
0.01095100399106741,
-0.003579749958589673,
-0.03365297615528107,
-0.055822886526584625,
0.03957981988787651,
-0.025684984400868416,
-0.05275309830904007,
-0.045540228486061096,
-0.035533130168914795,
0.017037419602274895,
0.0628255307674408,
0.02427799068391323,
-0.015718121081590652,
-0.02292545698583126,
0.03185715526342392,
0.058901380747556686,
0.039443161338567734,
-0.012888184748589993,
0.019110344350337982,
0.06133783236145973,
0.01571563631296158,
-0.03823748975992203,
0.07651402801275253,
0.014039660803973675,
-0.024011904373764992,
-0.04453030228614807,
-0.013288361020386219,
0.041352104395627975,
-0.012836878187954426,
0.019536318257451057,
0.04163825139403343,
-0.03225314989686012,
-0.020836828276515007,
0.0029557892121374607,
0.032807935029268265,
-0.027702560648322105,
0.004797643981873989,
-0.03737310692667961,
-0.026676036417484283,
-0.024412622675299644,
0.012413845397531986,
-0.042873673141002655,
-0.008345994167029858,
-0.031802523881196976,
-0.007100037764757872,
0.03879958391189575,
0.006841485388576984,
0.011190292425453663,
0.05255676060914993,
-0.007401755545288324,
0.06568801403045654,
-0.03826543688774109,
0.010872703045606613,
-0.04541894048452377,
-0.02608509361743927,
-0.031862128525972366,
0.03165863826870918,
0.021952424198389053,
0.05125986039638519,
-0.03963010385632515,
-0.04609569534659386,
0.031208578497171402,
0.06608854234218597,
0.02209891378879547,
0.024657567963004112,
-0.02162889763712883,
-0.013181369751691818,
0.04671796038746834,
0.03761649504303932,
-0.030741920694708824,
0.016146628186106682,
0.010148674249649048,
0.03237935155630112,
-0.02903973124921322,
-0.025739165022969246,
-0.04807797074317932,
0.011543898843228817,
-0.04452874884009361,
-0.059790365397930145,
0.036891594529151917,
0.03894747793674469,
-0.02236338146030903,
0.038641177117824554,
-0.005855860188603401,
-0.0022195884957909584,
0.03443323075771332,
0.006123574450612068,
-0.0030312174931168556,
-0.08714167773723602,
0.014763342216610909,
0.0243103988468647,
0.09419170022010803,
-0.05747207626700401,
0.01682308316230774,
0.014976179227232933,
0.022710539400577545,
0.018098536878824234,
-0.015151520259678364,
0.0473686158657074,
0.05187412351369858,
0.053761791437864304,
-0.03346344083547592,
0.03317425400018692,
0.0051862639375030994,
0.025051821023225784,
0.0659000352025032,
-0.015251641161739826,
0.057041753083467484,
-0.014476859010756016,
0.01997753418982029,
0.04808264970779419,
0.026963751763105392,
-0.025125937536358833,
0.029938189312815666,
0.07313960790634155,
0.00725609390065074,
0.03238853067159653,
0.03660007566213608,
-0.0008927740855142474,
-0.0005136591498740017,
-0.04768379405140877,
-0.0034241671673953533,
0.005797282326966524,
-0.020106283947825432,
0.06892599165439606,
0.0035121708642691374,
-0.008059264160692692,
0.0012935763224959373,
-0.009023004211485386,
0.006591972429305315,
0.05201555788516998,
0.007867720909416676,
-0.025366980582475662,
0.0038079682271927595,
-0.021949967369437218,
0.02276967093348503,
-0.046490225940942764,
-0.034396834671497345,
-0.011945182457566261,
-0.05564206466078758,
-0.015310064889490604,
-0.07941020280122757,
-0.035611920058727264,
-0.06324013322591782,
-0.01902473345398903,
0.04936285316944122,
0.007085112854838371,
0.02391427382826805,
0.001527708605863154,
-0.0025796466507017612,
-0.015377848409116268,
-0.058273352682590485,
-0.04243085905909538,
-0.03206119313836098,
0.00010677337559172884,
-0.04278695210814476,
0.02467927522957325,
0.032261863350868225,
0.038330599665641785,
0.0017333407886326313,
-0.023270122706890106,
-0.027380309998989105,
-0.03841719031333923,
0.04885656014084816,
0.015944980084896088,
-0.03601483628153801,
-0.041158124804496765,
0.009544786997139454,
0.015554475598037243,
0.0032783730421215296,
-0.022010749205946922,
-0.04166141897439957,
0.07184333354234695,
0.04932919889688492,
0.015563840046525002,
0.02171812392771244,
-0.002085104351863265,
-0.031151924282312393,
-0.025860536843538284,
-0.07085020840167999,
-0.022488076239824295,
-0.00166440533939749,
-0.012058460153639317,
-0.05064757168292999,
-0.020018944516777992,
-0.04980473592877388,
-0.004367027897387743,
0.009318587370216846,
0.011064409278333187,
0.045253653079271317,
0.020228248089551926,
0.02760753594338894,
0.012942634522914886,
-0.019938478246331215,
-0.0262924712151289,
0.053339920938014984,
-0.014320039190351963,
-0.008922336623072624,
-0.07422412931919098,
-0.048457905650138855,
0.040669117122888565,
-0.0002009551099035889,
-0.006106091663241386,
-0.017460986971855164,
0.03201023489236832,
0.02951863408088684,
0.006166346371173859,
0.04416266828775406,
-0.07451722025871277,
-0.00452254805713892,
-0.03426094725728035,
-0.0238474290817976,
-0.04034145921468735,
-0.024192215874791145,
-0.014435183256864548,
-0.006499186158180237,
0.04451817274093628,
-0.08873365819454193,
-0.029628029093146324,
-0.03505783528089523,
0.01749035343527794,
0.04676921293139458,
-0.00668687978759408,
-0.06428481638431549,
-0.01136460155248642,
-0.03824261948466301,
-0.020970970392227173,
-0.005426337476819754,
-0.018795598298311234,
-0.00499308854341507,
0.0228061955422163,
0.009292085655033588,
-0.03021666221320629,
0.05174790695309639,
0.009866241365671158,
0.0718221515417099,
0.0517793744802475,
-0.031178271397948265,
0.035131946206092834,
-0.025337163358926773,
0.028506392613053322,
-0.003384677693247795,
-0.03307591378688812,
-0.031616900116205215,
-0.10453908890485764,
-0.03699927031993866,
0.029754536226391792,
-0.02231067791581154,
0.006177181378006935,
0.03078039363026619,
-0.045277178287506104,
-0.002311757067218423,
-0.0036809290759265423,
0.038584887981414795,
0.0368758887052536,
-0.03503822162747383,
0.06940420717000961,
0.013929576613008976,
0.014801422134041786,
-0.05626807361841202,
-0.00769386300817132,
-0.056462179869413376,
-0.006308918818831444,
-0.006548043340444565,
0.049662619829177856,
0.014847184531390667,
0.05875881016254425,
0.06357862055301666,
0.034627679735422134,
-0.03934917598962784,
0.04741440713405609,
0.07220359891653061,
-0.03301181271672249,
-0.04368314892053604,
-0.014519699849188328,
-0.013268242590129375,
-0.0273542832583189,
0.00705007603392005,
-0.03183022513985634,
0.03179978206753731,
0.03614698350429535,
-0.00012996021541766822,
0.0009319292148575187,
-0.0020118148531764746,
-0.03694647178053856,
-0.025486085563898087,
-0.062179047614336014,
-0.009675412438809872,
0.00027564814081415534,
-0.015110599808394909,
0.056919634342193604,
0.05093099921941757,
0.016116490587592125,
0.06502105295658112,
0.022008102387189865,
-0.014720836654305458,
-0.05364193022251129,
0.025374913588166237,
0.01123850978910923,
-0.032436806708574295,
-0.053671516478061676,
-0.04948878288269043,
0.03817208111286163,
0.035715676844120026,
-0.029340822249650955,
-0.08416172116994858,
0.007991361431777477,
0.05093248561024666,
-0.04003476724028587,
0.048185817897319794,
-0.003490544157102704,
0.059448156505823135,
0.028193006291985512,
0.006934678182005882,
0.051098745316267014,
-0.07885956764221191,
0.026936642825603485,
-0.024172110483050346,
0.025143546983599663,
-0.05037793889641762,
-0.057628851383924484,
-0.06426448374986649,
0.04505055770277977,
0.012913988903164864,
0.009361808188259602,
0.021677911281585693,
-0.04064866155385971,
-0.04960419237613678,
0.000457101414212957,
0.04503743350505829,
-0.016207778826355934,
0.011588162742555141,
0.034253112971782684,
0.054866448044776917,
-0.06034769117832184,
0.012108168564736843,
0.023995481431484222,
0.01987791247665882,
0.014144924469292164,
-0.018747560679912567,
-0.045700620859861374,
-0.006548879202455282,
0.02761511132121086,
-0.046734318137168884,
-0.04113103449344635,
-0.08951590210199356,
0.022060921415686607,
-0.039020609110593796,
-0.03943555802106857,
0.07294999063014984,
0.07177401334047318,
0.05427714064717293,
0.07486455887556076,
-0.006777388509362936,
0.051078010350465775,
-0.03165143355727196,
0.014301290735602379,
-0.030568134039640427,
-0.026322830468416214,
0.004621411208063364,
-0.07659922540187836,
-0.028448160737752914,
-0.04231305792927742,
-0.03421435505151749,
-0.031445082277059555,
0.012985719367861748,
0.01184020098298788,
0.004230918828397989,
-0.003601633245125413,
0.00729209091514349,
0.016516953706741333,
-0.022091398015618324,
-0.02934751845896244,
-0.004238724708557129,
-0.010633650235831738,
-0.07450699061155319,
-0.06830567121505737,
0.023833736777305603,
-0.027684729546308517,
0.009753096848726273,
-0.006366701330989599,
0.020915448665618896,
0.04060954600572586,
-0.010580711998045444,
-0.029281236231327057,
0.008959783241152763,
0.02614614926278591,
-0.037101902067661285,
-0.0230750422924757,
0.0051634120754897594,
0.028358090668916702,
0.02773139625787735,
-0.03705108165740967,
0.03545023873448372,
0.008091775700449944,
-0.06544819474220276,
-0.015610486268997192,
0.03048841282725334,
0.012954788282513618,
-0.07421458512544632,
-0.00033439300023019314,
-0.0437571220099926,
-0.033766914159059525,
0.003981457557529211,
-0.039107974618673325,
-0.02153041772544384,
-0.012534058652818203,
0.0310816690325737,
0.031916338950395584,
0.005652569234371185,
-0.022762788459658623,
-0.0010706923203542829,
-0.007378581445664167,
-0.000020476030840654857,
-0.07880012691020966,
0.035083044320344925,
-0.02764943614602089,
0.01635085791349411,
-0.00725947692990303,
0.010267918929457664,
-0.034990373998880386,
0.05513913184404373,
-0.017939487472176552,
-0.002622717060148716,
-0.0015566771617159247,
-0.017442844808101654,
0.004100477322936058,
0.061921510845422745,
0.008444241248071194,
0.004443830344825983,
-0.037288639694452286,
0.0678127333521843,
-0.06076998636126518,
0.01161608099937439,
-0.007971004582941532,
-0.02097400277853012,
-0.02167520485818386,
0.01023810263723135,
0.0028389617800712585,
-0.05924759805202484,
0.023683784529566765,
0.038444098085165024,
0.027172882109880447,
0.037531256675720215,
-0.011112242005765438,
0.0026676375418901443,
0.01941150799393654,
-0.05120052024722099,
-0.03319091722369194,
0.0036395874340087175,
0.005293946247547865,
0.02999326027929783,
0.053981125354766846,
0.01982838846743107,
-0.05677640438079834,
-0.025013454258441925,
0.027062220498919487,
0.02183169312775135,
0.013214906677603722,
-0.003487375332042575,
0.043972890824079514,
0.04350150376558304,
0.06184501573443413,
-0.004561245441436768,
-0.0012253442546352744,
0.023511426523327827,
-0.013045454397797585,
-0.0145730497315526,
-0.004900177475064993,
0.005033073481172323,
-0.00490170530974865,
-0.02515006996691227,
-0.03962665796279907,
0.06883308291435242,
-0.013689986430108547,
0.001151795731857419,
-0.02414504438638687,
-0.035891517996788025,
0.06362247467041016,
-0.007976057007908821,
-0.03641904518008232,
-0.002844620728865266,
0.04267934337258339,
-0.022304406389594078,
0.03486112132668495,
-0.02163740247488022,
-0.00008144495950546116,
0.060907993465662,
0.02710064686834812,
0.005415786523371935,
0.012530196458101273,
-0.01507081463932991,
-0.007291380316019058,
0.016838790848851204,
-0.03634266182780266,
-0.010561460629105568,
-0.03533155843615532,
0.06827405095100403,
-0.04729076847434044,
0.05555550754070282,
0.030390724539756775,
0.03350334241986275,
0.020710507407784462,
-0.048220351338386536,
-0.027370328083634377,
-0.026994453743100166,
-0.04021143913269043,
0.06584908813238144,
-0.006730917375534773,
-0.03772897273302078,
0.06077887862920761,
0.043131016194820404,
-0.07718117535114288,
0.03448044881224632,
0.043806299567222595,
0.04864368587732315,
0.02700001932680607,
0.04298895597457886,
-0.04986843094229698,
0.024777835234999657,
-0.017763569951057434,
0.003667046781629324,
-0.03759126737713814,
-0.0004949192516505718,
-0.03471831604838371,
-0.04291326552629471,
-0.005673080217093229,
0.022854221984744072,
-0.03710461035370827,
0.0019113343441858888,
0.007901228033006191,
-0.028792139142751694,
-0.07220766693353653,
0.00564130675047636,
0.03234235569834709,
-0.016529951244592667,
-0.011559619568288326,
-0.03326950594782829,
0.02363257296383381,
0.04236878082156181,
-0.005540723912417889,
-0.06900671124458313,
0.019738629460334778,
-0.014209129847586155,
-0.0678263008594513,
-0.04659850895404816,
0.05666153132915497,
0.020099880173802376,
-0.010604440234601498,
-0.01192750595510006,
0.038003068417310715,
0.013137546367943287,
0.030746109783649445,
-0.013768112286925316,
0.006178274750709534,
-0.0642569437623024,
-0.00558127649128437,
0.026521285995841026,
0.009194566868245602,
0.003536424832418561,
-0.004460941534489393,
0.03353772684931755,
0.07837066799402237,
0.04436881095170975,
0.004043633583933115,
-0.05688206106424332,
-0.02617071010172367,
-0.002001061337068677,
-0.04485742002725601,
0.050015710294246674,
0.013169551268219948,
-0.06248767673969269,
-0.025709567591547966,
-0.022616242989897728,
0.005182465072721243,
0.024615993723273277,
-0.02442937158048153,
0.012543067336082458,
0.01993248611688614,
0.004960168618708849,
-0.039510782808065414,
-0.10402527451515198,
-0.04276198521256447,
-0.008723634295165539,
0.021818608045578003,
0.02550000511109829,
-0.07273002713918686,
0.02916991524398327,
-0.03424357995390892,
-0.00723677733913064,
0.06130438297986984,
-0.010454009287059307,
-0.020856093615293503,
0.0639212429523468,
0.06786646693944931,
-0.048847321420907974,
0.0612354651093483,
0.03348490223288536,
-0.027683066204190254,
0.0474654957652092,
0.0065047722309827805,
0.029368827119469643,
0.017383785918354988,
0.0180383138358593,
-0.012903106398880482,
-0.0055677094496786594,
0.0017475310014560819,
-0.038254909217357635,
0.0066274311393499374,
0.0018225384410470724,
0.05108514055609703
] |
BitanBiswas/mbert-bengali-ner-finetuned-ner | [
"pytorch",
"tensorboard",
"bert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"BertForTokenClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 4 | null | ---
language: pt
datasets:
- common_voice
metrics:
- wer
tags:
- audio
- speech
- wav2vec2
- pt
- apache-2.0
- portuguese-speech-corpus
- automatic-speech-recognition
- speech
- xlsr-fine-tuning-week
- PyTorch
license: apache-2.0
model-index:
- name: Rubens XLSR Wav2Vec2 Large 53 Portuguese
results:
- task:
name: Speech Recognition
type: automatic-speech-recognition
dataset:
name: Common Voice pt
type: common_voice
args: pt
metrics:
- name: Test WER
type: wer
value: 20.41%
---
# Wav2Vec2-Large-XLSR-53-Portuguese
Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Portuguese using the [Common Voice](https://huggingface.co/datasets/common_voice) dataset.
## Usage
The model can be used directly (without a language model) as follows:
```python
import torch
import torchaudio
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
test_dataset = load_dataset("common_voice", "pt", split="test[:2%]")
processor = Wav2Vec2Processor.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-Portuguese")
model = Wav2Vec2ForCTC.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-Portuguese")
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
\tspeech_array, sampling_rate = torchaudio.load(batch["path"])
\tbatch["speech"] = resampler(speech_array).squeeze().numpy()
\treturn batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
\tlogits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
predicted_ids = torch.argmax(logits, dim=-1)
print("Prediction:", processor.batch_decode(predicted_ids))
print("Reference:", test_dataset["sentence"][:2])
```
## Evaluation
The model can be evaluated as follows on the Portuguese test data of Common Voice.
```python
import torch
import torchaudio
from datasets import load_dataset, load_metric
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import re
test_dataset = load_dataset("common_voice", "pt", split="test")
wer = load_metric("wer")
processor = Wav2Vec2Processor.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-Portuguese")
model = Wav2Vec2ForCTC.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-Portuguese")
model.to("cuda")
chars_to_ignore_regex = '[\\,\\?\\.\\!\\-\\;\\:\\"\\“]' # TODO: adapt this list to include all special characters you removed from the data
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
\tbatch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
\tspeech_array, sampling_rate = torchaudio.load(batch["path"])
\tbatch["speech"] = resampler(speech_array).squeeze().numpy()
\treturn batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def evaluate(batch):
\tinputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
\twith torch.no_grad():
\t\tlogits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
pred_ids = torch.argmax(logits, dim=-1)
\tbatch["pred_strings"] = processor.batch_decode(pred_ids)
\treturn batch
result = test_dataset.map(evaluate, batched=True, batch_size=8)
print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
```
**Test Result (wer)**: 20.41 %
## Training
The Common Voice `train`, `validation` datasets were used for training.
The script used for training can be found at: https://github.com/RubensZimbres/wav2vec2/blob/main/fine-tuning.py
| [
-0.031416479498147964,
-0.033186621963977814,
-0.007363433483988047,
0.05110218748450279,
0.053545452654361725,
0.04039781540632248,
-0.011987190693616867,
-0.00808866135776043,
-0.025199778378009796,
0.076442651450634,
0.01436302438378334,
-0.02354598604142666,
-0.023402512073516846,
0.04322581738233566,
-0.01166577823460102,
-0.049275949597358704,
-0.009454348124563694,
-0.00840841792523861,
-0.07190703600645065,
-0.023207267746329308,
-0.004038515035063028,
0.024264385923743248,
-0.011142056435346603,
0.01485505886375904,
-0.01657872088253498,
0.007337841205298901,
-0.0006715101189911366,
0.019366327673196793,
0.0027270843274891376,
-0.06548140943050385,
-0.015422428958117962,
-0.014105666428804398,
-0.028909601271152496,
-0.05180846527218819,
-0.01878696121275425,
-0.015560482628643513,
-0.0026199466083198786,
0.015293536707758904,
0.03649714216589928,
0.05191485211253166,
-0.02092350646853447,
0.004372540395706892,
0.0008421990787610412,
-0.00967322289943695,
0.019707780331373215,
0.0053382799960672855,
-0.03032199665904045,
-0.019083969295024872,
0.037463776767253876,
-0.009212161414325237,
-0.035835787653923035,
-0.07496697455644608,
-0.003250807523727417,
0.02389724738895893,
-0.027717771008610725,
-0.026172839105129242,
-0.04203684255480766,
-0.0183626189827919,
0.07920769602060318,
-0.04686784744262695,
-0.03297156095504761,
0.030289482325315475,
-0.06354684382677078,
0.011337202973663807,
0.013868589885532856,
-0.04607843607664108,
-0.001218057470396161,
-0.036957819014787674,
0.03499877452850342,
-0.03190131485462189,
0.057616643607616425,
-0.0446028932929039,
0.0195428729057312,
-0.10563149303197861,
0.013108549639582634,
-0.011844667606055737,
0.03072037734091282,
0.02618381194770336,
-0.0356442853808403,
0.049709055572748184,
0.03527293726801872,
0.007182617671787739,
0.03149578720331192,
-0.010705584660172462,
-0.005020487122237682,
0.041475579142570496,
-0.05236933380365372,
0.005753994919359684,
0.020348861813545227,
0.04355241358280182,
-0.03997890278697014,
-0.04759376123547554,
-0.016203416511416435,
-0.04413767158985138,
0.016084816306829453,
0.05858411267399788,
0.04461998865008354,
-0.03624991700053215,
0.03802468627691269,
0.019150547683238983,
0.013551032170653343,
0.03972470387816429,
-0.004910212941467762,
0.056957121938467026,
-0.01927812770009041,
0.010303325019776821,
-0.0034085523802787066,
-0.031506896018981934,
-0.028217075392603874,
0.006003767251968384,
0.041774798184633255,
-0.0405561737716198,
-0.035970065742731094,
0.04919768124818802,
0.00043062676559202373,
-0.02033119834959507,
0.04965384677052498,
-0.05101277306675911,
-0.046993423253297806,
-0.06130119040608406,
0.0417192280292511,
0.015797926113009453,
0.01614157110452652,
0.017934072762727737,
-0.05429581552743912,
0.019941914826631546,
-0.02831440418958664,
-0.03077077679336071,
-0.0007758865249343216,
0.012951069511473179,
0.0016787993954494596,
0.018911726772785187,
0.01871633715927601,
-0.04868343099951744,
0.0003342444251757115,
0.014145221561193466,
-0.04767721891403198,
0.0280905794352293,
0.026363367214798927,
0.10078499466180801,
-0.05172233283519745,
-0.042725514620542526,
0.03472272306680679,
0.007418872322887182,
0.004777735099196434,
0.016892509534955025,
0.0063410731963813305,
-0.023376157507300377,
-0.043234776705503464,
-0.006868541706353426,
0.058818601071834564,
-0.057808633893728256,
-0.005317824427038431,
0.04433918744325638,
-0.040449872612953186,
0.04413461685180664,
-0.02335963025689125,
-0.004615167621523142,
0.02607540600001812,
-0.013998185284435749,
-0.011781368404626846,
0.03717581555247307,
-0.009473095647990704,
-0.027997158467769623,
-0.035464800894260406,
-0.048036716878414154,
-0.002926227170974016,
0.07302971184253693,
-0.0030650687403976917,
-0.0060126446187496185,
-0.020139245316386223,
0.0249903853982687,
0.04180571436882019,
0.045113466680049896,
-0.03644663840532303,
0.039040420204401016,
0.06662718951702118,
0.03138452395796776,
-0.016904199495911598,
0.08180069923400879,
0.019330425187945366,
-0.03631681203842163,
-0.03649907186627388,
0.007865178398787975,
-0.004417119547724724,
-0.03199212998151779,
-0.00726071884855628,
0.057037800550460815,
-0.016938362270593643,
-0.028453214094042778,
-0.010898463428020477,
0.04335494711995125,
-0.02284117601811886,
0.00016551012231502682,
-0.014426910318434238,
-0.009656831622123718,
-0.033530961722135544,
0.049167364835739136,
-0.024517841637134552,
0.008572491817176342,
-0.02300415001809597,
-0.031031155958771706,
-0.021701037883758545,
0.039535555988550186,
0.02276458777487278,
0.05068954452872276,
0.0056822760961949825,
0.09107004851102829,
-0.039368886500597,
0.008614637888967991,
-0.049378734081983566,
-0.047726068645715714,
-0.01251841988414526,
0.04825403541326523,
0.012934879399836063,
0.06770360469818115,
-0.0075339968316257,
-0.05059335008263588,
0.014719299972057343,
0.07667230814695358,
0.08262823522090912,
0.02489473670721054,
-0.017108242958784103,
-0.0036493900697678328,
0.029214337468147278,
0.05047940835356712,
-0.0630621388554573,
-0.05238889902830124,
-0.0005554468370974064,
0.02285310998558998,
-0.028457051143050194,
0.005550914444029331,
-0.022055724635720253,
0.044655680656433105,
-0.05105073004961014,
-0.08686035126447678,
0.06583663076162338,
0.008410695008933544,
-0.00279197096824646,
0.03959745913743973,
-0.024665815755724907,
-0.0008762897923588753,
0.02235298603773117,
0.00658237561583519,
-0.0030265306122601032,
-0.02910049818456173,
0.0030701225623488426,
-0.0036432354245334864,
0.04316776990890503,
-0.06310565769672394,
0.04199545830488205,
-0.017878862097859383,
0.00562989991158247,
0.03659440949559212,
-0.035179100930690765,
0.024045143276453018,
0.02546456828713417,
0.016119642183184624,
-0.02605653554201126,
0.01617525704205036,
-0.008448273874819279,
0.037570010870695114,
0.037219446152448654,
0.003742641769349575,
0.04075108841061592,
0.00921224057674408,
0.045073848217725754,
0.09572689980268478,
0.020050833001732826,
-0.005262307822704315,
0.013944016769528389,
0.07274828106164932,
-0.007737156935036182,
-0.010616517625749111,
0.07166662067174911,
-0.02855115570127964,
0.03072023205459118,
-0.02637920156121254,
0.003210620256140828,
0.006370152346789837,
-0.000897986872587353,
0.012410007417201996,
0.003376853419467807,
-0.026478130370378494,
0.012468121014535427,
-0.02843768149614334,
-0.0351388156414032,
0.05372150242328644,
-0.035348519682884216,
-0.023588022217154503,
0.0031161520164459944,
-0.002912286901846528,
0.00244501861743629,
-0.08414734154939651,
-0.03575080633163452,
0.004626864101737738,
-0.027675040066242218,
0.011482021771371365,
-0.05988002568483353,
-0.039385512471199036,
-0.051278021186590195,
-0.010297044180333614,
0.027921713888645172,
0.022801684215664864,
0.011934256181120872,
-0.02823498100042343,
0.018438974395394325,
-0.06110665947198868,
-0.04016808792948723,
-0.05686534568667412,
-0.03599592670798302,
-0.0367160402238369,
-0.058801401406526566,
0.0371679849922657,
0.02607167698442936,
0.046676769852638245,
0.0005581835866905749,
-0.0028466209769248962,
-0.019983557984232903,
-0.026262128725647926,
0.055848412215709686,
0.03792488947510719,
-0.036471687257289886,
-0.05675310641527176,
0.029699211940169334,
-0.0382235161960125,
0.011232913471758366,
0.01861467771232128,
-0.031533557921648026,
0.0812239795923233,
0.059010911732912064,
0.02758125029504299,
0.018098438158631325,
-0.03622240200638771,
-0.04119611531496048,
-0.06876485794782639,
-0.03240363299846649,
-0.0452229268848896,
-0.013364442624151707,
-0.02522958256304264,
-0.034028779715299606,
-0.01546850148588419,
-0.014904741197824478,
-0.016286445781588554,
-0.017291361466050148,
0.0007419205503538251,
0.05888010933995247,
0.03813658282160759,
0.03550931438803673,
0.034487802535295486,
-0.04165676236152649,
-0.05067845806479454,
0.08056221157312393,
0.03167543187737465,
-0.00019167653226759285,
-0.07576575875282288,
-0.03673877194523811,
0.019838886335492134,
0.025308270007371902,
-0.008339091204106808,
0.00433053495362401,
0.09319145977497101,
0.0039514596574008465,
0.0028389436192810535,
0.012327062897384167,
-0.03102915734052658,
-0.035637639462947845,
-0.015756282955408096,
-0.022009754553437233,
-0.012330127879977226,
-0.05472045764327049,
-0.012163600884377956,
0.012183748185634613,
0.04183671995997429,
-0.0512121319770813,
-0.05780988559126854,
-0.006830795202404261,
0.04390639811754227,
0.025852980092167854,
-0.0105607183650136,
-0.0341433547437191,
0.0021862469147890806,
-0.033380940556526184,
-0.034943047910928726,
0.004385596141219139,
0.013186379335820675,
0.021168604493141174,
0.03629855439066887,
0.01320950873196125,
-0.04381564259529114,
0.03440365567803383,
0.026997046545147896,
0.07769352197647095,
0.025049548596143723,
-0.04480960592627525,
0.007384112104773521,
-0.02528216689825058,
0.014621598646044731,
-0.011925390921533108,
-0.028677036985754967,
-0.032258398830890656,
-0.08868784457445145,
-0.01233680173754692,
0.007219730876386166,
-0.013734109699726105,
-0.022520679980516434,
0.04022995010018349,
-0.002256135456264019,
0.019390834495425224,
0.000019098069969913922,
0.015856178477406502,
0.03619060665369034,
-0.05601854994893074,
0.031848788261413574,
-0.002986650448292494,
0.03604906052350998,
-0.07425511628389359,
0.02736341767013073,
-0.02159888483583927,
-0.025705605745315552,
-0.010449404828250408,
0.05872297286987305,
0.010516348294913769,
0.050954196602106094,
0.08353441208600998,
0.022224150598049164,
-0.03911387175321579,
0.04202043637633324,
0.031513359397649765,
-0.04463319480419159,
-0.0573810450732708,
-0.01284718420356512,
-0.009348336607217789,
-0.05335284397006035,
0.0033651504199951887,
-0.03193831443786621,
0.05226733162999153,
0.022053977474570274,
-0.004316988866776228,
-0.02827233076095581,
0.008549518883228302,
-0.02610565908253193,
-0.020420923829078674,
-0.027394909411668777,
-0.05829600617289543,
0.022959820926189423,
-0.01324077695608139,
0.029606375843286514,
0.03918219357728958,
0.002515175146982074,
0.06466539949178696,
0.0462283231317997,
-0.020944304764270782,
-0.03782181441783905,
0.020525934174656868,
0.027610916644334793,
-0.03189750388264656,
-0.06036388874053955,
-0.03657921403646469,
0.05882386863231659,
0.03946983069181442,
0.005511473398655653,
-0.0806090235710144,
0.00206778128631413,
0.05777065083384514,
-0.03603386506438255,
0.05190601199865341,
-0.004744279198348522,
0.038897883147001266,
0.06147639825940132,
-0.03557818755507469,
0.0021120193414390087,
-0.028436187654733658,
0.013769663870334625,
0.006085612345486879,
0.03594030812382698,
-0.009463636204600334,
-0.04489617794752121,
-0.07462193816900253,
0.0214169230312109,
0.03488676995038986,
0.03236739709973335,
0.03985662758350372,
-0.02226518839597702,
-0.05735205486416817,
0.0052928864024579525,
0.015116918832063675,
-0.04292057454586029,
0.03601420298218727,
0.019790828227996826,
0.026922103017568588,
-0.03301609307527542,
-0.026879027485847473,
-0.0034918240271508694,
0.012124729342758656,
0.03025592304766178,
0.012359664775431156,
-0.039950739592313766,
-0.036669325083494186,
0.012013937346637249,
-0.01687174290418625,
-0.03921893984079361,
-0.06684498488903046,
0.019988596439361572,
-0.019630005583167076,
-0.0071144914254546165,
0.04019613191485405,
0.029457656666636467,
0.04859192669391632,
0.02494772896170616,
0.00958426296710968,
0.00883628148585558,
-0.030240217223763466,
0.032287705689668655,
-0.025733070448040962,
-0.022147303447127342,
-0.010072470642626286,
-0.03448846563696861,
-0.016599707305431366,
-0.033239878714084625,
-0.045893240720033646,
-0.0575486496090889,
-0.009563963860273361,
0.04339401423931122,
-0.03327412158250809,
-0.01528348121792078,
-0.01797451637685299,
0.045592449605464935,
-0.030787775292992592,
-0.03325371444225311,
-0.024363623932003975,
-0.02035514824092388,
-0.05612488463521004,
-0.06650598347187042,
0.02982383780181408,
-0.004188508726656437,
0.025614537298679352,
0.01767268218100071,
0.015095586888492107,
0.027408095076680183,
-0.0026187379844486713,
0.018075745552778244,
0.045587118715047836,
-0.004941500257700682,
-0.04946747422218323,
-0.025658266618847847,
0.0208999365568161,
0.0097386809065938,
0.058834340423345566,
-0.005331097170710564,
0.03788357600569725,
0.045035332441329956,
-0.02959386818110943,
-0.016550911590456963,
0.01368977315723896,
0.033779483288526535,
-0.06309696286916733,
-0.052907925099134445,
-0.010029682889580727,
-0.07300178706645966,
0.011497325263917446,
-0.023895006626844406,
0.005695630330592394,
0.02571316622197628,
0.025430304929614067,
0.05784042552113533,
-0.0013238951796665788,
-0.036461714655160904,
0.012852099724113941,
-0.02098696306347847,
-0.0002319530613021925,
-0.05477021634578705,
0.05474370718002319,
-0.025006329640746117,
0.007157235872000456,
-0.01056895311921835,
-0.013866445049643517,
-0.04809962958097458,
0.029148181900382042,
-0.005587791558355093,
-0.009267481975257397,
0.000027375330319046043,
0.012577068991959095,
-0.007760506123304367,
0.035892270505428314,
-0.05265899747610092,
0.008608448319137096,
-0.036341592669487,
0.05608691647648811,
-0.030179794877767563,
0.00833494309335947,
-0.008631320670247078,
-0.018488449975848198,
-0.02339821122586727,
-0.017766684293746948,
-0.0023865436669439077,
-0.061189986765384674,
0.05651208013296127,
0.04974919930100441,
0.033334676176309586,
0.02628469467163086,
-0.030438853427767754,
0.0006108603556640446,
-0.0026538646779954433,
-0.06082078814506531,
-0.007557836826890707,
-0.0018180375918745995,
0.02122117392718792,
0.012036249041557312,
0.043292898684740067,
0.03535955399274826,
-0.05487014725804329,
-0.05592265725135803,
0.02363981306552887,
0.0096171535551548,
-0.00015913660172373056,
0.0055076563730835915,
0.03449329361319542,
0.034543029963970184,
0.06585872173309326,
-0.030793286859989166,
0.002978748409077525,
-0.015102002769708633,
-0.04292219132184982,
0.030004356056451797,
-0.010592943988740444,
0.020154498517513275,
0.0023228127975016832,
-0.041685912758111954,
-0.016942135989665985,
0.06713641434907913,
0.017067255452275276,
-0.0008303485228680074,
-0.028476031497120857,
-0.027418265119194984,
-0.002101961290463805,
-0.005871680099517107,
-0.04768472537398338,
0.009498350322246552,
-0.015092556364834309,
-0.01858050934970379,
0.08655636757612228,
-0.016115283593535423,
0.00452664028853178,
0.04481634125113487,
0.014917068183422089,
-0.006541372276842594,
0.048503078520298004,
-0.0037770976778119802,
0.017954515293240547,
0.04814571142196655,
-0.07292705029249191,
-0.007926824502646923,
-0.03356143459677696,
0.05954018607735634,
-0.07455857843160629,
0.031084733083844185,
0.046222228556871414,
0.01788347028195858,
0.01583774760365486,
-0.04075121879577637,
-0.030680157244205475,
0.04518894851207733,
-0.04748797416687012,
0.08194638788700104,
0.02761562168598175,
-0.07150448858737946,
0.07291881740093231,
0.02892349474132061,
-0.10044281929731369,
0.05221344530582428,
0.04497823864221573,
0.027772611007094383,
0.03125974163413048,
0.051475051790475845,
-0.05332963168621063,
0.00816410779953003,
-0.04209811985492706,
0.03853072598576546,
-0.05933443829417229,
0.005582503043115139,
0.007510761730372906,
-0.04877812787890434,
-0.01845444180071354,
0.028561389073729515,
-0.025222131982445717,
-0.02474568411707878,
-0.006689746398478746,
-0.060164134949445724,
-0.04744483530521393,
-0.00022966258984524757,
0.026301516219973564,
-0.03659772127866745,
0.004843238275498152,
-0.03268111124634743,
0.01858029142022133,
0.027231568470597267,
-0.0017092644702643156,
-0.02834579534828663,
-0.02136894129216671,
0.013211068697273731,
-0.06604044139385223,
-0.05211901664733887,
0.037266891449689865,
0.014896729029715061,
-0.020638076588511467,
0.05595822632312775,
0.014340057037770748,
0.013107753358781338,
0.028657425194978714,
0.011579819023609161,
0.0256390031427145,
-0.06623709201812744,
-0.030093470588326454,
-0.010366949252784252,
0.019839560613036156,
0.022166520357131958,
-0.009860901162028313,
0.051427144557237625,
0.03799721226096153,
0.010500645264983177,
0.016692262142896652,
-0.003772305091843009,
-0.036149218678474426,
0.022526400163769722,
-0.04605067893862724,
0.01756366528570652,
0.017927734181284904,
-0.05048706382513046,
-0.030350109562277794,
-0.0034046273212879896,
0.006474998313933611,
0.023285508155822754,
-0.050160735845565796,
-6.552677973559184e-7,
0.03564511239528656,
-0.0461449958384037,
-0.039589766412973404,
-0.07317810505628586,
-0.03388810157775879,
-0.025325041264295578,
0.04337344691157341,
0.02510489709675312,
-0.05688493326306343,
0.007411071565002203,
-0.05757536739110947,
-0.06379450112581253,
0.01106063462793827,
0.025819499045610428,
-0.035191748291254044,
0.05037819594144821,
0.04354667291045189,
-0.0714992806315422,
0.022723400965332985,
0.036808080971241,
-0.008153833448886871,
0.025145890191197395,
0.004002793226391077,
0.007333593908697367,
0.05027288198471069,
0.030889686197042465,
-0.03137609735131264,
-0.021932950243353844,
-0.05597710609436035,
-0.021980226039886475,
-0.01984165422618389,
-0.004181413911283016,
0.05323028191924095
] |
Blabla/Pipipopo | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
language: pt
datasets:
- common_voice
metrics:
- wer
tags:
- audio
- speech
- wav2vec2
- pt
- apache-2.0
- portuguese-speech-corpus
- automatic-speech-recognition
- speech
- xlsr-fine-tuning-week
- PyTorch
license: apache-2.0
model-index:
- name: Rubens XLSR Wav2Vec2 Large 53 Portuguese
results:
- task:
name: Speech Recognition
type: automatic-speech-recognition
dataset:
name: Common Voice pt
type: common_voice
args: pt
metrics:
- name: Test WER
type: wer
value: 19.30%
---
# Wav2Vec2-Large-XLSR-53-Portuguese
Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Portuguese using the [Common Voice](https://huggingface.co/datasets/common_voice) dataset.
## Usage
The model can be used directly (without a language model) as follows:
```python
import torch
import torchaudio
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
test_dataset = load_dataset("common_voice", "pt", split="test[:2%]")
processor = Wav2Vec2Processor.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-a-Portuguese")
model = Wav2Vec2ForCTC.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-a-Portuguese")
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the audio files as arrays
def speech_file_to_array_fn(batch):
\tspeech_array, sampling_rate = torchaudio.load(batch["path"])
\tbatch["speech"] = resampler(speech_array).squeeze().numpy()
\treturn batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
\tlogits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
predicted_ids = torch.argmax(logits, dim=-1)
print("Prediction:", processor.batch_decode(predicted_ids))
print("Reference:", test_dataset["sentence"][:2])
```
## Evaluation
The model can be evaluated as follows on the Portuguese test data of Common Voice.
```python
import torch
import torchaudio
from datasets import load_dataset, load_metric
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import re
test_dataset = load_dataset("common_voice", "pt", split="test")
wer = load_metric("wer")
processor = Wav2Vec2Processor.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-a-Portuguese")
model = Wav2Vec2ForCTC.from_pretrained("Rubens/Wav2Vec2-Large-XLSR-53-a-Portuguese")
model.to("cuda")
chars_to_ignore_regex = '[\\,\\?\\.\\!\\-\\;\\:\\"\\“]' # TODO: adapt this list to include all special characters you removed from the data
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
\tbatch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
\tspeech_array, sampling_rate = torchaudio.load(batch["path"])
\tbatch["speech"] = resampler(speech_array).squeeze().numpy()
\treturn batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def evaluate(batch):
\tinputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
\twith torch.no_grad():
\t\tlogits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
pred_ids = torch.argmax(logits, dim=-1)
\tbatch["pred_strings"] = processor.batch_decode(pred_ids)
\treturn batch
result = test_dataset.map(evaluate, batched=True, batch_size=8)
print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
```
**Test Result(wer)**: 19.30 %
## Training
The Common Voice `train`, `validation` datasets were used for training.
The script used for training can be found at: https://github.com/RubensZimbres/wav2vec2/blob/main/fine-tuning.py
| [
-0.03218415006995201,
-0.033347420394420624,
-0.006950552109628916,
0.0514080673456192,
0.05362076312303543,
0.040367454290390015,
-0.012225414626300335,
-0.008699941448867321,
-0.025264646857976913,
0.07564893364906311,
0.014431513845920563,
-0.023847222328186035,
-0.022662054747343063,
0.04349149763584137,
-0.011851780116558075,
-0.0489920899271965,
-0.00963378045707941,
-0.008129984140396118,
-0.07175134867429733,
-0.022742539644241333,
-0.004444098100066185,
0.023901237174868584,
-0.011271527037024498,
0.014786718413233757,
-0.017359821125864983,
0.0071980939246714115,
-0.0010226360755041242,
0.02002698928117752,
0.0031345204915851355,
-0.06512551754713058,
-0.015079583041369915,
-0.01436814945191145,
-0.02891169860959053,
-0.052192024886608124,
-0.018561601638793945,
-0.016130300238728523,
-0.0022954961750656366,
0.015089760534465313,
0.036255721002817154,
0.051594242453575134,
-0.020816143602132797,
0.004380970261991024,
0.000711024331394583,
-0.009209327399730682,
0.018733154982328415,
0.0054074907675385475,
-0.031138084828853607,
-0.019715361297130585,
0.03775177523493767,
-0.009002195671200752,
-0.036301419138908386,
-0.07591556757688522,
-0.002658923389390111,
0.023951459676027298,
-0.027796270325779915,
-0.02589266188442707,
-0.04230666533112526,
-0.018236322328448296,
0.07952248305082321,
-0.046316731721162796,
-0.032455701380968094,
0.03008153848350048,
-0.06354273855686188,
0.01212672982364893,
0.014567054808139801,
-0.045598696917295456,
-0.0005177893908694386,
-0.037166353315114975,
0.034917328506708145,
-0.032151829451322556,
0.057504307478666306,
-0.04438150301575661,
0.019530458375811577,
-0.1055593490600586,
0.013290349394083023,
-0.011587145738303661,
0.031182516366243362,
0.026623867452144623,
-0.03573233261704445,
0.0500878244638443,
0.03517843782901764,
0.007239200174808502,
0.031064989045262337,
-0.010666938498616219,
-0.004823978524655104,
0.04176400974392891,
-0.05226415768265724,
0.005935249850153923,
0.02006935514509678,
0.042599618434906006,
-0.0403238907456398,
-0.048088811337947845,
-0.016235031187534332,
-0.04471198096871376,
0.016272975131869316,
0.058953605592250824,
0.04452209919691086,
-0.03642332926392555,
0.03809390589594841,
0.01924695260822773,
0.013841718435287476,
0.03879430145025253,
-0.005025328602641821,
0.05706683173775673,
-0.018631557002663612,
0.009456973522901535,
-0.003016554983332753,
-0.03194114938378334,
-0.028390806168317795,
0.00633962219581008,
0.04141119867563248,
-0.040580615401268005,
-0.03635421022772789,
0.04884964972734451,
0.0004806748765986413,
-0.02055252715945244,
0.05012919381260872,
-0.0515599250793457,
-0.046790484338998795,
-0.06145080551505089,
0.04206473007798195,
0.015863144770264626,
0.016530675813555717,
0.017580196261405945,
-0.05447285249829292,
0.019899865612387657,
-0.028459623456001282,
-0.03143345192074776,
-0.0009843860752880573,
0.012807685881853104,
0.0017007333226501942,
0.019248930737376213,
0.019316233694553375,
-0.04932157322764397,
0.00008729391265660524,
0.014531209133565426,
-0.04782033711671829,
0.029033193364739418,
0.025975380092859268,
0.10107914358377457,
-0.051688987761735916,
-0.04300728067755699,
0.03434544801712036,
0.00662551075220108,
0.004525790922343731,
0.017041988670825958,
0.0062620984390378,
-0.02452201396226883,
-0.04285995662212372,
-0.007311198394745588,
0.058400481939315796,
-0.05750337615609169,
-0.006680937949568033,
0.044554416090250015,
-0.03976092115044594,
0.04357064142823219,
-0.023751264438033104,
-0.0043539851903915405,
0.02580038644373417,
-0.013302047736942768,
-0.012559962458908558,
0.03793616220355034,
-0.008986030705273151,
-0.02801705151796341,
-0.03517094999551773,
-0.04828238859772682,
-0.0025952362921088934,
0.07349201291799545,
-0.0035111175384372473,
-0.005020536947995424,
-0.02034960314631462,
0.025192780420184135,
0.041203200817108154,
0.04577893763780594,
-0.036492038518190384,
0.038621965795755386,
0.06652775406837463,
0.031090492382645607,
-0.017199886962771416,
0.0812649354338646,
0.018893463537096977,
-0.036681462079286575,
-0.03657647594809532,
0.008058768697082996,
-0.0035486991982907057,
-0.03187829628586769,
-0.00755959702655673,
0.05771715193986893,
-0.016659075394272804,
-0.028186626732349396,
-0.011266881600022316,
0.043311845511198044,
-0.023162486031651497,
-0.00026626200997270644,
-0.014813780784606934,
-0.009943440556526184,
-0.03407420590519905,
0.049056779593229294,
-0.024968674406409264,
0.009108041413128376,
-0.022747043520212173,
-0.03096821904182434,
-0.021646330133080482,
0.03917510434985161,
0.022646574303507805,
0.051198724657297134,
0.005556612275540829,
0.09115232527256012,
-0.039682962000370026,
0.008719260804355145,
-0.049036286771297455,
-0.04790083318948746,
-0.012308567762374878,
0.047544047236442566,
0.013337645679712296,
0.06684347987174988,
-0.008177174255251884,
-0.051122233271598816,
0.014749799855053425,
0.07625424861907959,
0.08221591264009476,
0.02502216026186943,
-0.016810612753033638,
-0.003493962110951543,
0.02928723208606243,
0.05061069130897522,
-0.06246059760451317,
-0.05212835222482681,
0.000035852652217727154,
0.022636283189058304,
-0.02827499620616436,
0.00551637401804328,
-0.02164742350578308,
0.044604722410440445,
-0.05141269043087959,
-0.08637835085391998,
0.06530939042568207,
0.009130248799920082,
-0.0027627823874354362,
0.03975808247923851,
-0.024693921208381653,
-0.0012349592288956046,
0.022438522428274155,
0.006052366923540831,
-0.0032347855158150196,
-0.02933700568974018,
0.00357478647492826,
-0.0046575479209423065,
0.043047983199357986,
-0.06339281052350998,
0.042239781469106674,
-0.017681226134300232,
0.004974951036274433,
0.03678929805755615,
-0.03546573221683502,
0.024150637909770012,
0.026070715859532356,
0.0161531213670969,
-0.026384180411696434,
0.01579935848712921,
-0.007990158163011074,
0.038061317056417465,
0.03721960261464119,
0.003657028777524829,
0.04078710079193115,
0.00859658420085907,
0.04530949890613556,
0.0957394689321518,
0.019653793424367905,
-0.004944059532135725,
0.014611410908401012,
0.07252119481563568,
-0.007496216334402561,
-0.010831684805452824,
0.07251189649105072,
-0.02814638242125511,
0.030678708106279373,
-0.02609536424279213,
0.001631507184356451,
0.005924249533563852,
-0.0015628710389137268,
0.013129407539963722,
0.002958542201668024,
-0.02624296396970749,
0.012229705229401588,
-0.02805665135383606,
-0.03553982824087143,
0.05249832570552826,
-0.034919481724500656,
-0.023253420367836952,
0.0032287808135151863,
-0.003137463005259633,
0.0021415974479168653,
-0.08393359184265137,
-0.03477904945611954,
0.004428130108863115,
-0.028558509424328804,
0.011198052205145359,
-0.05931243300437927,
-0.03941325098276138,
-0.05169832706451416,
-0.010646441020071507,
0.02819027751684189,
0.023154672235250473,
0.012166322208940983,
-0.027898533269762993,
0.018595168367028236,
-0.06067253649234772,
-0.040145471692085266,
-0.05716178938746452,
-0.03554533049464226,
-0.03643934056162834,
-0.05889846011996269,
0.037729330360889435,
0.025925250723958015,
0.046750638633966446,
-0.0003566891246009618,
-0.0025208836887031794,
-0.019689137116074562,
-0.02643033303320408,
0.05655611678957939,
0.03839365392923355,
-0.03647031635046005,
-0.056471507996320724,
0.029221823439002037,
-0.03793126344680786,
0.010998597368597984,
0.017733337357640266,
-0.0314471609890461,
0.0818086490035057,
0.05879460275173187,
0.027685975655913353,
0.018019935116171837,
-0.035398390144109726,
-0.041679613292217255,
-0.06837145984172821,
-0.032296232879161835,
-0.04566928371787071,
-0.013512484729290009,
-0.024853698909282684,
-0.03396718576550484,
-0.015657534822821617,
-0.014756499789655209,
-0.016019508242607117,
-0.01650242693722248,
0.0008517246460542083,
0.058801617473363876,
0.038168661296367645,
0.03548645228147507,
0.034106310456991196,
-0.041718676686286926,
-0.05016378313302994,
0.0804818719625473,
0.032129544764757156,
0.0001834726717788726,
-0.07513018697500229,
-0.03659319877624512,
0.020133931189775467,
0.02586590126156807,
-0.008915286511182785,
0.004790907260030508,
0.09258073568344116,
0.004627569578588009,
0.0030696571338921785,
0.013710438273847103,
-0.031137945130467415,
-0.03527844324707985,
-0.01507848035544157,
-0.021724965423345566,
-0.012442703358829021,
-0.054988157004117966,
-0.012289207428693771,
0.012263852171599865,
0.04179004579782486,
-0.05217945948243141,
-0.057524263858795166,
-0.007055505644530058,
0.043574847280979156,
0.026057489216327667,
-0.010142314247786999,
-0.034483179450035095,
0.0022760226856917143,
-0.033250074833631516,
-0.034786101430654526,
0.004892417229712009,
0.01324185449630022,
0.02119436115026474,
0.03673891723155975,
0.0139729343354702,
-0.04414490610361099,
0.03417711704969406,
0.02745783142745495,
0.07768005132675171,
0.025082485750317574,
-0.045270610600709915,
0.007121047005057335,
-0.025150157511234283,
0.014905869960784912,
-0.011544998735189438,
-0.029108120128512383,
-0.03230470418930054,
-0.08894966542720795,
-0.01288654375821352,
0.007291396614164114,
-0.013796934857964516,
-0.022076504305005074,
0.03963445872068405,
-0.0016088784905150533,
0.018602751195430756,
-0.00036105187609791756,
0.015773935243487358,
0.03576045483350754,
-0.05576438084244728,
0.03208004683256149,
-0.0027087784837931395,
0.034413084387779236,
-0.07428097724914551,
0.026921017095446587,
-0.021594004705548286,
-0.02592325024306774,
-0.010473237372934818,
0.058554768562316895,
0.010667422786355019,
0.052191633731126785,
0.08308573067188263,
0.0220772884786129,
-0.03899059444665909,
0.04255647212266922,
0.03219284489750862,
-0.04447179287672043,
-0.05668547749519348,
-0.012433932162821293,
-0.010002889670431614,
-0.052358001470565796,
0.0036522538866847754,
-0.0319366455078125,
0.05207473784685135,
0.022496193647384644,
-0.004474774468690157,
-0.02845650352537632,
0.008551569655537605,
-0.026288611814379692,
-0.020283794030547142,
-0.027329662814736366,
-0.05846196785569191,
0.022588811814785004,
-0.013884836807847023,
0.02932668663561344,
0.04019404575228691,
0.0029022684320807457,
0.06584600359201431,
0.04617471620440483,
-0.021124443039298058,
-0.03802913427352905,
0.020852597430348396,
0.028286954388022423,
-0.0328492745757103,
-0.06081022694706917,
-0.03693123906850815,
0.058010369539260864,
0.038950033485889435,
0.0056553990580141544,
-0.07937231659889221,
0.001658528228290379,
0.057021815329790115,
-0.03617231175303459,
0.051461681723594666,
-0.005358337890356779,
0.03834536299109459,
0.06185014545917511,
-0.035435326397418976,
0.0020175729878246784,
-0.02835540473461151,
0.01414075680077076,
0.006506463512778282,
0.03618328645825386,
-0.00954331923276186,
-0.044836774468421936,
-0.07492364943027496,
0.021592820063233376,
0.03452121466398239,
0.03174648806452751,
0.04000956192612648,
-0.021808438003063202,
-0.05683377385139465,
0.005331911146640778,
0.01586303301155567,
-0.04235977306962013,
0.03628721460700035,
0.02004682458937168,
0.026199480518698692,
-0.03335506469011307,
-0.027020087465643883,
-0.0037453998811542988,
0.012080793268978596,
0.030151693150401115,
0.012486264109611511,
-0.040077388286590576,
-0.03657634183764458,
0.011376708745956421,
-0.015975872054696083,
-0.03956644609570503,
-0.06775492429733276,
0.020553037524223328,
-0.019706927239894867,
-0.007753799669444561,
0.04049563780426979,
0.03063722886145115,
0.04958583042025566,
0.025626854971051216,
0.00915256142616272,
0.00859546847641468,
-0.029706403613090515,
0.0325966514647007,
-0.025843191891908646,
-0.02264714241027832,
-0.009599929675459862,
-0.03508978709578514,
-0.017955085262656212,
-0.03326202183961868,
-0.04472609609365463,
-0.05770132690668106,
-0.009457340463995934,
0.04376170411705971,
-0.03333771973848343,
-0.015121479518711567,
-0.01724136434495449,
0.04499152675271034,
-0.030110951513051987,
-0.03321366384625435,
-0.02425408363342285,
-0.020719626918435097,
-0.05600586161017418,
-0.06672924757003784,
0.02980240061879158,
-0.004088836256414652,
0.025928974151611328,
0.01770680397748947,
0.015056980773806572,
0.026791369542479515,
-0.0022650749888271093,
0.017994455993175507,
0.04462062940001488,
-0.004385859705507755,
-0.048724688589572906,
-0.02593204565346241,
0.02043895795941353,
0.010864784941077232,
0.059437740594148636,
-0.005914556793868542,
0.03761130943894386,
0.044753361493349075,
-0.029326220974326134,
-0.0161899421364069,
0.014245688915252686,
0.03383331745862961,
-0.06346102058887482,
-0.05244169384241104,
-0.010578305460512638,
-0.07255381345748901,
0.012410868890583515,
-0.023954760283231735,
0.0055604008957743645,
0.025810036808252335,
0.025533998385071754,
0.05724944546818733,
-0.0010254564695060253,
-0.03653847798705101,
0.01267761830240488,
-0.02177131548523903,
0.0005511222989298403,
-0.05525638908147812,
0.05449644476175308,
-0.024882810190320015,
0.00771778728812933,
-0.01079322025179863,
-0.013187524862587452,
-0.048235729336738586,
0.029318813234567642,
-0.005714881233870983,
-0.009249649941921234,
-0.00042430934263393283,
0.012879240326583385,
-0.00766691192984581,
0.03556511923670769,
-0.05238724499940872,
0.008064736612141132,
-0.03610183671116829,
0.056837569922208786,
-0.029798688367009163,
0.008729711174964905,
-0.009106305427849293,
-0.018418557941913605,
-0.023902397602796555,
-0.017624393105506897,
-0.0020602780859917402,
-0.06101556122303009,
0.056637879461050034,
0.049688369035720825,
0.03398960456252098,
0.025774378329515457,
-0.03074628673493862,
0.0006525912904180586,
-0.0022752070799469948,
-0.06072920560836792,
-0.007149841170758009,
-0.002072105649858713,
0.021974103525280952,
0.01307868305593729,
0.04301347956061363,
0.03530305624008179,
-0.05472196266055107,
-0.05505334958434105,
0.023581333458423615,
0.010258279740810394,
-0.0005449527525343001,
0.005724099464714527,
0.03351816162467003,
0.03348483517765999,
0.06587376445531845,
-0.03094789758324623,
0.002738398965448141,
-0.015620801597833633,
-0.04312388226389885,
0.029796870425343513,
-0.010697264224290848,
0.02002447284758091,
0.0027196607552468777,
-0.04214460402727127,
-0.016866033896803856,
0.06719082593917847,
0.01760442741215229,
-0.0008128823828883469,
-0.02842111513018608,
-0.02729448676109314,
-0.002501576906070113,
-0.005077293608337641,
-0.04725592955946922,
0.009646679274737835,
-0.014721253886818886,
-0.0185578390955925,
0.08574368059635162,
-0.015801135450601578,
0.004397910088300705,
0.04460621625185013,
0.015323593281209469,
-0.007054343353956938,
0.04833593964576721,
-0.0036127527710050344,
0.019049854949116707,
0.04859098047018051,
-0.07255882769823074,
-0.007782955188304186,
-0.0338621586561203,
0.060018979012966156,
-0.0749928280711174,
0.03088380955159664,
0.04640443995594978,
0.01809455081820488,
0.015879075974225998,
-0.04158439859747887,
-0.03050398826599121,
0.04431835189461708,
-0.04680044576525688,
0.08154436945915222,
0.02716677263379097,
-0.07128454744815826,
0.07291442155838013,
0.028334008529782295,
-0.09945781528949738,
0.051821477711200714,
0.044900450855493546,
0.028320057317614555,
0.0318722166121006,
0.051522597670555115,
-0.05409371480345726,
0.007576408796012402,
-0.04223869740962982,
0.038114793598651886,
-0.05999961495399475,
0.005918747279793024,
0.007371015381067991,
-0.04913442209362984,
-0.01926705427467823,
0.028533676639199257,
-0.02465989626944065,
-0.024257846176624298,
-0.005474801175296307,
-0.059732455760240555,
-0.0478193499147892,
-0.00052836345275864,
0.025336306542158127,
-0.03700830787420273,
0.0037852090317755938,
-0.03347769007086754,
0.018283629789948463,
0.026764709502458572,
-0.0013622594997286797,
-0.028095165267586708,
-0.02127796970307827,
0.012908738106489182,
-0.06646376103162766,
-0.052730780094861984,
0.037076495587825775,
0.014939627610147,
-0.020412756130099297,
0.05693360045552254,
0.014190120622515678,
0.013026593253016472,
0.028458092361688614,
0.011919422075152397,
0.026175692677497864,
-0.06544987857341766,
-0.030417172238230705,
-0.010275210253894329,
0.019024327397346497,
0.02303793653845787,
-0.010481570847332478,
0.05141466483473778,
0.03826349973678589,
0.010843976400792599,
0.016789717599749565,
-0.004010661505162716,
-0.036051809787750244,
0.021951280534267426,
-0.04617699980735779,
0.017373517155647278,
0.017701638862490654,
-0.05042080581188202,
-0.030534829944372177,
-0.002878631232306361,
0.005854285787791014,
0.02331722527742386,
-0.05041978508234024,
-0.00003318741073599085,
0.03549643233418465,
-0.045461926609277725,
-0.03997161611914635,
-0.07326152175664902,
-0.033930592238903046,
-0.025025438517332077,
0.043802618980407715,
0.024306153878569603,
-0.05685240030288696,
0.008664493449032307,
-0.058016493916511536,
-0.06438624858856201,
0.011553144082427025,
0.025638645514845848,
-0.03491665795445442,
0.051324713975191116,
0.04448087140917778,
-0.07107800245285034,
0.022526560351252556,
0.037690166383981705,
-0.008396072313189507,
0.025320863351225853,
0.00395151088014245,
0.00767145399004221,
0.05014634132385254,
0.02985699474811554,
-0.032338760793209076,
-0.022334057837724686,
-0.05650368705391884,
-0.02303355373442173,
-0.020942186936736107,
-0.004596218932420015,
0.0533202700316906
] |
BogdanKuloren/continual-learning-paper-embeddings-model | [
"pytorch",
"mpnet",
"feature-extraction",
"transformers"
] | feature-extraction | {
"architectures": [
"MPNetModel"
],
"model_type": "mpnet",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 11 | null | ---
language:
- mt
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- mt
- robust-speech-event
- model_for_talk
- hf-asr-leaderboard
datasets:
- mozilla-foundation/common_voice_8_0
model-index:
- name: wav2vec2-large-xls-r-1b-cv8-mt
results:
- task:
name: Automatic Speech Recognition
type: automatic-speech-recognition
dataset:
name: Common Voice 8
type: mozilla-foundation/common_voice_8_0
args: mt
metrics:
- name: Test WER
type: wer
value: 17.57
- name: Test CER
type: cer
value: 3.86
- task:
name: Automatic Speech Recognition
type: automatic-speech-recognition
dataset:
name: Robust Speech Event - Dev Data
type: speech-recognition-community-v2/dev_data
args: mt
metrics:
- name: Test WER
type: wer
value: null
- name: Test CER
type: cer
value: null
---
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
# wav2vec2-large-xls-r-1b-cv8-mt
This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the common_voice dataset.
It achieves the following results on the evaluation set:
- Loss: 0.2210
- Wer: 0.1974
## Model description
Note: another version of this model is available with a KenLM 3gram model. This model performs better than this model. See https://huggingface.co/RuudVelo/wav2vec2-large-xls-r-1b-cv8-mt-lm
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following config and hyperparameters were used during training:
model = Wav2Vec2ForCTC.from_pretrained(
"facebook/wav2vec2-xls-r-1b",
attention_dropout=0.05,
hidden_dropout=0.05,
feat_proj_dropout=0.05,
mask_time_prob=0.55,
mask_feature_prob=0.10,
layerdrop=0.05,
ctc_zero_infinity=True,
ctc_loss_reduction="mean",
pad_token_id=processor.tokenizer.pad_token_id,
vocab_size=len(processor.tokenizer),
)
from transformers import TrainingArguments
training_args = TrainingArguments(
output_dir=repo_name,
group_by_length=True,
per_device_train_batch_size=32,
gradient_accumulation_steps=2,
evaluation_strategy="steps",
num_train_epochs=50,
gradient_checkpointing=True,
fp16=True,
save_steps=400,
eval_steps=400,
logging_steps=400,
learning_rate=5.5e-05,
warmup_steps=500,
save_total_limit=2,
push_to_hub=True,
report_to="tensorboard")
### Training results
| Training Loss | Epoch | Step | Validation Loss | Wer |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| 3.4564 | 13.33 | 400 | 0.3783 | 0.3981 |
| 0.7931 | 26.66 | 800 | 0.2377 | 0.2298 |
| 0.5364 | 39.98 | 1200 | 0.2210 | 0.1974 |
Note that the test WER of 19.74 is different than the above reported 17.57. This was due to a bug which was found while processing files with an older version of the datasets library. The right library is listed below.
### Framework versions
- Transformers 4.17.0.dev0
- Pytorch 1.10.2+cu102
- Datasets 1.18.3
- Tokenizers 0.11.0
| [
-0.03830009326338768,
-0.0004024097870569676,
-0.015958722680807114,
0.033624276518821716,
0.05210654437541962,
0.02862856350839138,
-0.015243597328662872,
-0.020316997542977333,
-0.02942916378378868,
0.05865589529275894,
0.01954003795981407,
-0.0393550731241703,
0.01259087398648262,
0.011778943240642548,
-0.025752557441592216,
-0.05680546164512634,
-0.029493410140275955,
0.0034616992343217134,
-0.042769208550453186,
-0.014348921366035938,
0.008141238242387772,
0.0342499241232872,
-0.04206417500972748,
0.02288331836462021,
-0.002827964723110199,
0.01129551138728857,
-0.014821457676589489,
0.02952488325536251,
-0.002644164953380823,
-0.05493355914950371,
-0.015269733034074306,
-0.05579373985528946,
-0.048801444470882416,
-0.024000927805900574,
-0.008662097156047821,
0.017183588817715645,
0.006067929323762655,
0.020857753232121468,
0.02820727415382862,
0.04719037935137749,
-0.004136490635573864,
0.018800344318151474,
-0.007002303376793861,
-0.012386515736579895,
0.029058881103992462,
-0.0020515862852334976,
-0.03823971748352051,
-0.030512340366840363,
0.030470261350274086,
-0.03975914791226387,
-0.04521763697266579,
-0.050394512712955475,
0.013895204290747643,
0.025895997881889343,
-0.017628738656640053,
-0.026869678869843483,
-0.04597989842295647,
-0.020651517435908318,
0.0716218650341034,
-0.03930841013789177,
-0.03935879468917847,
0.02234586700797081,
-0.051117125898599625,
0.006285109091550112,
0.02248174138367176,
-0.060468725860118866,
0.013740835711359978,
-0.03387454152107239,
0.04519828036427498,
-0.02297450229525566,
0.046114735305309296,
-0.0239117294549942,
0.00925365649163723,
-0.1026131883263588,
-0.005084450356662273,
-0.00027091155061498284,
0.04586955904960632,
0.0591161884367466,
-0.03012007474899292,
0.05803171172738075,
0.02381705492734909,
0.016338735818862915,
0.030603423714637756,
-0.017602136358618736,
0.035782523453235626,
0.03357531130313873,
-0.04071121662855148,
0.029134690761566162,
0.018298493698239326,
0.008030758239328861,
-0.010200168937444687,
-0.039610400795936584,
-0.03931146487593651,
-0.0501578189432621,
-0.011057306081056595,
0.0448552668094635,
0.048456475138664246,
-0.020506149157881737,
0.03625998646020889,
0.017642278224229813,
0.029901079833507538,
0.011680337600409985,
-0.025940094143152237,
0.06854076683521271,
-0.0353567935526371,
-0.0038832039572298527,
-0.009032434783875942,
-0.010543369688093662,
-0.034920357167720795,
0.019762378185987473,
0.02270796149969101,
-0.035916998982429504,
-0.05655308812856674,
0.03073881007730961,
-0.0021967426873743534,
-0.03471239283680916,
0.06577571481466293,
-0.03384118154644966,
-0.026538999751210213,
-0.05670096352696419,
0.04010053724050522,
0.017293225973844528,
0.020885629579424858,
0.019027404487133026,
-0.053665388375520706,
0.02014433778822422,
-0.030000995844602585,
-0.04261612147092819,
0.01457455288618803,
-0.0015901153674349189,
-0.008838917128741741,
0.04936334863305092,
0.014973331242799759,
-0.06641863286495209,
-0.017519230023026466,
0.003441288135945797,
-0.04338918253779411,
0.012830193154513836,
-0.0024289090652018785,
0.08352548629045486,
-0.042890820652246475,
-0.07407470047473907,
0.012849632650613785,
0.02219131588935852,
-0.009151219390332699,
0.040178727358579636,
0.026383208110928535,
-0.0022692398633807898,
-0.02882295288145542,
-0.0021902653388679028,
0.04223041608929634,
-0.08509580790996552,
0.007810307200998068,
0.06862808018922806,
-0.02074405364692211,
0.038944460451602936,
-0.025054089725017548,
-0.01674751564860344,
0.014688769355416298,
-0.027537288144230843,
0.004678249359130859,
0.03749750927090645,
-0.00792967900633812,
-0.02326924540102482,
-0.03205990046262741,
-0.0487196110188961,
0.0018114767735823989,
0.05772509425878525,
0.0033881543204188347,
-0.013918057084083557,
-0.03663270175457001,
0.03441421315073967,
0.05367496609687805,
0.017113925889134407,
-0.056910112500190735,
0.0376322865486145,
0.07108897715806961,
0.03477811440825462,
-0.038058698177337646,
0.06044020876288414,
0.006265642587095499,
-0.022090159356594086,
-0.055553510785102844,
0.024533139541745186,
0.006223665084689856,
-0.05060987547039986,
-0.0027103694155812263,
0.046883247792720795,
0.0029472513124346733,
-0.045766133815050125,
-0.046305716037750244,
0.06886725127696991,
-0.010575315915048122,
-0.01269504800438881,
0.006534371059387922,
-0.019908400252461433,
-0.043489839881658554,
0.03826288878917694,
-0.028166817501187325,
0.0015647155232727528,
-0.03327995538711548,
-0.04114817827939987,
0.009448397904634476,
0.01875431090593338,
0.03239249810576439,
0.0657636895775795,
-0.0033890081103891134,
0.08033524453639984,
-0.0364936962723732,
0.01591307856142521,
-0.023594090715050697,
-0.05301345884799957,
-0.02064717374742031,
0.06752312183380127,
0.0297449491918087,
0.07365026324987411,
-0.001501421327702701,
-0.043918684124946594,
0.030704474076628685,
0.08180224150419235,
0.06757248938083649,
0.006483787205070257,
-0.029100440442562103,
-0.009759092703461647,
0.039469849318265915,
0.04241463914513588,
-0.0747741162776947,
-0.031629256904125214,
0.007259116508066654,
0.038145288825035095,
-0.02598472312092781,
0.0029662225861102343,
-0.018209394067525864,
0.04933907836675644,
-0.06024860963225365,
-0.08790276944637299,
0.0595865473151207,
0.023967910557985306,
0.012181496247649193,
0.031922321766614914,
-0.020752375945448875,
-0.003521999344229698,
0.032422035932540894,
0.014735335484147072,
-0.007801828905940056,
-0.028799982741475105,
0.01684645004570484,
0.01880962960422039,
0.04884340241551399,
-0.057863425463438034,
0.04111524671316147,
-0.029889782890677452,
0.004995450377464294,
0.031158259138464928,
-0.04331139102578163,
0.03662748634815216,
0.027086492627859116,
0.022024327889084816,
-0.03685692697763443,
0.0023329416289925575,
0.014198455959558487,
0.03970741108059883,
0.0400165319442749,
0.009735152125358582,
0.061490610241889954,
0.02249041572213173,
0.0579228512942791,
0.07585866004228592,
0.0422234982252121,
0.010276548564434052,
0.013045030646026134,
0.07601319253444672,
0.010354479774832726,
-0.025941815227270126,
0.07894216477870941,
-0.04226104915142059,
0.024811437353491783,
-0.04430675134062767,
0.0027470942586660385,
-0.007819798775017262,
-0.007075383327901363,
0.016624340787529945,
0.017699509859085083,
-0.014389274641871452,
-0.0038625982124358416,
-0.02838161028921604,
-0.028767084702849388,
0.05024499073624611,
-0.02866409160196781,
-0.020532401278614998,
-0.004658352583646774,
-0.013836256228387356,
-0.00494867330417037,
-0.07690957188606262,
-0.024071788415312767,
-0.005155814811587334,
-0.03856688737869263,
0.010325145907700062,
-0.07464121282100677,
-0.018164757639169693,
-0.06303516775369644,
0.0024057053960859776,
0.03721247985959053,
0.007446091156452894,
0.005286747124046087,
-0.04247839376330376,
-0.0023590056225657463,
-0.06061709672212601,
-0.04492627829313278,
-0.049568261951208115,
-0.032648466527462006,
-0.029282616451382637,
-0.06097475439310074,
0.028201650828123093,
0.027075964957475662,
0.037142980843782425,
-0.005234742537140846,
-0.012960724532604218,
-0.023676475510001183,
-0.020423326641321182,
0.05757613107562065,
0.03520483151078224,
-0.04301418736577034,
-0.05323198065161705,
0.01730996184051037,
-0.03994865342974663,
0.009412365034222603,
-0.011872567236423492,
-0.029564250260591507,
0.08774819225072861,
0.05891180410981178,
0.013564128428697586,
0.01819617860019207,
-0.02516186609864235,
-0.05316600576043129,
-0.05245760455727577,
-0.02687831036746502,
-0.026588337495923042,
-0.022298891097307205,
-0.03554330766201019,
-0.03744431585073471,
-0.0025424850173294544,
-0.022646784782409668,
0.000025334999008919112,
-0.020031124353408813,
-0.005852296017110348,
0.05163167417049408,
0.026874365285038948,
0.020106898620724678,
0.03304288536310196,
-0.034401677548885345,
-0.04160631448030472,
0.07972008734941483,
0.036086421459913254,
0.004244511015713215,
-0.07433059066534042,
-0.038155678659677505,
0.015528551302850246,
0.029965858906507492,
-0.012465589679777622,
-0.014062147587537766,
0.08168424665927887,
-0.00337979756295681,
-0.01955580711364746,
0.025301817804574966,
-0.032051458954811096,
-0.01716870442032814,
-0.035970740020275116,
-0.00956023670732975,
-0.009472648613154888,
-0.05320700630545616,
0.008244047872722149,
0.0014080418040975928,
0.05235057324171066,
-0.057733435183763504,
-0.047871336340904236,
-0.023068509995937347,
0.043600477278232574,
0.035868287086486816,
-0.010212656110525131,
-0.033374059945344925,
-0.004381134174764156,
-0.053221020847558975,
-0.012748043984174728,
0.011049522086977959,
0.01861712522804737,
0.006208555772900581,
0.05745582655072212,
0.017396587878465652,
-0.02675570547580719,
0.04182683303952217,
0.034760475158691406,
0.06472302228212357,
0.017234934493899345,
-0.05861903727054596,
0.010819781571626663,
-0.02015344798564911,
0.029106097295880318,
-0.0056985532864928246,
-0.019426647573709488,
-0.033934686332941055,
-0.0974869653582573,
-0.0074789137579500675,
0.009631749242544174,
-0.01683538407087326,
-0.015163701958954334,
0.03043544664978981,
-0.010329472832381725,
0.0002346867258893326,
0.005744239315390587,
0.026104062795639038,
0.03225955367088318,
-0.04415430128574371,
0.045665543526411057,
-0.010691570118069649,
0.038837797939777374,
-0.07887101173400879,
0.01303505152463913,
-0.012212586589157581,
-0.03243520110845566,
0.022865787148475647,
0.07021594792604446,
0.014696184545755386,
0.054364074021577835,
0.07124930620193481,
0.03218826279044151,
-0.044110048562288284,
0.04815809801220894,
0.05760491266846657,
-0.05383756756782532,
-0.04985455051064491,
0.006842987146228552,
-0.021994296461343765,
-0.04673713445663452,
-0.020409008488059044,
-0.028675515204668045,
0.04131690785288811,
0.030442560091614723,
-0.014215316623449326,
-0.0007406623335555196,
0.026859834790229797,
-0.028545977547764778,
-0.015580459497869015,
-0.06027519330382347,
-0.04450639337301254,
0.01191714033484459,
-0.03184941038489342,
0.04331070929765701,
0.034210145473480225,
0.007477660663425922,
0.05937134474515915,
0.040407080203294754,
-0.04914817586541176,
-0.027613766491413116,
0.036178942769765854,
0.02073737606406212,
-0.035238057374954224,
-0.05320315808057785,
-0.006014608312398195,
0.057175248861312866,
0.03294968232512474,
-0.01245911419391632,
-0.0697106420993805,
-0.012509189546108246,
0.05189476162195206,
-0.03471638262271881,
0.03598889708518982,
-0.02712291106581688,
0.03717011213302612,
0.04940379038453102,
-0.013213681988418102,
0.04022761434316635,
-0.03287464380264282,
0.017317190766334534,
0.00045632501132786274,
0.00538139371201396,
-0.019049612805247307,
-0.023480037227272987,
-0.06401073187589645,
0.013245834968984127,
0.03867049142718315,
0.02894570678472519,
0.05913350358605385,
-0.02025076560676098,
-0.026620808988809586,
-0.005070508923381567,
0.02834330126643181,
-0.03996653854846954,
0.013696687296032906,
0.009370403364300728,
0.047609277069568634,
-0.028948375955224037,
-0.015153028070926666,
-0.02178962714970112,
-0.0009217768674716353,
0.01869540475308895,
0.016005273908376694,
-0.047278083860874176,
-0.024374840781092644,
0.02957984246313572,
-0.010777318850159645,
-0.027481429278850555,
-0.07639987021684647,
0.04077078029513359,
-0.0058812592178583145,
-0.0031420160084962845,
0.02744189463555813,
0.02870820462703705,
0.03194999322295189,
0.04718753695487976,
0.018732288852334023,
0.008774036541581154,
-0.02145344205200672,
0.026869460940361023,
-0.03234592452645302,
-0.027237359434366226,
-0.015082200057804585,
-0.026657551527023315,
-0.006985184270888567,
-0.027547674253582954,
-0.023153161630034447,
-0.036530859768390656,
-0.0019893262069672346,
0.04088819772005081,
-0.0327802374958992,
-0.01605251245200634,
-0.022409964352846146,
0.034023404121398926,
-0.03432496264576912,
-0.03957666829228401,
-0.03585003688931465,
-0.03643028065562248,
-0.05793768912553787,
-0.06704135239124298,
0.03193666785955429,
-0.0027048904448747635,
0.020862620323896408,
0.031075457111001015,
0.028747400268912315,
0.03696189820766449,
-0.009830896742641926,
-0.005031046457588673,
0.030852150171995163,
-0.021801261231303215,
-0.03631696105003357,
-0.040375083684921265,
0.025962190702557564,
0.018322331830859184,
0.05615988001227379,
-0.024671632796525955,
0.01817914843559265,
0.022831659764051437,
-0.04176373407244682,
-0.00784736592322588,
0.02337527461349964,
0.03142797201871872,
-0.05574340745806694,
-0.04100600630044937,
-0.011134210973978043,
-0.04356878250837326,
0.019114376977086067,
-0.03749815747141838,
-0.005448023788630962,
-0.0023740301840007305,
0.012366061098873615,
0.0400443933904171,
-0.013011600822210312,
-0.024482136592268944,
0.02270413003861904,
-0.021745815873146057,
0.006380259059369564,
-0.03463701903820038,
0.08301281929016113,
-0.04028668999671936,
0.013991623185575008,
-0.018201790750026703,
0.01653141714632511,
-0.057453349232673645,
0.030611153692007065,
-0.007549641188234091,
-0.011471782810986042,
0.013733012601733208,
0.027075892314314842,
-0.009397371672093868,
0.017277706414461136,
-0.02489766851067543,
0.015400419011712074,
-0.04756700247526169,
0.08402762562036514,
-0.015359051525592804,
0.002682039048522711,
-0.01911018416285515,
0.013262514024972916,
-0.02638830803334713,
0.008452342823147774,
-0.014307266101241112,
-0.03867333382368088,
0.0335937924683094,
0.06990472972393036,
0.03343069553375244,
0.03931219503283501,
-0.03484703600406647,
-0.010092371143400669,
0.0067616612650454044,
-0.03267045319080353,
0.00017811870202422142,
0.010944625362753868,
0.04000082612037659,
0.009138737805187702,
0.056375473737716675,
0.045528948307037354,
-0.05782972648739815,
-0.06555553525686264,
0.03686080500483513,
-0.0005287123494781554,
-0.0008371837320737541,
0.013242051936686039,
0.015036926604807377,
0.03814687952399254,
0.05376514419913292,
-0.01655689813196659,
0.003496788674965501,
-0.027879614382982254,
-0.03127724677324295,
0.02623075805604458,
-0.004916131030768156,
0.004571197554469109,
0.008559118956327438,
-0.030661968514323235,
-0.04024379700422287,
0.04625372961163521,
0.006704057566821575,
0.018997088074684143,
-0.02480453997850418,
-0.046422891318798065,
0.004833854269236326,
-0.01805388741195202,
-0.05484601482748985,
0.021590936928987503,
0.0003920221934095025,
-0.01292384322732687,
0.06864151358604431,
-0.010508827865123749,
0.00930873490869999,
0.05387231707572937,
0.037049584090709686,
-0.012241356074810028,
0.05511782690882683,
-0.0072179692797362804,
0.012491490691900253,
0.057569727301597595,
-0.06701221317052841,
-0.018927263095974922,
-0.03426181524991989,
0.07262638956308365,
-0.08654358983039856,
0.03838585317134857,
0.04459033161401749,
0.012528092600405216,
0.03510569408535957,
-0.03803146630525589,
-0.04830986633896828,
0.01988607831299305,
-0.04330088198184967,
0.08599212765693665,
0.027847738936543465,
-0.04198186472058296,
0.0416136234998703,
0.029219744727015495,
-0.08175577968358994,
0.05413993075489998,
0.044340237975120544,
0.034996148198843,
0.00852122250944376,
0.053227704018354416,
-0.05720200017094612,
0.019851697608828545,
-0.047992829233407974,
0.03227559104561806,
-0.051985930651426315,
-0.006847921758890152,
0.02735445462167263,
-0.039105888456106186,
-0.021915648132562637,
0.018691619858145714,
-0.031305842101573944,
-0.04092290252447128,
0.03842134401202202,
-0.056621234863996506,
-0.038435738533735275,
0.007152203004807234,
0.017925787717103958,
-0.05172772333025932,
0.00028847737121395767,
-0.033275898545980453,
0.008474433794617653,
0.01838444545865059,
0.006151129025965929,
-0.012665397487580776,
-0.025495104491710663,
0.020697107538580894,
-0.04546336829662323,
-0.0553569570183754,
0.047051526606082916,
0.004949538037180901,
-0.03066759742796421,
0.040355194360017776,
0.011550279334187508,
0.005564654245972633,
0.032922107726335526,
-0.007268180605024099,
0.020977014675736427,
-0.05711787939071655,
-0.014069686643779278,
-0.0004679924459196627,
0.010038982145488262,
0.01618122309446335,
0.012264762073755264,
0.03607519343495369,
0.035091549158096313,
0.006140484474599361,
0.006415016017854214,
-0.035359807312488556,
-0.029370654374361038,
0.03645884245634079,
-0.03683715686202049,
0.020893637090921402,
0.0031057875603437424,
-0.05129902437329292,
-0.03936445713043213,
-0.007773963734507561,
-0.01244362536817789,
0.0258552934974432,
-0.07034280896186829,
-0.006259108893573284,
0.03099031001329422,
-0.028682008385658264,
-0.053796861320734024,
-0.07866082340478897,
-0.025561099871993065,
-0.030324282124638557,
0.037865761667490005,
0.014765582978725433,
-0.04408540949225426,
0.012555137276649475,
-0.053837813436985016,
-0.05223364010453224,
0.029195688664913177,
0.00830090045928955,
-0.015348352491855621,
0.03976588323712349,
0.039880771189928055,
-0.067877396941185,
0.016713645309209824,
0.05581417307257652,
-0.022067034617066383,
0.029772687703371048,
0.028546016663312912,
-0.0016318780835717916,
0.03165246173739433,
0.02424556016921997,
-0.04546108841896057,
-0.012199196964502335,
-0.08130388706922531,
-0.054012447595596313,
-0.025371838361024857,
-0.008672194555401802,
0.045483171939849854
] |
Bryson575x/riceboi | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "parse the uses licence node of this package , if any , and returns the license definition if theres"
---
# CodeTrans model for api recommendation generation
Pretrained model for api recommendation generation using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used single-task training on Api Recommendation Generation dataset.
## Intended uses & limitations
The model could be used to generate api usage for the java programming tasks.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_api_generation"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_api_generation", skip_special_tokens=True),
device=0
)
tokenized_code = "parse the uses licence node of this package , if any , and returns the license definition if theres"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/api%20generation/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 68.71 |
| CodeTrans-ST-Base | 70.45 |
| CodeTrans-TF-Small | 68.90 |
| CodeTrans-TF-Base | 72.11 |
| CodeTrans-TF-Large | 73.26 |
| CodeTrans-MT-Small | 58.43 |
| CodeTrans-MT-Base | 67.97 |
| CodeTrans-MT-Large | 72.29 |
| CodeTrans-MT-TF-Small | 69.29 |
| CodeTrans-MT-TF-Base | 72.89 |
| CodeTrans-MT-TF-Large | **73.39** |
| State of the art | 54.42 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.02576717548072338,
-0.019133346155285835,
0.00394685473293066,
0.03846704214811325,
0.03199983388185501,
0.01909760572016239,
-0.026379458606243134,
0.002504139905795455,
-0.019368475303053856,
0.0609566830098629,
0.05535540357232094,
0.003465312300249934,
-0.01566523313522339,
0.031190011650323868,
-0.042914167046546936,
-0.051935408264398575,
-0.0035800915211439133,
-0.028705932199954987,
-0.03324270248413086,
-0.00846575852483511,
0.00686994893476367,
-0.018008138984441757,
-0.008499449118971825,
0.013050302863121033,
-0.028495224192738533,
0.004568209405988455,
0.008397206664085388,
0.027264246717095375,
0.02272270992398262,
-0.06869035959243774,
-0.03483722358942032,
-0.011393002234399319,
-0.02671584114432335,
-0.01741584949195385,
-0.02092626504600048,
0.03312333673238754,
0.019329769536852837,
0.023718014359474182,
0.039133839309215546,
0.05887889862060547,
0.01179236825555563,
0.025685319676995277,
0.015429535880684853,
-0.0341755673289299,
0.05235534533858299,
-0.0023415007162839174,
-0.03189745545387268,
-0.023892322555184364,
0.024257289245724678,
-0.025080790743231773,
-0.07397469133138657,
-0.0645134374499321,
-0.029568491503596306,
0.0320504866540432,
-0.007519971113651991,
-0.013343920931220055,
-0.05236230418086052,
-0.0335979200899601,
0.0421411469578743,
-0.06767100840806961,
-0.028059108182787895,
0.025216732174158096,
-0.0757203921675682,
0.01248468179255724,
0.02531113103032112,
-0.02844233065843582,
-0.0006597352330572903,
-0.04673521965742111,
0.031053626909852028,
-0.02321392484009266,
0.06233852729201317,
-0.04077418893575668,
0.025521351024508476,
-0.09008601307868958,
0.005262536462396383,
-0.01641378365457058,
0.007992735132575035,
0.023418961092829704,
-0.004170364234596491,
0.035348452627658844,
-0.003524594707414508,
0.002663085702806711,
0.04415777698159218,
0.0202036015689373,
-0.00045490742195397615,
0.039674483239650726,
-0.026612233370542526,
-0.006370756309479475,
-0.022552702575922012,
0.05255288630723953,
-0.05669292435050011,
-0.0759575217962265,
-0.0018451630603522062,
-0.025553343817591667,
-0.039659444242715836,
0.01637968048453331,
0.039222344756126404,
-0.012380928732454777,
0.0200191643089056,
0.0037012833636254072,
0.04938053339719772,
0.05536394938826561,
-0.03049829974770546,
0.057008251547813416,
0.01841629669070244,
0.0006542626651935279,
-0.0014319902984425426,
-0.04554290696978569,
-0.04446285963058472,
0.05720900371670723,
0.010794340632855892,
-0.028380941599607468,
-0.04722544923424721,
0.03906372934579849,
0.01829906925559044,
-0.036311790347099304,
0.045608021318912506,
-0.01996639557182789,
-0.04689742624759674,
-0.03846374526619911,
0.05051218718290329,
0.0036328122951090336,
-0.006381318438798189,
0.0015149263199418783,
-0.03536975383758545,
0.01843581534922123,
-0.06166987493634224,
-0.043796904385089874,
0.009744427166879177,
0.023540306836366653,
-0.021694278344511986,
0.08967716246843338,
0.008746140636503696,
-0.04501856118440628,
0.006876861676573753,
0.031811583787202835,
-0.05863147974014282,
0.07477004826068878,
0.04008132591843605,
0.10987979918718338,
-0.08155982941389084,
-0.03963211551308632,
0.02923741564154625,
0.012370014563202858,
-0.013019775040447712,
0.016435297206044197,
-0.013489695265889168,
-0.05454288795590401,
-0.03039591573178768,
-0.009316937997937202,
0.054607290774583817,
-0.042948201298713684,
-0.02164708822965622,
0.03532339259982109,
0.004623913671821356,
0.025699486956000328,
-0.02884097956120968,
-0.000562510802410543,
-0.004570546559989452,
-0.01933988556265831,
-0.05032951757311821,
0.023321667686104774,
-0.004961006809026003,
-0.0245883297175169,
-0.033360790461301804,
-0.024905633181333542,
-0.0008450302411802113,
0.09080267697572708,
0.01047732774168253,
-0.022322650998830795,
-0.04379657283425331,
-0.000643890758510679,
0.033958595246076584,
0.02627444453537464,
-0.03097030147910118,
0.026350704953074455,
0.044176194816827774,
0.05691814422607422,
-0.026013918220996857,
0.06679795682430267,
-0.017056219279766083,
-0.03165475279092789,
-0.029160602018237114,
-0.00217203376814723,
-0.0040021371096372604,
-0.03595041111111641,
0.010738537646830082,
0.025750188156962395,
-0.013395865447819233,
-0.017371254041790962,
-0.01725650392472744,
0.06269174069166183,
0.011465342715382576,
-0.015320392325520515,
-0.03301673382520676,
0.026780813932418823,
-0.008436835370957851,
0.05947476252913475,
-0.023518161848187447,
-0.013633537106215954,
-0.013103351928293705,
-0.027892032638192177,
0.002892427146434784,
0.04414960369467735,
0.047379426658153534,
0.016543185338377953,
-0.0022558949422091246,
0.09592967480421066,
-0.03334462270140648,
0.006225623190402985,
-0.03794573247432709,
-0.044038377702236176,
0.00139894662424922,
0.047703687101602554,
0.023549091070890427,
0.042065251618623734,
0.0023670631926506758,
-0.025901831686496735,
0.009068607352674007,
0.07263488322496414,
0.049742791801691055,
0.02457052282989025,
-0.01917969435453415,
-0.027669604867696762,
0.06184554845094681,
0.06450694799423218,
-0.045735809952020645,
-0.050058163702487946,
0.04285314679145813,
0.05723949521780014,
-0.01197812333703041,
0.01635390892624855,
-0.0026656498666852713,
0.016094837337732315,
-0.07487434893846512,
-0.06039367988705635,
0.03203946352005005,
0.010207809507846832,
0.008302598260343075,
0.02882418781518936,
0.0042081670835614204,
-0.013707500882446766,
0.033845338970422745,
0.01008209865540266,
0.008628780953586102,
-0.060153599828481674,
0.022024013102054596,
0.015297762118279934,
0.05768471211194992,
-0.03939826413989067,
0.0482325442135334,
0.000002866222530428786,
0.004673522897064686,
0.03268900886178017,
-0.011576361954212189,
0.02517576515674591,
0.028101837262511253,
0.027817605063319206,
-0.009316163137555122,
0.028087059035897255,
0.01799086667597294,
0.025655657052993774,
0.08236832916736603,
0.012674261815845966,
0.06871215999126434,
0.008574705570936203,
0.04455122724175453,
0.060855966061353683,
0.015522235073149204,
0.007763450965285301,
0.021999584510922432,
0.06456628441810608,
0.0014360222266986966,
-0.0044761230237782,
0.07474750280380249,
-0.07374263554811478,
0.03496824949979782,
-0.04021330177783966,
0.022897234186530113,
-0.007875227369368076,
-0.00973724015057087,
0.06370153278112411,
0.01914582960307598,
-0.03359578549861908,
0.009540174156427383,
-0.03823062777519226,
-0.008442182093858719,
-0.0022660016547888517,
-0.007615917827934027,
-0.0048791528679430485,
0.0009095622226595879,
-0.01648712530732155,
0.015121778473258018,
-0.07926429063081741,
-0.05117231234908104,
-0.019526995718479156,
-0.033897899091243744,
-0.008506393060088158,
-0.07497453689575195,
-0.05226868391036987,
-0.06663069128990173,
-0.025512978434562683,
0.057143714278936386,
0.018945593386888504,
-0.0007632957422174513,
-0.04775403439998627,
0.015249339863657951,
-0.01152525283396244,
-0.020398179069161415,
-0.05229650437831879,
-0.06553441286087036,
-0.025520876049995422,
-0.07042234390974045,
0.044173602014780045,
-0.013083125464618206,
0.015316890552639961,
0.0038563876878470182,
-0.020745210349559784,
-0.02221744693815708,
-0.0365658700466156,
0.07170595973730087,
0.026438217610120773,
-0.002824329538270831,
-0.008446535095572472,
0.019902044907212257,
-0.01957632601261139,
0.03265049681067467,
-0.005710784811526537,
-0.03372117504477501,
0.10610388964414597,
0.04204396530985832,
0.020374035462737083,
-0.009566587395966053,
-0.03612292930483818,
-0.04200563579797745,
-0.03671141341328621,
-0.01255561038851738,
-0.032500989735126495,
-0.021608559414744377,
-0.028193317353725433,
-0.05544498935341835,
-0.016832076013088226,
-0.045908086001873016,
-0.03505190089344978,
-0.023298973217606544,
0.017268894240260124,
0.025170160457491875,
0.056986913084983826,
0.06845854967832565,
0.024618515744805336,
-0.0029779376927763224,
-0.03918467462062836,
0.040811680257320404,
0.017248058691620827,
-0.01049946341663599,
-0.07567903399467468,
-0.03598315641283989,
0.030604315921664238,
0.026082295924425125,
0.00229725893586874,
-0.023329012095928192,
0.06195554509758949,
0.018989648669958115,
-0.0037726021837443113,
0.021140454337000847,
-0.006182011682540178,
-0.020977752283215523,
-0.024927888065576553,
-0.009094263426959515,
-0.03254266828298569,
-0.027393309399485588,
-0.043959081172943115,
-0.03167048841714859,
0.02795683965086937,
-0.05726168304681778,
-0.054678115993738174,
0.012502949684858322,
0.03648810088634491,
0.02012854442000389,
0.011588042601943016,
-0.029145654290914536,
-0.011936604045331478,
-0.06400278955698013,
-0.04674459621310234,
0.04693884029984474,
0.012283582240343094,
0.00454176589846611,
0.018345309421420097,
0.03025294467806816,
-0.04080963879823685,
0.033342309296131134,
0.01584065519273281,
0.04259917885065079,
0.024368824437260628,
-0.05762818083167076,
0.013747630640864372,
-0.030145691707730293,
0.019427277147769928,
0.0013730964856222272,
-0.023154649883508682,
-0.048700034618377686,
-0.08021893352270126,
-0.019648635759949684,
0.01057521067559719,
-0.010470448061823845,
-0.010751643218100071,
0.051898617297410965,
-0.01146045234054327,
-0.01998911239206791,
0.0011090660700574517,
0.020289801061153412,
0.05280282720923424,
-0.03532872349023819,
0.043364930897951126,
-0.008387557230889797,
0.06623956561088562,
-0.03726634383201599,
-0.005618035793304443,
-0.036648087203502655,
-0.03536111116409302,
0.019607365131378174,
0.023696614429354668,
0.016567401587963104,
0.05039173364639282,
0.08359170705080032,
0.025638874620199203,
-0.0469827875494957,
0.047030191868543625,
0.06120705604553223,
-0.001655735308304429,
-0.03484921157360077,
-0.0063590616919100285,
-0.01238763052970171,
-0.022008070722222328,
0.016918987035751343,
-0.024893689900636673,
0.04226164147257805,
0.025006547570228577,
-0.027025887742638588,
-0.0016357245622202754,
-0.013188710436224937,
-0.03326428309082985,
-0.04882817715406418,
-0.05748985707759857,
-0.016758011654019356,
-0.02571391500532627,
-0.06137816980481148,
0.01144340354949236,
0.05178200826048851,
0.04396376758813858,
0.04775821045041084,
0.030993428081274033,
-0.052000172436237335,
-0.05083020403981209,
0.027451366186141968,
0.05401356890797615,
-0.05067731812596321,
-0.038966719061136246,
-0.05191387981176376,
0.021425830200314522,
0.028973659500479698,
-0.03891261667013168,
-0.0857144370675087,
0.03456297144293785,
0.02287137694656849,
-0.0285918228328228,
0.07961923629045486,
0.02910982072353363,
0.01251144241541624,
0.06189194694161415,
-0.007694552186876535,
0.023461103439331055,
-0.01372905820608139,
0.0004251793143339455,
0.005276614800095558,
0.059510376304388046,
-0.04204592481255531,
-0.03766179084777832,
-0.04981182515621185,
0.029006464406847954,
0.02107393369078636,
0.05439728498458862,
0.017817188054323196,
-0.012803101912140846,
-0.06872955709695816,
-0.015752429142594337,
0.024526923894882202,
0.0011462221154943109,
0.003985496237874031,
0.03960408642888069,
0.049203403294086456,
-0.04887673631310463,
-0.026343783363699913,
0.0009032775415107608,
-0.026923608034849167,
0.038558684289455414,
-0.011543180793523788,
-0.014345167204737663,
-0.055938106030225754,
0.015275470912456512,
0.0013949437998235226,
-0.016750792041420937,
-0.09663061052560806,
0.0481998510658741,
0.018640676513314247,
-0.005289580672979355,
0.053734272718429565,
0.034726884216070175,
0.004503058735281229,
0.051904208958148956,
-0.008432899601757526,
0.020564088597893715,
-0.0328487902879715,
0.02853124402463436,
-0.030562566593289375,
-0.022066567093133926,
-0.018068833276629448,
-0.06825720518827438,
-0.02106187306344509,
-0.034406960010528564,
-0.026015328243374825,
-0.03669561818242073,
-0.026000147685408592,
-0.0009429492056369781,
-0.017710521817207336,
-0.008225835859775543,
0.007935905829071999,
0.019736647605895996,
-0.040412429720163345,
-0.027629129588603973,
-0.027150195091962814,
-0.04629087820649147,
-0.10687274485826492,
-0.01651098020374775,
0.020943816751241684,
0.02183869294822216,
0.04210277646780014,
0.0016347485361620784,
0.009039046242833138,
0.03038070723414421,
0.010858472436666489,
-0.03557516261935234,
0.022213611751794815,
0.015019560232758522,
-0.036242078989744186,
-0.02349179796874523,
0.002878864062950015,
0.0004115118645131588,
-0.0031987603288143873,
-0.016885951161384583,
-0.011911907233297825,
0.02134247124195099,
-0.009556648321449757,
0.004002138040959835,
0.015634173527359962,
0.005883255507797003,
-0.06942583620548248,
-0.017477812245488167,
0.0004574685881379992,
-0.0468720905482769,
0.021407591179013252,
0.011639129370450974,
-0.0349544957280159,
0.0056390040554106236,
-0.010043023154139519,
0.030636245384812355,
-0.001201993552967906,
-0.0382029190659523,
-0.006941474042832851,
-0.038217637687921524,
0.03591356426477432,
-0.06709413230419159,
0.0514763779938221,
-0.027741042897105217,
-0.00197025784291327,
-0.020404541864991188,
-0.011200601235032082,
-0.043574925512075424,
0.0744728296995163,
0.0033201947808265686,
0.005000348202884197,
-0.009204979054629803,
0.03609120845794678,
-0.026380334049463272,
0.036821845918893814,
-0.011922553181648254,
0.012985886074602604,
-0.025882378220558167,
0.01688900776207447,
-0.030977878719568253,
0.017404703423380852,
-0.025622757151722908,
-0.006665721070021391,
-0.020599018782377243,
-0.035828571766614914,
-0.023666415363550186,
-0.03961385414004326,
0.03408303111791611,
0.05097996070981026,
0.02866893820464611,
0.02119908481836319,
-0.00004193363929516636,
-0.02222784049808979,
0.015843672677874565,
-0.07516314834356308,
-0.02769029326736927,
-0.024867970496416092,
0.007596745155751705,
-0.01590234413743019,
0.0533820204436779,
0.04027571901679039,
-0.04292638227343559,
-0.02510085329413414,
0.027243077754974365,
0.0016836302820593119,
0.0030461582355201244,
0.009374093264341354,
0.0274024847894907,
0.03842887282371521,
0.03935575485229492,
-0.06558319181203842,
0.012927795760333538,
0.007904279045760632,
-0.005792045500129461,
-0.009775856509804726,
-0.017965076491236687,
0.01614835299551487,
-0.02146945707499981,
-0.0543118491768837,
-0.017716610804200172,
0.04853373020887375,
0.037321142852306366,
0.03023822046816349,
0.015075149945914745,
-0.052466534078121185,
0.017747502774000168,
0.0005303109646774828,
-0.04146060720086098,
-0.04021826013922691,
0.01720549911260605,
-0.05199190974235535,
0.07439619302749634,
-0.021480729803442955,
0.010956338606774807,
0.030348028987646103,
0.022182587534189224,
-0.002211356768384576,
0.04649525508284569,
-0.04214443266391754,
-0.013587970286607742,
0.04885954037308693,
-0.028231997042894363,
-0.015791025012731552,
-0.007253535091876984,
0.058312468230724335,
-0.044141948223114014,
0.05373997986316681,
0.012081582099199295,
0.009145986288785934,
-0.007604246027767658,
-0.022414518520236015,
-0.06117423623800278,
0.02841331623494625,
-0.0541963055729866,
0.06400878727436066,
-0.0002879623498301953,
-0.08681325614452362,
0.06718273460865021,
0.0384310707449913,
-0.1026952713727951,
-0.0028144014067947865,
0.03537927195429802,
0.0221233069896698,
0.0346013605594635,
0.037844110280275345,
-0.062110915780067444,
0.003502169158309698,
-0.05739673599600792,
0.024414686486124992,
-0.052863962948322296,
-0.01634284481406212,
0.016585420817136765,
-0.05272349342703819,
-0.018784694373607635,
0.030993444845080376,
-0.010694434866309166,
0.004226278979331255,
0.010200654156506062,
-0.04546036198735237,
-0.04109429940581322,
-0.02977699041366577,
0.030115997418761253,
-0.026199165731668472,
0.022562894970178604,
-0.0261380635201931,
0.04670650139451027,
0.011798116378486156,
0.008625256828963757,
-0.02932933159172535,
0.006652944255620241,
0.014982210472226143,
-0.04060143232345581,
-0.044070787727832794,
0.031619343906641006,
0.01571911759674549,
-0.02151278220117092,
0.029902013018727303,
-0.014924101531505585,
0.02324512228369713,
0.04120403900742531,
-0.025656860321760178,
0.013280045241117477,
-0.04140501841902733,
0.0022959907073527575,
0.009669912047684193,
0.0023351481650024652,
0.02362043410539627,
-0.013189190998673439,
0.026706747710704803,
0.034302107989788055,
0.03366752713918686,
-0.019687319174408913,
-0.00003248459324822761,
-0.0037215817719697952,
0.0311743076890707,
-0.03618831932544708,
0.019970327615737915,
0.0116324033588171,
-0.04370904713869095,
-0.055047761648893356,
-0.047872498631477356,
-0.05269341543316841,
0.05246323347091675,
-0.04705313593149185,
0.030414585024118423,
0.05059748515486717,
-0.011137554422020912,
-0.0520012304186821,
-0.0810927152633667,
0.0011898361844941974,
-0.014465613290667534,
0.02204280160367489,
0.03390533849596977,
-0.023505492135882378,
-0.006440985482186079,
-0.04642143100500107,
-0.06166936457157135,
0.028830023482441902,
0.02560039609670639,
-0.02090197056531906,
0.051736436784267426,
0.0315563790500164,
-0.011653359048068523,
0.011290144175291061,
0.012005943804979324,
-0.051157090812921524,
0.006546392105519772,
0.018067460507154465,
0.03403008356690407,
0.03736136108636856,
0.039976850152015686,
-0.03182465583086014,
-0.024143988266587257,
-0.05212162062525749,
-0.03140230104327202,
-0.04419976845383644,
-0.008663922548294067,
0.0792156308889389
] |
BumBelDumBel/TRUMP | [
"pytorch",
"tensorboard",
"gpt2",
"text-generation",
"transformers",
"generated_from_trainer",
"license:mit"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 5 | 2020-12-10T14:36:07Z | ---
tags:
- summarization
widget:
- text: "parse the uses licence node of this package , if any , and returns the license definition if theres"
---
# CodeTrans model for api recommendation generation
Pretrained model for api recommendation generation using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the api recommendation generation task for the java apis.
## Intended uses & limitations
The model could be used to generate api usage for the java programming tasks.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_api_generation_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_api_generation_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "parse the uses licence node of this package , if any , and returns the license definition if theres"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/api%20generation/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 320,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing api recommendation generation data.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 68.71 |
| CodeTrans-ST-Base | 70.45 |
| CodeTrans-TF-Small | 68.90 |
| CodeTrans-TF-Base | 72.11 |
| CodeTrans-TF-Large | 73.26 |
| CodeTrans-MT-Small | 58.43 |
| CodeTrans-MT-Base | 67.97 |
| CodeTrans-MT-Large | 72.29 |
| CodeTrans-MT-TF-Small | 69.29 |
| CodeTrans-MT-TF-Base | 72.89 |
| CodeTrans-MT-TF-Large | **73.39** |
| State of the art | 54.42 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.02397303096950054,
-0.021681485697627068,
0.003109399229288101,
0.034575916826725006,
0.03321116790175438,
0.023030998185276985,
-0.026540938764810562,
0.00009089272498385981,
-0.015405788086354733,
0.061342161148786545,
0.05765704810619354,
0.005905799102038145,
-0.013724717311561108,
0.0314323827624321,
-0.041870877146720886,
-0.05296512320637703,
-0.001797460950911045,
-0.030936982482671738,
-0.03289508447051048,
-0.007260218728333712,
0.012692541815340519,
-0.017257394269108772,
-0.0035327901132404804,
0.012787345796823502,
-0.02405557408928871,
0.0034551220014691353,
0.00830879621207714,
0.030006995424628258,
0.021301796659827232,
-0.07258514314889908,
-0.0375564768910408,
-0.012388605624437332,
-0.026258183643221855,
-0.01805070787668228,
-0.018833979964256287,
0.038768284022808075,
0.021444518119096756,
0.02840198017656803,
0.03872344270348549,
0.05757647380232811,
0.013491878286004066,
0.02264253795146942,
0.011882958002388477,
-0.0335678905248642,
0.05326461046934128,
-0.0010255224769935012,
-0.030794544145464897,
-0.02583594061434269,
0.0239835437387228,
-0.0242474302649498,
-0.07179058343172073,
-0.06418129056692123,
-0.03150743618607521,
0.033005841076374054,
-0.009459167718887329,
-0.008564427495002747,
-0.053187381476163864,
-0.03868405520915985,
0.041086696088314056,
-0.06735919415950775,
-0.03059207834303379,
0.027044212445616722,
-0.07420816272497177,
0.011374670080840588,
0.02208319865167141,
-0.03016049601137638,
-0.0006654961034655571,
-0.047291290014982224,
0.03174930810928345,
-0.02121243253350258,
0.06439241766929626,
-0.039480894804000854,
0.024720357730984688,
-0.09034060686826706,
0.005382160656154156,
-0.016338763758540154,
0.0103681655600667,
0.019520018249750137,
-0.004573751240968704,
0.028853468596935272,
-0.006276124157011509,
0.005766195710748434,
0.04493927210569382,
0.018427439033985138,
-0.0032561311963945627,
0.03893480449914932,
-0.026917334645986557,
-0.006150481291115284,
-0.02124129980802536,
0.05301384627819061,
-0.05725036934018135,
-0.07580199092626572,
-0.002052636118605733,
-0.021748097613453865,
-0.043624963611364365,
0.018618473783135414,
0.04067329317331314,
-0.013305390253663063,
0.01816820353269577,
0.004006780218333006,
0.04860441014170647,
0.05509744584560394,
-0.029901869595050812,
0.05525783821940422,
0.018852755427360535,
0.0010111324954777956,
-0.002288605086505413,
-0.04625528305768967,
-0.04351792111992836,
0.05787352845072746,
0.01216832548379898,
-0.029197119176387787,
-0.04745188727974892,
0.03779846429824829,
0.017623133957386017,
-0.035153452306985855,
0.04573953151702881,
-0.0198754221200943,
-0.04056965559720993,
-0.04273676872253418,
0.04749596491456032,
0.004084001295268536,
-0.007750837132334709,
0.006926586385816336,
-0.032350100576877594,
0.01630771905183792,
-0.062138985842466354,
-0.044587764889001846,
0.009572210721671581,
0.020537102594971657,
-0.026301279664039612,
0.09304573386907578,
0.013557938858866692,
-0.04591498523950577,
0.011543458327651024,
0.03171943500638008,
-0.057485438883304596,
0.07526141405105591,
0.0417557954788208,
0.10865382105112076,
-0.08179788291454315,
-0.03817659988999367,
0.027791619300842285,
0.017067572101950645,
-0.012404129840433598,
0.019933994859457016,
-0.014593183062970638,
-0.05718887597322464,
-0.024262065067887306,
-0.0073468792252242565,
0.05426944047212601,
-0.043155767023563385,
-0.021192515268921852,
0.03421812877058983,
0.0065806410275399685,
0.02235579676926136,
-0.026553919538855553,
-0.0034622447565197945,
-0.005135811399668455,
-0.021647144109010696,
-0.05243159085512161,
0.024843785911798477,
-0.002425592625513673,
-0.03132547438144684,
-0.03383849561214447,
-0.023869486525654793,
-0.0005233336705714464,
0.09038558602333069,
0.01093556173145771,
-0.023428821936249733,
-0.040857378393411636,
0.001235296600498259,
0.03476414829492569,
0.024311134591698647,
-0.030593683943152428,
0.030683668330311775,
0.04387792944908142,
0.059250880032777786,
-0.026549337431788445,
0.06792529672384262,
-0.016059959307312965,
-0.02824884094297886,
-0.030603082850575447,
-0.0014641135931015015,
-0.006425928324460983,
-0.038633305579423904,
0.008027860894799232,
0.022813603281974792,
-0.01776088774204254,
-0.016341855749487877,
-0.01977553404867649,
0.05768175050616264,
0.009649371728301048,
-0.019142381846904755,
-0.03204387426376343,
0.02669495716691017,
-0.0065418994054198265,
0.05858172848820686,
-0.023974834010004997,
-0.0115592572838068,
-0.010187575593590736,
-0.027564845979213715,
0.001020566443912685,
0.041225314140319824,
0.04870055243372917,
0.019676601514220238,
0.00013428849342744797,
0.09286049753427505,
-0.03112258017063141,
0.00519857881590724,
-0.03770171478390694,
-0.04332628473639488,
0.005731705576181412,
0.04992116242647171,
0.02401384897530079,
0.03843196481466293,
-0.00004584821726894006,
-0.02235797792673111,
0.007583530154079199,
0.07013271749019623,
0.04834191873669624,
0.024625835940241814,
-0.023786913603544235,
-0.02780906669795513,
0.06391679495573044,
0.06319554895162582,
-0.04397500306367874,
-0.051822155714035034,
0.04346022754907608,
0.05888795480132103,
-0.01364205963909626,
0.019624613225460052,
-0.004052051343023777,
0.014213445596396923,
-0.07051064074039459,
-0.05990714579820633,
0.03060263767838478,
0.010086814872920513,
0.004468722268939018,
0.02458454668521881,
0.0065215956419706345,
-0.011917734518647194,
0.03536555543541908,
0.006900078617036343,
0.008589718490839005,
-0.06129072979092598,
0.017756879329681396,
0.013257276266813278,
0.06154249608516693,
-0.04048286750912666,
0.05090877041220665,
0.0030942452140152454,
0.0074618179351091385,
0.03874644264578819,
-0.01509342435747385,
0.023966342210769653,
0.026816707104444504,
0.026270810514688492,
-0.008271167986094952,
0.027628295123577118,
0.02159968949854374,
0.030906878411769867,
0.08431021124124527,
0.012093334458768368,
0.07062647491693497,
0.005651876330375671,
0.04215202108025551,
0.05722915008664131,
0.01662704534828663,
0.00856530200690031,
0.02210150472819805,
0.059569038450717926,
0.00598487164825201,
-0.005603852681815624,
0.07298553735017776,
-0.0783391147851944,
0.03312733769416809,
-0.03658243268728256,
0.023189274594187737,
-0.006528900936245918,
-0.009109093807637691,
0.06358395516872406,
0.016614031046628952,
-0.03168705850839615,
0.010908925905823708,
-0.038040611892938614,
-0.013921258971095085,
-0.0013403135817497969,
-0.008265916258096695,
-0.005836361553519964,
0.0010996999917551875,
-0.014490189962089062,
0.012848162092268467,
-0.08128859102725983,
-0.04867291823029518,
-0.017698092386126518,
-0.03607124462723732,
-0.0075815096497535706,
-0.0728914812207222,
-0.055949483066797256,
-0.06363248825073242,
-0.025704532861709595,
0.058652061969041824,
0.018640106543898582,
-0.00378242670558393,
-0.04631071910262108,
0.016367806121706963,
-0.014702706597745419,
-0.01831151358783245,
-0.054477259516716,
-0.07014978677034378,
-0.026195164769887924,
-0.0720444843173027,
0.03933775797486305,
-0.016854101791977882,
0.011912345886230469,
0.003940014634281397,
-0.019853176549077034,
-0.022957712411880493,
-0.03700292855501175,
0.07406245917081833,
0.021827859804034233,
0.00042608100920915604,
-0.0061948662623763084,
0.01751374639570713,
-0.021688373759388924,
0.03409566730260849,
-0.005736690014600754,
-0.03750230371952057,
0.10813646018505096,
0.03934619575738907,
0.021771060302853584,
-0.011309009976685047,
-0.03576841205358505,
-0.04505831003189087,
-0.04102368652820587,
-0.01358337514102459,
-0.03864283114671707,
-0.022412193939089775,
-0.027940377593040466,
-0.05411738157272339,
-0.018989969044923782,
-0.04526558890938759,
-0.033611152321100235,
-0.021382035687565804,
0.015654858201742172,
0.02474198490381241,
0.054655056446790695,
0.06708084791898727,
0.02185601368546486,
-0.009138572961091995,
-0.03693299740552902,
0.03912436217069626,
0.01602814346551895,
-0.010557352565228939,
-0.07970517128705978,
-0.033889289945364,
0.02978500910103321,
0.027682838961482048,
-0.00011230719974264503,
-0.022769533097743988,
0.060551293194293976,
0.02050016261637211,
-0.004008473362773657,
0.023915816098451614,
-0.009318111464381218,
-0.014535917900502682,
-0.027236565947532654,
-0.004992988426238298,
-0.03282995522022247,
-0.026423851028084755,
-0.042692963033914566,
-0.026577962562441826,
0.02789684385061264,
-0.05498166009783745,
-0.055260222405195236,
0.011196526698768139,
0.03646652773022652,
0.020936189219355583,
0.01418286468833685,
-0.029061244800686836,
-0.013157295994460583,
-0.06484618037939072,
-0.04929268732666969,
0.04797406867146492,
0.014978042803704739,
0.0010589954908937216,
0.020938752219080925,
0.027308527380228043,
-0.04447770491242409,
0.0319390669465065,
0.016636459156870842,
0.039694998413324356,
0.02814297564327717,
-0.054363224655389786,
0.015542353503406048,
-0.03258262202143669,
0.016634861007332802,
0.005255022086203098,
-0.02473938837647438,
-0.050735149532556534,
-0.07896564900875092,
-0.019962048158049583,
0.01186889223754406,
-0.008004344068467617,
-0.008654767647385597,
0.05471525713801384,
-0.01275085099041462,
-0.017876792699098587,
0.003395101288333535,
0.021979840472340584,
0.05363338813185692,
-0.03098120354115963,
0.04312758892774582,
-0.010025903582572937,
0.06379066407680511,
-0.035055018961429596,
-0.0036315815523266792,
-0.03149668872356415,
-0.03465292602777481,
0.019859643653035164,
0.022251104936003685,
0.021462420001626015,
0.053727343678474426,
0.08382625877857208,
0.02998947724699974,
-0.045609887689352036,
0.04193940758705139,
0.0626954510807991,
-0.0033217864111065865,
-0.03352568671107292,
-0.009008186869323254,
-0.015869196504354477,
-0.02074917033314705,
0.017259227111935616,
-0.025097906589508057,
0.04472894221544266,
0.023133566603064537,
-0.024231720715761185,
0.0006496018031612039,
-0.014864746481180191,
-0.03406798839569092,
-0.0509452261030674,
-0.06073862314224243,
-0.01743972674012184,
-0.026241177693009377,
-0.06149841845035553,
0.012798162177205086,
0.054011620581150055,
0.04207761213183403,
0.04642580822110176,
0.032801128923892975,
-0.05410148575901985,
-0.050768930464982986,
0.028787661343812943,
0.05640583857893944,
-0.05080240219831467,
-0.03895222023129463,
-0.05193652957677841,
0.023627907037734985,
0.0306939035654068,
-0.04446524381637573,
-0.08135299384593964,
0.03413766622543335,
0.02806113474071026,
-0.03290655463933945,
0.07902148365974426,
0.029990699142217636,
0.012130002491176128,
0.061623066663742065,
-0.006637317128479481,
0.024448979645967484,
-0.012691962532699108,
0.004777990747243166,
0.010396239347755909,
0.05510192736983299,
-0.038284704089164734,
-0.035649605095386505,
-0.048288870602846146,
0.026337267830967903,
0.018927570432424545,
0.05404066666960716,
0.01882435753941536,
-0.009492605924606323,
-0.06765895336866379,
-0.016887955367565155,
0.02811233513057232,
0.00019701210840139538,
0.00469072163105011,
0.03913478925824165,
0.05355221778154373,
-0.049831949174404144,
-0.022998381406068802,
-0.004580568056553602,
-0.025528356432914734,
0.03925269842147827,
-0.010228145867586136,
-0.01481725089251995,
-0.054170913994312286,
0.014691906049847603,
0.001090701436623931,
-0.016714613884687424,
-0.09662815928459167,
0.050836436450481415,
0.018385982140898705,
-0.002296362305060029,
0.054509758949279785,
0.032016903162002563,
0.007558771874755621,
0.05055946484208107,
-0.008572228252887726,
0.019152136519551277,
-0.03742057457566261,
0.031377162784338,
-0.027251871302723885,
-0.024251678958535194,
-0.015627305954694748,
-0.07171231508255005,
-0.02026413567364216,
-0.03421870246529579,
-0.02755662426352501,
-0.04104391112923622,
-0.029110707342624664,
-0.0026365695521235466,
-0.01786317490041256,
-0.007459189277142286,
0.0072837211191654205,
0.017999012023210526,
-0.039040662348270416,
-0.024600885808467865,
-0.028827939182519913,
-0.048780810087919235,
-0.10459976643323898,
-0.016325965523719788,
0.022016804665327072,
0.024620231240987778,
0.040943555533885956,
-0.0019892456475645304,
0.007635205984115601,
0.029644478112459183,
0.012620019726455212,
-0.0319700688123703,
0.022061463445425034,
0.011959090828895569,
-0.03468375280499458,
-0.019559022039175034,
-0.001962018199265003,
0.0017292266711592674,
-0.0035651116631925106,
-0.02145562134683132,
-0.00927520077675581,
0.020666269585490227,
-0.01115938276052475,
0.0038726679049432278,
0.018125349655747414,
0.007345281075686216,
-0.07236646860837936,
-0.017293626442551613,
-0.0027031025383621454,
-0.04344996064901352,
0.019889166578650475,
0.011536723002791405,
-0.03606824949383736,
0.005932664964348078,
-0.010512636043131351,
0.029119452461600304,
-0.0018770822789520025,
-0.03411432355642319,
-0.00567328417673707,
-0.037362899631261826,
0.03241138160228729,
-0.06556199491024017,
0.05752842128276825,
-0.028584139421582222,
-0.0036750021390616894,
-0.019201310351490974,
-0.009900805540382862,
-0.042598702013492584,
0.07647139579057693,
0.005706844385713339,
0.0037104617804288864,
-0.010654507204890251,
0.033116403967142105,
-0.02751472033560276,
0.034614212810993195,
-0.011184286326169968,
0.011987310834228992,
-0.02459344081580639,
0.010567800141870975,
-0.026419978588819504,
0.017297765240073204,
-0.024763332679867744,
-0.006935892626643181,
-0.014166487380862236,
-0.033757809549570084,
-0.02627112716436386,
-0.03782980889081955,
0.03450539708137512,
0.04961059242486954,
0.028356149792671204,
0.01669277809560299,
-0.0037519761826843023,
-0.024178607389330864,
0.01601235382258892,
-0.07697805762290955,
-0.02455851249396801,
-0.02825203910470009,
0.006650696974247694,
-0.014165334403514862,
0.05343548581004143,
0.03914842754602432,
-0.041798464953899384,
-0.025292841717600822,
0.025141790509223938,
0.0040055145509541035,
0.0063637481071054935,
0.008886290714144707,
0.024799570441246033,
0.03776420280337334,
0.037230025976896286,
-0.06520861387252808,
0.015456627123057842,
0.008217474445700645,
-0.006003695074468851,
-0.009489042684435844,
-0.019075527787208557,
0.01901533268392086,
-0.02526341751217842,
-0.052513111382722855,
-0.017161788418889046,
0.04962686076760292,
0.034326083958148956,
0.033766068518161774,
0.016894787549972534,
-0.05324668064713478,
0.018438182771205902,
0.003956555388867855,
-0.04378381744027138,
-0.04258257895708084,
0.018143612891435623,
-0.05097898840904236,
0.07449233531951904,
-0.02002713829278946,
0.010755791328847408,
0.027506571263074875,
0.019060492515563965,
0.002849097363650799,
0.04433834180235863,
-0.044999998062849045,
-0.012140821665525436,
0.05023295804858208,
-0.02738271839916706,
-0.012987635098397732,
-0.007433210499584675,
0.057547297328710556,
-0.04731515794992447,
0.05436884984374046,
0.008779783733189106,
0.012999758124351501,
-0.008946400135755539,
-0.017025252804160118,
-0.06554453074932098,
0.03311549872159958,
-0.049454864114522934,
0.06232144683599472,
-0.0037664349656552076,
-0.08284374326467514,
0.06939153373241425,
0.03947506472468376,
-0.1034405529499054,
-0.0009068114450201392,
0.03518213331699371,
0.019860072061419487,
0.03681115433573723,
0.035980746150016785,
-0.06429830193519592,
-0.0010301267029717565,
-0.059318553656339645,
0.025945236906409264,
-0.05331852287054062,
-0.01530065294355154,
0.017366871237754822,
-0.05461883917450905,
-0.016329100355505943,
0.029959535226225853,
-0.012363584712147713,
0.004241670947521925,
0.006164888385683298,
-0.046463362872600555,
-0.041082024574279785,
-0.025707276538014412,
0.028063716366887093,
-0.023702895268797874,
0.023776261135935783,
-0.025975646451115608,
0.046147577464580536,
0.011999719776213169,
0.0084225470200181,
-0.029158510267734528,
0.005274266004562378,
0.017310762777924538,
-0.03741614893078804,
-0.04111297056078911,
0.029229899868369102,
0.016968224197626114,
-0.02372993901371956,
0.031112786382436752,
-0.014502828940749168,
0.022272218018770218,
0.03817753866314888,
-0.02779906615614891,
0.014080269262194633,
-0.040776729583740234,
0.0009588263346813619,
0.00940203107893467,
0.005330830346792936,
0.021155396476387978,
-0.01060014683753252,
0.02679736725986004,
0.03458128124475479,
0.03490496054291725,
-0.02268693596124649,
-0.0016942222137004137,
-0.0041604796424508095,
0.02876472659409046,
-0.03404766321182251,
0.0162066500633955,
0.013075684197247028,
-0.04096789285540581,
-0.05369897559285164,
-0.048498786985874176,
-0.050480835139751434,
0.051915306597948074,
-0.04890979081392288,
0.028542203828692436,
0.050023335963487625,
-0.010763796046376228,
-0.05659497529268265,
-0.08243479579687119,
0.0015457597328349948,
-0.011427954770624638,
0.026177845895290375,
0.03081917203962803,
-0.021789856255054474,
-0.009410018101334572,
-0.044868506491184235,
-0.06251749396324158,
0.029010487720370293,
0.023832710459828377,
-0.01970772258937359,
0.05412443354725838,
0.02960364520549774,
-0.011148709803819656,
0.010202433913946152,
0.01626025140285492,
-0.0549708716571331,
0.015819791704416275,
0.018536677584052086,
0.026852650567889214,
0.0372639074921608,
0.03734224662184715,
-0.03185642883181572,
-0.024714231491088867,
-0.05024529621005058,
-0.03070107102394104,
-0.040418099611997604,
-0.009242260828614235,
0.08085467666387558
] |
BumBelDumBel/ZORK_AI_SCIFI | [
"pytorch",
"tensorboard",
"gpt2",
"text-generation",
"transformers",
"generated_from_trainer"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 14 | 2020-12-09T08:38:52Z | ---
tags:
- summarization
widget:
- text: "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
---
# CodeTrans model for code comment generation java
Pretrained model on programming language java using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_code_comment_generation_java_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_code_comment_generation_java_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/code%20comment%20generation/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 460,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 37.98 |
| CodeTrans-ST-Base | 38.07 |
| CodeTrans-TF-Small | 38.56 |
| CodeTrans-TF-Base | 39.06 |
| CodeTrans-TF-Large | **39.50** |
| CodeTrans-MT-Small | 20.15 |
| CodeTrans-MT-Base | 27.44 |
| CodeTrans-MT-Large | 34.69 |
| CodeTrans-MT-TF-Small | 38.37 |
| CodeTrans-MT-TF-Base | 38.90 |
| CodeTrans-MT-TF-Large | 39.25 |
| State of the art | 38.17 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.009304444305598736,
-0.02324683777987957,
-0.009663496166467667,
0.026238324120640755,
0.029936423525214195,
0.036757927387952805,
-0.031882092356681824,
-0.004834040533751249,
-0.0033982302993535995,
0.05392294377088547,
0.03888445347547531,
-0.007443070877343416,
-0.01860714703798294,
0.04474437236785889,
-0.036651886999607086,
-0.06441273540258408,
-0.01846342906355858,
-0.030904365703463554,
-0.03421299532055855,
-0.016594277694821358,
0.020550454035401344,
0.00899703148752451,
0.0012072628596797585,
0.005587135441601276,
-0.005951151717454195,
0.001974624115973711,
0.005193155258893967,
0.01662980020046234,
0.029893413186073303,
-0.07792678475379944,
-0.02921374887228012,
-0.008150732144713402,
-0.03654943406581879,
-0.01288275234401226,
-0.03360794484615326,
0.019718775525689125,
0.015212965197861195,
0.044080015271902084,
0.02974751405417919,
0.06001254543662071,
0.0036669080145657063,
0.027083562687039375,
0.018350863829255104,
-0.03669273480772972,
0.06206575036048889,
0.005001261830329895,
-0.026047203689813614,
-0.03321443498134613,
0.029631083831191063,
-0.0046499609015882015,
-0.05169840157032013,
-0.07129335403442383,
-0.034448813647031784,
0.04621254652738571,
-0.01591530628502369,
-0.00907439086586237,
-0.06445653736591339,
-0.03513325750827789,
0.04978783801198006,
-0.051484424620866776,
-0.024280602112412453,
0.00851606298238039,
-0.062265604734420776,
0.022152213379740715,
0.014516890048980713,
-0.014760727994143963,
0.010209759697318077,
-0.04459982365369797,
0.026432232931256294,
0.0027614079881459475,
0.0482487827539444,
-0.031868431717157364,
0.030824579298496246,
-0.11247868090867996,
0.012297453358769417,
-0.012707575224339962,
0.03040805272758007,
0.02728451043367386,
-0.020790940150618553,
0.059223473072052,
-0.006963212508708239,
0.005881844088435173,
0.04975931718945503,
0.000880190811585635,
-0.012206069193780422,
0.025202402845025063,
-0.02992691844701767,
-0.012953408993780613,
-0.014778279699385166,
0.06784286350011826,
-0.05293408781290054,
-0.06603487581014633,
-0.024035979062318802,
-0.01787734217941761,
-0.03859316185116768,
0.02367238514125347,
0.04012307524681091,
-0.008757427334785461,
0.025629650801420212,
0.0067227487452328205,
0.043488793075084686,
0.05772169306874275,
-0.00538191944360733,
0.05091160535812378,
0.03691691905260086,
0.0136321522295475,
-0.008345304988324642,
-0.03902247175574303,
-0.022123344242572784,
0.04367469623684883,
0.009452945552766323,
-0.035925380885601044,
-0.05199820548295975,
0.04126722738146782,
0.015657221898436546,
-0.03382319584488869,
0.05157175287604332,
-0.013806218281388283,
-0.04981416463851929,
-0.03909682109951973,
0.040358319878578186,
-0.009118301793932915,
-0.013453149236738682,
-0.004326303023844957,
-0.0450231097638607,
0.011968269012868404,
-0.0570254884660244,
-0.029366573318839073,
0.01842743717133999,
0.027922911569476128,
-0.02588147297501564,
0.08763456344604492,
0.0007226472953334451,
-0.03490786626935005,
0.005999061278998852,
0.024186722934246063,
-0.057689107954502106,
0.0594232939183712,
0.028496457263827324,
0.10993008315563202,
-0.05724911019206047,
-0.04553721100091934,
0.021705571562051773,
-0.000016981352018774487,
-0.020399726927280426,
0.012365207076072693,
-0.01256889384239912,
-0.06283815950155258,
-0.024800335988402367,
-0.008124208077788353,
0.0484924390912056,
-0.046415798366069794,
-0.018628614023327827,
0.032464370131492615,
0.0031870189122855663,
0.012967097572982311,
-0.03564256802201271,
0.0034596864134073257,
0.006075820419937372,
-0.028179168701171875,
-0.06183997914195061,
0.028045522049069405,
0.0007425708463415504,
-0.02810254506766796,
-0.03125215694308281,
-0.034464169293642044,
-0.0012706044362857938,
0.09091255813837051,
0.01769290119409561,
-0.006159164942800999,
-0.042935341596603394,
0.013158123940229416,
0.03438569977879524,
0.03437497466802597,
-0.015540777705609798,
0.028386680409312248,
0.04915362969040871,
0.06888594478368759,
-0.028221681714057922,
0.06518587470054626,
-0.015141839161515236,
-0.0259565357118845,
-0.038225024938583374,
0.01502405758947134,
-0.009180004708468914,
-0.03896097093820572,
0.013104090467095375,
0.010430634021759033,
-0.02207011729478836,
-0.0033811195753514767,
-0.010344701819121838,
0.050729796290397644,
0.015905138105154037,
-0.014446176588535309,
-0.022999035194516182,
0.015557775273919106,
-0.018171848729252815,
0.05675181746482849,
-0.039650991559028625,
-0.008119677193462849,
-0.015572438947856426,
-0.030414462089538574,
-0.010014239698648453,
0.02506943978369236,
0.04246751219034195,
0.01657133735716343,
-0.012720472179353237,
0.09912275522947311,
-0.04771779850125313,
0.01798754185438156,
-0.03791294991970062,
-0.038967620581388474,
0.008764219470322132,
0.0422026701271534,
0.02714448980987072,
0.037620458751916885,
0.0011717213783413172,
-0.023020800203084946,
0.011261280626058578,
0.08145572990179062,
0.03789578378200531,
0.04566552862524986,
-0.016002601012587547,
-0.030209001153707504,
0.05292415991425514,
0.07099634408950806,
-0.05749141052365303,
-0.0443439818918705,
0.04909246787428856,
0.03481028974056244,
-0.012143611907958984,
0.029965069144964218,
-0.009337380528450012,
0.015092818066477776,
-0.052615780383348465,
-0.05535942316055298,
0.03820869326591492,
0.01869640126824379,
0.0049057104624807835,
0.025748420506715775,
0.012286812998354435,
-0.012001994997262955,
0.046695683151483536,
0.007559638936072588,
0.010738837532699108,
-0.05981561541557312,
0.007704947143793106,
0.00012887157208751887,
0.08330707997083664,
-0.04454993084073067,
0.04110954701900482,
0.013098778203129768,
-0.003577959490939975,
0.04985716938972473,
-0.025739112868905067,
0.019067110493779182,
0.028908926993608475,
0.020063551142811775,
-0.015256344340741634,
0.01942918635904789,
0.025117890909314156,
0.028940577059984207,
0.07605405151844025,
0.011009788140654564,
0.07250906527042389,
0.000013234029211162124,
0.06068611890077591,
0.06393050402402878,
0.021131599321961403,
0.0042881746776402,
0.022524641826748848,
0.0627654567360878,
0.00880861934274435,
-0.016766341403126717,
0.062043555080890656,
-0.04621550440788269,
0.02507070265710354,
-0.03840365260839462,
0.028896933421492577,
-0.012106984853744507,
-0.02566220983862877,
0.042376771569252014,
0.012224138714373112,
-0.04258323460817337,
-0.011045990511775017,
-0.038842394948005676,
-0.024744678288698196,
0.021129531785845757,
-0.016614705324172974,
-0.013901947997510433,
0.0056070610880851746,
-0.01957685686647892,
0.01922580599784851,
-0.07995878159999847,
-0.04152297228574753,
-0.012730537913739681,
-0.036511827260255814,
0.003252549096941948,
-0.07821707427501678,
-0.048021283000707626,
-0.06372764706611633,
-0.01682683825492859,
0.04596637561917305,
0.00387973221950233,
-0.017921628430485725,
-0.035725031048059464,
0.011266893707215786,
-0.039530202746391296,
-0.028383471071720123,
-0.05647777393460274,
-0.07178379595279694,
-0.002022132743149996,
-0.07442133128643036,
0.023726895451545715,
-0.025283589959144592,
0.028260350227355957,
-0.0000030332560072565684,
-0.014651191420853138,
-0.026533521711826324,
-0.022564146667718887,
0.05282225087285042,
0.021187355741858482,
-0.01446897815912962,
-0.03236836567521095,
0.012165965512394905,
-0.018465828150510788,
0.03453866019845009,
-0.005552878603339195,
-0.04628297686576843,
0.10533880442380905,
0.05288201570510864,
0.039242934435606,
-0.009783781133592129,
-0.034635771065950394,
-0.039966609328985214,
-0.032395001500844955,
-0.013135303743183613,
-0.015446477569639683,
-0.024718213826417923,
-0.006919538136571646,
-0.043532129377126694,
-0.026092231273651123,
-0.0381561703979969,
-0.041979193687438965,
-0.020771922543644905,
0.028512470424175262,
0.03020104579627514,
0.047228578478097916,
0.058874066919088364,
0.027260703966021538,
-0.02379997819662094,
-0.03694206848740578,
0.04204779863357544,
-0.008772107772529125,
-0.003491662908345461,
-0.07123808562755585,
-0.028014015406370163,
0.03306883946061134,
0.023992935195565224,
-0.010880861431360245,
-0.014778396114706993,
0.048526227474212646,
0.012233903631567955,
0.0027653309516608715,
0.013501695357263088,
-0.01722429320216179,
-0.009366421960294247,
-0.034016452729701996,
-0.004208636004477739,
-0.02961011230945587,
-0.035536713898181915,
-0.025310171768069267,
-0.015535588376224041,
0.04996417462825775,
-0.06471318006515503,
-0.05602957308292389,
0.003348549595102668,
0.029290001839399338,
0.03137492761015892,
0.019563142210245132,
-0.035937000066041946,
0.003697651205584407,
-0.07111480832099915,
-0.03958955779671669,
0.038892943412065506,
0.015038574114441872,
-0.005085722543299198,
0.03804852068424225,
0.04354975372552872,
-0.038900308310985565,
0.040727585554122925,
0.02315285988152027,
0.041118472814559937,
0.035685185343027115,
-0.035210080444812775,
0.01229766570031643,
-0.04880538582801819,
0.02419203147292137,
0.006357253063470125,
-0.03142337128520012,
-0.04275539144873619,
-0.07873843610286713,
-0.032655589282512665,
0.022967305034399033,
-0.024054180830717087,
0.004336992744356394,
0.049094315618276596,
-0.015196318738162518,
-0.04307348653674126,
-0.012042012065649033,
0.017822885885834694,
0.05883707478642464,
-0.030888540670275688,
0.03143002465367317,
0.013904924504458904,
0.06865903735160828,
-0.05047649145126343,
0.005162879358977079,
-0.034498270601034164,
-0.03237353265285492,
0.008595271036028862,
0.04609647020697594,
0.012942793779075146,
0.05678251385688782,
0.07893168181180954,
0.024574026465415955,
-0.035251956433057785,
0.038829728960990906,
0.06001061573624611,
0.007590097840875387,
-0.03430015966296196,
0.0035772696137428284,
-0.003114186692982912,
-0.02881309576332569,
0.012589165940880775,
-0.008094635792076588,
0.016218986362218857,
0.022377481684088707,
-0.011991966515779495,
0.00033456666278652847,
-0.00006594860315090045,
-0.0232614167034626,
-0.03626329079270363,
-0.052521999925374985,
0.0008801393560133874,
-0.036281127482652664,
-0.06712692975997925,
0.01992011070251465,
0.032856423407793045,
0.036181528121232986,
0.05659596249461174,
0.053568024188280106,
-0.04494428634643555,
-0.014736325480043888,
0.03582422062754631,
0.04811841621994972,
-0.03537602350115776,
-0.03157295286655426,
-0.04743945226073265,
0.03166705369949341,
0.03973378986120224,
-0.03396765887737274,
-0.09643307328224182,
0.009913577698171139,
0.018116194754838943,
-0.024911290034651756,
0.062631756067276,
0.023336848244071007,
0.026022594422101974,
0.05452559143304825,
-0.0009351429180242121,
0.023059288039803505,
-0.028600044548511505,
0.00710106547921896,
-0.0056292228400707245,
0.0435488224029541,
-0.035772401839494705,
-0.03334890678524971,
-0.05120829865336418,
0.01608455181121826,
0.016097189858555794,
0.034130778163671494,
0.0361844040453434,
-0.0033581415191292763,
-0.07838420569896698,
-0.010130061767995358,
0.028576035052537918,
-0.01608435809612274,
0.01838039420545101,
0.02403549663722515,
0.038147300481796265,
-0.033612366765737534,
-0.02899792231619358,
-0.017915386706590652,
-0.014840281568467617,
0.03513270244002342,
-0.003782113315537572,
-0.01918131299316883,
-0.055827438831329346,
0.013760225847363472,
-0.013977829366922379,
-0.025159746408462524,
-0.09307382255792618,
0.04832593351602554,
-0.0007514766766689718,
-0.0065033105202019215,
0.0581052340567112,
0.026043333113193512,
0.009913455694913864,
0.04597514867782593,
-0.01433266419917345,
0.025851190090179443,
-0.037460807710886,
0.011968366801738739,
-0.02549763396382332,
-0.02284124493598938,
-0.015439581125974655,
-0.07145126909017563,
-0.02324640564620495,
-0.032973434776067734,
-0.03546598553657532,
-0.03861720487475395,
-0.02809038944542408,
-0.0029443632811307907,
-0.02042290009558201,
0.0005205763736739755,
-0.004242733120918274,
0.00815229956060648,
-0.033160168677568436,
-0.027579642832279205,
-0.027556592598557472,
-0.04028834030032158,
-0.11138061434030533,
-0.03434578329324722,
0.014593866653740406,
0.027633775025606155,
0.0401504747569561,
-0.005739698652178049,
0.008737064898014069,
0.037710145115852356,
-0.005496225319802761,
-0.0063310847617685795,
0.015416803769767284,
0.00819900818169117,
-0.040816452354192734,
-0.04354441165924072,
-0.0012898906134068966,
0.0070941261947155,
0.019784117117524147,
-0.014858050271868706,
0.0038156260270625353,
0.04510599374771118,
-0.03837621957063675,
-0.0026831557042896748,
0.03721214458346367,
0.002024771412834525,
-0.07535187900066376,
-0.0299854539334774,
0.002246938180178404,
-0.04492536932229996,
0.02396254613995552,
-0.00001975705527001992,
-0.03326129540801048,
-0.004562650341540575,
-0.005115572363138199,
0.03723561763763428,
-0.006425146479159594,
-0.02330838143825531,
0.004651304334402084,
-0.030630292370915413,
0.04145057126879692,
-0.06680890917778015,
0.0583253838121891,
-0.037167876958847046,
-0.0051134019158780575,
-0.014132422395050526,
-0.016016660258173943,
-0.03543083369731903,
0.06011941283941269,
-0.010812701657414436,
-0.004291001707315445,
-0.00978238508105278,
0.012264717370271683,
-0.02693035453557968,
0.03110850788652897,
-0.012418167665600777,
0.013026000931859016,
-0.030579013749957085,
0.013014093972742558,
-0.04860885068774223,
0.010534814558923244,
-0.024690059944987297,
-0.01134980097413063,
-0.017437001690268517,
-0.029114697128534317,
-0.017242122441530228,
-0.052486054599285126,
0.051967084407806396,
0.029113003984093666,
0.031136102974414825,
0.010116716846823692,
-0.01795744150876999,
-0.021825237199664116,
0.03154156729578972,
-0.08414532244205475,
-0.042150016874074936,
-0.02398395724594593,
0.03249410167336464,
-0.019488545134663582,
0.06073804572224617,
0.04705096036195755,
-0.041968174278736115,
-0.008265972137451172,
0.02544637955725193,
0.014686589129269123,
0.0030760886147618294,
0.022137869149446487,
0.01308481302112341,
0.05186886340379715,
0.044114626944065094,
-0.05019751936197281,
-0.010275411419570446,
-0.0013492228463292122,
-0.010283957235515118,
-0.008318884298205376,
-0.0213547982275486,
0.014807592146098614,
-0.008459746837615967,
-0.05270743742585182,
-0.02319762483239174,
0.05552899092435837,
0.050733622163534164,
0.03686413913965225,
-0.0004422005149535835,
-0.04367314651608467,
0.026710204780101776,
0.012930908240377903,
-0.045582935214042664,
-0.038594696670770645,
0.015181291848421097,
-0.05640226602554321,
0.07419808208942413,
-0.013204001821577549,
0.015917791053652763,
0.022503377869725227,
0.0271559190005064,
0.016287576407194138,
0.03733167052268982,
-0.03575397655367851,
-0.010425424203276634,
0.04654315114021301,
-0.04330134391784668,
-0.013368072919547558,
-0.005248409230262041,
0.05476273223757744,
-0.05734124779701233,
0.05068311467766762,
0.021399620920419693,
0.020511431619524956,
-0.01386355608701706,
-0.026994485408067703,
-0.056239623576402664,
0.0421990342438221,
-0.05957287549972534,
0.065121129155159,
-0.019698616117239,
-0.08018963038921356,
0.07728459686040878,
0.039686910808086395,
-0.11143980175256729,
0.0068095363676548,
0.04099893942475319,
0.015388973988592625,
0.03179030865430832,
0.04854816943407059,
-0.08676670491695404,
0.00010532813757890835,
-0.04277338087558746,
0.009202768094837666,
-0.05304782837629318,
-0.010151197202503681,
0.02787257358431816,
-0.05312519147992134,
-0.005817309021949768,
0.029489751905202866,
-0.026444217190146446,
-0.00004522419840213843,
0.0155562749132514,
-0.039869118481874466,
-0.04774105176329613,
-0.02450719103217125,
0.0015773962950333953,
-0.02176063507795334,
0.029261719435453415,
-0.019412510097026825,
0.037545524537563324,
0.012095758691430092,
0.000779219379182905,
-0.04866524785757065,
0.001842381083406508,
0.03262905403971672,
-0.04388849809765816,
-0.03358625993132591,
0.03124113567173481,
0.011428775265812874,
-0.011849353089928627,
0.029009951278567314,
-0.023827198892831802,
0.018550558015704155,
0.030832616612315178,
-0.022714246064424515,
0.01744890958070755,
-0.043215107172727585,
-0.01472215261310339,
0.023400643840432167,
0.012869434431195259,
0.021312782540917397,
-0.00867497455328703,
0.027556443586945534,
0.026372497901320457,
0.03481088578701019,
-0.023329738527536392,
-0.01929822936654091,
-0.01887582428753376,
0.016489150002598763,
-0.0544595792889595,
0.026064712554216385,
0.023272432386875153,
-0.03424665704369545,
-0.05331537500023842,
-0.0431443490087986,
-0.026059193536639214,
0.05344893038272858,
-0.04266096279025078,
0.020291773602366447,
0.05471241846680641,
-0.020549019798636436,
-0.04498990625143051,
-0.08333975821733475,
-0.009266580455005169,
-0.03202417492866516,
0.021713068708777428,
0.0331263430416584,
-0.02573590725660324,
-0.006887161172926426,
-0.045689892023801804,
-0.06757891923189163,
0.03870373219251633,
0.0171420369297266,
-0.01810568757355213,
0.035037800669670105,
0.03831496089696884,
-0.008775611408054829,
0.007550283335149288,
0.012709476053714752,
-0.058417923748493195,
0.018651215359568596,
0.01288424152880907,
0.01664414443075657,
0.03223493695259094,
0.04740963876247406,
-0.017991939559578896,
-0.029932932928204536,
-0.07806476205587387,
-0.030991192907094955,
-0.03409956768155098,
-0.013808505609631538,
0.06661566346883774
] |
CAMeL-Lab/bert-base-arabic-camelbert-msa-did-madar-twitter5 | [
"pytorch",
"tf",
"bert",
"text-classification",
"ar",
"arxiv:2103.06678",
"transformers",
"license:apache-2.0"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 75 | 2020-12-08T19:21:25Z | ---
tags:
- summarization
widget:
- text: "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
---
# CodeTrans model for program synthesis
Pretrained model on programming language lisp inspired DSL using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate lisp inspired DSL code given the human language description tasks.
### How to use
Here is how to use this model to generate lisp inspired DSL code using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_program_synthese_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_program_synthese_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/program%20synthesis/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 360,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | LISP |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 89.43 |
| CodeTrans-ST-Base | 89.65 |
| CodeTrans-TF-Small | 90.30 |
| CodeTrans-TF-Base | 90.24 |
| CodeTrans-TF-Large | 90.21 |
| CodeTrans-MT-Small | 82.88 |
| CodeTrans-MT-Base | 86.99 |
| CodeTrans-MT-Large | 90.27 |
| CodeTrans-MT-TF-Small | **90.31** |
| CodeTrans-MT-TF-Base | 90.30 |
| CodeTrans-MT-TF-Large | 90.17 |
| State of the art | 85.80 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.02893759310245514,
-0.03594134375452995,
-0.015151607804000378,
0.04323854297399521,
0.026980537921190262,
0.02998853661119938,
-0.03244023397564888,
0.0004783787881024182,
-0.017726581543684006,
0.057490091770887375,
0.04613073170185089,
0.012083250097930431,
-0.036985523998737335,
0.05680188164114952,
-0.04075188562273979,
-0.05562209337949753,
-0.014727290719747543,
-0.032351672649383545,
-0.019649140536785126,
-0.024820972234010696,
0.01415267027914524,
-0.008474525064229965,
0.018290890380740166,
0.007490875199437141,
-0.004844918381422758,
0.019012823700904846,
0.000015560061001451686,
0.035283129662275314,
0.020725542679429054,
-0.0757240429520607,
-0.025526434183120728,
-0.02264358662068844,
-0.03871855512261391,
0.0008221864118240774,
-0.015158889815211296,
0.0275000911206007,
0.011884140782058239,
0.02523491159081459,
0.026385411620140076,
0.0528874471783638,
0.009316177107393742,
0.0013441928895190358,
-0.0026893459726125,
-0.04342450574040413,
0.057907991111278534,
0.0076196822337806225,
-0.019213803112506866,
-0.010827397927641869,
0.023848166689276695,
0.0035864715464413166,
-0.056108660995960236,
-0.05779377371072769,
-0.03696732223033905,
0.034580640494823456,
-0.011467698030173779,
-0.01786584034562111,
-0.055154070258140564,
-0.009296745993196964,
0.05490292236208916,
-0.04890720173716545,
-0.030286947265267372,
0.024623138830065727,
-0.06062999740242958,
0.013364681974053383,
0.029030341655015945,
-0.016008617356419563,
0.007599919103085995,
-0.0375642366707325,
0.011927271261811256,
-0.010211188346147537,
0.06154954805970192,
-0.01987961120903492,
0.018064484000205994,
-0.10289683192968369,
0.018294982612133026,
-0.004559369292110205,
0.022586176171898842,
0.02574996091425419,
-0.022800222039222717,
0.04790821298956871,
0.013975882902741432,
-0.011324580758810043,
0.037184447050094604,
0.014528671279549599,
-0.002055317396298051,
0.04736001044511795,
-0.04042422026395798,
-0.010054927319288254,
-0.016553817316889763,
0.059261586517095566,
-0.04900965839624405,
-0.0455072782933712,
-0.030207358300685883,
-0.015182767994701862,
-0.021512510254979134,
0.01598171889781952,
0.02783840335905552,
-0.0007652266649529338,
0.03241615369915962,
0.017251966521143913,
0.048555031418800354,
0.04330449178814888,
-0.017959851771593094,
0.04898936301469803,
0.025370009243488312,
0.020954938605427742,
0.006111702416092157,
-0.04262905567884445,
-0.039643969386816025,
0.040605898946523666,
0.023898277431726456,
-0.03426728397607803,
-0.045254871249198914,
0.04494672641158104,
0.013305818662047386,
-0.025742394849658012,
0.04233867675065994,
-0.018324127420783043,
-0.05210663005709648,
-0.023248130455613136,
0.03378618136048317,
-0.0029756769072264433,
-0.01335055846720934,
0.018962688744068146,
-0.0481034554541111,
0.002808814402669668,
-0.06962642818689346,
-0.04336249455809593,
0.018203746527433395,
0.02722204104065895,
-0.006354643497616053,
0.08126892894506454,
0.0020692627876996994,
-0.05192165449261665,
0.011425688862800598,
0.015193628147244453,
-0.08198341727256775,
0.054875101894140244,
0.041261713951826096,
0.13403242826461792,
-0.07026362419128418,
-0.04553799331188202,
0.014514872804284096,
-0.0038369724061340094,
-0.037390951067209244,
0.023785296827554703,
-0.0025923154316842556,
-0.057353999465703964,
-0.019272703677415848,
-0.02204088121652603,
0.07246453315019608,
-0.050665900111198425,
-0.016841163858771324,
0.04117776080965996,
-0.0005434293416328728,
0.018694767728447914,
-0.037688400596380234,
-0.0003404426097404212,
-0.013755365274846554,
-0.02664759010076523,
-0.04499681666493416,
0.03025083616375923,
-0.011573126539587975,
-0.027719467878341675,
-0.03956300765275955,
-0.025464700534939766,
0.0157688669860363,
0.0869578868150711,
0.0159758348017931,
-0.021285230293869972,
-0.024406233802437782,
0.005083567462861538,
0.03512722998857498,
0.028751328587532043,
-0.04688017815351486,
0.026895729824900627,
0.04701577126979828,
0.05143360421061516,
-0.027243798598647118,
0.06697706133127213,
-0.007460770662873983,
-0.03599335253238678,
-0.021898197010159492,
-0.0055835070088505745,
-0.0168281439691782,
-0.034635405987501144,
-0.0007057565962895751,
0.03291613981127739,
-0.014271426014602184,
0.003193879732862115,
-0.022474870085716248,
0.06630818545818329,
0.013227288611233234,
-0.011405515484511852,
-0.03142043948173523,
0.004491725470870733,
-0.019077911972999573,
0.05862218141555786,
-0.028017686679959297,
-0.004961755126714706,
-0.017170609906315804,
-0.03896886855363846,
-0.009196280501782894,
0.018495740368962288,
0.050079379230737686,
0.025826558470726013,
0.00655632046982646,
0.09942232072353363,
-0.04794483259320259,
0.012392695061862469,
-0.05407439544796944,
-0.035867370665073395,
0.013081636279821396,
0.05467591807246208,
0.01379042211920023,
0.04530155286192894,
0.0089905746281147,
-0.03172241896390915,
0.022399719804525375,
0.058095917105674744,
0.02648722380399704,
0.017636392265558243,
-0.026647213846445084,
-0.01966504193842411,
0.03175123780965805,
0.07031450420618057,
-0.04457290098071098,
-0.027966657653450966,
0.037998586893081665,
0.0384836420416832,
-0.0192708782851696,
0.02274134010076523,
-0.01141943410038948,
0.018683582544326782,
-0.06065650284290314,
-0.06188684701919556,
0.02944228984415531,
0.0029433723539114,
0.012487692758440971,
0.01592393033206463,
0.007083086762577295,
-0.012739931233227253,
0.044609591364860535,
0.0005709104589186609,
-0.0018973186379298568,
-0.0659671425819397,
-0.00730063347145915,
0.002976178890094161,
0.03689231723546982,
-0.03636063262820244,
0.04056074097752571,
0.005633195862174034,
0.008834843523800373,
0.06278088688850403,
-0.023559976369142532,
0.026188189163804054,
0.034350715577602386,
0.02190696820616722,
-0.013205664232373238,
0.01464936789125204,
0.010343543253839016,
0.03228253871202469,
0.06518049538135529,
-0.004575488157570362,
0.07296954840421677,
-0.01033012568950653,
0.05163143575191498,
0.06067752093076706,
0.014533243142068386,
0.011207706294953823,
0.042858000844717026,
0.07619820535182953,
0.0001385642244713381,
-0.0053540440276265144,
0.04171553626656532,
-0.07009914517402649,
0.036938153207302094,
-0.022242387756705284,
0.02473338507115841,
-0.020283566787838936,
-0.01749552972614765,
0.05861622467637062,
0.005606451071798801,
-0.024814452975988388,
0.0001137169892899692,
-0.03429488092660904,
-0.023267369717359543,
0.009089085273444653,
-0.012445138767361641,
-0.0237494595348835,
0.025000223889946938,
-0.02627040073275566,
0.007476764265447855,
-0.08776934444904327,
-0.05575857684016228,
-0.017543531954288483,
-0.0420541912317276,
0.02262881211936474,
-0.06959152221679688,
-0.05011633411049843,
-0.06162785738706589,
-0.021577222272753716,
0.02830367349088192,
0.0031443950720131397,
0.003986664116382599,
-0.025870218873023987,
0.023552529513835907,
-0.04410313442349434,
-0.019081519916653633,
-0.04884069412946701,
-0.062279220670461655,
-0.016886426135897636,
-0.052888158708810806,
0.033195625990629196,
-0.0007220882689580321,
0.0058120256289839745,
-0.0026583876460790634,
-0.002958688884973526,
-0.032424040138721466,
-0.022563982754945755,
0.07135389745235443,
0.01535811834037304,
-0.018120218068361282,
-0.03212479129433632,
0.012863703072071075,
-0.025480132550001144,
0.03020736761391163,
-0.029440712183713913,
-0.031251437962055206,
0.09270533174276352,
0.0512554794549942,
0.025440767407417297,
-0.0102755818516016,
-0.038413286209106445,
-0.0568394809961319,
-0.05936022475361824,
-0.01593679003417492,
-0.03630004823207855,
-0.030334629118442535,
-0.003881926415488124,
-0.040335364639759064,
-0.012993313372135162,
-0.040031734853982925,
-0.030099978670477867,
-0.001312733511440456,
0.02776237204670906,
0.046966712921857834,
0.034726887941360474,
0.05159328505396843,
0.02339521236717701,
-0.03744634985923767,
-0.013918053358793259,
0.035642948001623154,
0.0035299600567668676,
0.012013819068670273,
-0.0800781100988388,
-0.01908951997756958,
0.04154419153928757,
0.028025735169649124,
0.0049454038962721825,
-0.017933225259184837,
0.08116733282804489,
0.02689238265156746,
0.0035313954576849937,
0.006964731961488724,
0.013636332005262375,
-0.012032908387482166,
-0.01059014443308115,
-0.001853884314186871,
-0.03302105888724327,
-0.04854052886366844,
-0.02018243446946144,
-0.027644405141472816,
0.03925374522805214,
-0.055653296411037445,
-0.04438350722193718,
-0.018642015755176544,
0.03432906046509743,
0.01780444011092186,
0.016421154141426086,
-0.018442954868078232,
-0.005492285825312138,
-0.05402972921729088,
-0.03852446377277374,
0.035100776702165604,
0.015086248517036438,
-0.0182571429759264,
0.03758570924401283,
0.01916792429983616,
-0.05341310054063797,
0.022224199026823044,
0.01977887563407421,
0.050867222249507904,
0.03912211209535599,
-0.0448148250579834,
0.015139116905629635,
-0.03399776667356491,
0.02835264801979065,
0.005876942537724972,
-0.042534757405519485,
-0.058212485164403915,
-0.08683754503726959,
-0.028590954840183258,
0.008589893579483032,
-0.03513537719845772,
0.00374728930182755,
0.052159734070301056,
-0.02469669282436371,
-0.01894496940076351,
0.002527794800698757,
0.017897004261612892,
0.05358394235372543,
-0.0364748053252697,
0.03698136657476425,
0.007042139768600464,
0.05983006954193115,
-0.033888012170791626,
0.015723958611488342,
-0.030124692246317863,
-0.016244176775217056,
0.009056461974978447,
0.036382872611284256,
0.03359418362379074,
0.06105819717049599,
0.06588362157344818,
0.02780483104288578,
-0.04725591093301773,
0.03627299889922142,
0.05733233317732811,
-0.0018083435716107488,
-0.030804425477981567,
0.008549013175070286,
-0.0018116176361218095,
-0.03498358651995659,
0.014208381995558739,
-0.01523393765091896,
0.021317793056368828,
0.037315282970666885,
-0.010299043729901314,
-0.00568727171048522,
-0.0015213560545817018,
-0.031346645206213,
-0.03867832571268082,
-0.050995033234357834,
-0.021458391100168228,
-0.02341304160654545,
-0.06971947848796844,
0.04426415264606476,
0.03696262836456299,
0.026727749034762383,
0.04566190764307976,
0.04803052917122841,
-0.03524848446249962,
-0.03995940834283829,
0.04297685995697975,
0.03823082149028778,
-0.04743482545018196,
-0.05316496640443802,
-0.07171088457107544,
0.028375260531902313,
0.03851756453514099,
-0.0331697016954422,
-0.08515084534883499,
0.020672913640737534,
0.046616941690444946,
-0.02854498289525509,
0.076530322432518,
0.006946532521396875,
0.021107889711856842,
0.03930791839957237,
-0.013446013443171978,
0.02722996287047863,
-0.0239228717982769,
0.022776806727051735,
0.01381082646548748,
0.06004464253783226,
-0.03588373586535454,
-0.03806134685873985,
-0.055342305451631546,
0.0399349182844162,
0.029255708679556847,
0.045473042875528336,
0.03890116885304451,
-0.007947967387735844,
-0.07211622595787048,
0.001483083120547235,
0.014427075162529945,
-0.03369082510471344,
0.016885872930288315,
0.03748861327767372,
0.04777075722813606,
-0.05699092522263527,
-0.01665111444890499,
-0.013498260639607906,
-0.0013927692780271173,
0.023512020707130432,
-0.0018972603138536215,
-0.029702385887503624,
-0.059585507959127426,
0.014523315243422985,
-0.028299814090132713,
-0.01899411715567112,
-0.09829113632440567,
0.03994534909725189,
-0.008566549979150295,
-0.01651860401034355,
0.06122495234012604,
0.04691581428050995,
0.030345402657985687,
0.04501067101955414,
-0.0175198744982481,
0.026207292452454567,
-0.034748028963804245,
0.0445479117333889,
-0.011281684041023254,
-0.01826569065451622,
-0.016489233821630478,
-0.08183671534061432,
-0.011618448421359062,
-0.03215251490473747,
-0.03304366022348404,
-0.04151109606027603,
-0.04844748228788376,
0.0042452383786439896,
-0.00029615245875902474,
0.009432854130864143,
0.004236468113958836,
0.019461676478385925,
-0.023086940869688988,
-0.022118614986538887,
-0.04392721876502037,
-0.0522039420902729,
-0.09520905464887619,
-0.02914131060242653,
0.0037511754781007767,
0.027773147448897362,
0.02562997117638588,
0.005072419997304678,
0.01164559181779623,
0.029309211298823357,
-0.0013339805882424116,
-0.024210389703512192,
0.025224218145012856,
0.013651944696903229,
-0.050615809857845306,
-0.015529640950262547,
-0.010201826691627502,
-0.0025944779627025127,
0.012275367975234985,
-0.03897075727581978,
0.005582650192081928,
0.023619361221790314,
-0.03062816709280014,
-0.006178067531436682,
0.020993104204535484,
0.007149022072553635,
-0.0765632838010788,
-0.05554359033703804,
-0.016305411234498024,
-0.061268191784620285,
0.023340558633208275,
-0.0018859796691685915,
-0.030191073194146156,
-0.004909760784357786,
0.014146794565021992,
0.019043298438191414,
-0.010385066270828247,
-0.027445392683148384,
-0.003323245095089078,
-0.045384179800748825,
0.04026549682021141,
-0.05945948138833046,
0.05440078675746918,
-0.03765928000211716,
-0.007605076301842928,
-0.009302296675741673,
-0.02822078950703144,
-0.032990437000989914,
0.049573931843042374,
-0.013903886079788208,
-7.398090247079381e-7,
-0.024923104792833328,
0.02494686283171177,
-0.0375785157084465,
0.05219855532050133,
0.0006498639122582972,
0.009035182185471058,
-0.032334573566913605,
0.010141128674149513,
-0.03850987181067467,
0.016931721940636635,
-0.015371075831353664,
-0.019424546509981155,
-0.015532094053924084,
-0.027880119159817696,
-0.027832617983222008,
-0.04615515097975731,
0.042081404477357864,
0.025461643934249878,
0.032829008996486664,
0.008720239624381065,
-0.004436735063791275,
-0.016681218519806862,
0.02213943749666214,
-0.07527557015419006,
-0.03709746152162552,
-0.017521483823657036,
0.019647302106022835,
-0.02369561418890953,
0.06048613786697388,
0.041246458888053894,
-0.04950334504246712,
-0.02925148978829384,
0.01343391090631485,
0.00678218575194478,
0.011249832808971405,
0.026313316076993942,
0.030369604006409645,
0.03885151445865631,
0.05379261076450348,
-0.028006218373775482,
-0.000583711895160377,
-0.0007694281521253288,
-0.01215153094381094,
-0.016316629946231842,
-0.01716446690261364,
0.023561086505651474,
-0.013518096879124641,
-0.04317353665828705,
-0.02571238949894905,
0.0576019287109375,
0.025695329532027245,
0.025100279599428177,
0.007648244965821505,
-0.03989948704838753,
0.018449869006872177,
0.024437032639980316,
-0.04750669375061989,
-0.03365839645266533,
0.0112771512940526,
-0.0461767204105854,
0.07974254339933395,
-0.02492220513522625,
0.02046184614300728,
0.04389514401555061,
0.030569016933441162,
0.0043355547823011875,
0.03972723335027695,
-0.03522305190563202,
0.010863793082535267,
0.046807918697595596,
-0.0555952824652195,
-0.012429040856659412,
-0.011219733394682407,
0.0657920241355896,
-0.057269979268312454,
0.05990079790353775,
0.015845997259020805,
0.019763045012950897,
0.006123483646661043,
-0.008491838350892067,
-0.07027359306812286,
0.02465280145406723,
-0.04158574342727661,
0.07231900840997696,
-0.022626783698797226,
-0.06616032123565674,
0.08059187978506088,
0.03510531410574913,
-0.08358462899923325,
0.008155879564583302,
0.03816632553935051,
0.02231641486287117,
0.0379786379635334,
0.022976644337177277,
-0.08183390647172928,
-0.01305851899087429,
-0.03289881721138954,
0.017048431560397148,
-0.05536164343357086,
-0.009479144588112831,
0.029702428728342056,
-0.05287465453147888,
0.001189635368064046,
0.02230057492852211,
0.007536045275628567,
0.0020901868119835854,
0.015015392564237118,
-0.06245070695877075,
-0.04835335910320282,
-0.02703632228076458,
0.015297268517315388,
-0.04192815348505974,
0.023500841110944748,
-0.018856283277273178,
0.036427102982997894,
0.02837434411048889,
0.005775016732513905,
-0.049363698810338974,
0.0051605794578790665,
0.029082706198096275,
-0.05422249063849449,
-0.035980839282274246,
0.01785135269165039,
0.017031686380505562,
-0.03350425511598587,
0.030494514852762222,
-0.02313552051782608,
0.03350699692964554,
0.03341788053512573,
-0.012005167081952095,
0.011653615161776543,
-0.04442107304930687,
-0.0059695765376091,
0.022022804245352745,
0.012455063872039318,
0.009100264869630337,
-0.00643466180190444,
0.029631981626152992,
0.04964746534824371,
0.04036249220371246,
-0.011622410267591476,
-0.0020885125268250704,
-0.009453092701733112,
0.023978205397725105,
-0.04239644110202789,
0.01981368288397789,
0.01946166902780533,
-0.03309797868132591,
-0.03169690817594528,
-0.04593469575047493,
-0.0260629840195179,
0.03891173005104065,
-0.03482995927333832,
0.006158219184726477,
0.04610224813222885,
-0.01894463784992695,
-0.04927578195929527,
-0.06600484251976013,
0.0027515296824276447,
-0.024750834330916405,
0.04799288138747215,
0.03488928824663162,
-0.035203006118535995,
-0.0030426839366555214,
-0.04401686415076256,
-0.06786750257015228,
0.03976723551750183,
0.027101168408989906,
-0.018133588135242462,
0.04914330691099167,
0.03514079749584198,
-0.02672775834798813,
0.0196299497038126,
0.02149120904505253,
-0.05268687382340431,
0.02629357948899269,
0.022379383444786072,
0.02072380669414997,
0.040148958563804626,
0.03799472004175186,
-0.03284849226474762,
-0.043815720826387405,
-0.07039953768253326,
-0.016154155135154724,
-0.04312969744205475,
-0.0038060869555920362,
0.07099082320928574
] |
CAMeL-Lab/bert-base-arabic-camelbert-msa-pos-glf | [
"pytorch",
"tf",
"bert",
"token-classification",
"ar",
"arxiv:2103.06678",
"transformers",
"license:apache-2.0",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"BertForTokenClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 21 | 2020-11-26T09:10:46Z | ---
tags:
- summarization
widget:
- text: '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
---
# CodeTrans model for source code summarization python
Pretrained model on programming language python using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used single-task training on source code summarization python dataset.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_python"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_python", skip_special_tokens=True),
device=0
)
tokenized_code = '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/source%20code%20summarization/python/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0008420926751568913,
-0.027927977964282036,
-0.013090802356600761,
0.03162038326263428,
0.028991203755140305,
0.03250934183597565,
-0.026841901242733,
-0.00016275537200272083,
-0.026041071861982346,
0.059456855058670044,
0.04493715614080429,
0.00395278912037611,
-0.00626729940995574,
0.04600514844059944,
-0.04040716215968132,
-0.0654124915599823,
-0.023475801572203636,
-0.03222199156880379,
-0.029561614617705345,
-0.012191849760711193,
0.017708998173475266,
0.0007288656197488308,
0.013594148680567741,
0.009517982602119446,
-0.003997519612312317,
0.01282916497439146,
0.003096279688179493,
0.018006207421422005,
0.035205647349357605,
-0.07868850231170654,
-0.023639608174562454,
0.0018985160859301686,
-0.047155383974313736,
-0.009628918953239918,
-0.015051704831421375,
0.020247474312782288,
0.002236512489616871,
0.026994604617357254,
0.015699978917837143,
0.06491135060787201,
-0.0021366486325860023,
0.026660775765776634,
0.011801964603364468,
-0.034712597727775574,
0.05871989205479622,
0.003983032424002886,
-0.028165526688098907,
-0.0316171832382679,
0.018710698932409286,
0.005484860390424728,
-0.056746505200862885,
-0.07027798891067505,
-0.029481664299964905,
0.051051679998636246,
-0.008193441666662693,
-0.012489787302911282,
-0.07139300554990768,
-0.012135513126850128,
0.045568931847810745,
-0.057676274329423904,
-0.03149602934718132,
0.011747094802558422,
-0.05987902358174324,
0.016292952001094818,
0.013165521435439587,
0.006461376789957285,
0.007991121150553226,
-0.03594852238893509,
0.02647421695291996,
0.0020954713691025972,
0.05965506285429001,
-0.01836751028895378,
0.03216369450092316,
-0.11075504869222641,
0.020673617720603943,
-0.006107345223426819,
0.014783933758735657,
0.012091519311070442,
-0.013924004510045052,
0.054637614637613297,
0.005373894702643156,
-0.01086469367146492,
0.04123587906360626,
0.014016550965607166,
-0.016389675438404083,
0.03935070335865021,
-0.0365164540708065,
-0.015163086354732513,
-0.021984415128827095,
0.06700144708156586,
-0.07166118919849396,
-0.06501251459121704,
-0.007707266137003899,
-0.024281680583953857,
-0.03128424286842346,
0.019495105370879173,
0.046791139990091324,
-0.008243243210017681,
0.02114603854715824,
0.007330253720283508,
0.039002712815999985,
0.05141754448413849,
-0.0048396834172308445,
0.04516245424747467,
0.02750597707927227,
0.014536465518176556,
-0.015406947582960129,
-0.04354291409254074,
-0.019556710496544838,
0.039267513900995255,
0.018869522958993912,
-0.03350164741277695,
-0.048691119998693466,
0.03323462978005409,
0.02125725708901882,
-0.044048164039850235,
0.03836876526474953,
-0.02464447356760502,
-0.05102838575839996,
-0.03186355158686638,
0.0413605161011219,
-0.008723433129489422,
-0.011714001186192036,
0.008089390583336353,
-0.04211096465587616,
-0.0009108945378102362,
-0.05991799011826515,
-0.027917364612221718,
0.010493791662156582,
0.041380058974027634,
-0.0035251700319349766,
0.08711458742618561,
0.012211154215037823,
-0.025792565196752548,
0.010420636273920536,
0.01358726155012846,
-0.07413970679044724,
0.06570932269096375,
0.03959425911307335,
0.11141347885131836,
-0.0647011250257492,
-0.041431643068790436,
0.024355396628379822,
-0.010898797772824764,
-0.026528187096118927,
0.020594000816345215,
-0.0047572604380548,
-0.07606106996536255,
-0.02788490615785122,
-0.007524535991251469,
0.06557659804821014,
-0.0393429659307003,
-0.02258707955479622,
0.019721360877156258,
0.004187490791082382,
0.011473541148006916,
-0.038227882236242294,
0.004633049014955759,
-0.0025381396990269423,
-0.027679862454533577,
-0.06476712226867676,
0.03285425528883934,
-0.001199845690280199,
-0.0266904067248106,
-0.027599051594734192,
-0.039986398071050644,
0.010907134972512722,
0.11046984046697617,
0.0008573323721066117,
-0.010498885996639729,
-0.04912561923265457,
0.010997866280376911,
0.024169906973838806,
0.04723568260669708,
-0.017888041213154793,
0.019492940977215767,
0.04458565637469292,
0.07159774005413055,
-0.024898085743188858,
0.07388018071651459,
-0.0160545501857996,
-0.03548480570316315,
-0.030803363770246506,
0.016985440626740456,
-0.014400593005120754,
-0.034771647304296494,
0.009394525550305843,
0.029132694005966187,
-0.015023299492895603,
-0.0044976347126066685,
-0.00848327111452818,
0.057479456067085266,
0.025913989171385765,
-0.005582254845649004,
-0.030210163444280624,
0.011865371838212013,
-0.021132515743374825,
0.06577713787555695,
-0.04161122068762779,
-0.010846256278455257,
-0.012642033398151398,
-0.03385961055755615,
-0.00986784789711237,
0.02752656303346157,
0.047406088560819626,
0.018134476616978645,
-0.009937121532857418,
0.10864271968603134,
-0.04178706929087639,
0.004420905839651823,
-0.04599917307496071,
-0.034937743097543716,
0.023510273545980453,
0.035257067531347275,
0.03270889073610306,
0.03128533065319061,
0.014276903122663498,
-0.02550690434873104,
0.01381855271756649,
0.07088117301464081,
0.027207957580685616,
0.044957246631383896,
-0.010161682963371277,
-0.029126783832907677,
0.033095162361860275,
0.06999540328979492,
-0.04048138111829758,
-0.04038812592625618,
0.04269005358219147,
0.02872375398874283,
-0.006413526367396116,
0.027335628867149353,
-0.008886019699275494,
0.013753250241279602,
-0.04626176506280899,
-0.06510145217180252,
0.04584205523133278,
0.0159720778465271,
0.002683415310457349,
0.03448822721838951,
-0.0007656402885913849,
0.0009479933069087565,
0.03343122452497482,
0.0033071055077016354,
-0.00030637075542472303,
-0.05781321972608566,
0.010272751562297344,
0.0025207865983247757,
0.06381156295537949,
-0.03624939173460007,
0.03393813222646713,
0.015762874856591225,
0.0009500178857706487,
0.056201737374067307,
-0.034466568380594254,
0.026874857023358345,
0.03169267624616623,
0.025140389800071716,
-0.018907060846686363,
0.01986883208155632,
0.024517003446817398,
0.026266196742653847,
0.08235187083482742,
0.012762402184307575,
0.06333901733160019,
-0.002305675996467471,
0.05920179560780525,
0.07431995868682861,
0.013564741238951683,
0.011341583915054798,
0.02295314334332943,
0.06570439040660858,
-0.01125612948089838,
-0.013583713211119175,
0.06356560438871384,
-0.048210423439741135,
0.02802729606628418,
-0.038561075925827026,
0.02981646917760372,
-0.015456334687769413,
-0.0164148211479187,
0.03550978749990463,
0.004074921365827322,
-0.047581225633621216,
0.003768082009628415,
-0.02717585675418377,
-0.025219842791557312,
0.00861923024058342,
0.001721413224004209,
-0.030296074226498604,
0.024288758635520935,
-0.019106950610876083,
0.024460356682538986,
-0.08535249531269073,
-0.047485899180173874,
-0.006512385793030262,
-0.040288250893354416,
0.013523577712476254,
-0.07125644385814667,
-0.05746026337146759,
-0.06386835128068924,
-0.021257616579532623,
0.031024541705846786,
0.0028402069583535194,
-0.009307986125349998,
-0.030474528670310974,
0.009575561620295048,
-0.04268787056207657,
-0.02699153497815132,
-0.05641037970781326,
-0.05902750790119171,
-0.0037706890143454075,
-0.06527958810329437,
0.04227093234658241,
-0.021068725734949112,
0.03172158822417259,
0.008158054202795029,
-0.014725537970662117,
-0.02917652763426304,
-0.019810136407613754,
0.07103124260902405,
0.012190200388431549,
-0.013717971742153168,
-0.0339006707072258,
0.01739322952926159,
-0.021741092205047607,
0.030948469415307045,
0.00163308868650347,
-0.037300098687410355,
0.1017317920923233,
0.06780411303043365,
0.04164424166083336,
-0.01371407974511385,
-0.03865395486354828,
-0.04130388796329498,
-0.04888065531849861,
-0.02261057309806347,
-0.029576139524579048,
-0.031335603445768356,
-0.0007149274460971355,
-0.05528007075190544,
-0.022362586110830307,
-0.02768598683178425,
-0.045515455305576324,
-0.0186571404337883,
0.02972542680799961,
0.031812023371458054,
0.040767647325992584,
0.04945250600576401,
0.021309055387973785,
-0.0406402125954628,
-0.03466738015413284,
0.04136265814304352,
0.0014884131960570812,
0.003947282675653696,
-0.0749683752655983,
-0.03943663462996483,
0.03953281044960022,
0.012905467301607132,
-0.00020928619778715074,
-0.026079846546053886,
0.051658354699611664,
0.013920255936682224,
0.010321320965886116,
0.0002494509390089661,
-0.00651518302038312,
-0.019583003595471382,
-0.02213462069630623,
-0.0014302085619419813,
-0.030505063012242317,
-0.03602683171629906,
-0.019399413838982582,
-0.006824130192399025,
0.04213889688253403,
-0.061180561780929565,
-0.05881709232926369,
-0.00557707529515028,
0.03659792244434357,
0.03526177257299423,
0.02301790565252304,
-0.018753238022327423,
-0.005370078142732382,
-0.06463544815778732,
-0.043094243854284286,
0.036811310797929764,
0.011973570100963116,
-0.007370633073151112,
0.04639321193099022,
0.050376925617456436,
-0.05567517131567001,
0.025568922981619835,
0.038406744599342346,
0.05027768015861511,
0.020600391551852226,
-0.03505154699087143,
0.009597496129572392,
-0.04765233397483826,
0.020533310249447823,
0.008389399386942387,
-0.03139926493167877,
-0.04830208793282509,
-0.0731477215886116,
-0.0312872976064682,
0.011735779233276844,
-0.01238175854086876,
-0.00036911433562636375,
0.04517814889550209,
-0.028624307364225388,
-0.0511457584798336,
-0.006792891770601273,
0.005154414102435112,
0.0726507231593132,
-0.040056273341178894,
0.034576866775751114,
0.011512069962918758,
0.06208305060863495,
-0.03905044496059418,
0.005586638581007719,
-0.029595276340842247,
-0.019175991415977478,
0.004602801986038685,
0.049762532114982605,
0.029175540432333946,
0.05764956399798393,
0.07810549437999725,
0.010619444772601128,
-0.03604644909501076,
0.04703135788440704,
0.05295966565608978,
0.009713124483823776,
-0.025826238095760345,
0.00725314486771822,
0.01783120632171631,
-0.028501790016889572,
0.01971595175564289,
-0.002829347038641572,
0.015446741133928299,
0.02639044262468815,
-0.003365961369127035,
0.00042966942419297993,
-0.0008520556730218232,
-0.024632874876260757,
-0.04379422590136528,
-0.046068061143159866,
-0.0031957270111888647,
-0.03216216713190079,
-0.048753198236227036,
0.027976645156741142,
0.039092738181352615,
0.026800615713000298,
0.0460578128695488,
0.041059959679841995,
-0.032381847500801086,
-0.02618970163166523,
0.04599679633975029,
0.04857369512319565,
-0.039552412927150726,
-0.04424375668168068,
-0.05318307876586914,
0.033594682812690735,
0.047727715224027634,
-0.019561847671866417,
-0.0958772823214531,
0.0018198654288426042,
0.023708799853920937,
-0.02018241211771965,
0.06469849497079849,
0.030239379033446312,
0.02498459815979004,
0.05314512178301811,
-0.004698765929788351,
0.02490595169365406,
-0.014793184585869312,
0.017122281715273857,
-0.0006335481302812696,
0.037357147783041,
-0.025417262688279152,
-0.032620083540678024,
-0.0426386296749115,
0.020133644342422485,
0.010936107486486435,
0.038592323660850525,
0.03295127674937248,
-0.01450843084603548,
-0.07751329243183136,
0.0020227825734764338,
0.029132114723324776,
-0.030180152505636215,
0.015304254367947578,
0.02792355604469776,
0.03369659185409546,
-0.05066836252808571,
-0.03185210004448891,
-0.018304793164134026,
-0.01185799390077591,
0.031993355602025986,
0.0026767700910568237,
-0.014551409520208836,
-0.06710201501846313,
0.011637174524366856,
-0.02044055424630642,
-0.03157433494925499,
-0.08133921027183533,
0.0360342301428318,
0.0046747829765081406,
-0.0018584985518828034,
0.0556609220802784,
0.0365440770983696,
0.021186823025345802,
0.03139008954167366,
-0.014298006892204285,
0.03135937452316284,
-0.025069460272789,
0.02033562771975994,
-0.018330207094550133,
-0.024753663688898087,
-0.023681635037064552,
-0.05542124807834625,
-0.029554035514593124,
-0.03892803564667702,
-0.04656855762004852,
-0.0476159043610096,
-0.028012903407216072,
0.008280483074486256,
-0.014259208925068378,
-0.005996952764689922,
-0.010940137319266796,
0.006474179681390524,
-0.026077382266521454,
-0.025614220649003983,
-0.030525198206305504,
-0.04181163012981415,
-0.10277682542800903,
-0.02550400234758854,
0.004134184680879116,
0.038876939564943314,
0.036399826407432556,
-0.002003583125770092,
0.0032231637742370367,
0.02607063576579094,
0.006405708845704794,
-0.008390586823225021,
0.019773496314883232,
0.007219691760838032,
-0.04798298701643944,
-0.032524991780519485,
0.008578070439398289,
0.011227245442569256,
0.009252834133803844,
-0.023605067282915115,
0.0052552963607013226,
0.04804182052612305,
-0.0303873959928751,
-0.00162775837816298,
0.03602634370326996,
0.001532956724986434,
-0.08050962537527084,
-0.04135178029537201,
0.005604373291134834,
-0.044557441025972366,
0.03609434515237808,
0.0010484576923772693,
-0.028238950297236443,
-0.014913292601704597,
0.013703936710953712,
0.03389411047101021,
-0.014172926545143127,
-0.030663276091217995,
-0.006858874578028917,
-0.03418506309390068,
0.040335655212402344,
-0.06428073346614838,
0.04047508165240288,
-0.03262131288647652,
-0.004947258625179529,
-0.010339885950088501,
-0.005434904247522354,
-0.0347212515771389,
0.06569721549749374,
-0.011440892703831196,
-0.008701382204890251,
-0.013468940742313862,
0.006984858773648739,
-0.023925799876451492,
0.04185892641544342,
-0.01216385792940855,
0.006720503326505423,
-0.029853856191039085,
0.013295586220920086,
-0.046187736093997955,
0.004672428127378225,
-0.030285298824310303,
-0.012793488800525665,
-0.02551153115928173,
-0.028256626799702644,
-0.005842307582497597,
-0.05315905064344406,
0.04745323210954666,
0.02419634722173214,
0.0370316356420517,
0.013283304870128632,
-0.021032163873314857,
-0.011647556908428669,
0.02626517228782177,
-0.08639582991600037,
-0.050751421600580215,
-0.03163190186023712,
0.016900012269616127,
-0.025800015777349472,
0.06256313621997833,
0.05114464834332466,
-0.05681584030389786,
-0.007598826661705971,
0.013855161145329475,
0.010801319032907486,
0.0038013181183487177,
0.03061533346772194,
0.03130080923438072,
0.04040401428937912,
0.04555564373731613,
-0.038871727883815765,
-0.008969434536993504,
-0.009946648962795734,
-0.01931748539209366,
-0.014796003699302673,
-0.02198224887251854,
0.02290467545390129,
-0.012733185663819313,
-0.039115939289331436,
-0.024446075782179832,
0.05990269407629967,
0.06501972675323486,
0.022762123495340347,
-0.001280096941627562,
-0.036526717245578766,
0.027788113802671432,
0.014660995453596115,
-0.05293155834078789,
-0.027186090126633644,
0.013910273090004921,
-0.046845443546772,
0.0848228707909584,
-0.005602838471531868,
0.013571220450103283,
0.02501680888235569,
0.025041349232196808,
-0.005548510234802961,
0.04164551943540573,
-0.03499729931354523,
-0.003719102591276169,
0.036793820559978485,
-0.045491550117731094,
-0.011133168824017048,
-0.008562328293919563,
0.04801132157444954,
-0.05284157395362854,
0.03907748684287071,
0.02657722495496273,
0.014577697031199932,
-0.012265178374946117,
-0.025602813810110092,
-0.05301347002387047,
0.04172961041331291,
-0.06482935696840286,
0.068931445479393,
-0.017693648114800453,
-0.07972514629364014,
0.09146742522716522,
0.01580132357776165,
-0.09626194834709167,
0.002667752793058753,
0.02453722432255745,
0.01942124404013157,
0.02618648111820221,
0.043646521866321564,
-0.0860430970788002,
0.0042427596636116505,
-0.03870192542672157,
0.009718522429466248,
-0.06440769881010056,
-0.001280432567000389,
0.03274201974272728,
-0.05395182594656944,
0.006642259191721678,
0.034765128046274185,
-0.017564639449119568,
0.007907670922577381,
0.019444530829787254,
-0.050032105296850204,
-0.03877496346831322,
-0.023229867219924927,
0.013012637384235859,
-0.027723485603928566,
0.031141089275479317,
-0.01444061379879713,
0.03565198928117752,
0.021333280950784683,
0.0012876915279775858,
-0.047910165041685104,
0.009534778073430061,
0.027834810316562653,
-0.043581772595644,
-0.040203068405389786,
0.020378857851028442,
0.005669302307069302,
-0.005719174165278673,
0.03476741909980774,
-0.00809739250689745,
0.023364201188087463,
0.0327080599963665,
-0.01397763192653656,
0.020440563559532166,
-0.0387481264770031,
0.0023699258454144,
0.015185108408331871,
0.0122959790751338,
0.03657688573002815,
-0.016960935667157173,
0.03416646644473076,
0.02881048619747162,
0.03130076080560684,
-0.024956021457910538,
-0.02064533345401287,
-0.013833517208695412,
0.015970494598150253,
-0.03884616494178772,
0.026424206793308258,
0.025143856182694435,
-0.037242453545331955,
-0.04297899082303047,
-0.03271457552909851,
-0.017527054995298386,
0.05514537915587425,
-0.03820936381816864,
0.01788627728819847,
0.05590854212641716,
-0.01736670732498169,
-0.050478994846343994,
-0.05930710956454277,
-0.011018727906048298,
-0.024120504036545753,
0.026208892464637756,
0.024720290675759315,
-0.025746621191501617,
-0.017735008150339127,
-0.050781432539224625,
-0.07007651776075363,
0.04486506059765816,
0.023919327184557915,
-0.01743915304541588,
0.044824741780757904,
0.03651798889040947,
-0.021776271983981133,
0.008428605273365974,
0.0236614178866148,
-0.04742914065718651,
0.013844962231814861,
0.00927470438182354,
0.013446809723973274,
0.03933342918753624,
0.037585727870464325,
-0.015036891214549541,
-0.036001548171043396,
-0.06862349808216095,
-0.024309908971190453,
-0.03486385941505432,
-0.010331207886338234,
0.08120080828666687
] |
CAMeL-Lab/bert-base-arabic-camelbert-msa-pos-msa | [
"pytorch",
"tf",
"bert",
"token-classification",
"ar",
"arxiv:2103.06678",
"transformers",
"license:apache-2.0",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"BertForTokenClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 133 | null | ---
tags:
- summarization
widget:
- text: '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
---
# CodeTrans model for source code summarization python
Pretrained model on programming language python using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_python_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_python_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/source%20code%20summarization/python/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 260,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0018796202493831515,
-0.030599279329180717,
-0.014621310867369175,
0.030784452334046364,
0.030929621309041977,
0.032927367836236954,
-0.02828846126794815,
-0.0030015583615750074,
-0.023989995941519737,
0.06077969819307327,
0.04634018987417221,
0.010466081090271473,
-0.008958405815064907,
0.047646138817071915,
-0.03969443589448929,
-0.06589546799659729,
-0.02015071175992489,
-0.0324677899479866,
-0.027458759024739265,
-0.01314456295222044,
0.02037760429084301,
0.00013661434059031308,
0.01630595326423645,
0.007639529649168253,
-0.0024817772209644318,
0.013530568219721317,
0.0010707800975069404,
0.022071432322263718,
0.0340178906917572,
-0.08149796724319458,
-0.025564201176166534,
0.0012932615354657173,
-0.04604415223002434,
-0.007384444121271372,
-0.012846608646214008,
0.023234130814671516,
0.003028977895155549,
0.02904938906431198,
0.018316613510251045,
0.06142190843820572,
0.0005656210705637932,
0.022404158487915993,
0.010479281656444073,
-0.03878441080451012,
0.058434031903743744,
0.006365020759403706,
-0.028378168120980263,
-0.028007734566926956,
0.018825650215148926,
0.0014786184765398502,
-0.05702681094408035,
-0.06851021945476532,
-0.028187893331050873,
0.05330687761306763,
-0.007878840900957584,
-0.013576200231909752,
-0.0681348592042923,
-0.014307579956948757,
0.04261082038283348,
-0.05704428255558014,
-0.03377450257539749,
0.012957766652107239,
-0.05572481080889702,
0.015395604074001312,
0.01088008750230074,
0.006079656537622213,
0.006357911042869091,
-0.03776119276881218,
0.026050826534628868,
0.002761643845587969,
0.06275447458028793,
-0.018760617822408676,
0.028140269219875336,
-0.10859520733356476,
0.0201114509254694,
-0.006852091755717993,
0.01577865704894066,
0.013190599158406258,
-0.011940259486436844,
0.05025498941540718,
0.0015249960124492645,
-0.010528047569096088,
0.041641965508461,
0.016663571819663048,
-0.013395206071436405,
0.037085920572280884,
-0.03830014169216156,
-0.012540561147034168,
-0.021792840212583542,
0.06707222759723663,
-0.06688736379146576,
-0.06517457216978073,
-0.008629541844129562,
-0.02244327776134014,
-0.03224143013358116,
0.02051509916782379,
0.04438324272632599,
-0.011258904822170734,
0.021237436681985855,
0.0056703416630625725,
0.041381288319826126,
0.04952108860015869,
-0.005978834815323353,
0.046982523053884506,
0.02700856700539589,
0.0167300533503294,
-0.015403138473629951,
-0.0434403121471405,
-0.021061424165964127,
0.040016938000917435,
0.018909985199570656,
-0.03426966443657875,
-0.04888669028878212,
0.03254019096493721,
0.01968400366604328,
-0.04200706258416176,
0.03621920198202133,
-0.024046599864959717,
-0.04780608043074608,
-0.03147788718342781,
0.03667128086090088,
-0.008130770176649094,
-0.01372760720551014,
0.013005702756345272,
-0.041310057044029236,
-0.0027287588454782963,
-0.05854559689760208,
-0.029877744615077972,
0.010945203714072704,
0.03890005499124527,
-0.009194201789796352,
0.08817633986473083,
0.015110882930457592,
-0.030872445553541183,
0.014822496101260185,
0.01490848045796156,
-0.07349827140569687,
0.06846155971288681,
0.039873480796813965,
0.11075160652399063,
-0.06925509870052338,
-0.04299663007259369,
0.026284528896212578,
-0.005088874604552984,
-0.022514650598168373,
0.02414030022919178,
-0.004596438724547625,
-0.07865455001592636,
-0.024225493893027306,
-0.0075707994401454926,
0.06594515591859818,
-0.04079689085483551,
-0.022711871191859245,
0.023792853578925133,
0.005217102821916342,
0.009780301712453365,
-0.03578494116663933,
0.0012862876756116748,
-0.00144142284989357,
-0.02988581545650959,
-0.06584186851978302,
0.03331298753619194,
0.00005566289837588556,
-0.03058544173836708,
-0.030762506648898125,
-0.03806423023343086,
0.012945206835865974,
0.11058252304792404,
0.002188721438869834,
-0.010014352388679981,
-0.04465506225824356,
0.010466590523719788,
0.025899864733219147,
0.04288769140839577,
-0.020154599100351334,
0.021464848890900612,
0.04294663295149803,
0.07029865682125092,
-0.02653384953737259,
0.07253895699977875,
-0.014511462301015854,
-0.03635541349649429,
-0.028668198734521866,
0.016933638602495193,
-0.017961513251066208,
-0.03803609311580658,
0.00594985019415617,
0.026571596041321754,
-0.015587050467729568,
-0.004667265806347132,
-0.013209084048867226,
0.05534570291638374,
0.024951770901679993,
-0.0077339899726212025,
-0.03377186506986618,
0.013611781410872936,
-0.017290525138378143,
0.061641059815883636,
-0.03826770931482315,
-0.0107386140152812,
-0.012863029725849628,
-0.03443686291575432,
-0.01006618794053793,
0.027875380590558052,
0.04766524210572243,
0.01924998313188553,
-0.010144799016416073,
0.1062348261475563,
-0.041626155376434326,
0.005788857117295265,
-0.04566513001918793,
-0.03622014448046684,
0.02357085794210434,
0.036647822707891464,
0.0351545475423336,
0.03085877001285553,
0.013939588330686092,
-0.02241540141403675,
0.017145877704024315,
0.07073784619569778,
0.027073848992586136,
0.04369032755494118,
-0.013595241121947765,
-0.02474702149629593,
0.034368135035037994,
0.06847308576107025,
-0.03611581400036812,
-0.03877564147114754,
0.04324585944414139,
0.03194282576441765,
-0.0068643661215901375,
0.026699749752879143,
-0.010174689814448357,
0.015238901600241661,
-0.04737265408039093,
-0.0647575631737709,
0.04520479962229729,
0.013220244087278843,
-0.0011498798849061131,
0.03338870033621788,
0.0018872853834182024,
0.0012485065963119268,
0.033780161291360855,
0.0002281086635775864,
0.001329046324826777,
-0.05933622643351555,
0.008899535052478313,
0.0017468753503635526,
0.06396429240703583,
-0.040138792246580124,
0.035875678062438965,
0.014648358337581158,
0.00034998360206373036,
0.06365232914686203,
-0.031843606382608414,
0.028983352705836296,
0.034648627042770386,
0.02473646029829979,
-0.017443688586354256,
0.016335951164364815,
0.024196982383728027,
0.02874029241502285,
0.08161220699548721,
0.011842786334455013,
0.06292477250099182,
-0.0046302555128932,
0.057585909962654114,
0.07049023360013962,
0.01637711003422737,
0.01308225654065609,
0.026103638112545013,
0.06505381315946579,
-0.006346899084746838,
-0.010862326249480247,
0.06182945519685745,
-0.05503683537244797,
0.028264129534363747,
-0.0372685082256794,
0.02701539546251297,
-0.013605182059109211,
-0.01725795678794384,
0.04047969728708267,
0.002830713288858533,
-0.042465101927518845,
0.004889920819550753,
-0.026368288323283195,
-0.028557205572724342,
0.0107659250497818,
0.002558475360274315,
-0.03223758935928345,
0.024013865739107132,
-0.019649719819426537,
0.020555764436721802,
-0.08409223705530167,
-0.04466192051768303,
-0.006883432622998953,
-0.04201929271221161,
0.01554838940501213,
-0.07210589945316315,
-0.05580349639058113,
-0.06231994554400444,
-0.020948732271790504,
0.03310473635792732,
0.0039842096157372,
-0.011176872067153454,
-0.028084324672818184,
0.009975072927772999,
-0.0436391718685627,
-0.024327334016561508,
-0.055164121091365814,
-0.06236017122864723,
-0.006557530723512173,
-0.06489772349596024,
0.039478596299886703,
-0.02527415193617344,
0.024293750524520874,
0.011341281235218048,
-0.014591963030397892,
-0.03071853145956993,
-0.021656988188624382,
0.07311122864484787,
0.010006342083215714,
-0.008406883105635643,
-0.03170963376760483,
0.0135664576664567,
-0.027573414146900177,
0.033452361822128296,
-0.002785118529573083,
-0.03951302915811539,
0.10327457636594772,
0.06296882778406143,
0.042462658137083054,
-0.013861951418220997,
-0.04164183512330055,
-0.04541095718741417,
-0.05341352894902229,
-0.022012660279870033,
-0.031279414892196655,
-0.029230888932943344,
-0.0021599065512418747,
-0.05331241339445114,
-0.022237058728933334,
-0.028819261118769646,
-0.04126304015517235,
-0.01967501826584339,
0.02760862372815609,
0.034178271889686584,
0.03734588250517845,
0.05024010315537453,
0.01832234486937523,
-0.042003974318504333,
-0.03126242384314537,
0.03933631628751755,
0.002259870059788227,
0.002978813834488392,
-0.07630866765975952,
-0.03813686966896057,
0.043151870369911194,
0.014562178403139114,
-0.002542756963521242,
-0.02389366738498211,
0.05173322558403015,
0.01740548387169838,
0.009816383011639118,
0.002053014235571027,
-0.006663755513727665,
-0.01311300415545702,
-0.021832147613167763,
0.0006399878184311092,
-0.034020617604255676,
-0.03608549386262894,
-0.0205682460218668,
-0.004389291629195213,
0.042284708470106125,
-0.06289906054735184,
-0.05872195214033127,
-0.0030558558646589518,
0.03713438659906387,
0.034149788320064545,
0.022433582693338394,
-0.01554793119430542,
-0.007755405269563198,
-0.0646364837884903,
-0.04536444693803787,
0.03520212322473526,
0.01658201776444912,
-0.010603774338960648,
0.047902677208185196,
0.043372221291065216,
-0.06054029241204262,
0.025938767939805984,
0.03451913222670555,
0.0509435310959816,
0.023261036723852158,
-0.034510329365730286,
0.011588274501264095,
-0.046716175973415375,
0.019131314009428024,
0.007909854874014854,
-0.033050596714019775,
-0.04872257262468338,
-0.07543333619832993,
-0.032675597816705704,
0.012536725029349327,
-0.014408071525394917,
-0.0011007717112079263,
0.047662921249866486,
-0.027791470289230347,
-0.04762496054172516,
-0.0039797499775886536,
0.0058632949367165565,
0.07281884551048279,
-0.038769569247961044,
0.03553808480501175,
0.009479201398789883,
0.05943863093852997,
-0.034968018531799316,
0.007482228334993124,
-0.02867080271244049,
-0.01623520813882351,
0.0018999321619048715,
0.04727126285433769,
0.02862541563808918,
0.059503160417079926,
0.08020924031734467,
0.012583088129758835,
-0.03720355033874512,
0.04227621853351593,
0.052954550832509995,
0.007057206705212593,
-0.020497901365160942,
0.006409281399101019,
0.014978994615375996,
-0.02924215793609619,
0.017616594210267067,
-0.0029866707045584917,
0.01768549159169197,
0.028449835255742073,
-0.003109346842393279,
0.004883143585175276,
0.00041563951526768506,
-0.02417091280221939,
-0.044586557894945145,
-0.04832209646701813,
-0.005191334523260593,
-0.03203463554382324,
-0.05101349204778671,
0.025815436616539955,
0.040165189653635025,
0.023724274709820747,
0.04402967914938927,
0.04378129169344902,
-0.03466399386525154,
-0.02949475310742855,
0.04500892758369446,
0.05129288509488106,
-0.0400654561817646,
-0.04346499592065811,
-0.05651708319783211,
0.035085227340459824,
0.046969976276159286,
-0.025245027616620064,
-0.09525268524885178,
0.0012192701688036323,
0.029966354370117188,
-0.02135208435356617,
0.06347861886024475,
0.028128284960985184,
0.02225794829428196,
0.05068949609994888,
-0.004939125385135412,
0.025885166600346565,
-0.01408910471946001,
0.01929643377661705,
0.0037615413311868906,
0.04002833738923073,
-0.02216813899576664,
-0.03312663361430168,
-0.041012104600667953,
0.021993746981024742,
0.012358247302472591,
0.038815490901470184,
0.030932242050766945,
-0.010867667384445667,
-0.0783812403678894,
0.0024988939985632896,
0.02990410476922989,
-0.0305464044213295,
0.01707601174712181,
0.028143536299467087,
0.036597661674022675,
-0.05438721179962158,
-0.029880696907639503,
-0.02135099098086357,
-0.01286070141941309,
0.02810058183968067,
0.0026716531720012426,
-0.014133616350591183,
-0.06623543798923492,
0.011665625497698784,
-0.02052825130522251,
-0.029042517766356468,
-0.08436334878206253,
0.037396710366010666,
0.007785786874592304,
-0.0019844193011522293,
0.05509927123785019,
0.034228939563035965,
0.021219652146100998,
0.03326568007469177,
-0.014651686884462833,
0.031638145446777344,
-0.029608195647597313,
0.023296834900975227,
-0.01672998256981373,
-0.025250094011425972,
-0.019691359251737595,
-0.06143023073673248,
-0.026934390887618065,
-0.04269566759467125,
-0.04416905716061592,
-0.04768456891179085,
-0.03300097957253456,
0.006828156765550375,
-0.011688623577356339,
-0.005751652177423239,
-0.011682087555527687,
0.00786508433520794,
-0.022676417604088783,
-0.022345418110489845,
-0.03473268076777458,
-0.04526772350072861,
-0.09820111095905304,
-0.026249049231410027,
0.004094863310456276,
0.04017709195613861,
0.03316305950284004,
-0.0002542163128964603,
0.005128096789121628,
0.025089235976338387,
0.004906484857201576,
-0.006244833115488291,
0.020580748096108437,
0.007540742866694927,
-0.0435086190700531,
-0.028210755437612534,
0.0037153838202357292,
0.012508101761341095,
0.007841827347874641,
-0.02403794229030609,
0.005388994701206684,
0.04767054691910744,
-0.030296923592686653,
-0.00036141800228506327,
0.0378713496029377,
0.0016524929087609053,
-0.0808422788977623,
-0.0412672758102417,
0.0037898309528827667,
-0.044282279908657074,
0.03383549302816391,
0.0017690493259578943,
-0.027898257598280907,
-0.012612108141183853,
0.009040210396051407,
0.034819990396499634,
-0.012072008103132248,
-0.03116525709629059,
-0.003562019672244787,
-0.03748879209160805,
0.04110655561089516,
-0.06176488846540451,
0.04528672993183136,
-0.03227515518665314,
-0.007074328139424324,
-0.008199824951589108,
-0.0077473497949540615,
-0.034799546003341675,
0.066604383289814,
-0.01190713606774807,
-0.00854787789285183,
-0.014396199956536293,
0.005919267423450947,
-0.027162490412592888,
0.04138166084885597,
-0.010272429324686527,
0.004719120915979147,
-0.029507435858249664,
0.009436494670808315,
-0.03959071636199951,
0.006047274451702833,
-0.02809188701212406,
-0.014009565114974976,
-0.0207306407392025,
-0.028367673978209496,
-0.007042770739644766,
-0.055042192339897156,
0.049606259912252426,
0.02492588944733143,
0.033139970153570175,
0.012943862937390804,
-0.022616246715188026,
-0.015159057453274727,
0.025829829275608063,
-0.08630157262086868,
-0.049039650708436966,
-0.03307243809103966,
0.016766367480158806,
-0.0267076026648283,
0.06216317415237427,
0.052255600690841675,
-0.05705432593822479,
-0.011015726253390312,
0.010348446667194366,
0.013937358744442463,
0.010645602829754353,
0.03011593408882618,
0.02902239002287388,
0.038594573736190796,
0.04930952563881874,
-0.03948891907930374,
-0.005507384892553091,
-0.009967470541596413,
-0.020531360059976578,
-0.015543542802333832,
-0.01951955445110798,
0.02319120615720749,
-0.018214209005236626,
-0.041467223316431046,
-0.02441100962460041,
0.05992618203163147,
0.06369048357009888,
0.023719582706689835,
0.0008766008540987968,
-0.035638727247714996,
0.028494911268353462,
0.015602930448949337,
-0.05127405747771263,
-0.029608717188239098,
0.015560409985482693,
-0.04547179862856865,
0.08720210939645767,
-0.006046075373888016,
0.01456144917756319,
0.0246225968003273,
0.025958791375160217,
-0.00025928052491508424,
0.041442763060331345,
-0.03500661998987198,
-0.0037102734204381704,
0.03907008096575737,
-0.05001203343272209,
-0.006834245752543211,
-0.005680778529495001,
0.0498739592730999,
-0.05540335923433304,
0.04158853366971016,
0.022909848019480705,
0.017136380076408386,
-0.013098275288939476,
-0.02182537317276001,
-0.05782882496714592,
0.04119088128209114,
-0.05773872509598732,
0.06775898486375809,
-0.020906878635287285,
-0.0760163888335228,
0.09146140515804291,
0.019023118540644646,
-0.09692957997322083,
0.0023660757578909397,
0.023840567097067833,
0.01876450702548027,
0.029665492475032806,
0.04208913818001747,
-0.08729442954063416,
-0.0023902226239442825,
-0.043611202389001846,
0.012356112711131573,
-0.06329058110713959,
-0.002047058194875717,
0.036494430154561996,
-0.0545094832777977,
0.007458358537405729,
0.03527044504880905,
-0.01678411476314068,
0.0064575569704174995,
0.01682201586663723,
-0.05151502415537834,
-0.04215667396783829,
-0.021988265216350555,
0.011865849606692791,
-0.029326869174838066,
0.03468447923660278,
-0.014487245120108128,
0.03484548628330231,
0.017930682748556137,
-0.0011677651200443506,
-0.04539110139012337,
0.007992229424417019,
0.028222383931279182,
-0.03868163004517555,
-0.03789610043168068,
0.01777501404285431,
0.008572534658014774,
-0.009831744246184826,
0.032302193343639374,
-0.01213641744107008,
0.02135799638926983,
0.03061790205538273,
-0.016276931390166283,
0.02056898921728134,
-0.04248984903097153,
0.0005649011582136154,
0.018119947984814644,
0.015665607526898384,
0.03448949754238129,
-0.01430092565715313,
0.03204475715756416,
0.029798179864883423,
0.032234542071819305,
-0.022149547934532166,
-0.017112964764237404,
-0.01455017551779747,
0.01804880052804947,
-0.03990444540977478,
0.022969789803028107,
0.025297287851572037,
-0.03660229220986366,
-0.04191524162888527,
-0.03501908853650093,
-0.0179764237254858,
0.05304790288209915,
-0.03781198337674141,
0.01597731001675129,
0.053110405802726746,
-0.01833399012684822,
-0.05621153116226196,
-0.058609213680028915,
-0.007452928926795721,
-0.021046355366706848,
0.031546663492918015,
0.021619973704218864,
-0.02329196035861969,
-0.01589069329202175,
-0.04933195188641548,
-0.07165055721998215,
0.0428009033203125,
0.021072199568152428,
-0.01587347686290741,
0.04595784842967987,
0.03496088087558746,
-0.021314840763807297,
0.008467454463243484,
0.025596901774406433,
-0.04799678921699524,
0.021050646901130676,
0.011279771104454994,
0.013091088272631168,
0.038628824055194855,
0.03612492233514786,
-0.014792565256357193,
-0.03904213383793831,
-0.06619659066200256,
-0.025606192648410797,
-0.03559718653559685,
-0.009416074492037296,
0.08195054531097412
] |
CAMeL-Lab/bert-base-arabic-camelbert-msa-sixteenth | [
"pytorch",
"tf",
"jax",
"bert",
"fill-mask",
"ar",
"arxiv:2103.06678",
"transformers",
"license:apache-2.0",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"BertForMaskedLM"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 26 | null | ---
tags:
- summarization
widget:
- text: "select time ( col0 ) from tab0"
---
# CodeTrans model for source code summarization sql
Pretrained model on programming language sql using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized sql code functions: it works best with tokenized sql functions.
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used single-task training on source code summarization sql dataset.
## Intended uses & limitations
The model could be used to generate the description for the sql function or be fine-tuned on other sql code tasks. It can be used on unparsed and untokenized sql code. However, if the sql code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate sql function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_sql"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_sql", skip_special_tokens=True),
device=0
)
tokenized_code = "select time ( col0 ) from tab0"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/source%20code%20summarization/sql/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.005782884079962969,
-0.03083685226738453,
-0.009454617276787758,
0.03929055854678154,
0.027676649391651154,
0.026576614007353783,
-0.029261920601129532,
-0.003418219741433859,
-0.03067636862397194,
0.05519205331802368,
0.05118546262383461,
0.010021931491792202,
-0.00969566311687231,
0.04637451469898224,
-0.03952665627002716,
-0.06178978830575943,
-0.01750265248119831,
-0.04045657068490982,
-0.024105895310640335,
-0.0127231040969491,
0.01904417760670185,
0.0004966398701071739,
0.01642569899559021,
0.011364376172423363,
-0.004465159028768539,
0.01699247397482395,
-0.0015173261053860188,
0.02539808489382267,
0.032720793038606644,
-0.06867390871047974,
-0.015735507011413574,
-0.0016254003858193755,
-0.043216485530138016,
-0.022693229839205742,
-0.02054044045507908,
0.02532224915921688,
0.00852337758988142,
0.03661594167351723,
0.02719058282673359,
0.057551752775907516,
0.009331774897873402,
0.02562785893678665,
0.02282651513814926,
-0.044138103723526,
0.06428785622119904,
0.004892590455710888,
-0.02093861810863018,
-0.029019474983215332,
0.024336371570825577,
-0.005435761064291,
-0.058392155915498734,
-0.060141827911138535,
-0.02407781034708023,
0.04108044132590294,
-0.014559219591319561,
-0.0032603268045932055,
-0.0605122447013855,
-0.013192357495427132,
0.05345284193754196,
-0.05162747949361801,
-0.02811630256474018,
0.015999149531126022,
-0.05564140900969505,
0.013502118177711964,
0.011564509011805058,
0.0031482670456171036,
0.001280994969420135,
-0.05065739154815674,
0.016416160389780998,
-0.0020534154027700424,
0.04983000084757805,
-0.026005547493696213,
0.030979713425040245,
-0.099782794713974,
0.021207744255661964,
0.0027204083744436502,
0.016679532825946808,
0.020555466413497925,
-0.009058373048901558,
0.052182190120220184,
0.011060241609811783,
-0.01328004989773035,
0.044832196086645126,
0.01531812734901905,
-0.024481656029820442,
0.03796244040131569,
-0.03392422944307327,
-0.017000561580061913,
-0.012492654845118523,
0.06447212398052216,
-0.05517299100756645,
-0.06992939859628677,
-0.014845426194369793,
-0.023066027089953423,
-0.028623199090361595,
0.02095796726644039,
0.03689303994178772,
0.006858159322291613,
0.016984855756163597,
0.011565422639250755,
0.039957329630851746,
0.055457666516304016,
-0.016869232058525085,
0.05871007591485977,
0.02551967464387417,
0.01280915830284357,
-0.007282054051756859,
-0.043207619339227676,
-0.0097727719694376,
0.0287331473082304,
0.022286146879196167,
-0.03817738592624664,
-0.04169318452477455,
0.036864835768938065,
0.022227494046092033,
-0.03948143124580383,
0.04811787232756615,
-0.016316724941134453,
-0.05727669596672058,
-0.03435737267136574,
0.042599134147167206,
-0.00684911385178566,
-0.014791012741625309,
0.010957294143736362,
-0.045076850801706314,
0.0011112671345472336,
-0.06458257138729095,
-0.0242035873234272,
0.018688984215259552,
0.04388866946101189,
-0.005786105524748564,
0.08526328206062317,
0.010173670947551727,
-0.055480122566223145,
0.019358551129698753,
0.02375796064734459,
-0.0662386566400528,
0.06254956126213074,
0.052392031997442245,
0.12731195986270905,
-0.06404169648885727,
-0.047968026250600815,
0.029055293649435043,
-0.016015881672501564,
-0.03747072443366051,
0.017545068636536598,
-0.0024459424894303083,
-0.05839379131793976,
-0.02540900930762291,
-0.017661666497588158,
0.05539374798536301,
-0.03671493008732796,
-0.012743244878947735,
0.02310609072446823,
0.005558397620916367,
0.014059752225875854,
-0.02865755185484886,
-0.008246136829257011,
0.0034123724326491356,
-0.02204996533691883,
-0.06126171350479126,
0.038283538073301315,
0.0021837723907083273,
-0.02430281974375248,
-0.029556630179286003,
-0.02199109084904194,
0.0016043046489357948,
0.09713791310787201,
0.014164123684167862,
-0.026490338146686554,
-0.05024881288409233,
0.00905689224600792,
0.0231870636343956,
0.04382076486945152,
-0.02493911236524582,
0.0220536757260561,
0.0542181171476841,
0.0754406750202179,
-0.02400851435959339,
0.07388897985219955,
-0.012990879826247692,
-0.03122781030833721,
-0.033245693892240524,
0.016247523948550224,
-0.02006836235523224,
-0.04462248831987381,
0.01805057004094124,
0.020412525162100792,
-0.018371785059571266,
-0.004872459918260574,
-0.01788301207125187,
0.04480832815170288,
0.015757277607917786,
-0.001839716685935855,
-0.037827663123607635,
0.014882723800837994,
-0.030057961121201515,
0.06161993741989136,
-0.03347910940647125,
-0.01473546028137207,
-0.0047593675553798676,
-0.04670864716172218,
-0.015244407579302788,
0.03554331138730049,
0.04131963104009628,
0.02253248170018196,
-0.0034134613815695047,
0.12567922472953796,
-0.051786892116069794,
0.009386981837451458,
-0.04320463538169861,
-0.03141062334179878,
0.027714138850569725,
0.0355154424905777,
0.026242295280098915,
0.041223566979169846,
0.005323822610080242,
-0.02436426654458046,
0.016426190733909607,
0.0773458257317543,
0.02374485693871975,
0.04243855178356171,
-0.005289238411933184,
-0.029564296826720238,
0.041493844240903854,
0.06478685885667801,
-0.0467119999229908,
-0.040817420929670334,
0.04628938436508179,
0.02030934952199459,
-0.006889650132507086,
0.03369448706507683,
-0.008929280564188957,
0.021368110552430153,
-0.058091405779123306,
-0.060854148119688034,
0.04951801523566246,
0.008529525250196457,
-0.0012246934929862618,
0.03830539062619209,
0.007062917109578848,
-0.008944774977862835,
0.031035738065838814,
0.01043369248509407,
0.0044592260383069515,
-0.05601860210299492,
0.008917806670069695,
-0.003653828287497163,
0.06168372184038162,
-0.0479048490524292,
0.03903209790587425,
0.006624305620789528,
-0.0008830631850287318,
0.06170446425676346,
-0.020992306992411613,
0.02125132456421852,
0.03760582581162453,
0.027705537155270576,
-0.022009484469890594,
0.009051652625203133,
0.014868443831801414,
0.016208795830607414,
0.07447082549333572,
0.013022342696785927,
0.064447782933712,
-0.005338265094906092,
0.0526931956410408,
0.07199208438396454,
0.013483158312737942,
0.015940500423312187,
0.020374439656734467,
0.0630006268620491,
-0.008346669375896454,
-0.005151668097823858,
0.06345999985933304,
-0.05498186871409416,
0.03912908211350441,
-0.037129536271095276,
0.022047212347388268,
-0.014449680224061012,
-0.010892719961702824,
0.040552087128162384,
0.01461765542626381,
-0.05720643326640129,
0.002337214769795537,
-0.027583492919802666,
-0.02572700008749962,
0.006834333296865225,
-0.0063816215842962265,
-0.014951400458812714,
0.009162805043160915,
-0.025112653151154518,
0.020190102979540825,
-0.07513286918401718,
-0.04897990822792053,
-0.019459178671240807,
-0.033516619354486465,
0.006216682959347963,
-0.06756532937288284,
-0.040117911994457245,
-0.06205549091100693,
-0.027475448325276375,
0.021443137899041176,
0.006521252915263176,
-0.005355291999876499,
-0.028496431186795235,
0.017552634701132774,
-0.028091810643672943,
-0.02947247214615345,
-0.04174765199422836,
-0.061044346541166306,
-0.017604514956474304,
-0.06457360833883286,
0.03644918277859688,
-0.01389391627162695,
0.022885572165250778,
0.0016741764266043901,
-0.014910571277141571,
-0.026005273684859276,
-0.020917600020766258,
0.0773557499051094,
0.012010935693979263,
-0.018478285521268845,
-0.0329965204000473,
0.013736046850681305,
-0.029017524793744087,
0.033738840371370316,
-0.010132797062397003,
-0.04418817162513733,
0.10032553970813751,
0.06661202013492584,
0.04293307289481163,
-0.010789059102535248,
-0.03771250322461128,
-0.04040708765387535,
-0.0395098514854908,
-0.027013534680008888,
-0.019847366958856583,
-0.02889776974916458,
-0.0053342594765126705,
-0.053532395511865616,
-0.01251435000449419,
-0.02855250984430313,
-0.05231600999832153,
-0.013668238185346127,
0.023444458842277527,
0.02861260622739792,
0.03268030658364296,
0.056907013058662415,
0.015519455075263977,
-0.028321830555796623,
-0.029946239665150642,
0.036240387707948685,
0.002300325082615018,
0.015512446872889996,
-0.07002312690019608,
-0.03053944930434227,
0.039775557816028595,
0.012444769963622093,
0.010184117592871189,
-0.030143853276968002,
0.05926549807190895,
0.014736765995621681,
0.013651782646775246,
0.011755160987377167,
-0.0009108333615586162,
-0.024785475805401802,
-0.028516985476017,
-0.00954537745565176,
-0.025599410757422447,
-0.03699968010187149,
-0.012871364131569862,
-0.011930094100534916,
0.04074782133102417,
-0.06611678749322891,
-0.0521182119846344,
-0.009738712571561337,
0.032038845121860504,
0.03956769406795502,
0.014161217957735062,
-0.024877063930034637,
0.003875450463965535,
-0.057383522391319275,
-0.04011974856257439,
0.02961559407413006,
0.022479455918073654,
-0.018334776163101196,
0.03535083681344986,
0.05168185383081436,
-0.0579879991710186,
0.03332693874835968,
0.037232283502817154,
0.04363512620329857,
0.02879117988049984,
-0.03823716938495636,
0.011500805616378784,
-0.04859523847699165,
0.033396657556295395,
0.0015636461321264505,
-0.03616851940751076,
-0.05232050642371178,
-0.06810413300991058,
-0.030652856454253197,
0.012699184007942677,
-0.017243804410099983,
-0.0005411527235992253,
0.04474014416337013,
-0.028590992093086243,
-0.04055522009730339,
-0.019911006093025208,
0.005806999746710062,
0.06486289948225021,
-0.03705384209752083,
0.026132849976420403,
0.003183400258421898,
0.056562941521406174,
-0.04082246497273445,
0.008673908188939095,
-0.027398770675063133,
-0.008200098760426044,
-0.001972797093912959,
0.04025430604815483,
0.01306232064962387,
0.0496940016746521,
0.07715269923210144,
0.007522170431911945,
-0.03898323327302933,
0.04232452064752579,
0.04653993248939514,
0.00485380319878459,
-0.02160876989364624,
0.005808232817798853,
0.009179888293147087,
-0.01774199865758419,
0.011044956743717194,
-0.0025211197789758444,
0.01825241930782795,
0.029541848227381706,
-0.00006271379243116826,
-0.008775241672992706,
0.007652087602764368,
-0.017765002325177193,
-0.03907783702015877,
-0.04240322858095169,
-0.004575951024889946,
-0.025844857096672058,
-0.05850217118859291,
0.026760686188936234,
0.04340674355626106,
0.027219736948609352,
0.05156542733311653,
0.04126167669892311,
-0.03731885179877281,
-0.01760994642972946,
0.04860718548297882,
0.04486464709043503,
-0.04548845812678337,
-0.03673487901687622,
-0.05058714747428894,
0.03580620139837265,
0.037428807467222214,
-0.0222461000084877,
-0.08774136006832123,
0.00018439613631926477,
0.017015330493450165,
-0.03227243199944496,
0.06979755312204361,
0.010990358889102936,
0.021280232816934586,
0.04621588811278343,
-0.008477579802274704,
0.022379852831363678,
-0.020217562094330788,
0.010521629825234413,
-0.01120604295283556,
0.06027502939105034,
-0.037228748202323914,
-0.03345770761370659,
-0.035586122423410416,
0.031229257583618164,
0.004656301345676184,
0.0386628732085228,
0.033298417925834656,
-0.005026523023843765,
-0.07584307342767715,
0.0000923934712773189,
0.022271744906902313,
-0.03826858475804329,
0.009905789978802204,
0.02633880265057087,
0.038412708789110184,
-0.054855022579431534,
-0.02042008377611637,
-0.012815568596124649,
-0.02260252833366394,
0.032568641006946564,
0.005591940134763718,
-0.027082759886980057,
-0.07211071997880936,
0.0155161302536726,
-0.019627340137958527,
-0.034392308443784714,
-0.08278702199459076,
0.04234236851334572,
0.010123317129909992,
-0.0005636496935039759,
0.053682103753089905,
0.04001278430223465,
0.01696755737066269,
0.03766592592000961,
-0.010703922249376774,
0.028997749090194702,
-0.019353527575731277,
0.028379317373037338,
-0.019370438531041145,
-0.016755331307649612,
-0.020337287336587906,
-0.057102154940366745,
-0.029985034838318825,
-0.040052659809589386,
-0.05151732265949249,
-0.04686598852276802,
-0.027006087824702263,
0.0019222934497520328,
-0.009853165596723557,
-0.008868458680808544,
-0.016411254182457924,
0.01995231956243515,
-0.01970314234495163,
-0.023746958002448082,
-0.023789094761013985,
-0.042723048478364944,
-0.11366165429353714,
-0.024264806881546974,
0.008416236378252506,
0.033278051763772964,
0.039203349500894547,
0.0017146304016932845,
0.010172472335398197,
0.03499332070350647,
-0.00416660588234663,
-0.02161896415054798,
0.02256837859749794,
0.011292246170341969,
-0.04776758700609207,
-0.0352444164454937,
0.0001341807801509276,
0.013637885451316833,
0.016674719750881195,
-0.030558062717318535,
0.0017084823921322823,
0.05068314075469971,
-0.04244032874703407,
-0.004699066746979952,
0.03701655566692352,
0.006768339313566685,
-0.09468770772218704,
-0.036866288632154465,
0.003430435433983803,
-0.04409164562821388,
0.035324811935424805,
-0.0019725561141967773,
-0.021704237908124924,
-0.02246318943798542,
0.017160482704639435,
0.031074443832039833,
0.014791417866945267,
-0.03487279638648033,
-0.003077597124502063,
-0.028438879176974297,
0.049797069281339645,
-0.06436872482299805,
0.05810122191905975,
-0.04015451669692993,
-0.00950463954359293,
-0.010284357704222202,
-0.005738763138651848,
-0.03437494859099388,
0.05619090795516968,
-0.009918388910591602,
-0.003929716069251299,
-0.013347909785807133,
0.020890139043331146,
-0.010970104485750198,
0.037926264107227325,
-0.0038393698632717133,
0.014043583534657955,
-0.02340845949947834,
0.004453452304005623,
-0.04620819538831711,
0.004691239912062883,
-0.022940531373023987,
-0.027199972420930862,
-0.02769341878592968,
-0.027746306732296944,
-0.014877330511808395,
-0.04647357761859894,
0.051044072955846786,
0.01898316480219364,
0.04409659281373024,
0.023919323459267616,
-0.010778127238154411,
-0.01764497347176075,
0.030395610257983208,
-0.07445535063743591,
-0.04401903226971626,
-0.035205092281103134,
0.011175030842423439,
-0.02429543435573578,
0.06540817022323608,
0.05408347770571709,
-0.05886729434132576,
-0.011249284259974957,
0.015024533495306969,
-0.0013623094419017434,
0.007432587910443544,
0.02693408541381359,
0.013615898787975311,
0.045436326414346695,
0.04824255034327507,
-0.040542297065258026,
-0.001321777468547225,
-0.0020780530758202076,
-0.01453396212309599,
-0.014023356139659882,
-0.015426057390868664,
0.029893696308135986,
-0.012466411106288433,
-0.03748239576816559,
-0.021177006885409355,
0.04482497647404671,
0.058306220918893814,
0.033833157271146774,
-0.004756156355142593,
-0.030785851180553436,
0.028305111452937126,
0.0241788849234581,
-0.04747415706515312,
-0.02870755083858967,
0.009619138203561306,
-0.0564253143966198,
0.08659402281045914,
-0.01065113116055727,
0.0180153027176857,
0.03630872443318367,
0.018882857635617256,
0.001987321535125375,
0.02983028255403042,
-0.030394021421670914,
-0.008549261838197708,
0.04464840143918991,
-0.05274789407849312,
-0.003177280304953456,
-0.011928032152354717,
0.060820117592811584,
-0.04564476013183594,
0.045579422265291214,
0.033356405794620514,
0.02715756744146347,
-0.014956396073102951,
-0.0163629911839962,
-0.056662000715732574,
0.0501481294631958,
-0.06563826650381088,
0.06970969587564468,
-0.01735255867242813,
-0.07860517501831055,
0.08427640795707703,
0.038845695555210114,
-0.09524629265069962,
-0.000012698945283773355,
0.0302866343408823,
0.025656137615442276,
0.036129944026470184,
0.04044234752655029,
-0.08072493970394135,
0.0013976298505440354,
-0.038634292781353,
0.0033447479363530874,
-0.05105148255825043,
-0.0043007261119782925,
0.03649449720978737,
-0.05186536908149719,
0.00010349684453103691,
0.0365760363638401,
-0.015645276755094528,
0.00818516407161951,
0.01723172888159752,
-0.04314352944493294,
-0.04108448326587677,
-0.03277849033474922,
0.014642097055912018,
-0.02645839750766754,
0.026848791167140007,
-0.020931841805577278,
0.027807991951704025,
0.02612307481467724,
-0.007121974602341652,
-0.05304688587784767,
0.010812688618898392,
0.023333260789513588,
-0.051492296159267426,
-0.03040512278676033,
0.016696913167834282,
0.024315165355801582,
-0.013434695079922676,
0.035282887518405914,
-0.016710808500647545,
0.01899663731455803,
0.036314066499471664,
-0.022493654862046242,
0.024952895939350128,
-0.04091469943523407,
0.007548188325017691,
0.012123861350119114,
0.0002857229264918715,
0.02954600565135479,
-0.01563415117561817,
0.040415480732917786,
0.029572179540991783,
0.038576725870370865,
-0.025419525802135468,
-0.0119962552562356,
-0.014579994603991508,
0.019576579332351685,
-0.04620324447751045,
0.026324322447180748,
0.021732574328780174,
-0.03087715432047844,
-0.03702183812856674,
-0.040413327515125275,
-0.020924732089042664,
0.05048605799674988,
-0.03173248469829559,
0.015273948200047016,
0.05015191063284874,
-0.016648592427372932,
-0.040991589426994324,
-0.07468006014823914,
-0.008059551939368248,
-0.02622487023472786,
0.029772836714982986,
0.02494480274617672,
-0.03388030827045441,
-0.013410262763500214,
-0.04498925432562828,
-0.07012464851140976,
0.0520714670419693,
0.027414746582508087,
-0.01885749027132988,
0.04498748853802681,
0.031113162636756897,
-0.018831292167305946,
0.005625508259981871,
0.024515300989151,
-0.054144080728292465,
0.019900809973478317,
0.010620664805173874,
0.031644128262996674,
0.04612184688448906,
0.043429918587207794,
-0.015909923240542412,
-0.03741711750626564,
-0.05588196590542793,
-0.037226200103759766,
-0.03740159049630165,
-0.0030996454879641533,
0.07168231159448624
] |
CAMeL-Lab/bert-base-arabic-camelbert-msa | [
"pytorch",
"tf",
"jax",
"bert",
"fill-mask",
"ar",
"arxiv:2103.06678",
"transformers",
"license:apache-2.0",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"BertForMaskedLM"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 2,967 | 2020-12-09T12:06:06Z | ---
tags:
- summarization
widget:
- text: "select time ( col0 ) from tab0"
---
# CodeTrans model for source code summarization sql
Pretrained model on programming language sql using the t5 base model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized sql code functions: it works best with tokenized sql functions.
## Model description
This CodeTrans model is based on the `t5-base` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the sql function or be fine-tuned on other sql code tasks. It can be used on unparsed and untokenized sql code. However, if the sql code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate sql function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_sql_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_base_source_code_summarization_sql_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "select time ( col0 ) from tab0"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/source%20code%20summarization/sql/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.005701859947293997,
-0.03407151252031326,
-0.008475767448544502,
0.03712603822350502,
0.030169403180480003,
0.030279895290732384,
-0.029651133343577385,
-0.006125195417553186,
-0.025780409574508667,
0.054877206683158875,
0.05312490090727806,
0.012645632028579712,
-0.012137752957642078,
0.04856330528855324,
-0.04150941222906113,
-0.06112389639019966,
-0.015123195014894009,
-0.03452005237340927,
-0.022345583885908127,
-0.014000696130096912,
0.023383120074868202,
0.003514327108860016,
0.014962083660066128,
0.00961283128708601,
-0.002545283641666174,
0.016221972182393074,
-0.003832149552181363,
0.03109266608953476,
0.027058232575654984,
-0.0722239762544632,
-0.015005232766270638,
-0.0044961110688745975,
-0.0419737845659256,
-0.019121365621685982,
-0.020144224166870117,
0.026350580155849457,
0.01009861659258604,
0.03468858078122139,
0.028866030275821686,
0.05538051947951317,
0.008470190688967705,
0.02156529575586319,
0.01944851130247116,
-0.046943098306655884,
0.06383544206619263,
0.007051172200590372,
-0.022061655297875404,
-0.029609743505716324,
0.02467365935444832,
-0.004186371807008982,
-0.05683725327253342,
-0.06029818207025528,
-0.024428458884358406,
0.04290764778852463,
-0.016093621030449867,
-0.0028535721357911825,
-0.0627499595284462,
-0.016574880108237267,
0.052964214235544205,
-0.05107187107205391,
-0.02624899335205555,
0.017762407660484314,
-0.05375073850154877,
0.011852176859974861,
0.011863106861710548,
0.00481583783403039,
0.002023138338699937,
-0.051255229860544205,
0.019127650186419487,
0.00043691054452210665,
0.05085242539644241,
-0.02551591582596302,
0.026516741141676903,
-0.09880170226097107,
0.020344555377960205,
0.002447213511914015,
0.01864452473819256,
0.01981259137392044,
-0.00755147822201252,
0.04816361516714096,
0.00878969207406044,
-0.010291008278727531,
0.0464404933154583,
0.01319166086614132,
-0.02275402471423149,
0.034469909965991974,
-0.03982729837298393,
-0.013760033063590527,
-0.011568213813006878,
0.06612025201320648,
-0.05424497649073601,
-0.0696856677532196,
-0.017201347276568413,
-0.022675851359963417,
-0.030437886714935303,
0.024253729730844498,
0.04018570855259895,
0.0002639847807586193,
0.01538883987814188,
0.008903978392481804,
0.04424891993403435,
0.05363745242357254,
-0.013556135818362236,
0.05795663595199585,
0.022857842966914177,
0.012390140444040298,
-0.007646146230399609,
-0.04289304092526436,
-0.007972843013703823,
0.03009553998708725,
0.022425547242164612,
-0.038160067051649094,
-0.04224598780274391,
0.03636077791452408,
0.02594313956797123,
-0.03880257159471512,
0.04517097771167755,
-0.015599267557263374,
-0.05249723047018051,
-0.03420014679431915,
0.03970310464501381,
-0.006057029590010643,
-0.014337437227368355,
0.011816251091659069,
-0.040907591581344604,
0.0013809044612571597,
-0.06074240803718567,
-0.024247389286756516,
0.019086826592683792,
0.03793945163488388,
-0.00880327820777893,
0.08619535714387894,
0.014255366288125515,
-0.05884646996855736,
0.02646954543888569,
0.021226005628705025,
-0.06631258130073547,
0.06525072455406189,
0.050499673932790756,
0.12436499446630478,
-0.06668241322040558,
-0.04716203734278679,
0.027514846995472908,
-0.010004332289099693,
-0.033744219690561295,
0.020992029458284378,
-0.0033397935330867767,
-0.06304211169481277,
-0.02256476692855358,
-0.017066383734345436,
0.05657007545232773,
-0.03986343741416931,
-0.017113858833909035,
0.023751573637127876,
0.005050855688750744,
0.011942559853196144,
-0.027133746072649956,
-0.010391181334853172,
0.0025165120605379343,
-0.025242390111088753,
-0.06079579144716263,
0.037119172513484955,
0.0007418961613439023,
-0.028956042602658272,
-0.030652042478322983,
-0.021128585562109947,
0.0036168198566883802,
0.10034812986850739,
0.016110820695757866,
-0.023632870987057686,
-0.04614172503352165,
0.008293096907436848,
0.02135014720261097,
0.041904378682374954,
-0.024526702240109444,
0.026556873694062233,
0.05444644019007683,
0.07522419095039368,
-0.026015201583504677,
0.07103175669908524,
-0.008375258184969425,
-0.030577195808291435,
-0.03122648037970066,
0.018043965101242065,
-0.023548580706119537,
-0.046097543090581894,
0.01462559774518013,
0.014770640060305595,
-0.020747141912579536,
-0.005111035890877247,
-0.019844597205519676,
0.03975071385502815,
0.014654801227152348,
-0.0015324034029617906,
-0.04011040925979614,
0.01089601032435894,
-0.02312636934220791,
0.061154067516326904,
-0.0331544429063797,
-0.00992263201624155,
-0.003714131424203515,
-0.04370197281241417,
-0.017777100205421448,
0.03539673984050751,
0.04338599368929863,
0.026043511927127838,
-0.004805925767868757,
0.12099874019622803,
-0.0466206893324852,
0.009420122019946575,
-0.04213874787092209,
-0.03252476453781128,
0.026707975193858147,
0.03677131608128548,
0.02792573906481266,
0.039747267961502075,
0.006949994713068008,
-0.020916078239679337,
0.017406264320015907,
0.07785147428512573,
0.024826399981975555,
0.041260987520217896,
-0.010729266330599785,
-0.025264544412493706,
0.04023662582039833,
0.06410245597362518,
-0.04224565997719765,
-0.03799186274409294,
0.044731173664331436,
0.024261904880404472,
-0.011920889839529991,
0.032956138253211975,
-0.012926495634019375,
0.020729225128889084,
-0.057843517512083054,
-0.05824321508407593,
0.04769451916217804,
0.008792086504399776,
-0.005122588016092777,
0.03657004237174988,
0.009082995355129242,
-0.005979948677122593,
0.0321563258767128,
0.004159650299698114,
0.0023369635455310345,
-0.05914413928985596,
0.004774133674800396,
-0.0038768642116338015,
0.06609278917312622,
-0.050027698278427124,
0.0395670086145401,
0.006824576761573553,
0.0021638728212565184,
0.06873545795679092,
-0.02356543019413948,
0.020474903285503387,
0.036552052944898605,
0.028794538229703903,
-0.019681034609675407,
0.005585853010416031,
0.014546329155564308,
0.0185722503811121,
0.07554291933774948,
0.009953263215720654,
0.06895574927330017,
-0.005577979143708944,
0.048734139651060104,
0.06928544491529465,
0.015783140435814857,
0.017406726256012917,
0.021457210183143616,
0.059378184378147125,
-0.0028950958512723446,
-0.00046431797090917826,
0.058418795466423035,
-0.060853756964206696,
0.03693120554089546,
-0.036870360374450684,
0.019141584634780884,
-0.012620796449482441,
-0.010397299192845821,
0.043043456971645355,
0.011536960490047932,
-0.04956661909818649,
0.0014937372179701924,
-0.028534073382616043,
-0.03161812201142311,
0.00991749670356512,
-0.008464185521006584,
-0.016388719901442528,
0.009281112812459469,
-0.024819402024149895,
0.015749679878354073,
-0.07768558710813522,
-0.04493455961346626,
-0.02067224681377411,
-0.037022825330495834,
0.006960232276469469,
-0.06587402522563934,
-0.03961924836039543,
-0.0657019391655922,
-0.027398325502872467,
0.02678174339234829,
0.009099527262151241,
-0.009474622085690498,
-0.029202504083514214,
0.01712835393846035,
-0.033452846109867096,
-0.027525775134563446,
-0.04547739773988724,
-0.062420736998319626,
-0.016974065452814102,
-0.06257083266973495,
0.03425280749797821,
-0.01408335193991661,
0.017463548108935356,
0.002991003217175603,
-0.011064055375754833,
-0.026851914823055267,
-0.020755726844072342,
0.0790088027715683,
0.008683525025844574,
-0.014353473670780659,
-0.03302350640296936,
0.011631377041339874,
-0.03028924949467182,
0.0337272547185421,
-0.010098873637616634,
-0.04581195488572121,
0.10288775712251663,
0.06488889455795288,
0.04352375864982605,
-0.012858100235462189,
-0.037854526191949844,
-0.043573375791311264,
-0.045051541179418564,
-0.027625825256109238,
-0.02720639854669571,
-0.024004502221941948,
-0.004587225615978241,
-0.05188358575105667,
-0.011048478074371815,
-0.030914438888430595,
-0.04837623983621597,
-0.014636434614658356,
0.023182595148682594,
0.029835177585482597,
0.028151823207736015,
0.05620038881897926,
0.013133232481777668,
-0.034022584557533264,
-0.028625208884477615,
0.03416648507118225,
0.0038897525519132614,
0.013313781470060349,
-0.07148683816194534,
-0.026959840208292007,
0.04240206629037857,
0.01444846112281084,
0.008646270260214806,
-0.0302145816385746,
0.056861165910959244,
0.017893534153699875,
0.012489547953009605,
0.01578737609088421,
-0.0015640183119103312,
-0.01654619723558426,
-0.029989108443260193,
-0.007755730766803026,
-0.02727113664150238,
-0.03451421484351158,
-0.015852756798267365,
-0.007583484519273043,
0.040097933262586594,
-0.06792522966861725,
-0.05148564651608467,
-0.00851526577025652,
0.03466024994850159,
0.039933815598487854,
0.018041830509901047,
-0.021708816289901733,
0.0011340255150571465,
-0.05632104352116585,
-0.04019178822636604,
0.03018629364669323,
0.026132771745324135,
-0.019181273877620697,
0.03741879016160965,
0.045687250792980194,
-0.06126941740512848,
0.03124340996146202,
0.03735509142279625,
0.04442055895924568,
0.03194035217165947,
-0.03761804476380348,
0.011773084290325642,
-0.047446735203266144,
0.032662831246852875,
-0.0007991038728505373,
-0.038076091557741165,
-0.05345504730939865,
-0.07163089513778687,
-0.030916104093194008,
0.01259246002882719,
-0.023597361519932747,
0.0022160757798701525,
0.04860468581318855,
-0.027655547484755516,
-0.03966894745826721,
-0.017756592482328415,
0.011489438824355602,
0.06590191274881363,
-0.03694445639848709,
0.03170293942093849,
0.0019414935959503055,
0.05398086830973625,
-0.04241229221224785,
0.013028712943196297,
-0.025367440655827522,
-0.010319196619093418,
-0.0031854005064815283,
0.039510536938905716,
0.017789479345083237,
0.055149465799331665,
0.07717978954315186,
0.011945908889174461,
-0.040359221398830414,
0.03692801296710968,
0.04813941940665245,
0.003852477064356208,
-0.017166323959827423,
0.004254867788404226,
0.006812038831412792,
-0.019849563017487526,
0.011638817377388477,
-0.0034425139892846346,
0.020329821854829788,
0.030765710398554802,
0.00033819678355939686,
-0.005551290698349476,
0.005542368162423372,
-0.020272918045520782,
-0.04143966734409332,
-0.04339802265167236,
-0.005024963524192572,
-0.026561632752418518,
-0.056686416268348694,
0.028043469414114952,
0.04565266892313957,
0.026852838695049286,
0.05086880549788475,
0.045641493052244186,
-0.039441466331481934,
-0.01962319388985634,
0.04293006658554077,
0.04619297757744789,
-0.04482739418745041,
-0.038378361612558365,
-0.052807699888944626,
0.035518940538167953,
0.035488348454236984,
-0.027225913479924202,
-0.08190806210041046,
0.0005469574825838208,
0.022730231285095215,
-0.03442465886473656,
0.06717513501644135,
0.01321346778422594,
0.01922106370329857,
0.045991674065589905,
-0.007697424851357937,
0.020157678052783012,
-0.020950371399521828,
0.014647465199232101,
-0.005824200809001923,
0.05904008820652962,
-0.03261274844408035,
-0.033278752118349075,
-0.037003565579652786,
0.029212696477770805,
0.008721458725631237,
0.039621684700250626,
0.034045297652482986,
-0.005043751560151577,
-0.07530268281698227,
0.0017384844832122326,
0.025052005425095558,
-0.038718514144420624,
0.01228577084839344,
0.024231743067502975,
0.040929704904556274,
-0.054991163313388824,
-0.015672188252210617,
-0.014936313964426517,
-0.02004293166100979,
0.030696211382746696,
0.00251690368168056,
-0.02568446286022663,
-0.06924464553594589,
0.013701729476451874,
-0.0200485922396183,
-0.03168105334043503,
-0.0865735188126564,
0.041899193078279495,
0.009613691829144955,
0.0008212389075197279,
0.0547625795006752,
0.04056757688522339,
0.021618016064167023,
0.03974936157464981,
-0.012129507027566433,
0.02610582858324051,
-0.025088705122470856,
0.02840241976082325,
-0.016107704490423203,
-0.014908179640769958,
-0.01479419693350792,
-0.05985310673713684,
-0.026060981675982475,
-0.04397366940975189,
-0.051268476992845535,
-0.04751173034310341,
-0.030466541647911072,
-0.0007281698053702712,
-0.009932643733918667,
-0.005788709502667189,
-0.015590846538543701,
0.019093403592705727,
-0.019970735535025597,
-0.021769225597381592,
-0.025240713730454445,
-0.045861467719078064,
-0.11193674802780151,
-0.02265183813869953,
0.012432187795639038,
0.03650423139333725,
0.03509843721985817,
0.0016975512262433767,
0.011825092136859894,
0.03387146443128586,
-0.004232655744999647,
-0.018784908577799797,
0.022641699761152267,
0.010393727570772171,
-0.04092029109597206,
-0.034349486231803894,
-0.003385822521522641,
0.014082876034080982,
0.017142849043011665,
-0.02931082621216774,
0.006551948841661215,
0.04906710609793663,
-0.04208306223154068,
-0.0035580932162702084,
0.033466704189777374,
0.0053376927971839905,
-0.0937073677778244,
-0.03621864318847656,
0.002650299109518528,
-0.044893186539411545,
0.032282911241054535,
-0.0017271777614951134,
-0.02016427367925644,
-0.017929138615727425,
0.012927302159368992,
0.03175179287791252,
0.012372761964797974,
-0.031762074679136276,
-0.0010403599590063095,
-0.02933691255748272,
0.046957261860370636,
-0.06025233119726181,
0.05974964424967766,
-0.039166998118162155,
-0.009897179901599884,
-0.008742257952690125,
-0.009772107936441898,
-0.03213552013039589,
0.05685722827911377,
-0.010991248302161694,
-0.002472499618306756,
-0.014898323453962803,
0.016151458024978638,
-0.01636393368244171,
0.03927081450819969,
-0.002854220801964402,
0.01414879597723484,
-0.02223239466547966,
0.002388855442404747,
-0.04018528014421463,
0.005850554443895817,
-0.022467270493507385,
-0.026146478950977325,
-0.022942179813981056,
-0.024921203032135963,
-0.016632258892059326,
-0.047567859292030334,
0.05162036046385765,
0.019367128610610962,
0.039050083607435226,
0.02253013290464878,
-0.013589096255600452,
-0.02124655246734619,
0.032128747552633286,
-0.07580467313528061,
-0.0400707982480526,
-0.03922102600336075,
0.007970374077558517,
-0.021533774212002754,
0.06651926785707474,
0.05423722416162491,
-0.058305080980062485,
-0.011910456232726574,
0.011643829755485058,
-0.0007831144612282515,
0.015029624104499817,
0.02534140646457672,
0.009399156086146832,
0.04270346090197563,
0.04889778047800064,
-0.04191494733095169,
0.0011398199712857604,
-0.0076240417547523975,
-0.01771700568497181,
-0.013291946612298489,
-0.01729762926697731,
0.02860415168106556,
-0.01733393594622612,
-0.04240285977721214,
-0.019328342750668526,
0.04948830604553223,
0.055595990270376205,
0.03395900875329971,
-0.003293357789516449,
-0.031321700662374496,
0.028369929641485214,
0.025596626102924347,
-0.048627957701683044,
-0.03172578662633896,
0.010247381404042244,
-0.05294715240597725,
0.09010370075702667,
-0.01106971688568592,
0.018595073372125626,
0.03510671481490135,
0.02013637311756611,
0.007764222100377083,
0.030535440891981125,
-0.03148484230041504,
-0.004618905950337648,
0.04831920191645622,
-0.054202865809202194,
0.00042717912583611906,
-0.01186859980225563,
0.061200644820928574,
-0.05129021033644676,
0.04108469933271408,
0.028899693861603737,
0.030926082283258438,
-0.016681943088769913,
-0.01544572040438652,
-0.06297680735588074,
0.046571824699640274,
-0.05981016531586647,
0.06952399760484695,
-0.019614864140748978,
-0.07417713850736618,
0.08494264632463455,
0.03875003010034561,
-0.09713973850011826,
0.00009307672007707879,
0.0305385310202837,
0.028095200657844543,
0.03925752267241478,
0.040405675768852234,
-0.08053435385227203,
-0.002761256182566285,
-0.04087037965655327,
0.004315497819334269,
-0.05311370640993118,
-0.002637383760884404,
0.037839677184820175,
-0.05341051146388054,
0.0003432423691265285,
0.032431505620479584,
-0.01803717203438282,
0.006340406835079193,
0.017361724749207497,
-0.047145944088697433,
-0.04534925892949104,
-0.028783109039068222,
0.015873469412326813,
-0.02867729216814041,
0.030948413535952568,
-0.02280595526099205,
0.02482077293097973,
0.026612335816025734,
-0.005903701763600111,
-0.05289177969098091,
0.008484210819005966,
0.021865153685212135,
-0.04731575772166252,
-0.03092469833791256,
0.01653275080025196,
0.024232914671301842,
-0.013673661276698112,
0.035177916288375854,
-0.01679171621799469,
0.01618846505880356,
0.03236948326230049,
-0.023251039907336235,
0.025538664311170578,
-0.043621309101581573,
0.00247788499109447,
0.01667836122214794,
0.003519707825034857,
0.027255257591605186,
-0.014119685627520084,
0.04056825116276741,
0.03063606657087803,
0.036587487906217575,
-0.025671470910310745,
-0.012428157031536102,
-0.01712760142982006,
0.021314041689038277,
-0.04818492382764816,
0.02134951762855053,
0.023430297151207924,
-0.03107733465731144,
-0.03533671051263809,
-0.04163065552711487,
-0.021761160343885422,
0.04927302896976471,
-0.035386111587285995,
0.013437191024422646,
0.04920552670955658,
-0.016412004828453064,
-0.047006603330373764,
-0.07620885223150253,
-0.00449908385053277,
-0.02291557937860489,
0.032725777477025986,
0.021388474851846695,
-0.03265885263681412,
-0.012738466262817383,
-0.046205174177885056,
-0.07083917409181595,
0.049029119312763214,
0.025607628747820854,
-0.017916012555360794,
0.0480603352189064,
0.031235912814736366,
-0.01727263070642948,
0.004263102542608976,
0.027500860393047333,
-0.0570622980594635,
0.026854291558265686,
0.014525814913213253,
0.024213116616010666,
0.04327487200498581,
0.042188894003629684,
-0.01694091409444809,
-0.03828418627381325,
-0.05704276263713837,
-0.04060788452625275,
-0.03657885640859604,
-0.004511314909905195,
0.07617098838090897
] |
CLAck/indo-pure | [
"pytorch",
"marian",
"text2text-generation",
"en",
"id",
"dataset:ALT",
"transformers",
"translation",
"license:apache-2.0",
"autotrain_compatible"
] | translation | {
"architectures": [
"MarianMTModel"
],
"model_type": "marian",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 4 | 2021-02-16T19:16:25Z | ---
tags:
- summarization
widget:
- text: "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
---
# CodeTrans model for code documentation generation java
Pretrained model on programming language java using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code comment generation task for the java function/method.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_comment_generation_java_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_comment_generation_java_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/code%20comment%20generation/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 260,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V3-8 for 25,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing java code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 37.98 |
| CodeTrans-ST-Base | 38.07 |
| CodeTrans-TF-Small | 38.56 |
| CodeTrans-TF-Base | 39.06 |
| CodeTrans-TF-Large | **39.50** |
| CodeTrans-MT-Small | 20.15 |
| CodeTrans-MT-Base | 27.44 |
| CodeTrans-MT-Large | 34.69 |
| CodeTrans-MT-TF-Small | 38.37 |
| CodeTrans-MT-TF-Base | 38.90 |
| CodeTrans-MT-TF-Large | 39.25 |
| State of the art | 38.17 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.005185895599424839,
-0.01775788702070713,
-0.011116640642285347,
0.023801583796739578,
0.030241377651691437,
0.03813399374485016,
-0.03158280998468399,
-0.006561974063515663,
-0.008014483377337456,
0.05345942825078964,
0.039334122091531754,
-0.014604156836867332,
-0.010313126258552074,
0.04846048727631569,
-0.03522643446922302,
-0.06676234304904938,
-0.019527580589056015,
-0.034149814397096634,
-0.04091637581586838,
-0.014346951618790627,
0.02442103438079357,
-0.00013056221359875053,
0.0040705204010009766,
0.00028699508402496576,
-0.006565914489328861,
-0.003091915976256132,
0.009108686819672585,
0.018328730016946793,
0.028736351057887077,
-0.07616650313138962,
-0.030573338270187378,
-0.003322300501167774,
-0.032524242997169495,
-0.01501361932605505,
-0.0342085175216198,
0.020179620012640953,
0.012434120289981365,
0.043902307748794556,
0.02945321798324585,
0.055629339069128036,
0.0036985082551836967,
0.026674671098589897,
0.02175283059477806,
-0.03811948373913765,
0.058977141976356506,
0.005839860066771507,
-0.028041252866387367,
-0.03428563103079796,
0.02043110691010952,
-0.004967059008777142,
-0.04813147708773613,
-0.07389060407876968,
-0.035694707185029984,
0.04500986263155937,
-0.012701636180281639,
-0.006567415781319141,
-0.06848718225955963,
-0.037646569311618805,
0.04496262967586517,
-0.05220910161733627,
-0.025445187464356422,
0.004018045496195555,
-0.06694041937589645,
0.026132984086871147,
0.008499201387166977,
-0.00718213664367795,
0.005962615367025137,
-0.04878801852464676,
0.028229963034391403,
0.004808596335351467,
0.04897671565413475,
-0.033555496484041214,
0.03281224146485329,
-0.11676011979579926,
0.013815858401358128,
-0.011119037866592407,
0.026395726948976517,
0.020912976935505867,
-0.015506171621382236,
0.06037728488445282,
-0.009520040825009346,
0.007331019267439842,
0.04995087906718254,
0.00555452099069953,
-0.012887801043689251,
0.029426947236061096,
-0.03028872050344944,
-0.01302625983953476,
-0.0111726438626647,
0.06514010578393936,
-0.053883105516433716,
-0.06739097088575363,
-0.018745912238955498,
-0.021341614425182343,
-0.042667824774980545,
0.02186700701713562,
0.04450061917304993,
-0.012179095298051834,
0.02551593817770481,
0.0002110464993165806,
0.0376136489212513,
0.0591481551527977,
-0.002319168299436569,
0.0455789677798748,
0.03742639720439911,
0.01174115389585495,
-0.0174302589148283,
-0.04155035689473152,
-0.024864615872502327,
0.05047798156738281,
0.004190897569060326,
-0.04286767914891243,
-0.04823478311300278,
0.030719585716724396,
0.016983142122626305,
-0.04543585702776909,
0.04522373899817467,
-0.018911482766270638,
-0.04728109762072563,
-0.03860316053032875,
0.040533341467380524,
-0.008587001822888851,
-0.021255891770124435,
0.0019823082257062197,
-0.04459843784570694,
0.012833286076784134,
-0.05854634940624237,
-0.03202487900853157,
0.01819123513996601,
0.03228754550218582,
-0.03206083923578262,
0.08567482233047485,
0.006583171430975199,
-0.03683573007583618,
0.005780315957963467,
0.024633189663290977,
-0.06183435022830963,
0.06377512216567993,
0.03290480002760887,
0.10072354227304459,
-0.05882468819618225,
-0.04608187824487686,
0.024060258641839027,
0.004654001444578171,
-0.009048938751220703,
0.0233076773583889,
-0.017876163125038147,
-0.07555819302797318,
-0.029998254030942917,
-0.009523048996925354,
0.05993679165840149,
-0.04576468840241432,
-0.020018141716718674,
0.030793379992246628,
0.0022881149780005217,
0.010590237565338612,
-0.037751782685518265,
0.0035056588239967823,
0.008701183833181858,
-0.02839723229408264,
-0.06276464462280273,
0.026965433731675148,
0.002113627502694726,
-0.02750718779861927,
-0.028797732666134834,
-0.03836275637149811,
-0.0041435156017541885,
0.10318700969219208,
0.016154639422893524,
-0.0035914257168769836,
-0.046359702944755554,
0.0197464507073164,
0.030855726450681686,
0.037771642208099365,
-0.017609622329473495,
0.0328628271818161,
0.04764537885785103,
0.06978052109479904,
-0.03121090866625309,
0.06841269135475159,
-0.012689244002103806,
-0.02931986190378666,
-0.031077992171049118,
0.01774468459188938,
-0.007986580021679401,
-0.041828006505966187,
0.003908558748662472,
0.011225588619709015,
-0.024011893197894096,
-0.005264962557703257,
-0.006765077356249094,
0.05846668779850006,
0.022126011550426483,
-0.017864244058728218,
-0.02540811523795128,
0.016206173226237297,
-0.012861574999988079,
0.05339059233665466,
-0.03963780030608177,
-0.003589184721931815,
-0.01694272831082344,
-0.02728268876671791,
-0.004297463223338127,
0.022041484713554382,
0.04409314692020416,
0.019313156604766846,
-0.017018040642142296,
0.09802083671092987,
-0.0463537834584713,
0.012692722491919994,
-0.04406039044260979,
-0.04059356823563576,
0.009813307784497738,
0.036526668816804886,
0.026887523010373116,
0.024117877706885338,
0.0029170780908316374,
-0.018323982134461403,
0.011518282815814018,
0.07904686778783798,
0.04086465761065483,
0.04810355603694916,
-0.013239226303994656,
-0.03017091192305088,
0.05478671193122864,
0.0743383839726448,
-0.0521078035235405,
-0.050329823046922684,
0.05176135152578354,
0.034287139773368835,
-0.014623408205807209,
0.02860093303024769,
-0.00737785454839468,
0.010271907784044743,
-0.053527191281318665,
-0.06385407596826553,
0.039435975253582,
0.02031870186328888,
0.013867649249732494,
0.029764236882328987,
0.009168904274702072,
-0.011151145212352276,
0.04191501438617706,
0.0030635418370366096,
0.00942512508481741,
-0.05945000797510147,
0.008121510036289692,
-0.003278469666838646,
0.07253298163414001,
-0.03764256089925766,
0.03793509677052498,
0.01546902023255825,
-0.001093516475521028,
0.052062999457120895,
-0.023357214406132698,
0.017916634678840637,
0.027380317449569702,
0.015660995617508888,
-0.010939675383269787,
0.020003456622362137,
0.022474706172943115,
0.027165936306118965,
0.08788928389549255,
0.01244728360325098,
0.0668729841709137,
-0.002655667718499899,
0.06009279936552048,
0.06536851078271866,
0.02475995384156704,
0.006093298085033894,
0.024298425763845444,
0.05980446934700012,
0.0035872601438313723,
-0.013948542065918446,
0.061331816017627716,
-0.04220476746559143,
0.02274281531572342,
-0.04198625683784485,
0.03051098994910717,
-0.003814756404608488,
-0.026508720591664314,
0.043735530227422714,
0.01085580326616764,
-0.042562056332826614,
-0.005957067012786865,
-0.03478286415338516,
-0.023453397676348686,
0.02074761688709259,
-0.013996216468513012,
-0.016971928998827934,
0.010433312505483627,
-0.016548490151762962,
0.01875503547489643,
-0.07702284306287766,
-0.039936359971761703,
-0.004213264677673578,
-0.037253715097904205,
0.008010494522750378,
-0.07647059112787247,
-0.052565813064575195,
-0.06660278886556625,
-0.015056898817420006,
0.05365222319960594,
0.00870286300778389,
-0.018029451370239258,
-0.03668559342622757,
0.011214124970138073,
-0.04039929434657097,
-0.025260567665100098,
-0.059981804341077805,
-0.07226356863975525,
-0.010906996205449104,
-0.07627525180578232,
0.024763641878962517,
-0.02686246857047081,
0.032287102192640305,
-0.0016248846659436822,
-0.016204100102186203,
-0.024839429184794426,
-0.01941996067762375,
0.05081437528133392,
0.016663258895277977,
-0.00902315229177475,
-0.030358770862221718,
0.013248286210000515,
-0.017849460244178772,
0.03564995899796486,
-0.004493340849876404,
-0.0494069904088974,
0.10467658936977386,
0.05225773900747299,
0.04054347053170204,
-0.009117497131228447,
-0.04119104519486427,
-0.04808121919631958,
-0.03895356506109238,
-0.021911639720201492,
-0.01694573275744915,
-0.030074557289481163,
-0.00942453183233738,
-0.04803314432501793,
-0.027505826205015182,
-0.030923109501600266,
-0.03709081932902336,
-0.021238751709461212,
0.02610037475824356,
0.028126310557127,
0.05020340532064438,
0.05533064156770706,
0.026582323014736176,
-0.0285415630787611,
-0.03810887038707733,
0.046375613659620285,
-0.0055100140161812305,
0.002718433039262891,
-0.06709211319684982,
-0.03167704865336418,
0.030737334862351418,
0.02263316884636879,
-0.011662090197205544,
-0.011587117798626423,
0.04583680257201195,
0.016852349042892456,
0.003032754873856902,
0.010541930794715881,
-0.017667256295681,
-0.010765323415398598,
-0.03245677053928375,
-0.0032207549083977938,
-0.03254421427845955,
-0.03462115302681923,
-0.02025698497891426,
-0.01805114559829235,
0.04713290184736252,
-0.06597130000591278,
-0.059618622064590454,
0.009595918469130993,
0.02913120575249195,
0.03383825346827507,
0.02065875194966793,
-0.03136664628982544,
0.005239380523562431,
-0.06690175086259842,
-0.03929024934768677,
0.03795989975333214,
0.015416291542351246,
-0.0018386099254712462,
0.03864894434809685,
0.04108159616589546,
-0.03551115840673447,
0.03974897414445877,
0.02347097545862198,
0.03964882716536522,
0.03706980496644974,
-0.025761598721146584,
0.014279481954872608,
-0.04791903868317604,
0.020838795229792595,
0.010673141106963158,
-0.027538811787962914,
-0.04285117983818054,
-0.07770706713199615,
-0.03312079608440399,
0.019975721836090088,
-0.021505769342184067,
-0.0031994048040360212,
0.04612106457352638,
-0.014694919809699059,
-0.04601224884390831,
-0.0074892411939799786,
0.009383578784763813,
0.05895836651325226,
-0.03095979616045952,
0.031656891107559204,
0.015326938591897488,
0.07493723928928375,
-0.048697683960199356,
0.00015097214782144874,
-0.03253009170293808,
-0.030476117506623268,
0.014004678465425968,
0.051791731268167496,
0.015558945946395397,
0.05763771012425423,
0.0790150910615921,
0.016041208058595657,
-0.02624627947807312,
0.04449132829904556,
0.05715880170464516,
0.00407661497592926,
-0.03024628944694996,
-0.00009693892934592441,
-0.005648178514093161,
-0.037049587815999985,
0.012170635163784027,
-0.014464907348155975,
0.02297692745923996,
0.01998206600546837,
-0.01135994028300047,
0.0009095978457480669,
0.0001063661984517239,
-0.018680725246667862,
-0.041066307574510574,
-0.04917179048061371,
-0.00041237095138058066,
-0.04062424227595329,
-0.06669937074184418,
0.017157191410660744,
0.03512940928339958,
0.037280745804309845,
0.05561484023928642,
0.05403636023402214,
-0.047033507376909256,
-0.027279259636998177,
0.03521772101521492,
0.04990401491522789,
-0.035839781165122986,
-0.032127369195222855,
-0.051936812698841095,
0.031709738075733185,
0.039589837193489075,
-0.03202775865793228,
-0.09800278395414352,
0.01019691675901413,
0.024582602083683014,
-0.018675191327929497,
0.06367277354001999,
0.018798742443323135,
0.020904282107949257,
0.05979219451546669,
-0.0028434875421226025,
0.02156435325741768,
-0.030451275408267975,
0.011958307586610317,
-0.002176051028072834,
0.03932252153754234,
-0.027381515130400658,
-0.030949154868721962,
-0.04383871331810951,
0.014689924195408821,
0.013175579719245434,
0.03793010488152504,
0.03413873910903931,
-0.002096801530569792,
-0.06861666589975357,
-0.011636506766080856,
0.03366651013493538,
-0.019719524309039116,
0.021161343902349472,
0.01787162572145462,
0.03935550898313522,
-0.028951967135071754,
-0.02744455821812153,
-0.019219225272536278,
-0.014844220131635666,
0.04218738153576851,
-0.0020527010783553123,
-0.01584058441221714,
-0.06490465253591537,
0.014797777868807316,
-0.018091175705194473,
-0.02909022569656372,
-0.09379326552152634,
0.05223490670323372,
0.003456925041973591,
-0.008187489584088326,
0.05488274246454239,
0.02225055918097496,
0.009545569308102131,
0.042387209832668304,
-0.018817339092493057,
0.022153401747345924,
-0.03646848723292351,
0.012089040130376816,
-0.022267131134867668,
-0.02229546383023262,
-0.018681474030017853,
-0.07076159119606018,
-0.02471131831407547,
-0.03302774578332901,
-0.03550861403346062,
-0.039978161454200745,
-0.026495184749364853,
-0.0037700338289141655,
-0.02445976249873638,
-0.0013885664520785213,
-0.003624014323577285,
0.008690830320119858,
-0.030755119398236275,
-0.025427035987377167,
-0.032168008387088776,
-0.04370897263288498,
-0.10546905547380447,
-0.02880215272307396,
0.013411719352006912,
0.03600989654660225,
0.039043303579092026,
-0.0037624381948262453,
0.007696506101638079,
0.034926656633615494,
-0.004205711185932159,
-0.0070923627354204655,
0.013573416508734226,
0.0070489272475242615,
-0.03760691359639168,
-0.04041757434606552,
0.002472243271768093,
0.012206503190100193,
0.01079564355313778,
-0.012788609601557255,
0.0030259317718446255,
0.04354921728372574,
-0.03097188100218773,
0.0030447253957390785,
0.03818155452609062,
0.0008976274402812123,
-0.07924578338861465,
-0.029539912939071655,
0.00205161958001554,
-0.04472116008400917,
0.029644692316651344,
0.0008084680302999914,
-0.03713786602020264,
-0.007236100733280182,
-0.0026962028350681067,
0.03547164052724838,
-0.006661371327936649,
-0.01625184528529644,
0.0048543475568294525,
-0.028415298089385033,
0.03930604085326195,
-0.06321635842323303,
0.05891859903931618,
-0.033421676605939865,
-0.0023196644615381956,
-0.012799649499356747,
-0.012945408001542091,
-0.03904140740633011,
0.06436298787593842,
-0.005535523872822523,
-0.0003078201552852988,
-0.009707226417958736,
0.011843018233776093,
-0.024256600067019463,
0.030567485839128494,
-0.012473620474338531,
0.011325684376060963,
-0.03142842277884483,
0.012147722765803337,
-0.0504445917904377,
0.010666042566299438,
-0.023579822853207588,
-0.01090183574706316,
-0.016551548615098,
-0.02963251620531082,
-0.010996218770742416,
-0.0547759085893631,
0.048168398439884186,
0.030803203582763672,
0.028548214584589005,
0.011264919303357601,
-0.022559011355042458,
-0.02171141467988491,
0.030885035172104836,
-0.0917828232049942,
-0.03957245871424675,
-0.02587175741791725,
0.0262224692851305,
-0.019608013331890106,
0.062382955104112625,
0.04613840952515602,
-0.0427045077085495,
-0.006510959006845951,
0.01955859176814556,
0.015092635527253151,
0.0022237999364733696,
0.022289041429758072,
0.011186772026121616,
0.05327988415956497,
0.04396701976656914,
-0.05140048637986183,
-0.007156632840633392,
-0.0018652265425771475,
-0.004814927000552416,
-0.010258782655000687,
-0.01983187161386013,
0.015098486095666885,
-0.010404134169220924,
-0.05322533845901489,
-0.018124669790267944,
0.05825476348400116,
0.05149247124791145,
0.03193509578704834,
-0.003483052598312497,
-0.04105902835726738,
0.0236660186201334,
0.009216152131557465,
-0.04777000844478607,
-0.03565547615289688,
0.017310496419668198,
-0.0566633939743042,
0.07445762306451797,
-0.007800146006047726,
0.014027094468474388,
0.018127478659152985,
0.02670876868069172,
0.01506735384464264,
0.037276241928339005,
-0.04281425476074219,
-0.016299216076731682,
0.03985406458377838,
-0.04293082281947136,
-0.005582168698310852,
-0.008938541635870934,
0.057161666452884674,
-0.05474201217293739,
0.048307642340660095,
0.023251986131072044,
0.022616583853960037,
-0.009904587641358376,
-0.025466592982411385,
-0.04604978859424591,
0.04514068737626076,
-0.05090484023094177,
0.06581426411867142,
-0.022174695506691933,
-0.07956566661596298,
0.074043869972229,
0.03681238368153572,
-0.1096138283610344,
0.005188274197280407,
0.0405607633292675,
0.01899140514433384,
0.03435102477669716,
0.04978257790207863,
-0.08077345788478851,
0.005439105909317732,
-0.046533603221178055,
0.007658320479094982,
-0.05668845772743225,
-0.006179066374897957,
0.028336921706795692,
-0.05188945680856705,
-0.007705864496529102,
0.02873818576335907,
-0.02295849286019802,
0.0024215925950556993,
0.011931667104363441,
-0.040603309869766235,
-0.044388704001903534,
-0.02341764234006405,
0.009289282374083996,
-0.025270607322454453,
0.029169155284762383,
-0.019550271332263947,
0.03271893784403801,
0.008956603705883026,
0.00842974428087473,
-0.041963525116443634,
0.007420522626489401,
0.0325903594493866,
-0.042291224002838135,
-0.029589034616947174,
0.02849094569683075,
0.01388547383248806,
-0.012597785331308842,
0.028809405863285065,
-0.026213251054286957,
0.015028220601379871,
0.026374248787760735,
-0.0194680355489254,
0.011300861835479736,
-0.03926367685198784,
-0.013325712643563747,
0.020170947536826134,
0.010863222181797028,
0.029427187517285347,
-0.006726997904479504,
0.0298585407435894,
0.02891490049660206,
0.031525082886219025,
-0.01351749338209629,
-0.022923901677131653,
-0.01771407760679722,
0.022523531690239906,
-0.04961714148521423,
0.0251612551510334,
0.020506693050265312,
-0.03631456196308136,
-0.05128750577569008,
-0.04004650190472603,
-0.03042597323656082,
0.05765698105096817,
-0.03979393094778061,
0.018746700137853622,
0.0589020699262619,
-0.016324695199728012,
-0.04669435694813728,
-0.07804761081933975,
-0.01368040218949318,
-0.030997082591056824,
0.01819194108247757,
0.03209798410534859,
-0.020548289641737938,
-0.005626307334750891,
-0.05113483592867851,
-0.06974585354328156,
0.032870128750801086,
0.013028820976614952,
-0.022442713379859924,
0.03453114256262779,
0.03820041939616203,
-0.012936376966536045,
0.007896129973232746,
0.01587061770260334,
-0.05414155498147011,
0.023443667218089104,
0.008164656348526478,
0.010891535319387913,
0.03353850543498993,
0.04486269876360893,
-0.014949275180697441,
-0.033524539321660995,
-0.07172370702028275,
-0.02696734108030796,
-0.02905944734811783,
-0.01554080005735159,
0.0655917376279831
] |
CLEE/CLEE | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | 2021-02-13T22:14:05Z | ---
tags:
- summarization
widget:
- text: "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
---
# CodeTrans model for code documentation generation go
Pretrained model on programming language go using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized go code functions: it works best with tokenized go functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the go function or be fine-tuned on other go code tasks. It can be used on unparsed and untokenized go code. However, if the go code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate go function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_go_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_go_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/go/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 180,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.006281043402850628,
-0.029826976358890533,
0.0006147728418000042,
0.03858785331249237,
0.03397137299180031,
0.026989754289388657,
-0.018436996266245842,
-0.005125634837895632,
-0.023903222754597664,
0.060339462012052536,
0.04663659259676933,
0.005433366633951664,
-0.007956760935485363,
0.049948155879974365,
-0.02960587851703167,
-0.06417667120695114,
-0.01394881121814251,
-0.027402831241488457,
-0.041897162795066833,
-0.014935041777789593,
0.024480067193508148,
0.0001596955698914826,
0.009307625703513622,
0.009785295464098454,
0.0034605178516358137,
0.014311272650957108,
0.0022006090730428696,
0.021057114005088806,
0.03269510716199875,
-0.0777687281370163,
-0.02432459406554699,
-0.0046135373413562775,
-0.036912404000759125,
-0.0032460445072501898,
-0.03037026897072792,
0.01723271794617176,
0.008359471336007118,
0.038634561002254486,
0.018458334729075432,
0.059926725924015045,
0.011057708412408829,
0.019463637843728065,
0.027941230684518814,
-0.04387766867876053,
0.06039319187402725,
0.00043052859837189317,
-0.03582766279578209,
-0.026983195915818214,
0.019154107198119164,
0.0035182295832782984,
-0.056002598255872726,
-0.071125328540802,
-0.02664065919816494,
0.046694595366716385,
-0.008750507608056068,
-0.012653525918722153,
-0.07990078628063202,
-0.029686598107218742,
0.051177751272916794,
-0.049448754638433456,
-0.029379677027463913,
0.011826565489172935,
-0.05679262802004814,
0.025493714958429337,
0.0012093407567590475,
0.008533254265785217,
0.007124475669115782,
-0.04551379010081291,
0.027753392234444618,
0.004474847577512264,
0.05830639600753784,
-0.033008284866809845,
0.02908460609614849,
-0.1170407384634018,
0.015514377504587173,
-0.0029802953358739614,
0.01972108706831932,
0.009725634939968586,
-0.020011184737086296,
0.05188822001218796,
-0.0033521063160151243,
0.0013318387791514397,
0.03971165046095848,
0.01248844526708126,
-0.01434867549687624,
0.05154341831803322,
-0.03984248638153076,
-0.014634636230766773,
-0.014562834054231644,
0.07180708646774292,
-0.05958593264222145,
-0.06761346012353897,
-0.022829363122582436,
-0.025820506736636162,
-0.04164409637451172,
0.03166014328598976,
0.0532473661005497,
-0.01632307656109333,
0.019895492121577263,
-0.000557754363398999,
0.04720484837889671,
0.04977470263838768,
-0.004620297346264124,
0.044662509113550186,
0.02404886484146118,
0.011275921948254108,
-0.020602509379386902,
-0.049375858157873154,
-0.03619888424873352,
0.03864048048853874,
0.012943515554070473,
-0.024577509611845016,
-0.04538692533969879,
0.030018404126167297,
0.00941615179181099,
-0.04784010350704193,
0.05127330869436264,
-0.020362451672554016,
-0.052294593304395676,
-0.03594887629151344,
0.0573546402156353,
-0.00940518919378519,
-0.029827721416950226,
0.021955227479338646,
-0.03201961889863014,
0.00943534355610609,
-0.05139976739883423,
-0.03189754858613014,
0.003947664983570576,
0.01768931932747364,
-0.007253613788634539,
0.08281705528497696,
0.01261300127953291,
-0.03988722339272499,
0.014384647831320763,
0.02192714251577854,
-0.07558691501617432,
0.05327335000038147,
0.029732512310147285,
0.10661713033914566,
-0.08323514461517334,
-0.03754144534468651,
0.02915891818702221,
0.005551638547331095,
-0.007071429863572121,
0.024355819448828697,
-0.009368287399411201,
-0.07330673187971115,
-0.025977401062846184,
-0.001463807770051062,
0.06601015478372574,
-0.04721110686659813,
-0.025369897484779358,
0.03596257045865059,
0.0077119371853768826,
0.01148893404752016,
-0.03182476758956909,
-0.0034606806002557278,
-0.0030205892398953438,
-0.021747246384620667,
-0.06831980496644974,
0.026277346536517143,
-0.018994057551026344,
-0.03519265353679657,
-0.020659418776631355,
-0.029626691713929176,
0.01665213517844677,
0.11227783560752869,
0.010361009277403355,
-0.005301108118146658,
-0.03830087184906006,
0.01604948565363884,
0.02996385470032692,
0.054442305117845535,
-0.031572699546813965,
0.030888717621564865,
0.034768324345350266,
0.0596054270863533,
-0.03578075021505356,
0.06880933046340942,
0.0025868990924209356,
-0.04652981460094452,
-0.026913709938526154,
0.02023199014365673,
-0.01980542205274105,
-0.040726639330387115,
0.002985510742291808,
0.018070049583911896,
-0.022674109786748886,
-0.01305259857326746,
-0.01567545346915722,
0.053569529205560684,
0.022677915170788765,
-0.012872823514044285,
-0.030380956828594208,
0.014553282409906387,
-0.003097384935244918,
0.06345067918300629,
-0.03448666259646416,
-0.011160364374518394,
-0.021516086533665657,
-0.02993725799024105,
-0.0033806043211370707,
0.02495061233639717,
0.04932817816734314,
0.026859117671847343,
-0.014432228170335293,
0.09422720968723297,
-0.04433617368340492,
0.011503233574330807,
-0.03888275474309921,
-0.05225024372339249,
0.005435589235275984,
0.026667241007089615,
0.029483338817954063,
0.025580503046512604,
0.016467472538352013,
-0.03164331987500191,
0.010008921846747398,
0.08144920319318771,
0.03777804225683212,
0.040356215089559555,
-0.01979716867208481,
-0.016529738903045654,
0.04052867740392685,
0.060796722769737244,
-0.031249605119228363,
-0.03971070051193237,
0.038197293877601624,
0.032294079661369324,
-0.025052092969417572,
0.022488990798592567,
-0.006822817958891392,
0.014095672406256199,
-0.0495675690472126,
-0.060137879103422165,
0.03944509103894234,
0.01948736049234867,
-0.001815951894968748,
0.03087029792368412,
0.001748545910231769,
-0.0008634999394416809,
0.03166578337550163,
-0.00582139752805233,
0.003935659769922495,
-0.06615336984395981,
0.01858031377196312,
0.002980591030791402,
0.06128212809562683,
-0.04408429563045502,
0.0334249883890152,
0.011335798539221287,
-0.00531627656891942,
0.054110247641801834,
-0.025328747928142548,
0.031773023307323456,
0.02882152609527111,
0.03748047724366188,
-0.016504675149917603,
0.015380206517875195,
0.010451077483594418,
0.02553107962012291,
0.07816314697265625,
0.006935463286936283,
0.07038292288780212,
-0.009823757223784924,
0.057436827570199966,
0.06302879750728607,
0.01443146076053381,
0.0045462739653885365,
0.0347050242125988,
0.06434878706932068,
-0.00030242252978496253,
-0.006312184035778046,
0.05136225372552872,
-0.04908432066440582,
0.028979390859603882,
-0.041274625808000565,
0.027836551889777184,
-0.00966063141822815,
-0.027274493128061295,
0.0376167856156826,
0.014648035168647766,
-0.03392563387751579,
0.004162161611020565,
-0.021181516349315643,
-0.02217155136168003,
0.014513073489069939,
0.0005330902640707791,
-0.0292234905064106,
0.01186892669647932,
-0.015403056517243385,
0.01999843865633011,
-0.08217521011829376,
-0.036702997982501984,
-0.017095405608415604,
-0.03898819908499718,
0.013636302202939987,
-0.08370936661958694,
-0.04725569114089012,
-0.0750606507062912,
-0.010122868232429028,
0.046530287712812424,
0.01161419227719307,
-0.009710132144391537,
-0.03653755784034729,
0.010152176953852177,
-0.036223575472831726,
-0.02161543443799019,
-0.06334761530160904,
-0.06239887699484825,
-0.01331828162074089,
-0.06129582226276398,
0.02990388497710228,
-0.01135265827178955,
0.02313634380698204,
0.01154327392578125,
-0.021579299122095108,
-0.030835246667265892,
-0.018061714246869087,
0.05348680913448334,
0.003824214218184352,
-0.011731510050594807,
-0.024633606895804405,
0.02483612485229969,
-0.039509475231170654,
0.045373473316431046,
-0.0044328211806714535,
-0.03888754919171333,
0.10354600101709366,
0.059419237077236176,
0.03441006317734718,
-0.01006121002137661,
-0.03688652068376541,
-0.05378454551100731,
-0.04530971124768257,
-0.0248151496052742,
-0.030673997476696968,
-0.02743900939822197,
-0.00930588599294424,
-0.050759270787239075,
-0.013580059632658958,
-0.03873845934867859,
-0.04390259459614754,
-0.02407757006585598,
0.021214015781879425,
0.035543885082006454,
0.03877239674329758,
0.051167454570531845,
0.031012414023280144,
-0.031485795974731445,
-0.03094922937452793,
0.045656390488147736,
0.0123154167085886,
-0.004576160106807947,
-0.0765514150261879,
-0.0258098766207695,
0.04302787780761719,
0.02219853736460209,
0.0016635780921205878,
-0.021275492385029793,
0.04174267500638962,
0.017798852175474167,
0.00773693947121501,
0.005525772925466299,
-0.00982106663286686,
-0.005643954500555992,
-0.024572517722845078,
-0.00819093082100153,
-0.03749792277812958,
-0.026699624955654144,
-0.026909859851002693,
-0.017313921824097633,
0.042730946093797684,
-0.06856261938810349,
-0.05228258669376373,
0.008121133781969547,
0.04049157723784447,
0.03520379588007927,
0.026637090370059013,
-0.024505363777279854,
0.002833418780937791,
-0.05615370348095894,
-0.03676244243979454,
0.033573951572179794,
0.02740335650742054,
-0.0016561525408178568,
0.0415024608373642,
0.035739798098802567,
-0.044170212000608444,
0.019474949687719345,
0.02988111972808838,
0.039135612547397614,
0.032505594193935394,
-0.03628576919436455,
0.02695966139435768,
-0.038780342787504196,
0.02636927179992199,
0.003306970000267029,
-0.039147570729255676,
-0.04560922831296921,
-0.0875815823674202,
-0.020306631922721863,
0.013072757050395012,
-0.03292121738195419,
0.011374149471521378,
0.05429091304540634,
-0.02349075861275196,
-0.036361776292324066,
-0.0000638092024018988,
0.011676857247948647,
0.06441269814968109,
-0.03177794814109802,
0.037795230746269226,
0.007779574487358332,
0.06224096566438675,
-0.04097026214003563,
0.010686970315873623,
-0.03603963926434517,
-0.02864726632833481,
0.011565061286091805,
0.039266154170036316,
0.021018011495471,
0.07110646367073059,
0.07489868253469467,
-0.002082349034026265,
-0.03299138322472572,
0.04343848302960396,
0.05119597911834717,
-0.0026423525996506214,
-0.03244125097990036,
0.004144200589507818,
0.003003806574270129,
-0.029895775020122528,
0.010436995886266232,
-0.0031480304896831512,
0.019055740907788277,
0.02815900556743145,
-0.009165376424789429,
0.0019177751382812858,
-0.007071829866617918,
-0.020810525864362717,
-0.0557069331407547,
-0.03413163498044014,
-0.005857591982930899,
-0.04131671041250229,
-0.052467260509729385,
0.02876747027039528,
0.04845523461699486,
0.026849407702684402,
0.058557190001010895,
0.04372289031744003,
-0.04327664524316788,
-0.028977014124393463,
0.05362330749630928,
0.0460786335170269,
-0.036160312592983246,
-0.036282602697610855,
-0.05820009857416153,
0.040656086057424545,
0.044265154749155045,
-0.0355868861079216,
-0.0925440639257431,
0.0022797747515141964,
0.034135375171899796,
-0.02770751155912876,
0.07470300048589706,
0.012741073034703732,
0.01562020555138588,
0.04969901219010353,
-0.012898101471364498,
0.027029797434806824,
-0.025260383263230324,
0.017236905172467232,
0.0016431428957730532,
0.044929664582014084,
-0.019362572580575943,
-0.03473596274852753,
-0.03191738575696945,
0.021643951535224915,
0.011265499517321587,
0.03367159515619278,
0.02965501882135868,
-0.013058029115200043,
-0.06829866021871567,
-0.006977738346904516,
0.04068225249648094,
-0.03871478512883186,
0.013263561762869358,
0.01607828214764595,
0.046192776411771774,
-0.04896510764956474,
-0.027081627398729324,
-0.02035549469292164,
-0.005366659723222256,
0.0317680798470974,
-0.0017501020338386297,
-0.02132050134241581,
-0.06195467710494995,
0.011129536665976048,
-0.02388867549598217,
-0.023639198392629623,
-0.09015801548957825,
0.03959567844867706,
0.0009033692767843604,
-0.005535339005291462,
0.04988280311226845,
0.04664648324251175,
0.01626802794635296,
0.050421301275491714,
-0.016098350286483765,
0.025233197957277298,
-0.041779525578022,
0.016492119058966637,
-0.022285308688879013,
-0.015066711232066154,
-0.012201791629195213,
-0.06835322082042694,
-0.018953317776322365,
-0.04433634504675865,
-0.030670028179883957,
-0.04792027547955513,
-0.030982153490185738,
0.007552610244601965,
-0.01981109380722046,
-0.003455981845036149,
-0.004175185225903988,
0.011085286736488342,
-0.020246068015694618,
-0.01931835524737835,
-0.031961582601070404,
-0.04165590554475784,
-0.09136614948511124,
-0.02760169841349125,
0.013948827050626278,
0.034404657781124115,
0.04052246734499931,
-0.0009515947895124555,
0.012778390198946,
0.02826731465756893,
-0.0004599766107276082,
-0.01291643176227808,
0.030425364151597023,
0.009084208868443966,
-0.040826957672834396,
-0.03482593968510628,
0.013352932408452034,
0.020118916407227516,
0.014472470618784428,
-0.02258133888244629,
0.01077953726053238,
0.04185640066862106,
-0.04014131799340248,
0.0006469771033152938,
0.044122591614723206,
-0.014153358526527882,
-0.081264428794384,
-0.03716212511062622,
-0.0013023748761042953,
-0.04280679672956467,
0.034336745738983154,
-0.0027782428078353405,
-0.018081167712807655,
-0.020851686596870422,
0.0018179829930886626,
0.03565749153494835,
-0.017136553302407265,
-0.0292101688683033,
0.0024261735379695892,
-0.03498309105634689,
0.035202402621507645,
-0.060447320342063904,
0.056882344186306,
-0.039610691368579865,
-0.0009271111339330673,
-0.016379952430725098,
-0.00874061044305563,
-0.0423114039003849,
0.06397809833288193,
-0.013960059732198715,
-0.009736495092511177,
-0.016703404486179352,
-0.0002878166560549289,
-0.029317425563931465,
0.03594979643821716,
0.0016228046733886003,
0.003815333591774106,
-0.03552679717540741,
0.016080163419246674,
-0.038366615772247314,
0.010065843351185322,
-0.021980833262205124,
-0.017095590010285378,
-0.014955875463783741,
-0.025176474824547768,
-0.014294960536062717,
-0.05573460832238197,
0.04552968591451645,
0.031735293567180634,
0.018662219867110252,
0.011629185639321804,
-0.020459990948438644,
-0.00920806359499693,
0.03447507694363594,
-0.07540404051542282,
-0.04381159693002701,
-0.0272853821516037,
0.0018266269471496344,
-0.019089488312602043,
0.06307803094387054,
0.0606372095644474,
-0.04917370527982712,
-0.015282740816473961,
0.021655632182955742,
0.010082090273499489,
0.006199427414685488,
0.027081910520792007,
0.024496035650372505,
0.050022322684526443,
0.054071519523859024,
-0.04685613140463829,
-0.013737308792769909,
-0.016139058396220207,
-0.008918067440390587,
-0.01131127867847681,
-0.012020166032016277,
0.02634589374065399,
-0.01815960556268692,
-0.041378267109394073,
-0.015171727165579796,
0.06145348399877548,
0.05196380987763405,
0.016511688008904457,
-0.0011021202662959695,
-0.035032693296670914,
0.018025405704975128,
0.014112100005149841,
-0.04127996042370796,
-0.03463897481560707,
0.02407974936068058,
-0.0433359257876873,
0.08271311223506927,
-0.012263383716344833,
0.012388276867568493,
0.03359032794833183,
0.03600107505917549,
0.00737238023430109,
0.054423946887254715,
-0.03357924148440361,
-0.014692919328808784,
0.0416884683072567,
-0.03672334924340248,
-0.009280637837946415,
-0.005266748834401369,
0.05783415213227272,
-0.04945199564099312,
0.046755850315093994,
0.015253274701535702,
0.025297578424215317,
-0.008172051049768925,
-0.01902869902551174,
-0.054514676332473755,
0.03988707810640335,
-0.06088472902774811,
0.06516924500465393,
-0.020384009927511215,
-0.07713315635919571,
0.08455172181129456,
0.029987595975399017,
-0.09080537408590317,
0.007864585146307945,
0.03775003179907799,
0.02063639648258686,
0.03951539471745491,
0.03254036232829094,
-0.07064653933048248,
0.003584611928090453,
-0.05179358273744583,
0.008006857708096504,
-0.057730745524168015,
-0.009283812716603279,
0.02693762443959713,
-0.055155158042907715,
0.006202411372214556,
0.02478187344968319,
-0.015351839363574982,
0.004582083784043789,
0.01956409402191639,
-0.04853130504488945,
-0.043976638466119766,
-0.018029531463980675,
0.017960693687200546,
-0.030579106882214546,
0.028317052870988846,
-0.013930052518844604,
0.040943652391433716,
0.01246703788638115,
0.007501174695789814,
-0.04756075143814087,
0.019532078877091408,
0.03336431831121445,
-0.03788372501730919,
-0.026230627670884132,
0.017293987795710564,
0.0077395932748913765,
-0.016263535246253014,
0.033989518880844116,
-0.0066466243006289005,
0.02552846260368824,
0.02346491441130638,
-0.021413220092654228,
0.01548507809638977,
-0.03588693216443062,
-0.006178966257721186,
0.014230972155928612,
0.013858174905180931,
0.04072549566626549,
-0.011420775204896927,
0.02197006531059742,
0.03119577467441559,
0.030868060886859894,
-0.00493529811501503,
-0.0202951580286026,
-0.01023037452250719,
0.02657731994986534,
-0.036408547312021255,
0.026586022228002548,
0.009116953238844872,
-0.04530753567814827,
-0.028466856107115746,
-0.04066653549671173,
-0.022902874276041985,
0.049776043742895126,
-0.04019889608025551,
0.008382582105696201,
0.05269042029976845,
-0.007642537821084261,
-0.052726589143276215,
-0.07834576070308685,
-0.0015454720705747604,
-0.012247317470610142,
0.027609677985310555,
0.024316871538758278,
-0.023097651079297066,
0.0015369277680292726,
-0.047229792922735214,
-0.062250833958387375,
0.04149823635816574,
0.013739047572016716,
-0.0187717042863369,
0.051521267741918564,
0.040796294808387756,
-0.020681040361523628,
0.015575006604194641,
0.015904312953352928,
-0.04687672480940819,
0.03129756823182106,
0.013946243561804295,
0.006933419033885002,
0.03163410350680351,
0.042125411331653595,
-0.016108540818095207,
-0.04162103310227394,
-0.06797435879707336,
-0.02804100513458252,
-0.02697124518454075,
-0.014187938533723354,
0.07446157932281494
] |
CLS/WubiBERT_models | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
---
# CodeTrans model for code documentation generation go
Pretrained model on programming language go using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized go code functions: it works best with tokenized go functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the go function/method.
## Intended uses & limitations
The model could be used to generate the description for the go function or be fine-tuned on other go code tasks. It can be used on unparsed and untokenized go code. However, if the go code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate go function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_go_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_go_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/go/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 4500 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing go code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0037742811255156994,
-0.02768024057149887,
0.0016135902842506766,
0.038054779171943665,
0.032979756593704224,
0.027504323050379753,
-0.01802465133368969,
-0.004431367386132479,
-0.02193477377295494,
0.060559388250112534,
0.04737432301044464,
0.004368467256426811,
-0.0056801591999828815,
0.04970351606607437,
-0.029581014066934586,
-0.0666581392288208,
-0.01590723544359207,
-0.028997112065553665,
-0.04125095158815384,
-0.01500801369547844,
0.026877397671341896,
0.00020496528304647654,
0.00862445030361414,
0.007497937884181738,
0.0033674498554319143,
0.013919468969106674,
0.0010061494540423155,
0.021870644763112068,
0.034023843705654144,
-0.0761493593454361,
-0.023627739399671555,
-0.001348594087176025,
-0.036393940448760986,
-0.0046172174625098705,
-0.030200529843568802,
0.020555507391691208,
0.006880636792629957,
0.04051126912236214,
0.018770407885313034,
0.059529632329940796,
0.012247934006154537,
0.020244793966412544,
0.030442705377936363,
-0.042988602072000504,
0.060065191239118576,
-0.000408480002079159,
-0.035402510315179825,
-0.02912823110818863,
0.01761583238840103,
0.0023342971689999104,
-0.05435661971569061,
-0.07105196267366409,
-0.02682308666408062,
0.047098226845264435,
-0.005870046094059944,
-0.010280771180987358,
-0.08095954358577728,
-0.03172241523861885,
0.050170496106147766,
-0.04995323345065117,
-0.0279681459069252,
0.011970845982432365,
-0.05647137388586998,
0.022898945957422256,
-0.00039280590135604143,
0.008176798932254314,
0.007937566377222538,
-0.04875028505921364,
0.02760571800172329,
0.003956016153097153,
0.05924714356660843,
-0.03334972262382507,
0.029919326305389404,
-0.11876804381608963,
0.015034684911370277,
-0.0008605999173596501,
0.020204836502671242,
0.009728269651532173,
-0.019799834117293358,
0.051397766917943954,
-0.005313634406775236,
0.0036365645937621593,
0.04027535393834114,
0.01249599363654852,
-0.013652113266289234,
0.051501818001270294,
-0.036073196679353714,
-0.013986894860863686,
-0.015469328500330448,
0.06911016255617142,
-0.05973581224679947,
-0.06740109622478485,
-0.021743282675743103,
-0.027641482651233673,
-0.04305511340498924,
0.03220989555120468,
0.053937312215566635,
-0.017134254798293114,
0.018095267936587334,
-0.0016257890965789557,
0.045192964375019073,
0.05150841176509857,
-0.005180741660296917,
0.0429421029984951,
0.023511294275522232,
0.011592758819460869,
-0.02274627797305584,
-0.049326781183481216,
-0.03733399137854576,
0.03971399739384651,
0.01174774020910263,
-0.02587374486029148,
-0.044387128204107285,
0.026813752949237823,
0.007172675337642431,
-0.05337673798203468,
0.04848439618945122,
-0.02071249857544899,
-0.05240491032600403,
-0.03574947267770767,
0.056785814464092255,
-0.011616491712629795,
-0.030636006966233253,
0.0209989994764328,
-0.03214794397354126,
0.007028852589428425,
-0.05123886093497276,
-0.03449403494596481,
0.0037064487114548683,
0.017983993515372276,
-0.008599408902227879,
0.08649761229753494,
0.01155113149434328,
-0.04188278689980507,
0.013266658410429955,
0.02341647446155548,
-0.0762578696012497,
0.05320674180984497,
0.030705776065587997,
0.10503680258989334,
-0.0802517980337143,
-0.03811918944120407,
0.029027672484517097,
0.008266577497124672,
-0.0037472927942872047,
0.02618369460105896,
-0.010893270373344421,
-0.07409226149320602,
-0.02664291113615036,
0.0011337101459503174,
0.06622468680143356,
-0.04754893481731415,
-0.025861194357275963,
0.03579619526863098,
0.010330822318792343,
0.012170927599072456,
-0.03198084607720375,
-0.003056485904380679,
-0.003525964915752411,
-0.021907716989517212,
-0.06920883804559708,
0.027764970436692238,
-0.01813081093132496,
-0.033395178616046906,
-0.020462457090616226,
-0.03253042697906494,
0.014036786742508411,
0.11249614506959915,
0.011246188543736935,
-0.00693144928663969,
-0.039471980184316635,
0.018091121688485146,
0.03141574189066887,
0.05551600828766823,
-0.030321769416332245,
0.03000606596469879,
0.03336012363433838,
0.06144478917121887,
-0.03609177842736244,
0.06894803792238235,
-0.0003254508483223617,
-0.04718093201518059,
-0.026130177080631256,
0.019471343606710434,
-0.019111402332782745,
-0.043131593614816666,
0.00005795464676339179,
0.01621447689831257,
-0.021802164614200592,
-0.012009646743535995,
-0.016916872933506966,
0.05308059975504875,
0.02020203322172165,
-0.014692757278680801,
-0.028800420463085175,
0.013373137451708317,
-0.0019750725477933884,
0.0637444406747818,
-0.03586844354867935,
-0.010352726094424725,
-0.01906321570277214,
-0.03192061930894852,
-0.0014748899266123772,
0.023950694128870964,
0.04927576705813408,
0.028396762907505035,
-0.01568225957453251,
0.09333039820194244,
-0.044171564280986786,
0.00692541291937232,
-0.03895457461476326,
-0.04924926906824112,
0.006245432421565056,
0.02651911787688732,
0.03026926890015602,
0.02349712885916233,
0.015208203345537186,
-0.032480500638484955,
0.010129720903933048,
0.08149587363004684,
0.03829607367515564,
0.042330484837293625,
-0.01973740942776203,
-0.017239879816770554,
0.0422491729259491,
0.059661563485860825,
-0.03087858483195305,
-0.04035148769617081,
0.03847650811076164,
0.031183013692498207,
-0.025512393563985825,
0.02091243863105774,
-0.0057357363402843475,
0.01202901266515255,
-0.051387347280979156,
-0.06120755523443222,
0.03926556184887886,
0.021428775042295456,
-0.001951861777342856,
0.03237439692020416,
0.0013332698727026582,
0.0017452714964747429,
0.03217880427837372,
-0.006840405520051718,
0.0048767151311039925,
-0.06784573197364807,
0.018126895651221275,
0.001610783045180142,
0.05906691029667854,
-0.04395929351449013,
0.033813998103141785,
0.010869544930756092,
-0.00724228098988533,
0.053971827030181885,
-0.02539403922855854,
0.03283105045557022,
0.02526005543768406,
0.03682585805654526,
-0.018589023500680923,
0.016202345490455627,
0.011010333895683289,
0.026728160679340363,
0.08075529336929321,
0.006987879518419504,
0.07081902027130127,
-0.012241735123097897,
0.06002303957939148,
0.060456085950136185,
0.015049556270241737,
0.004437929484993219,
0.03450379520654678,
0.060196224600076675,
-0.004730680026113987,
-0.007368464954197407,
0.05333740636706352,
-0.050629399716854095,
0.028232688084244728,
-0.043162740767002106,
0.027983078733086586,
-0.008981392718851566,
-0.027505794540047646,
0.036684196442365646,
0.01397191546857357,
-0.035080764442682266,
0.0047184620052576065,
-0.021063977852463722,
-0.022136177867650986,
0.012396859005093575,
-0.0004922574735246599,
-0.029479580000042915,
0.0112703712657094,
-0.014512459747493267,
0.02114839293062687,
-0.08242001384496689,
-0.035715099424123764,
-0.01582789607346058,
-0.03856126591563225,
0.014413026161491871,
-0.08527358621358871,
-0.04922870546579361,
-0.07405350357294083,
-0.010903186164796352,
0.04747840762138367,
0.013826592825353146,
-0.007213946897536516,
-0.035673703998327255,
0.0090561518445611,
-0.03432745113968849,
-0.020955227315425873,
-0.06487715244293213,
-0.05895804241299629,
-0.015238100662827492,
-0.05962149426341057,
0.029945693910121918,
-0.011848149821162224,
0.02576381154358387,
0.012534563429653645,
-0.023828592151403427,
-0.03172967582941055,
-0.016529660671949387,
0.05466149374842644,
0.003917400259524584,
-0.011446553282439709,
-0.0215139277279377,
0.02411220595240593,
-0.03781028836965561,
0.04739483445882797,
-0.0043217819184064865,
-0.04013670235872269,
0.10435213893651962,
0.05916499346494675,
0.03536037355661392,
-0.00866614282131195,
-0.03605015203356743,
-0.05512513220310211,
-0.04722018912434578,
-0.026040785014629364,
-0.028746789321303368,
-0.02969331108033657,
-0.008297753520309925,
-0.051201630383729935,
-0.014637257903814316,
-0.03756373003125191,
-0.04289297014474869,
-0.024572694674134254,
0.023101404309272766,
0.034574925899505615,
0.03842147812247276,
0.05132010206580162,
0.028750132769346237,
-0.029435710981488228,
-0.03064153343439102,
0.04568864032626152,
0.013288496993482113,
-0.004179480019956827,
-0.07533685863018036,
-0.025728901848196983,
0.041748594492673874,
0.02313428558409214,
0.0012801408302038908,
-0.020978130400180817,
0.03875420615077019,
0.016668500378727913,
0.00803633127361536,
0.005090887192636728,
-0.011201351881027222,
-0.006835930049419403,
-0.024525918066501617,
-0.007521103601902723,
-0.03845289349555969,
-0.026277901604771614,
-0.026478825137019157,
-0.015493899583816528,
0.04140837490558624,
-0.06944756954908371,
-0.051221609115600586,
0.010645667091012001,
0.0386749766767025,
0.036547355353832245,
0.025433015078306198,
-0.023734483867883682,
0.0027069731149822474,
-0.05672113224864006,
-0.035393960773944855,
0.033604759722948074,
0.028841694816946983,
-0.0013837743317708373,
0.04045148193836212,
0.03701453283429146,
-0.043665338307619095,
0.02117493376135826,
0.029597995802760124,
0.03782278299331665,
0.03200981393456459,
-0.033977460116147995,
0.029002124443650246,
-0.038381271064281464,
0.025030972436070442,
0.004854786675423384,
-0.038846224546432495,
-0.046354103833436966,
-0.08531586080789566,
-0.02032415196299553,
0.012360510416328907,
-0.029590511694550514,
0.010708874091506004,
0.05303993821144104,
-0.023779507726430893,
-0.040647637099027634,
0.0010385069763287902,
0.009024197235703468,
0.06584098190069199,
-0.032509420067071915,
0.03648190572857857,
0.005367589183151722,
0.06366974860429764,
-0.04191618412733078,
0.007317468523979187,
-0.035859331488609314,
-0.02883046865463257,
0.012877590954303741,
0.0391642190515995,
0.01951831392943859,
0.0689631924033165,
0.07267303764820099,
-0.0030306237749755383,
-0.03203960508108139,
0.043304696679115295,
0.051325902342796326,
-0.0020248687360435724,
-0.03157598897814751,
0.0030833843629807234,
0.00599873811006546,
-0.029612654820084572,
0.011277946643531322,
-0.00705097708851099,
0.02081986330449581,
0.027400055900216103,
-0.009659157134592533,
0.0027633393183350563,
-0.006333101075142622,
-0.023229001089930534,
-0.05540216714143753,
-0.03385394066572189,
-0.0037130191922187805,
-0.04359462857246399,
-0.055045537650585175,
0.02951795421540737,
0.04905817657709122,
0.025097377598285675,
0.057681117206811905,
0.04626085236668587,
-0.04290979355573654,
-0.028446780517697334,
0.05512471869587898,
0.047895800322294235,
-0.037134937942028046,
-0.03522908315062523,
-0.05953473970293999,
0.03981504589319229,
0.045589879155159,
-0.03546054661273956,
-0.0927673950791359,
0.0010794284753501415,
0.03296378254890442,
-0.028221260756254196,
0.07442059367895126,
0.012494775466620922,
0.01444231253117323,
0.04927649348974228,
-0.00865635834634304,
0.02629566751420498,
-0.02592814899981022,
0.018568959087133408,
0.0005233773263171315,
0.04583655297756195,
-0.0174017995595932,
-0.03454330936074257,
-0.029938938096165657,
0.02331177145242691,
0.008706373162567616,
0.032814834266901016,
0.02996206097304821,
-0.012949367053806782,
-0.06502319872379303,
-0.0068232035264372826,
0.04015564173460007,
-0.04128003492951393,
0.015167193487286568,
0.016401709988713264,
0.04839300736784935,
-0.047430627048015594,
-0.027978427708148956,
-0.0211670882999897,
-0.006524056661874056,
0.033819474279880524,
-0.002383293816819787,
-0.023454871028661728,
-0.06363321095705032,
0.010610697790980339,
-0.02400895580649376,
-0.024381127208471298,
-0.0921531468629837,
0.040074754506349564,
0.0030330712907016277,
-0.007156635168939829,
0.05032657831907272,
0.047345444560050964,
0.016183065250515938,
0.049402471631765366,
-0.01630050130188465,
0.025235595181584358,
-0.04085829481482506,
0.018232431262731552,
-0.019765544682741165,
-0.015865102410316467,
-0.010977361351251602,
-0.06690273433923721,
-0.019916454330086708,
-0.04280734807252884,
-0.029769210144877434,
-0.0491119883954525,
-0.029917581006884575,
0.008844980970025063,
-0.020992795005440712,
-0.005042652599513531,
-0.0064991009421646595,
0.008823800832033157,
-0.017755726352334023,
-0.01626146025955677,
-0.031196938827633858,
-0.042003337293863297,
-0.09116270393133163,
-0.02492007426917553,
0.0147122573107481,
0.03453909605741501,
0.040219902992248535,
0.0003750479081645608,
0.01155547983944416,
0.028704943135380745,
0.0017596980324015021,
-0.01564369909465313,
0.030340438708662987,
0.005514107644557953,
-0.04142163693904877,
-0.0351298525929451,
0.012952865101397038,
0.02056361548602581,
0.011693842709064484,
-0.022486459463834763,
0.009889818727970123,
0.04123353585600853,
-0.03937371075153351,
0.0005237951991148293,
0.04356106370687485,
-0.013652190566062927,
-0.08286626636981964,
-0.035973794758319855,
-0.0036627319641411304,
-0.041658706963062286,
0.03803640976548195,
-0.0014609546633437276,
-0.020979776978492737,
-0.02217775210738182,
-0.0028793704695999622,
0.03396736830472946,
-0.016437983140349388,
-0.028983473777770996,
0.0022334770765155554,
-0.03553791716694832,
0.03444909676909447,
-0.06009719893336296,
0.057613782584667206,
-0.041429854929447174,
-0.0007388811209239066,
-0.01673150435090065,
-0.006177364382892847,
-0.04222092404961586,
0.06635342538356781,
-0.012327802367508411,
-0.008231615647673607,
-0.016257261857390404,
-0.0015026155160740018,
-0.030751090496778488,
0.033543024212121964,
0.000817801512312144,
0.002639292972162366,
-0.03556805104017258,
0.015634818002581596,
-0.03781406208872795,
0.008752141147851944,
-0.0247212965041399,
-0.018544917926192284,
-0.015530828386545181,
-0.023265525698661804,
-0.01482321135699749,
-0.05455491319298744,
0.043713707476854324,
0.03142476826906204,
0.01865578442811966,
0.012215963564813137,
-0.020100843161344528,
-0.008694445714354515,
0.038012370467185974,
-0.07614991068840027,
-0.04216357693076134,
-0.024888241663575172,
0.0007449617842212319,
-0.017692822962999344,
0.06315789371728897,
0.061263419687747955,
-0.047396689653396606,
-0.013521836139261723,
0.022639280185103416,
0.007767777889966965,
0.006489146500825882,
0.028615526854991913,
0.02302594482898712,
0.05189323052763939,
0.05442206189036369,
-0.048825107514858246,
-0.015446596778929234,
-0.014528960920870304,
-0.007204296998679638,
-0.013523886911571026,
-0.011924483813345432,
0.025275075808167458,
-0.01716388389468193,
-0.04059883579611778,
-0.015573120675981045,
0.059866923838853836,
0.05129529535770416,
0.01534931268543005,
-0.00186483736615628,
-0.03394082188606262,
0.016408391296863556,
0.016069650650024414,
-0.04326000437140465,
-0.033083029091358185,
0.022996284067630768,
-0.04434910789132118,
0.0787120908498764,
-0.01160639338195324,
0.011502393521368504,
0.03219413757324219,
0.0378979928791523,
0.007281757425516844,
0.05499674007296562,
-0.03311890736222267,
-0.017661232501268387,
0.04106271266937256,
-0.035145118832588196,
-0.009302536956965923,
-0.005418360698968172,
0.05926711857318878,
-0.04709571972489357,
0.04460878670215607,
0.017280293628573418,
0.026708872988820076,
-0.008260617032647133,
-0.017520742490887642,
-0.05199943482875824,
0.04038626700639725,
-0.058970797806978226,
0.066636823117733,
-0.018397245556116104,
-0.07765309512615204,
0.08195532113313675,
0.02851281315088272,
-0.09120910614728928,
0.006249604281038046,
0.038526661694049835,
0.022287912666797638,
0.03916209563612938,
0.03251761570572853,
-0.06886831670999527,
0.003901299787685275,
-0.05299792438745499,
0.005395165178924799,
-0.059291258454322815,
-0.00904155895113945,
0.026843231171369553,
-0.057831261307001114,
0.00687346700578928,
0.022490916773676872,
-0.016704315319657326,
0.0065819211304187775,
0.018330413848161697,
-0.04718034714460373,
-0.043416574597358704,
-0.01770063117146492,
0.01674703322350979,
-0.03020382672548294,
0.02645188570022583,
-0.015322120860219002,
0.03961164131760597,
0.012549067847430706,
0.007208795752376318,
-0.04550928249955177,
0.02041444182395935,
0.030990226194262505,
-0.03875618055462837,
-0.023953430354595184,
0.018904417753219604,
0.00946242455393076,
-0.015651758760213852,
0.03323996812105179,
-0.005514934659004211,
0.02538861334323883,
0.023678412660956383,
-0.023369263857603073,
0.015155485831201077,
-0.03569431230425835,
-0.0058885314501821995,
0.013456709682941437,
0.010614254511892796,
0.042673274874687195,
-0.012406782247126102,
0.02352244220674038,
0.031066475436091423,
0.030187100172042847,
-0.006056561600416899,
-0.021366380155086517,
-0.009657776914536953,
0.02662830427289009,
-0.03314827010035515,
0.025162575766444206,
0.006317440420389175,
-0.04649796709418297,
-0.028119049966335297,
-0.040281057357788086,
-0.02488602139055729,
0.05133206769824028,
-0.04231280833482742,
0.007355196867138147,
0.05364387482404709,
-0.006682820152491331,
-0.05225919559597969,
-0.07805795222520828,
-0.001853547291830182,
-0.011152773164212704,
0.026524128392338753,
0.023018378764390945,
-0.022340217605233192,
0.0009394122753292322,
-0.04780964553356171,
-0.06159598007798195,
0.039774924516677856,
0.012596885673701763,
-0.01912052370607853,
0.05067174881696701,
0.03955478593707085,
-0.02192399837076664,
0.016513455659151077,
0.01834198273718357,
-0.045771196484565735,
0.03401461988687515,
0.014186801388859749,
0.008320251479744911,
0.030927781015634537,
0.039733853191137314,
-0.01461612619459629,
-0.0419028103351593,
-0.06847327202558517,
-0.02791457250714302,
-0.026552319526672363,
-0.014538484625518322,
0.07567432522773743
] |
CLTL/MedRoBERTa.nl | [
"pytorch",
"roberta",
"fill-mask",
"nl",
"transformers",
"license:mit",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"RobertaForMaskedLM"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 2,988 | 2021-02-17T09:49:45Z | ---
tags:
- summarization
widget:
- text: "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
---
# CodeTrans model for code documentation generation go
Pretrained model on programming language go using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized go code functions: it works best with tokenized go functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the code documentation generation task for the go function/method.
## Intended uses & limitations
The model could be used to generate the description for the go function or be fine-tuned on other go code tasks. It can be used on unparsed and untokenized go code. However, if the go code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate go function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_go_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_go_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/go/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 1000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing go code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.006417467258870602,
-0.025920799002051353,
0.0011544754961505532,
0.038475096225738525,
0.033657003194093704,
0.023989839479327202,
-0.016149938106536865,
-0.0017718158196657896,
-0.02324017882347107,
0.05902792885899544,
0.0473751500248909,
0.001959183719009161,
-0.002967702690511942,
0.0498754158616066,
-0.02892880141735077,
-0.0650036633014679,
-0.02198570966720581,
-0.02921622060239315,
-0.044656023383140564,
-0.01440591923892498,
0.026581302285194397,
-0.00420925160869956,
0.00605777045711875,
0.009702063165605068,
0.0006429066997952759,
0.01724887639284134,
0.0014094084035605192,
0.01698252372443676,
0.03788462281227112,
-0.07363102585077286,
-0.02101946994662285,
-0.0025655583012849092,
-0.03970186412334442,
-0.005361370742321014,
-0.03261318802833557,
0.020106466487050056,
0.007128519471734762,
0.03932894393801689,
0.01645759493112564,
0.06183622404932976,
0.014127825386822224,
0.022077685222029686,
0.03411762788891792,
-0.03924985229969025,
0.05944199860095978,
-0.0019485910888761282,
-0.034537460654973984,
-0.0306855421513319,
0.016809148713946342,
0.002887660637497902,
-0.05488789826631546,
-0.07125141471624374,
-0.02870703674852848,
0.04782595485448837,
-0.0060609932988882065,
-0.0096258744597435,
-0.08446890860795975,
-0.030379343777894974,
0.054046157747507095,
-0.04994730278849602,
-0.02897314354777336,
0.012050116434693336,
-0.05632704868912697,
0.023393500596284866,
0.000023253296603797935,
0.009265612810850143,
0.008595313876867294,
-0.04574237018823624,
0.02563614398241043,
0.006987832952290773,
0.05602272227406502,
-0.03114117495715618,
0.0324852429330349,
-0.11795713007450104,
0.014820277690887451,
-0.0016104931710287929,
0.021223487332463264,
0.008743656799197197,
-0.02261485531926155,
0.05498947203159332,
-0.004950450733304024,
0.004044282250106335,
0.04165171459317207,
0.013595565222203732,
-0.013184859417378902,
0.05567942187190056,
-0.03260757029056549,
-0.015297450125217438,
-0.015333433635532856,
0.06746911257505417,
-0.060890547931194305,
-0.06958553194999695,
-0.02199826017022133,
-0.03004339337348938,
-0.04389013350009918,
0.03010934591293335,
0.056032855063676834,
-0.016059376299381256,
0.01846468076109886,
-0.0018696986371651292,
0.04467885196208954,
0.05479516461491585,
-0.005232945550233126,
0.04077376425266266,
0.024173693731427193,
0.01363138947635889,
-0.021300284191966057,
-0.04813284054398537,
-0.03816122189164162,
0.03765470162034035,
0.009661038406193256,
-0.024636736139655113,
-0.04583639279007912,
0.026460573077201843,
0.006470208987593651,
-0.05610915273427963,
0.05038869008421898,
-0.02326112799346447,
-0.05169713869690895,
-0.03495161607861519,
0.05937204137444496,
-0.010760380886495113,
-0.034861695021390915,
0.019216837361454964,
-0.03628741577267647,
0.008278099820017815,
-0.0526559054851532,
-0.03388257324695587,
0.003249840112403035,
0.01715836301445961,
-0.0032256711274385452,
0.08534805476665497,
0.010304254479706287,
-0.039559219032526016,
0.010093134827911854,
0.023981329053640366,
-0.07514436542987823,
0.052732858806848526,
0.0313715934753418,
0.10665800422430038,
-0.08061069250106812,
-0.03731409087777138,
0.02783610112965107,
0.006500392220914364,
-0.006093795411288738,
0.02471332810819149,
-0.01392417587339878,
-0.07342691719532013,
-0.028238067403435707,
-0.0004059833299834281,
0.06731484085321426,
-0.04858362302184105,
-0.026072965934872627,
0.03661568462848663,
0.005075881257653236,
0.011437891982495785,
-0.0342804491519928,
-0.0046960050240159035,
-0.005718499422073364,
-0.02178019843995571,
-0.06868641823530197,
0.029350267723202705,
-0.021539626643061638,
-0.0321124792098999,
-0.01938912458717823,
-0.029233481734991074,
0.01345816906541586,
0.11146042495965958,
0.009544958360493183,
-0.009060146287083626,
-0.04400474578142166,
0.020920297130942345,
0.03023543395102024,
0.05806238204240799,
-0.029454749077558517,
0.025663428008556366,
0.03165324404835701,
0.06030823662877083,
-0.0345216803252697,
0.07101040333509445,
-0.000991729204542935,
-0.04961590841412544,
-0.028301624581217766,
0.021671220660209656,
-0.015667088329792023,
-0.04545924812555313,
0.002243710681796074,
0.01991415210068226,
-0.019588399678468704,
-0.011585965752601624,
-0.01305485051125288,
0.05301227048039436,
0.019667761400341988,
-0.01592021808028221,
-0.02785556949675083,
0.016831062734127045,
-0.005371312145143747,
0.06895371526479721,
-0.03338626027107239,
-0.009818106889724731,
-0.0229178499430418,
-0.029654433950781822,
-0.0036224776413291693,
0.02354496531188488,
0.049022555351257324,
0.024608241394162178,
-0.014720386825501919,
0.09350139647722244,
-0.04609312862157822,
0.004071513190865517,
-0.0417659692466259,
-0.051648691296577454,
0.006064325105398893,
0.025603346526622772,
0.03208564966917038,
0.02262496016919613,
0.01482210960239172,
-0.037199873477220535,
0.010746118612587452,
0.08337005227804184,
0.03669140860438347,
0.04156849905848503,
-0.018307380378246307,
-0.018856853246688843,
0.04293185845017433,
0.0584038682281971,
-0.036707401275634766,
-0.04043617844581604,
0.03755924105644226,
0.03218590468168259,
-0.025629403069615364,
0.02218743972480297,
-0.002821639645844698,
0.01192270778119564,
-0.04641127958893776,
-0.06102311611175537,
0.038499027490615845,
0.023414943367242813,
0.0003588068066164851,
0.03272269666194916,
0.00028690462931990623,
0.0003573897120077163,
0.030231066048145294,
-0.0051241787150502205,
0.0036158449947834015,
-0.06718359887599945,
0.020128091797232628,
-0.00046576900058425963,
0.05648595839738846,
-0.04222241789102554,
0.03377307206392288,
0.0153636634349823,
-0.00713809859007597,
0.046973295509815216,
-0.024112381041049957,
0.03152298554778099,
0.028514744713902473,
0.03780100494623184,
-0.018344491720199585,
0.01811208575963974,
0.012381214648485184,
0.02537776529788971,
0.08018793910741806,
0.0042344918474555016,
0.07068396359682083,
-0.01184165384620428,
0.058161020278930664,
0.06091431528329849,
0.015562092885375023,
0.001529742730781436,
0.035488881170749664,
0.06106458604335785,
-0.009127547033131123,
-0.009478873573243618,
0.05585441365838051,
-0.04754648730158806,
0.028918376192450523,
-0.041886668652296066,
0.030264588072896004,
-0.00891470443457365,
-0.02877883054316044,
0.03422863408923149,
0.014140118844807148,
-0.03922513499855995,
0.002141128061339259,
-0.02217845991253853,
-0.017959728837013245,
0.011922851204872131,
0.0018974299309775233,
-0.02435707114636898,
0.0107008907943964,
-0.014836139976978302,
0.025201627984642982,
-0.08218051493167877,
-0.03863370418548584,
-0.015610634349286556,
-0.03931828960776329,
0.014296295121312141,
-0.08544119447469711,
-0.05220611020922661,
-0.07316656410694122,
-0.008237435482442379,
0.0473676361143589,
0.010527295991778374,
-0.006448348518460989,
-0.03363487869501114,
0.007377131842076778,
-0.03036927804350853,
-0.021651171147823334,
-0.06487583369016647,
-0.058557603508234024,
-0.013341459445655346,
-0.06256766617298126,
0.029925961047410965,
-0.012805559672415257,
0.02725672721862793,
0.012812416069209576,
-0.02279563993215561,
-0.03001931682229042,
-0.016070980578660965,
0.05287882685661316,
0.004505498800426722,
-0.01571562886238098,
-0.02349044568836689,
0.02467089705169201,
-0.03629076108336449,
0.04766950383782387,
-0.006582385860383511,
-0.0415455587208271,
0.10192408412694931,
0.05862806737422943,
0.03554452210664749,
-0.008725947700440884,
-0.03278423473238945,
-0.05447743833065033,
-0.043435581028461456,
-0.026070641353726387,
-0.0283509511500597,
-0.03046649508178234,
-0.010388690046966076,
-0.04965883865952492,
-0.014781508594751358,
-0.03645937144756317,
-0.045828573405742645,
-0.026098813861608505,
0.020174136385321617,
0.03203780576586723,
0.040573570877313614,
0.05328763648867607,
0.03184836357831955,
-0.02486437000334263,
-0.034169137477874756,
0.04698752984404564,
0.01246616244316101,
-0.007273717317730188,
-0.07256969809532166,
-0.032559484243392944,
0.04151357710361481,
0.022432060912251472,
0.0007667989702895284,
-0.02071848139166832,
0.03834068402647972,
0.01771709881722927,
0.006863477639853954,
0.00416243402287364,
-0.01017692405730486,
-0.013040089048445225,
-0.0219227634370327,
-0.012648814357817173,
-0.03953104838728905,
-0.02706822007894516,
-0.023945650085806847,
-0.019657284021377563,
0.041846442967653275,
-0.06827706098556519,
-0.05036255717277527,
0.01090669073164463,
0.03564945235848427,
0.040269944816827774,
0.026165056973695755,
-0.027727359905838966,
0.0012710615992546082,
-0.057229116559028625,
-0.03493638336658478,
0.030814215540885925,
0.02970009483397007,
-0.00019923210493288934,
0.04053196310997009,
0.04012637212872505,
-0.041192661970853806,
0.016765987500548363,
0.030932705849409103,
0.03648277744650841,
0.030159808695316315,
-0.03349700942635536,
0.030313076451420784,
-0.04389509931206703,
0.028011741116642952,
0.0045548235066235065,
-0.03942124545574188,
-0.04338020831346512,
-0.08259584754705429,
-0.02187497541308403,
0.006836564280092716,
-0.028332507237792015,
0.010158100165426731,
0.05099368840456009,
-0.025307416915893555,
-0.04293200373649597,
-0.0009122773190028965,
0.00733210938051343,
0.06417270749807358,
-0.029902003705501556,
0.03501598536968231,
0.0070574176497757435,
0.06487005949020386,
-0.0421738475561142,
0.0031985177192837,
-0.03556204214692116,
-0.030654428526759148,
0.013186108320951462,
0.0374600924551487,
0.019186226651072502,
0.06978554278612137,
0.07009067386388779,
-0.00965950358659029,
-0.032572995871305466,
0.0475454106926918,
0.05052698031067848,
-0.002083758357912302,
-0.034002672880887985,
0.0030886856839060783,
0.003930262755602598,
-0.027716463431715965,
0.012221363373100758,
-0.0050547062419354916,
0.019426129758358,
0.028495244681835175,
-0.008061687462031841,
0.002348528243601322,
-0.005550728645175695,
-0.015449155122041702,
-0.055428970605134964,
-0.03622940927743912,
-0.0030435381922870874,
-0.04239674285054207,
-0.05357503518462181,
0.027588609606027603,
0.04633016884326935,
0.027926024049520493,
0.06165379658341408,
0.04355565458536148,
-0.04515327140688896,
-0.029724406078457832,
0.059295233339071274,
0.04628346115350723,
-0.03756014630198479,
-0.034856509417295456,
-0.059676021337509155,
0.03890514373779297,
0.04664865508675575,
-0.02983993850648403,
-0.09479932487010956,
-0.0006680352380499244,
0.03144599869847298,
-0.02931484952569008,
0.07426873594522476,
0.011102957651019096,
0.017375333234667778,
0.050891321152448654,
-0.006855545565485954,
0.024782957509160042,
-0.02533702366054058,
0.01597665250301361,
-0.0002655354328453541,
0.042837969958782196,
-0.018111832439899445,
-0.035131167620420456,
-0.030678296461701393,
0.023590678349137306,
0.007629688363522291,
0.03018692508339882,
0.02927425317466259,
-0.014471293427050114,
-0.06418976187705994,
-0.0075098550878465176,
0.03802390769124031,
-0.03943101689219475,
0.013950031250715256,
0.019169993698596954,
0.04598326236009598,
-0.04613885283470154,
-0.02824779786169529,
-0.020926082506775856,
-0.003362407675012946,
0.03874577581882477,
-0.00009543747000861913,
-0.02439580112695694,
-0.06391888856887817,
0.01268015243113041,
-0.023572932928800583,
-0.024277187883853912,
-0.08963092416524887,
0.038956474512815475,
0.0014832387678325176,
-0.011264536529779434,
0.050745151937007904,
0.046930380165576935,
0.017165236175060272,
0.048818439245224,
-0.019302599132061005,
0.027118423953652382,
-0.03862077370285988,
0.017336741089820862,
-0.018655600026249886,
-0.017681267112493515,
-0.013075779192149639,
-0.06658340990543365,
-0.022315584123134613,
-0.03882719576358795,
-0.0306632649153471,
-0.04959419369697571,
-0.028382638469338417,
0.00901047233492136,
-0.02258751541376114,
-0.006133934948593378,
-0.005670107435435057,
0.011117348447442055,
-0.018080634996294975,
-0.01942232809960842,
-0.02869655191898346,
-0.03976881131529808,
-0.09262335300445557,
-0.026447003707289696,
0.01584607921540737,
0.03451947867870331,
0.04492856562137604,
-0.003221549792215228,
0.008801715448498726,
0.03175656870007515,
0.00198916532099247,
-0.017943495884537697,
0.02774105779826641,
0.006630192045122385,
-0.042171116918325424,
-0.039038773626089096,
0.014705129899084568,
0.021291736513376236,
0.009768107905983925,
-0.025618836283683777,
0.008057075552642345,
0.0422087199985981,
-0.04191622510552406,
-0.0020166097674518824,
0.04609080031514168,
-0.01576130837202072,
-0.08171070367097855,
-0.03637167811393738,
-0.005221971310675144,
-0.04279052093625069,
0.03656170889735222,
-0.004737744573503733,
-0.018479548394680023,
-0.023578617721796036,
0.004094686359167099,
0.03179147094488144,
-0.02031758427619934,
-0.029328716918826103,
-0.0013980702497065067,
-0.03292307257652283,
0.036082006990909576,
-0.05677369236946106,
0.055273015052080154,
-0.041582442820072174,
0.001085531315766275,
-0.020592711865901947,
-0.002053353004157543,
-0.04476425051689148,
0.06748704612255096,
-0.012568940408527851,
-0.008966388180851936,
-0.01558170560747385,
0.003129171207547188,
-0.026586128398776054,
0.03289460763335228,
-0.0016429348615929484,
0.0017658123979344964,
-0.03917822241783142,
0.023189881816506386,
-0.04056425392627716,
0.00944273080676794,
-0.02463231049478054,
-0.01975215971469879,
-0.017276890575885773,
-0.021373488008975983,
-0.012290793471038342,
-0.05245088413357735,
0.04340250417590141,
0.030587924644351006,
0.019178126007318497,
0.014534290879964828,
-0.01923544518649578,
-0.005910494364798069,
0.03335714712738991,
-0.07517155259847641,
-0.04432135820388794,
-0.02078276500105858,
0.0026325080543756485,
-0.017793970182538033,
0.06304356455802917,
0.060561224818229675,
-0.0488094799220562,
-0.01294983271509409,
0.022344809025526047,
0.009839300997555256,
-0.0007808686350472271,
0.026014743372797966,
0.021598979830741882,
0.054374467581510544,
0.050035033375024796,
-0.047921985387802124,
-0.01948469504714012,
-0.01511069480329752,
-0.004078230354934931,
-0.013998684473335743,
-0.010485226288437843,
0.02660955674946308,
-0.011667621321976185,
-0.03847035765647888,
-0.017036546021699905,
0.06041527912020683,
0.051342979073524475,
0.01562836579978466,
-0.002603543922305107,
-0.03374556452035904,
0.01719900220632553,
0.01296304352581501,
-0.03941803798079491,
-0.03307312726974487,
0.02062408998608589,
-0.047036316245794296,
0.07771195471286774,
-0.010529620572924614,
0.011677192524075508,
0.033176470547914505,
0.036775462329387665,
0.006566183641552925,
0.054857946932315826,
-0.03288910910487175,
-0.023143142461776733,
0.037267107516527176,
-0.032993484288454056,
-0.010743234306573868,
-0.0058638365007936954,
0.05801773816347122,
-0.043076470494270325,
0.04899599403142929,
0.01896839775145054,
0.02244666963815689,
-0.006830156780779362,
-0.01749296486377716,
-0.04756343737244606,
0.04133797436952591,
-0.06428322196006775,
0.06435202807188034,
-0.01716800034046173,
-0.0817636251449585,
0.08050715923309326,
0.028926406055688858,
-0.08963514864444733,
0.00352399330586195,
0.03836281970143318,
0.019514363259077072,
0.03787790983915329,
0.032763268798589706,
-0.06854810565710068,
0.005499864928424358,
-0.05243786796927452,
0.008963742293417454,
-0.06093362718820572,
-0.01353428978472948,
0.027774497866630554,
-0.056273557245731354,
0.007498484570533037,
0.025921359658241272,
-0.015122620388865471,
0.00852374080568552,
0.022554131224751472,
-0.045270539820194244,
-0.04012675955891609,
-0.018751397728919983,
0.01703772321343422,
-0.027116354554891586,
0.020314732566475868,
-0.013010764494538307,
0.0416109673678875,
0.011356974951922894,
0.008380722254514694,
-0.044598538428545,
0.02354094758629799,
0.031820688396692276,
-0.038475073873996735,
-0.022717928513884544,
0.019899755716323853,
0.006793659646064043,
-0.015320386737585068,
0.03546886146068573,
-0.004934491589665413,
0.024118317291140556,
0.02430848591029644,
-0.02588607184588909,
0.01372243370860815,
-0.030104363337159157,
-0.00826742872595787,
0.00994041282683611,
0.008169487118721008,
0.0429232195019722,
-0.011450813151896,
0.02483251318335533,
0.03067052736878395,
0.03110625594854355,
-0.005686040502041578,
-0.021932609379291534,
-0.008091660216450691,
0.02711498737335205,
-0.032100025564432144,
0.027770355343818665,
0.005445326212793589,
-0.04800340160727501,
-0.027029892429709435,
-0.04192144796252251,
-0.025144347921013832,
0.05222965031862259,
-0.0391894169151783,
0.00931800901889801,
0.054829780012369156,
-0.004916151985526085,
-0.04969317093491554,
-0.07775326818227768,
-0.004461559001356363,
-0.012517801485955715,
0.021775033324956894,
0.023778699338436127,
-0.022276440635323524,
0.001864776248112321,
-0.04572972282767296,
-0.060832422226667404,
0.04238471761345863,
0.01527437288314104,
-0.02075488679111004,
0.0507960319519043,
0.03909818083047867,
-0.02231692709028721,
0.016180502250790596,
0.013704453594982624,
-0.042394980788230896,
0.02982032299041748,
0.010502015240490437,
0.01010824367403984,
0.030965937301516533,
0.04027040675282478,
-0.016688574105501175,
-0.04424932226538658,
-0.07041044533252716,
-0.023751402273774147,
-0.024711379781365395,
-0.01323346234858036,
0.07537921518087387
] |
CLTL/gm-ner-xlmrbase | [
"pytorch",
"tf",
"xlm-roberta",
"token-classification",
"nl",
"transformers",
"dighum",
"license:apache-2.0",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"XLMRobertaForTokenClassification"
],
"model_type": "xlm-roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 2 | null | ---
tags:
- summarization
widget:
- text: "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
---
# CodeTrans model for code documentation generation java
Pretrained model on programming language java using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_java_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_java_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/java/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 180,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0022023734636604786,
-0.01566546969115734,
-0.004809489939361811,
0.026123693212866783,
0.036729585379362106,
0.03993118926882744,
-0.03210959583520889,
-0.003784337779507041,
-0.004152184352278709,
0.05274086818099022,
0.03663717210292816,
-0.013353641144931316,
-0.005861484445631504,
0.053045667707920074,
-0.03892241418361664,
-0.06534846872091293,
-0.013714367523789406,
-0.03382287919521332,
-0.036570318043231964,
-0.009315389208495617,
0.026092566549777985,
-0.0013413981068879366,
0.001134512247517705,
0.008827194571495056,
-0.0052523063495755196,
0.004386856686323881,
0.006267340388149023,
0.02319594845175743,
0.031385090202093124,
-0.07835756242275238,
-0.02735120803117752,
0.00031840032897889614,
-0.03375636413693428,
-0.016124123707413673,
-0.031102221459150314,
0.02149670571088791,
0.00804514717310667,
0.04175429791212082,
0.030960174277424812,
0.056849341839551926,
0.0013786953641101718,
0.027537047863006592,
0.01391596719622612,
-0.03938879445195198,
0.06234319880604744,
0.007371018175035715,
-0.028321439400315285,
-0.027754660695791245,
0.01674639992415905,
0.0017335733864456415,
-0.054370295256376266,
-0.0713442787528038,
-0.04100868105888367,
0.04471197351813316,
-0.004900436382740736,
-0.0025033140555024147,
-0.06893842667341232,
-0.03331897780299187,
0.038134168833494186,
-0.05233900249004364,
-0.02495678886771202,
0.005529479589313269,
-0.06633714586496353,
0.02184414304792881,
0.01080894935876131,
-0.004934604279696941,
0.0027934445533901453,
-0.047204043716192245,
0.031329307705163956,
-0.002322208369150758,
0.053091295063495636,
-0.026211725547909737,
0.022273344919085503,
-0.11541891098022461,
0.016303399577736855,
-0.014576179906725883,
0.02451092004776001,
0.020871449261903763,
-0.014460274949669838,
0.0570702850818634,
-0.005966256372630596,
0.010153360664844513,
0.044408008456230164,
0.007163439877331257,
-0.012946762144565582,
0.03533605486154556,
-0.029517924413084984,
-0.0160408653318882,
-0.007071678061038256,
0.07045864313840866,
-0.05740080401301384,
-0.06374144554138184,
-0.018585585057735443,
-0.024196932092308998,
-0.037786900997161865,
0.024942874908447266,
0.045975059270858765,
-0.013004649430513382,
0.01914391852915287,
0.003118491033092141,
0.046934567391872406,
0.05472269281744957,
-0.009916497394442558,
0.04249993711709976,
0.03584185242652893,
0.010296856053173542,
-0.013797497376799583,
-0.04760190472006798,
-0.020641585811972618,
0.04663110896945,
0.005998918786644936,
-0.043659768998622894,
-0.04704241454601288,
0.028431350365281105,
0.01762370951473713,
-0.04609684646129608,
0.048411257565021515,
-0.019389184191823006,
-0.04650058224797249,
-0.03793639689683914,
0.04444655776023865,
-0.005172711331397295,
-0.0213568564504385,
0.010138113982975483,
-0.04211719334125519,
0.008805389516055584,
-0.052065446972846985,
-0.02515672892332077,
0.014776920899748802,
0.027359679341316223,
-0.02644192799925804,
0.0828331783413887,
0.008569165132939816,
-0.03480030223727226,
0.013527901843190193,
0.02340216189622879,
-0.06892909109592438,
0.06346005201339722,
0.033952321857213974,
0.1036825180053711,
-0.06528571248054504,
-0.04732675105333328,
0.028969231992959976,
0.006012414116412401,
-0.009872478432953358,
0.02397048845887184,
-0.014241669327020645,
-0.08327282965183258,
-0.03222794458270073,
-0.012831241823732853,
0.06737973541021347,
-0.05171173810958862,
-0.01325369905680418,
0.03668086603283882,
0.0009446180774830282,
0.013287601061165333,
-0.03880174458026886,
-0.006377724930644035,
0.003337558824568987,
-0.030411912128329277,
-0.060788944363594055,
0.025828665122389793,
-0.0003857979318127036,
-0.02583101950585842,
-0.03187715634703636,
-0.03843638300895691,
-0.00011864340194733813,
0.10846471786499023,
0.0167093463242054,
-0.00968292448669672,
-0.048816148191690445,
0.01697886921465397,
0.03164239227771759,
0.03186197578907013,
-0.02327480912208557,
0.02653452381491661,
0.050415925681591034,
0.06632538884878159,
-0.035242535173892975,
0.06434428691864014,
-0.014955487102270126,
-0.024863803759217262,
-0.03223215788602829,
0.016083326190710068,
-0.010203368030488491,
-0.04094449803233147,
0.0005900987889617682,
0.013243019580841064,
-0.01971815899014473,
-0.007757179904729128,
-0.009781983681023121,
0.055237505584955215,
0.02771189622581005,
-0.0162243340164423,
-0.026358410716056824,
0.0097860898822546,
-0.01657579094171524,
0.050247613340616226,
-0.0387708954513073,
-0.004662700463086367,
-0.022501856088638306,
-0.028228893876075745,
-0.00651227543130517,
0.024774760007858276,
0.040082138031721115,
0.0250850860029459,
-0.00968088023364544,
0.09880924224853516,
-0.04395541176199913,
0.0073903994634747505,
-0.04401607811450958,
-0.043471068143844604,
0.00836958084255457,
0.033088624477386475,
0.026387641206383705,
0.027664465829730034,
0.0072893621399998665,
-0.01895040087401867,
0.016237899661064148,
0.07777099311351776,
0.042226314544677734,
0.04674852639436722,
-0.022412428632378578,
-0.02865871973335743,
0.05003971979022026,
0.06766973435878754,
-0.048879798501729965,
-0.04409165307879448,
0.047127071768045425,
0.03144361451268196,
-0.014103244990110397,
0.029934775084257126,
-0.00628254096955061,
0.012630103155970573,
-0.060501061379909515,
-0.06711997836828232,
0.03658781945705414,
0.02016218565404415,
0.0077279238030314445,
0.030940180644392967,
0.006808451376855373,
-0.005739962682127953,
0.04185871779918671,
-0.0004389335517771542,
0.005593901965767145,
-0.056480567902326584,
0.007501717656850815,
-0.001639046473428607,
0.06667447090148926,
-0.036070309579372406,
0.033297862857580185,
0.015185484662652016,
-0.0008386380504816771,
0.055773261934518814,
-0.029273612424731255,
0.0203156266361475,
0.02863050438463688,
0.018377622589468956,
-0.012545401230454445,
0.025632889941334724,
0.020699748769402504,
0.031425584107637405,
0.08634132891893387,
0.010851615108549595,
0.05617264658212662,
-0.006404876243323088,
0.06355541944503784,
0.05753662437200546,
0.01715538464486599,
0.011229855939745903,
0.028758201748132706,
0.06269984692335129,
0.0037355413660407066,
-0.0069640809670090675,
0.059677548706531525,
-0.039741549640893936,
0.01820509508252144,
-0.04107832536101341,
0.03447443246841431,
-0.0008280823822133243,
-0.021456975489854813,
0.03700602054595947,
0.01027682051062584,
-0.0555296391248703,
-0.00015902615268714726,
-0.029460279271006584,
-0.02739042043685913,
0.02030858024954796,
-0.016478588804602623,
-0.021684657782316208,
0.011669345200061798,
-0.021250879392027855,
0.01932154968380928,
-0.08635310083627701,
-0.04948370158672333,
-0.003486028639599681,
-0.040729351341724396,
0.005206202156841755,
-0.07234299182891846,
-0.04945782572031021,
-0.06230113282799721,
-0.020457666367292404,
0.05550722777843475,
0.012211990542709827,
-0.019307535141706467,
-0.031812697649002075,
0.015462035313248634,
-0.03833340108394623,
-0.026865430176258087,
-0.06127066910266876,
-0.07408157736063004,
-0.006090096663683653,
-0.07181788235902786,
0.027071436867117882,
-0.02418363280594349,
0.03416389971971512,
0.008331462740898132,
-0.014602226205170155,
-0.02453203871846199,
-0.01733582466840744,
0.058681048452854156,
0.01772354729473591,
-0.011144774965941906,
-0.02768123522400856,
0.01791682094335556,
-0.019641447812318802,
0.03618276119232178,
-0.004275651648640633,
-0.0456201434135437,
0.10843709856271744,
0.05114727094769478,
0.04400847852230072,
-0.008824548684060574,
-0.042706526815891266,
-0.053999029099941254,
-0.04449590668082237,
-0.023837801069021225,
-0.019466593861579895,
-0.028097806498408318,
-0.009468904696404934,
-0.051415570080280304,
-0.024033697322010994,
-0.03804868087172508,
-0.03994414955377579,
-0.021845253184437752,
0.029986020177602768,
0.03141612932085991,
0.04929380863904953,
0.05286036804318428,
0.022889025509357452,
-0.029636424034833908,
-0.03937295824289322,
0.037202123552560806,
0.0027733813039958477,
-0.00038936076452955604,
-0.0676770955324173,
-0.029067784547805786,
0.027373792603611946,
0.025487292557954788,
-0.012868257239460945,
-0.012258888222277164,
0.04681806638836861,
0.01516399160027504,
0.003247032640501857,
0.012582636438310146,
-0.011464612558484077,
-0.010248949751257896,
-0.027473993599414825,
0.0016308262711390853,
-0.0309786107391119,
-0.029317166656255722,
-0.015252933837473392,
-0.015627318993210793,
0.043761271983385086,
-0.0612056739628315,
-0.058549437671899796,
0.00841924361884594,
0.03717799112200737,
0.030334576964378357,
0.023869017139077187,
-0.023600054904818535,
0.0016413540579378605,
-0.062395501881837845,
-0.04500801861286163,
0.03406088799238205,
0.021267909556627274,
-0.00618450902402401,
0.03796800971031189,
0.041009657084941864,
-0.04210510104894638,
0.03237539157271385,
0.02438696101307869,
0.038943782448768616,
0.04125713184475899,
-0.028356295078992844,
0.008615775965154171,
-0.049647171050310135,
0.02111768163740635,
0.006395766511559486,
-0.030640678480267525,
-0.04451005160808563,
-0.08224447071552277,
-0.035756487399339676,
0.017137864604592323,
-0.024459032341837883,
-0.003452094504609704,
0.051270827651023865,
-0.01248452439904213,
-0.04226921871304512,
-0.0035091384779661894,
0.009452291764318943,
0.06124063581228256,
-0.023887163028120995,
0.031228985637426376,
0.015941012650728226,
0.06809523701667786,
-0.048786554485559464,
-0.0029692151583731174,
-0.030550608411431313,
-0.029787424951791763,
0.010970708914101124,
0.0515267588198185,
0.02213156223297119,
0.054318204522132874,
0.0749736949801445,
0.013730078004300594,
-0.03324020653963089,
0.046053070574998856,
0.057033076882362366,
0.005795086268335581,
-0.027017362415790558,
0.0001384964125463739,
-0.010620437562465668,
-0.03471887484192848,
0.013769231736660004,
-0.01277678832411766,
0.022550934925675392,
0.02405666373670101,
-0.005612670443952084,
-0.0004597747465595603,
-0.000016171174138435163,
-0.020934337750077248,
-0.04548396170139313,
-0.043049782514572144,
-0.0019450215622782707,
-0.036002665758132935,
-0.061475109308958054,
0.01914212480187416,
0.03534061834216118,
0.03941211849451065,
0.05491798743605614,
0.05226637423038483,
-0.049013279378414154,
-0.036310166120529175,
0.0372878834605217,
0.04889921098947525,
-0.03540605679154396,
-0.030724963173270226,
-0.05410351976752281,
0.040159840136766434,
0.04075178876519203,
-0.02568082883954048,
-0.09459568560123444,
0.011199149303138256,
0.025983408093452454,
-0.019505392760038376,
0.0682469829916954,
0.010839073918759823,
0.01948278211057186,
0.052314642816782,
0.0004949229187332094,
0.028141602873802185,
-0.02730061486363411,
0.010235442779958248,
-0.003902923548594117,
0.03398853912949562,
-0.02507743611931801,
-0.033765386790037155,
-0.04638112708926201,
0.020448023453354836,
0.014548832550644875,
0.04344344884157181,
0.034015290439128876,
-0.013006692752242088,
-0.0712028220295906,
-0.008618593215942383,
0.03200525417923927,
-0.01943032816052437,
0.021895797923207283,
0.01941869594156742,
0.04226578399538994,
-0.03449663892388344,
-0.025056179612874985,
-0.023019252344965935,
-0.013349443674087524,
0.03614788129925728,
0.004814607091248035,
-0.019038226455450058,
-0.0653911903500557,
0.017012568190693855,
-0.022009549662470818,
-0.027145523577928543,
-0.09062296152114868,
0.0525519922375679,
0.003756668185815215,
-0.004800715949386358,
0.055887699127197266,
0.024916449561715126,
0.013942111283540726,
0.0422019399702549,
-0.01944817043840885,
0.024844083935022354,
-0.03472483158111572,
0.018369602039456367,
-0.018599750474095345,
-0.015811629593372345,
-0.022171122953295708,
-0.07190695405006409,
-0.01630537211894989,
-0.038126520812511444,
-0.03315534442663193,
-0.03877062350511551,
-0.02432105503976345,
-0.00247112475335598,
-0.02460131049156189,
-0.004100617486983538,
-0.01011717040091753,
0.01582549326121807,
-0.029856419190764427,
-0.028342757374048233,
-0.030733145773410797,
-0.04595530405640602,
-0.09995348751544952,
-0.02791234478354454,
0.015370463021099567,
0.04251338168978691,
0.034442417323589325,
-0.0002905002620536834,
0.00890919379889965,
0.03775867447257042,
-0.005683227442204952,
-0.004223817493766546,
0.009424044750630856,
0.014255872927606106,
-0.03508155047893524,
-0.02901468425989151,
0.004311404190957546,
0.01085621863603592,
0.011199838481843472,
-0.021758832037448883,
0.0060437642969191074,
0.04383230581879616,
-0.025184163823723793,
0.00586627097800374,
0.03926211968064308,
0.007406014949083328,
-0.07845448702573776,
-0.030590035021305084,
0.00015329768939409405,
-0.04468825086951256,
0.02908606082201004,
0.00022516043100040406,
-0.031360648572444916,
-0.005444061942398548,
-0.0019632542971521616,
0.03652550280094147,
-0.0061241742223501205,
-0.023640461266040802,
0.003368213539943099,
-0.03212977573275566,
0.033282630145549774,
-0.05785014107823372,
0.05546927452087402,
-0.03280970826745033,
-0.0039493185468018055,
-0.011764363385736942,
-0.01251825038343668,
-0.04144127294421196,
0.0612025149166584,
-0.011075642891228199,
-0.002950558438897133,
-0.007082160096615553,
0.013989780098199844,
-0.025209031999111176,
0.02706928737461567,
-0.0034597543999552727,
0.008998338133096695,
-0.03020753338932991,
0.015366270206868649,
-0.0386628694832325,
0.011750753037631512,
-0.02070690505206585,
-0.014721700921654701,
-0.015183051116764545,
-0.02264459989964962,
-0.009824028238654137,
-0.04979580640792847,
0.04750918969511986,
0.03077019564807415,
0.032239656895399094,
0.01654997281730175,
-0.015297963283956051,
-0.020690634846687317,
0.031228819862008095,
-0.09424994885921478,
-0.03656021133065224,
-0.020876392722129822,
0.02360823005437851,
-0.016716575250029564,
0.06682469695806503,
0.0454564094543457,
-0.04755905643105507,
-0.005858063697814941,
0.015674598515033722,
0.01893475465476513,
0.0011059785028919578,
0.029121875762939453,
0.01836671307682991,
0.05066285654902458,
0.04584333673119545,
-0.048786815255880356,
-0.006356925703585148,
-0.007362796925008297,
-0.008350851014256477,
-0.011540348641574383,
-0.01928929053246975,
0.01614147238433361,
-0.01044925395399332,
-0.047960489988327026,
-0.021675927564501762,
0.0649106502532959,
0.05245015025138855,
0.02986646443605423,
-0.002149807522073388,
-0.03600023686885834,
0.020381316542625427,
0.013071046210825443,
-0.04585028812289238,
-0.03739718347787857,
0.017373092472553253,
-0.05144905298948288,
0.07893967628479004,
-0.008878658525645733,
0.01219759602099657,
0.017162324860692024,
0.024867748841643333,
0.016032030805945396,
0.04179195687174797,
-0.03978913277387619,
-0.019360460340976715,
0.039078518748283386,
-0.04377495124936104,
-0.005590368527919054,
-0.013273267075419426,
0.05763395130634308,
-0.05568629130721092,
0.04832253232598305,
0.026529453694820404,
0.023705489933490753,
-0.012835485860705376,
-0.017343124374747276,
-0.04276147857308388,
0.045972395688295364,
-0.04704117402434349,
0.06528034806251526,
-0.019782690331339836,
-0.08420096337795258,
0.07977455109357834,
0.03297882527112961,
-0.10683934390544891,
0.004928073845803738,
0.03330862522125244,
0.025659142062067986,
0.03509758412837982,
0.048806264996528625,
-0.07896170765161514,
-0.0010425433283671737,
-0.05290326848626137,
0.010970390401780605,
-0.05785537138581276,
-0.01078099012374878,
0.02788703888654709,
-0.056331515312194824,
-0.002891374984756112,
0.025994811207056046,
-0.01972668617963791,
-0.0024345966521650553,
0.010523081757128239,
-0.047052785754203796,
-0.04194142669439316,
-0.02424001879990101,
0.006884411443024874,
-0.03138751536607742,
0.02677055262029171,
-0.019361097365617752,
0.03380555659532547,
0.015552176162600517,
0.0065752132795751095,
-0.036070678383111954,
0.00862762052565813,
0.03241194039583206,
-0.03663437068462372,
-0.03071153722703457,
0.021909188479185104,
0.01939474791288376,
-0.01094120740890503,
0.029589448124170303,
-0.025130078196525574,
0.015731479972600937,
0.0285180751234293,
-0.017207851633429527,
0.016134746372699738,
-0.04745965451002121,
-0.008139087818562984,
0.011983713135123253,
0.011885859072208405,
0.03039870597422123,
-0.008557899855077267,
0.03398362174630165,
0.0327254980802536,
0.03848518803715706,
-0.013227192685008049,
-0.020759275183081627,
-0.015395434573292732,
0.029756009578704834,
-0.050260186195373535,
0.025214213877916336,
0.024326372891664505,
-0.04233812168240547,
-0.04474643990397453,
-0.046243615448474884,
-0.030457764863967896,
0.055350497364997864,
-0.040850330144166946,
0.015358452685177326,
0.060675978660583496,
-0.011045105755329132,
-0.04973151162266731,
-0.07338953763246536,
-0.012063666246831417,
-0.030899811536073685,
0.019333817064762115,
0.03318754956126213,
-0.019863013178110123,
-0.009795920923352242,
-0.05296184495091438,
-0.06632823497056961,
0.03203162923455238,
0.020436376333236694,
-0.016194472089409828,
0.039020538330078125,
0.03635445982217789,
-0.016994936391711235,
0.015017426572740078,
0.01511880848556757,
-0.05118121579289436,
0.02822626568377018,
0.009768628515303135,
0.012433032505214214,
0.036158058792352676,
0.041636109352111816,
-0.016620393842458725,
-0.038763199001550674,
-0.07429178804159164,
-0.032127439975738525,
-0.03494720533490181,
-0.010325716808438301,
0.06893757730722427
] |
CLTL/icf-domains | [
"pytorch",
"roberta",
"nl",
"transformers",
"license:mit",
"text-classification"
] | text-classification | {
"architectures": [
"RobertaForMultiLabelSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 35 | 2021-02-15T15:37:44Z | ---
tags:
- summarization
widget:
- text: "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
---
# CodeTrans model for code documentation generation java
Pretrained model on programming language java using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the java function/method.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_java_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_java_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/java/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 500 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing java code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.00015463869203813374,
-0.013425926677882671,
-0.003945531323552132,
0.02326325885951519,
0.03536996245384216,
0.041589587926864624,
-0.032846853137016296,
-0.003200698411092162,
-0.002397275995463133,
0.05198489874601364,
0.03693009912967682,
-0.015231839381158352,
-0.0041035874746739864,
0.052106473594903946,
-0.03858746588230133,
-0.06805881857872009,
-0.016158584505319595,
-0.035873834043741226,
-0.036030493676662445,
-0.009288300760090351,
0.02888554148375988,
-0.0016052520368248224,
0.0009454322280362248,
0.005795940291136503,
-0.006264996714890003,
0.002357418416067958,
0.007156257517635822,
0.022880418226122856,
0.03358841314911842,
-0.07634012401103973,
-0.027260227128863335,
0.004266846459358931,
-0.031749922782182693,
-0.016915710642933846,
-0.031160054728388786,
0.024108681827783585,
0.00714837433770299,
0.043800272047519684,
0.030217288061976433,
0.05679246783256531,
0.0014808139530941844,
0.0286384467035532,
0.015964191406965256,
-0.03786676749587059,
0.0629129558801651,
0.006602173671126366,
-0.02766375243663788,
-0.028994640335440636,
0.014130774885416031,
0.0022816925775259733,
-0.05235385522246361,
-0.0712599828839302,
-0.040326736867427826,
0.04525603726506233,
-0.0022854043636471033,
0.0005124897579662502,
-0.07053197175264359,
-0.03594662994146347,
0.03843751922249794,
-0.05321947857737541,
-0.024824680760502815,
0.005999954883009195,
-0.06656614691019058,
0.020527832210063934,
0.00927729532122612,
-0.0042458572424948215,
0.0027346485294401646,
-0.050674423575401306,
0.031744059175252914,
-0.0022442606277763844,
0.052902836352586746,
-0.026251323521137238,
0.022651489824056625,
-0.11637623608112335,
0.01741226390004158,
-0.012459051795303822,
0.02372833341360092,
0.019755860790610313,
-0.012333674356341362,
0.05777720734477043,
-0.0104801245033741,
0.01116472203284502,
0.044896483421325684,
0.008969830349087715,
-0.012593137100338936,
0.03496576100587845,
-0.02741485834121704,
-0.015582318417727947,
-0.00812049861997366,
0.06856303662061691,
-0.0568293035030365,
-0.06509105861186981,
-0.016472619026899338,
-0.024885201826691628,
-0.03813553974032402,
0.02379930578172207,
0.04649632051587105,
-0.013846651650965214,
0.016012197360396385,
0.0017632261151447892,
0.04275418817996979,
0.05665654316544533,
-0.009541712701320648,
0.03982653468847275,
0.03739835321903229,
0.010214989073574543,
-0.01728464476764202,
-0.048452816903591156,
-0.022105341777205467,
0.04827997088432312,
0.004278963897377253,
-0.04453190043568611,
-0.045399703085422516,
0.023949846625328064,
0.015040656551718712,
-0.05340806022286415,
0.04690002650022507,
-0.02067512273788452,
-0.046845901757478714,
-0.03784580156207085,
0.04354538023471832,
-0.006794971879571676,
-0.02269013598561287,
0.01016137283295393,
-0.04221048951148987,
0.009709945879876614,
-0.052970174700021744,
-0.028266893699765205,
0.013902084901928902,
0.027791742235422134,
-0.027935724705457687,
0.08584994077682495,
0.010129238478839397,
-0.035830337554216385,
0.012300512753427029,
0.02552257478237152,
-0.06735958158969879,
0.06277833878993988,
0.03492704778909683,
0.10036100447177887,
-0.06359611451625824,
-0.047629911452531815,
0.030049720779061317,
0.007485069800168276,
-0.006895217578858137,
0.026476942002773285,
-0.01745779626071453,
-0.08525950461626053,
-0.034650254994630814,
-0.008648387156426907,
0.06863299757242203,
-0.05143754929304123,
-0.013540035113692284,
0.03522547334432602,
0.002838179934769869,
0.015103405341506004,
-0.0378933846950531,
-0.005769889801740646,
0.002571130869910121,
-0.03125039115548134,
-0.06338717043399811,
0.026110123842954636,
0.00021304273104760796,
-0.025133417919278145,
-0.03135272487998009,
-0.04113678261637688,
-0.003014635993167758,
0.11002686619758606,
0.0168802198022604,
-0.011198977939784527,
-0.05158694460988045,
0.01989745907485485,
0.03209048882126808,
0.03353840485215187,
-0.021099334582686424,
0.028570905327796936,
0.0485285148024559,
0.06900488585233688,
-0.03672199696302414,
0.0659036934375763,
-0.018949253484606743,
-0.025252310559153557,
-0.03159945085644722,
0.015918444842100143,
-0.009199417196214199,
-0.0417051687836647,
-0.002141824923455715,
0.008642426691949368,
-0.018534524366259575,
-0.005878905300050974,
-0.008892088197171688,
0.05201149359345436,
0.026296354830265045,
-0.01792866736650467,
-0.02515481226146221,
0.008736370131373405,
-0.0163592416793108,
0.05022171512246132,
-0.03916318714618683,
-0.0036964919418096542,
-0.01952441595494747,
-0.028709465637803078,
-0.004753317218273878,
0.023195765912532806,
0.03938140720129013,
0.0258308257907629,
-0.010388657450675964,
0.09900080412626266,
-0.04276411607861519,
0.0052834064699709415,
-0.044000811874866486,
-0.04060887172818184,
0.008352754637598991,
0.0332869254052639,
0.02705313265323639,
0.02427689917385578,
0.006226937752217054,
-0.018442224711179733,
0.01580962724983692,
0.07925243675708771,
0.04355005547404289,
0.048871494829654694,
-0.022402403876185417,
-0.030804947018623352,
0.052582427859306335,
0.0668015107512474,
-0.048302628099918365,
-0.04557473957538605,
0.047321293503046036,
0.02880634367465973,
-0.013478744775056839,
0.027859846130013466,
-0.004731290508061647,
0.011246630921959877,
-0.060481179505586624,
-0.0689094066619873,
0.03811725601553917,
0.022407786920666695,
0.008157989010214806,
0.032840486615896225,
0.007289127912372351,
-0.0043670404702425,
0.0416378378868103,
-0.0013999466318637133,
0.006278959568589926,
-0.057412900030612946,
0.007373431231826544,
-0.002613761695101857,
0.06376893073320389,
-0.035862527787685394,
0.034073516726493835,
0.01459296140819788,
-0.0019809433724731207,
0.05545787513256073,
-0.028111184015870094,
0.021158704534173012,
0.025336895138025284,
0.017709383741021156,
-0.015400406904518604,
0.025554098188877106,
0.021002965047955513,
0.034022118896245956,
0.08950891345739365,
0.009910675697028637,
0.05658290162682533,
-0.008857335895299911,
0.06715240329504013,
0.055693529546260834,
0.01812349073588848,
0.009833002462983131,
0.02740521915256977,
0.05704643577337265,
-0.0001579094969201833,
-0.008362701162695885,
0.06252408772706985,
-0.0416555218398571,
0.015079190023243427,
-0.04343511536717415,
0.03543023765087128,
-0.00045301084173843265,
-0.021642640233039856,
0.035364434123039246,
0.010815782472491264,
-0.05686455965042114,
-0.00004545894262264483,
-0.02816242165863514,
-0.02732931077480316,
0.01738724485039711,
-0.017523115500807762,
-0.021898740902543068,
0.011069444008171558,
-0.019074615091085434,
0.01815369725227356,
-0.08549606800079346,
-0.04753681644797325,
-0.003102006856352091,
-0.03984963148832321,
0.005291387904435396,
-0.07289734482765198,
-0.051056284457445145,
-0.06286215782165527,
-0.021132664754986763,
0.05485183000564575,
0.0144193721935153,
-0.018199840560555458,
-0.03222499042749405,
0.014879758469760418,
-0.0365174375474453,
-0.025784874334931374,
-0.06282737851142883,
-0.07151178270578384,
-0.007403136231005192,
-0.06945884972810745,
0.026906026527285576,
-0.025287408381700516,
0.03717571869492531,
0.007665541954338551,
-0.01656193658709526,
-0.024161703884601593,
-0.01700805313885212,
0.05911501497030258,
0.017391478642821312,
-0.010899470187723637,
-0.02705788053572178,
0.017074020579457283,
-0.019160626456141472,
0.03887064754962921,
-0.002989566884934902,
-0.045304637402296066,
0.11004416644573212,
0.05202870070934296,
0.04518793150782585,
-0.006512320600450039,
-0.04355226457118988,
-0.05428019538521767,
-0.046131156384944916,
-0.02450672723352909,
-0.016243763267993927,
-0.030684655532240868,
-0.008759740740060806,
-0.05278297886252403,
-0.024308515712618828,
-0.03735274448990822,
-0.03859467804431915,
-0.022699378430843353,
0.03122507594525814,
0.029835758730769157,
0.04822973534464836,
0.050864629447460175,
0.02212667092680931,
-0.028013303875923157,
-0.041592083871364594,
0.037470392882823944,
0.0024719974026083946,
0.0004873473953921348,
-0.06417737156152725,
-0.029257172718644142,
0.02440265193581581,
0.025365857407450676,
-0.013110443018376827,
-0.011053180322051048,
0.042428772896528244,
0.01238645613193512,
0.005445826333016157,
0.010063196532428265,
-0.015377916395664215,
-0.010584088042378426,
-0.02666766382753849,
0.002689603716135025,
-0.03173770010471344,
-0.027800923213362694,
-0.016090812161564827,
-0.01168917678296566,
0.044488415122032166,
-0.06180852651596069,
-0.058155693113803864,
0.012823954224586487,
0.03603454679250717,
0.034399230033159256,
0.023637201637029648,
-0.02314150705933571,
0.0027870202902704477,
-0.06439658254384995,
-0.043857209384441376,
0.03677454963326454,
0.022574523463845253,
-0.0066170357167720795,
0.03766336292028427,
0.042805060744285583,
-0.04165283218026161,
0.0335567481815815,
0.02478400059044361,
0.03772561997175217,
0.040184278041124344,
-0.026560472324490547,
0.009030132554471493,
-0.05122673884034157,
0.021220911294221878,
0.007430946920067072,
-0.03154633939266205,
-0.04398997500538826,
-0.07930005341768265,
-0.03647208586335182,
0.017395131289958954,
-0.021391021087765694,
-0.0039104288443923,
0.05048437416553497,
-0.01259323675185442,
-0.04654931277036667,
-0.0036160654854029417,
0.006875539198517799,
0.06345891207456589,
-0.02448834665119648,
0.02939281053841114,
0.015536610968410969,
0.07000164687633514,
-0.04823392257094383,
-0.005926268640905619,
-0.02912922017276287,
-0.029403675347566605,
0.012832711450755596,
0.051629308611154556,
0.020793966948986053,
0.05301644280552864,
0.07281872630119324,
0.011092712171375751,
-0.03184204176068306,
0.04569743946194649,
0.05594010651111603,
0.006688123568892479,
-0.02628253772854805,
-0.0015147363301366568,
-0.008010484278202057,
-0.035128336399793625,
0.01362203061580658,
-0.014433269388973713,
0.02554362639784813,
0.021846981719136238,
-0.006672686897218227,
-0.000009031366971612442,
-0.00016843854973558336,
-0.022269422188401222,
-0.045672766864299774,
-0.04171466827392578,
0.0013449686812236905,
-0.03946727514266968,
-0.06355421245098114,
0.01897459663450718,
0.03546629473567009,
0.040375180542469025,
0.05385715141892433,
0.05416115000844002,
-0.049095518887043,
-0.03525267541408539,
0.03835543990135193,
0.04972667247056961,
-0.03545719012618065,
-0.029117673635482788,
-0.055471569299697876,
0.03845597058534622,
0.042648278176784515,
-0.026461735367774963,
-0.09428048133850098,
0.00931454822421074,
0.02383706346154213,
-0.0189839955419302,
0.06794687360525131,
0.011122215539216995,
0.017796194180846214,
0.053166572004556656,
0.004462983459234238,
0.028390824794769287,
-0.026938747614622116,
0.011629360727965832,
-0.0042624506168067455,
0.03569828346371651,
-0.022944815456867218,
-0.03202523663640022,
-0.043994978070259094,
0.02074419893324375,
0.013202880509197712,
0.04277627170085907,
0.033833593130111694,
-0.012381062842905521,
-0.06896044313907623,
-0.008569642901420593,
0.029338324442505836,
-0.02055649645626545,
0.02365046925842762,
0.017966600134968758,
0.043178778141736984,
-0.0322016105055809,
-0.026114681735634804,
-0.024049915373325348,
-0.016124185174703598,
0.03763394057750702,
0.004677468445152044,
-0.019358139485120773,
-0.06822527945041656,
0.017065364867448807,
-0.021594807505607605,
-0.02667202614247799,
-0.0932525023818016,
0.053619060665369034,
0.0059851547703146935,
-0.005510678514838219,
0.055744580924510956,
0.023931017145514488,
0.015440989285707474,
0.04222113639116287,
-0.019590115174651146,
0.024785546585917473,
-0.03523264452815056,
0.01815258152782917,
-0.015883294865489006,
-0.017342671751976013,
-0.02099759317934513,
-0.06983640789985657,
-0.018764283508062363,
-0.03693924471735954,
-0.032720040529966354,
-0.040788985788822174,
-0.023417392745614052,
-0.002425368642434478,
-0.024883069097995758,
-0.006931694690138102,
-0.01220451295375824,
0.014376684091985226,
-0.025851843878626823,
-0.02701132744550705,
-0.029311159625649452,
-0.046402476727962494,
-0.09845639765262604,
-0.024662308394908905,
0.01470654085278511,
0.04261765256524086,
0.03428678959608078,
0.0008314158767461777,
0.007998471148312092,
0.037168681621551514,
-0.0027859951369464397,
-0.006318133790045977,
0.009196209721267223,
0.010386273264884949,
-0.03557698056101799,
-0.029228409752249718,
0.004769996739923954,
0.010758548974990845,
0.008274841122329235,
-0.0197439007461071,
0.00691598653793335,
0.043908774852752686,
-0.024217121303081512,
0.0065993862226605415,
0.04008955508470535,
0.007822254672646523,
-0.07960139214992523,
-0.02928013540804386,
-0.0013374185655266047,
-0.04344615712761879,
0.032746247947216034,
0.002045074012130499,
-0.033373795449733734,
-0.007533853407949209,
-0.006806495133787394,
0.03491387516260147,
-0.0040161581709980965,
-0.021729109808802605,
0.004776543937623501,
-0.030832726508378983,
0.03338611125946045,
-0.05693461000919342,
0.056717172265052795,
-0.03424879536032677,
-0.0041765389032661915,
-0.010930555872619152,
-0.008296613581478596,
-0.04204612225294113,
0.06333014369010925,
-0.009005916304886341,
-0.0009566918597556651,
-0.00604001060128212,
0.010957272723317146,
-0.02534867636859417,
0.025402631610631943,
-0.004030830692499876,
0.008113185875117779,
-0.030091069638729095,
0.015622003935277462,
-0.038404081016778946,
0.009144867770373821,
-0.022154508158564568,
-0.0159076526761055,
-0.016288526356220245,
-0.020404914394021034,
-0.010396302677690983,
-0.04908159375190735,
0.04665346443653107,
0.031018035486340523,
0.030698856338858604,
0.01628660224378109,
-0.014175454154610634,
-0.020992638543248177,
0.03450186550617218,
-0.09477555751800537,
-0.03539259731769562,
-0.02041509933769703,
0.021024519577622414,
-0.01672259531915188,
0.06787337362766266,
0.04579218104481697,
-0.0454973429441452,
-0.004730843007564545,
0.01505920197814703,
0.0166948102414608,
0.0014852758031338453,
0.030224068090319633,
0.017518557608127594,
0.05149058997631073,
0.04654223844408989,
-0.05130806937813759,
-0.008707205764949322,
-0.005436853040009737,
-0.007166788447648287,
-0.013986164703965187,
-0.01842474192380905,
0.01603732630610466,
-0.010265389457345009,
-0.04825415089726448,
-0.021609846502542496,
0.06198554113507271,
0.05306647717952728,
0.0281498022377491,
-0.0027071197982877493,
-0.03611975535750389,
0.01986844278872013,
0.014714398421347141,
-0.04595901072025299,
-0.03636232763528824,
0.01737065240740776,
-0.05367874354124069,
0.07537701725959778,
-0.008112616837024689,
0.012109949253499508,
0.015192571096122265,
0.02672417461872101,
0.015790235251188278,
0.04169885441660881,
-0.039293888956308365,
-0.02142314985394478,
0.0364258848130703,
-0.042803794145584106,
-0.006976820528507233,
-0.013641337864100933,
0.057697948068380356,
-0.05315041169524193,
0.04528460651636124,
0.029160495847463608,
0.022761009633541107,
-0.014516375958919525,
-0.018140031024813652,
-0.04098412021994591,
0.04724143072962761,
-0.04557156562805176,
0.06692945212125778,
-0.018826613202691078,
-0.08469083905220032,
0.07708302140235901,
0.03254875913262367,
-0.10756289958953857,
0.003524992847815156,
0.035136230289936066,
0.027123797684907913,
0.03435460850596428,
0.0476495623588562,
-0.07838618010282516,
0.000471470266347751,
-0.05467192456126213,
0.008703007362782955,
-0.058319687843322754,
-0.010973627679049969,
0.027570312842726707,
-0.058131709694862366,
-0.0037775214295834303,
0.02415115013718605,
-0.021053025498986244,
-0.0012543213088065386,
0.008023292757570744,
-0.04465730860829353,
-0.0412631556391716,
-0.022876877337694168,
0.004925725515931845,
-0.029381200671195984,
0.025817666202783585,
-0.019906194880604744,
0.031133923679590225,
0.015231521800160408,
0.007236131001263857,
-0.03543733060359955,
0.009921655058860779,
0.03129023313522339,
-0.0361904613673687,
-0.028761330991983414,
0.02358322963118553,
0.02175804041326046,
-0.008298072032630444,
0.02896794304251671,
-0.02380964905023575,
0.015617047436535358,
0.02886301279067993,
-0.019222140312194824,
0.014941180124878883,
-0.047231629490852356,
-0.007284917403012514,
0.011324912309646606,
0.008068203926086426,
0.033084794878959656,
-0.009568619541823864,
0.03438897430896759,
0.0320211797952652,
0.03718733787536621,
-0.014323156327009201,
-0.020834827795624733,
-0.014173108153045177,
0.030319761484861374,
-0.04753983020782471,
0.023040620610117912,
0.023318860679864883,
-0.04332639276981354,
-0.043182019144296646,
-0.044296156615018845,
-0.03261440247297287,
0.05645330622792244,
-0.04285353049635887,
0.015181719325482845,
0.06271914392709732,
-0.00883859395980835,
-0.048105861991643906,
-0.07317057996988297,
-0.012554764747619629,
-0.02874113619327545,
0.016507325693964958,
0.03246922418475151,
-0.01926356740295887,
-0.010066481307148933,
-0.053756024688482285,
-0.06552580744028091,
0.03057754971086979,
0.01966756395995617,
-0.016677258536219597,
0.03598571941256523,
0.03442171588540077,
-0.018014242872595787,
0.013787084259092808,
0.018517326563596725,
-0.04957931488752365,
0.02905050851404667,
0.007161754183471203,
0.013465840369462967,
0.03638015314936638,
0.03806619346141815,
-0.014733776450157166,
-0.039742372930049896,
-0.07464662194252014,
-0.03212017938494682,
-0.0351535938680172,
-0.01070491410791874,
0.06888539344072342
] |
CLTL/icf-levels-adm | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 33 | null | ---
tags:
- summarization
widget:
- text: "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
---
# CodeTrans model for code documentation generation java
Pretrained model on programming language java using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the code documentation generation task for the java function/method.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_java_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_java_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/java/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 500 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing java code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0016864879289641976,
-0.010436792857944965,
-0.0041023180820047855,
0.022423937916755676,
0.0350823774933815,
0.03840390592813492,
-0.030549777671694756,
-0.0006467051571235061,
-0.0013738126726821065,
0.05063271149992943,
0.03735452890396118,
-0.017473584040999413,
-0.002283775247633457,
0.053317777812480927,
-0.03782332316040993,
-0.06732048839330673,
-0.0225607268512249,
-0.03702039644122124,
-0.040171653032302856,
-0.007325427141040564,
0.02828146144747734,
-0.0055397674441337585,
-0.002941807499155402,
0.006967666558921337,
-0.008006359450519085,
0.004318247549235821,
0.008061140775680542,
0.01771453022956848,
0.03586287796497345,
-0.07398126274347305,
-0.025272643193602562,
0.004057409707456827,
-0.03426395729184151,
-0.018210308626294136,
-0.033284466713666916,
0.023305153474211693,
0.008150173351168633,
0.04204957187175751,
0.02774053066968918,
0.05852528661489487,
0.002474188106134534,
0.03143830597400665,
0.019596900790929794,
-0.03444507345557213,
0.06339404731988907,
0.005172636825591326,
-0.026611465960741043,
-0.03132450580596924,
0.014030336402356625,
0.0018454694654792547,
-0.05303504690527916,
-0.07012608647346497,
-0.043283186852931976,
0.044989366084337234,
-0.002464213641360402,
0.0011755258310586214,
-0.07272323220968246,
-0.035682182759046555,
0.04128507897257805,
-0.05303579568862915,
-0.025333518162369728,
0.004589567892253399,
-0.06588364392518997,
0.019331684336066246,
0.008941917680203915,
-0.003944733180105686,
0.001461645239032805,
-0.04720248281955719,
0.03092777542769909,
0.0004978769575245678,
0.05095164477825165,
-0.02359752543270588,
0.025559138506650925,
-0.11511682718992233,
0.017529653385281563,
-0.013760874047875404,
0.024237142875790596,
0.019375696778297424,
-0.014310882426798344,
0.059595491737127304,
-0.010680025443434715,
0.012580984272062778,
0.047059316188097,
0.010079110972583294,
-0.011259665712714195,
0.03815845772624016,
-0.022926626726984978,
-0.01684861071407795,
-0.008281032554805279,
0.06696176528930664,
-0.0578809417784214,
-0.06770160794258118,
-0.015919234603643417,
-0.027071984484791756,
-0.03906664624810219,
0.021536163985729218,
0.04773057997226715,
-0.013509396463632584,
0.01583210378885269,
0.0020306904334574938,
0.04185635969042778,
0.06119915843009949,
-0.010290803387761116,
0.03791283816099167,
0.03941349312663078,
0.012706929817795753,
-0.015779251232743263,
-0.047004666179418564,
-0.02197803184390068,
0.046356525272130966,
0.001692886697128415,
-0.043401703238487244,
-0.04644029214978218,
0.023359982296824455,
0.014015880413353443,
-0.055872220546007156,
0.04835594817996025,
-0.022302905097603798,
-0.04616859182715416,
-0.03734026849269867,
0.04485713317990303,
-0.006456943694502115,
-0.025537945330142975,
0.007888760417699814,
-0.0461212694644928,
0.009501409716904163,
-0.05402740463614464,
-0.027182966470718384,
0.01448246743530035,
0.02794712595641613,
-0.023690128698945045,
0.08402527868747711,
0.009517144411802292,
-0.03414846584200859,
0.010030895471572876,
0.026546144858002663,
-0.06621096283197403,
0.06405747681856155,
0.03689577803015709,
0.10091941803693771,
-0.06275754421949387,
-0.04698178172111511,
0.028593599796295166,
0.0056937518529593945,
-0.008190706372261047,
0.024817243218421936,
-0.020568041130900383,
-0.08431549370288849,
-0.03584235534071922,
-0.01049396675080061,
0.06899091601371765,
-0.05249496176838875,
-0.012806282378733158,
0.03413815796375275,
-0.0023294962011277676,
0.01395186223089695,
-0.040829434990882874,
-0.007492086384445429,
0.0009748217999003828,
-0.03194856271147728,
-0.06350246071815491,
0.027414681389927864,
-0.0021861258428543806,
-0.023566432297229767,
-0.030470099300146103,
-0.03875754401087761,
-0.0034082240890711546,
0.1089504137635231,
0.01473220530897379,
-0.0124536557123065,
-0.0565645694732666,
0.0222184956073761,
0.030831480398774147,
0.034202806651592255,
-0.02014664188027382,
0.02380351722240448,
0.04803727567195892,
0.06788482517004013,
-0.03561051934957504,
0.06740648299455643,
-0.02085319720208645,
-0.02603762410581112,
-0.03457380831241608,
0.01702858693897724,
-0.005014203954488039,
-0.043635159730911255,
-0.00037300839903764427,
0.011752170510590076,
-0.01627456769347191,
-0.005348522216081619,
-0.003449275391176343,
0.05180184915661812,
0.024728497490286827,
-0.019288362935185432,
-0.02419218420982361,
0.012700188905000687,
-0.01918879710137844,
0.054892122745513916,
-0.03746446222066879,
-0.0029247142374515533,
-0.021790584549307823,
-0.0275892224162817,
-0.006481274962425232,
0.022707894444465637,
0.038676876574754715,
0.02156931348145008,
-0.008512781001627445,
0.09881510585546494,
-0.04422599822282791,
0.0021467593032866716,
-0.047317784279584885,
-0.040950845927000046,
0.008742566220462322,
0.03257633000612259,
0.0283656008541584,
0.023529551923274994,
0.004697552416473627,
-0.02171352691948414,
0.01710948348045349,
0.08042076975107193,
0.04101501405239105,
0.0482199490070343,
-0.02004685439169407,
-0.03279901295900345,
0.054198168218135834,
0.06562425196170807,
-0.05502208322286606,
-0.04543302208185196,
0.046454548835754395,
0.030921170487999916,
-0.014053108170628548,
0.028523525223135948,
-0.0024829800240695477,
0.011572376824915409,
-0.056163545697927475,
-0.06903621554374695,
0.03651505708694458,
0.02568596974015236,
0.011082948185503483,
0.032959405332803726,
0.006820265203714371,
-0.006728117819875479,
0.03950079157948494,
0.0004426680679898709,
0.004688415210694075,
-0.05644036829471588,
0.008096637204289436,
-0.004054023884236813,
0.06246957182884216,
-0.03290066495537758,
0.03407358005642891,
0.020055394619703293,
-0.0015208990080282092,
0.048894356936216354,
-0.026293452829122543,
0.020274968817830086,
0.028834229335188866,
0.017366277053952217,
-0.014401875436306,
0.028252020478248596,
0.022935476154088974,
0.032469429075717926,
0.09030470252037048,
0.007764101959764957,
0.05558621510863304,
-0.008517601527273655,
0.06512229144573212,
0.0560174286365509,
0.017740996554493904,
0.00599352503195405,
0.027601592242717743,
0.058154068887233734,
-0.004263576120138168,
-0.010601063258945942,
0.06585425138473511,
-0.03836238384246826,
0.01590244099497795,
-0.04209233447909355,
0.03669687733054161,
-0.0008765086531639099,
-0.022988678887486458,
0.03464523330330849,
0.010511212982237339,
-0.06129632890224457,
-0.0015549719100818038,
-0.028772005811333656,
-0.02401590161025524,
0.016884982585906982,
-0.015765853226184845,
-0.01669236831367016,
0.01031402125954628,
-0.019203493371605873,
0.021962054073810577,
-0.08405668288469315,
-0.050965018570423126,
-0.0027852270286530256,
-0.04154302552342415,
0.0061174542643129826,
-0.07233626395463943,
-0.05368374288082123,
-0.062068309634923935,
-0.01901351660490036,
0.053361911326646805,
0.01093681063503027,
-0.01794830523431301,
-0.028379525989294052,
0.012662758119404316,
-0.03266041725873947,
-0.02632274106144905,
-0.06297281384468079,
-0.07154709100723267,
-0.006737843155860901,
-0.07181849330663681,
0.02703717164695263,
-0.02733086422085762,
0.038756731897592545,
0.00712320813909173,
-0.01545091811567545,
-0.023464491590857506,
-0.017318712547421455,
0.05683017522096634,
0.018210994079709053,
-0.014613601379096508,
-0.02811654843389988,
0.01719866693019867,
-0.01748313382267952,
0.03939918801188469,
-0.005217997822910547,
-0.0474511981010437,
0.1073632463812828,
0.05063625052571297,
0.046321120113134384,
-0.005055425688624382,
-0.04033517464995384,
-0.05262104049324989,
-0.04065653309226036,
-0.024650899693369865,
-0.014848252758383751,
-0.03193655237555504,
-0.01179394032806158,
-0.05142732709646225,
-0.024880217388272285,
-0.03563795983791351,
-0.04180419072508812,
-0.0249938927590847,
0.028135348111391068,
0.027291515842080116,
0.051086872816085815,
0.052980706095695496,
0.023915238678455353,
-0.022919129580259323,
-0.045822277665138245,
0.03763362020254135,
0.0007581021054647863,
-0.0022609385196119547,
-0.0614788644015789,
-0.0352262482047081,
0.02295347861945629,
0.025226369500160217,
-0.013460571877658367,
-0.010829823091626167,
0.04095609113574028,
0.012678049504756927,
0.004657857120037079,
0.009308036416769028,
-0.014431764371693134,
-0.017458850517868996,
-0.025105001404881477,
-0.002278981963172555,
-0.03111265040934086,
-0.02839048206806183,
-0.01282376516610384,
-0.015134579502046108,
0.04426847770810127,
-0.06038246676325798,
-0.05744294077157974,
0.012784810736775398,
0.03314938768744469,
0.03843856230378151,
0.02383718639612198,
-0.026529576629400253,
0.0008122694562189281,
-0.06571228057146072,
-0.04381192475557327,
0.03499141335487366,
0.023653773590922356,
-0.005780007224529982,
0.036368466913700104,
0.04541061073541641,
-0.04064679518342018,
0.03004162199795246,
0.025451067835092545,
0.035338032990694046,
0.03792700171470642,
-0.026050591841340065,
0.008709652349352837,
-0.05701056495308876,
0.0224875770509243,
0.007386703044176102,
-0.03184511885046959,
-0.0412275604903698,
-0.07698864489793777,
-0.038061726838350296,
0.013339142315089703,
-0.019774669781327248,
-0.004967115353792906,
0.04867178574204445,
-0.014271626248955727,
-0.04852183908224106,
-0.005921318661421537,
0.005559816956520081,
0.06180720776319504,
-0.02200530841946602,
0.02723754569888115,
0.017861362546682358,
0.07108835875988007,
-0.04938136413693428,
-0.011022853665053844,
-0.028790336102247238,
-0.031143246218562126,
0.013243614695966244,
0.04999499022960663,
0.02084103599190712,
0.05382863059639931,
0.06968560069799423,
0.005651436280459166,
-0.03130726516246796,
0.049936071038246155,
0.05671580880880356,
0.006792047992348671,
-0.027296820655465126,
-0.0013010608963668346,
-0.009069274179637432,
-0.03419842571020126,
0.0143654253333807,
-0.01347325649112463,
0.025594009086489677,
0.022365858778357506,
-0.004987276624888182,
-0.0002020790707319975,
0.0009256815537810326,
-0.015323502011597157,
-0.04468317702412605,
-0.04367007315158844,
0.002642009174451232,
-0.03913974016904831,
-0.0634232610464096,
0.01639355905354023,
0.03243806213140488,
0.04252266511321068,
0.05727076530456543,
0.051450952887535095,
-0.051262401044368744,
-0.037736501544713974,
0.04177763685584068,
0.0481833778321743,
-0.036032769829034805,
-0.02853475697338581,
-0.05574525520205498,
0.0378197617828846,
0.04417581111192703,
-0.020827921107411385,
-0.09768883138895035,
0.007888630032539368,
0.022517170757055283,
-0.019264506176114082,
0.06804811954498291,
0.010592302307486534,
0.020671421661973,
0.05448701232671738,
0.0065012527629733086,
0.02602004073560238,
-0.026904461905360222,
0.0080159492790699,
-0.0058222571387887,
0.03352832794189453,
-0.02361840382218361,
-0.03346182405948639,
-0.044995080679655075,
0.021794551983475685,
0.01157000008970499,
0.0404864139854908,
0.032567091286182404,
-0.013927767984569073,
-0.06862835586071014,
-0.009560005739331245,
0.02756642922759056,
-0.016947781667113304,
0.024113180115818977,
0.021058164536952972,
0.040336184203624725,
-0.030880533158779144,
-0.025638800114393234,
-0.02351020649075508,
-0.013996992260217667,
0.04165060818195343,
0.006355766206979752,
-0.02067720890045166,
-0.06804395467042923,
0.01780955120921135,
-0.021275337785482407,
-0.02642037719488144,
-0.0912356972694397,
0.05380125343799591,
0.003924192860722542,
-0.010101511143147945,
0.056752122938632965,
0.023316895589232445,
0.016124974936246872,
0.04101632907986641,
-0.023037435486912727,
0.02617071382701397,
-0.03238498046994209,
0.01782238483428955,
-0.013900629244744778,
-0.019407041370868683,
-0.022585580125451088,
-0.07064303755760193,
-0.021521834656596184,
-0.03269902616739273,
-0.03382692113518715,
-0.040742646902799606,
-0.020905876532197,
-0.00196208362467587,
-0.025901231914758682,
-0.009073191322386265,
-0.01140583585947752,
0.015184903517365456,
-0.028054900467395782,
-0.029643254354596138,
-0.02830004133284092,
-0.04508981853723526,
-0.10029447078704834,
-0.026307731866836548,
0.015543869696557522,
0.04201178252696991,
0.038544006645679474,
-0.000990291009657085,
0.005601000040769577,
0.040349721908569336,
-0.0029057071078568697,
-0.009080006740987301,
0.005983014591038227,
0.01193204615265131,
-0.036598239094018936,
-0.03403109684586525,
0.005507290363311768,
0.011215121485292912,
0.005575733259320259,
-0.022960960865020752,
0.004674932919442654,
0.044947970658540726,
-0.02558101899921894,
0.004989401903003454,
0.04249498248100281,
0.006322982255369425,
-0.07827967405319214,
-0.029166344553232193,
-0.002712025074288249,
-0.046108733862638474,
0.03184866905212402,
-0.00003946170909330249,
-0.032193344086408615,
-0.008531668223440647,
-0.0005617160350084305,
0.032290078699588776,
-0.006422854494303465,
-0.02205992490053177,
0.00036379482480697334,
-0.028690526261925697,
0.035311512649059296,
-0.05345935374498367,
0.055394504219293594,
-0.0342140719294548,
-0.002200294518843293,
-0.013833706267178059,
-0.005220331251621246,
-0.043822478502988815,
0.06490536034107208,
-0.009446073323488235,
-0.0017109145410358906,
-0.0045288424007594585,
0.017248665913939476,
-0.021629633381962776,
0.02409122698009014,
-0.0062367673963308334,
0.007372668012976646,
-0.03290516883134842,
0.023561131209135056,
-0.0411359965801239,
0.010428564622998238,
-0.02272418886423111,
-0.01853873021900654,
-0.017481433227658272,
-0.018976055085659027,
-0.007583305239677429,
-0.047435205429792404,
0.04606315493583679,
0.030271286144852638,
0.03071829490363598,
0.018768832087516785,
-0.013749442994594574,
-0.01886429823935032,
0.0306863896548748,
-0.09434168040752411,
-0.036484938114881516,
-0.015699263662099838,
0.023307042196393013,
-0.016117120161652565,
0.0680050253868103,
0.04453984275460243,
-0.046097006648778915,
-0.003211323171854019,
0.014504731632769108,
0.019228043034672737,
-0.00554365199059248,
0.027495644986629486,
0.014934981241822243,
0.05374998599290848,
0.042802631855010986,
-0.05076395347714424,
-0.011827889829874039,
-0.005533997900784016,
-0.004497187677770853,
-0.016059409826993942,
-0.016884347423911095,
0.017772240564227104,
-0.004368509165942669,
-0.04658808931708336,
-0.023674556985497475,
0.06286054104566574,
0.05319036543369293,
0.028264349326491356,
-0.00282523175701499,
-0.035084061324596405,
0.022744400426745415,
0.011504747904837132,
-0.04339966922998428,
-0.037457991391420364,
0.015063309110701084,
-0.0568123385310173,
0.07375825196504593,
-0.006422056350857019,
0.012081494554877281,
0.01567305065691471,
0.025409819558262825,
0.015591304749250412,
0.040943533182144165,
-0.03908311203122139,
-0.025974849238991737,
0.032670192420482635,
-0.0407181978225708,
-0.007735883351415396,
-0.014418045990169048,
0.05582557991147041,
-0.050460491329431534,
0.04988865554332733,
0.03137878701090813,
0.01991899684071541,
-0.01371777057647705,
-0.01804453134536743,
-0.03608805686235428,
0.047883424907922745,
-0.05114607885479927,
0.06439273059368134,
-0.016795463860034943,
-0.08777505904436111,
0.076553575694561,
0.032252904027700424,
-0.10637220740318298,
0.0003303158446215093,
0.03402959927916527,
0.025221621617674828,
0.0323299765586853,
0.04836922511458397,
-0.07913488894701004,
0.002011544071137905,
-0.054119743406772614,
0.01197268720716238,
-0.0607798770070076,
-0.015613676980137825,
0.028117673471570015,
-0.057007431983947754,
-0.0039483425207436085,
0.02639082260429859,
-0.020599577575922012,
0.0014834041940048337,
0.010767588391900063,
-0.04210303723812103,
-0.03770476579666138,
-0.025133222341537476,
0.005141864065080881,
-0.027339844033122063,
0.020360784605145454,
-0.01817677542567253,
0.03255340829491615,
0.014682208187878132,
0.007804597727954388,
-0.03507344424724579,
0.012874512001872063,
0.032203689217567444,
-0.03650432452559471,
-0.028161924332380295,
0.023301592096686363,
0.019289495423436165,
-0.006851051934063435,
0.02968582697212696,
-0.022979015484452248,
0.014957866631448269,
0.03045148029923439,
-0.020879199728369713,
0.013405822217464447,
-0.0425029918551445,
-0.009490321390330791,
0.00863407552242279,
0.005234918557107449,
0.0324995182454586,
-0.008187275379896164,
0.03502996638417244,
0.03264953941106796,
0.03879748657345772,
-0.013338134624063969,
-0.02066471055150032,
-0.01265387050807476,
0.029693255200982094,
-0.048157788813114166,
0.026230311021208763,
0.02283470332622528,
-0.04422101378440857,
-0.043396033346652985,
-0.04587812349200249,
-0.034517426043748856,
0.05814748629927635,
-0.03979802504181862,
0.01813095435500145,
0.06422971934080124,
-0.007454324513673782,
-0.04597325250506401,
-0.0728367418050766,
-0.014840262942016125,
-0.03008934296667576,
0.011688796803355217,
0.032717835158109665,
-0.01867726817727089,
-0.00918255653232336,
-0.050624873489141464,
-0.06529886275529861,
0.03226405009627342,
0.02203361690044403,
-0.01859446056187153,
0.03488330543041229,
0.03357059136033058,
-0.0185271967202425,
0.013811426237225533,
0.013481535948812962,
-0.04636503383517265,
0.024771343916654587,
0.002779837464913726,
0.015771081671118736,
0.035547997802495956,
0.03809608146548271,
-0.017115069553256035,
-0.04215078800916672,
-0.07513432949781418,
-0.029111502692103386,
-0.033611126244068146,
-0.010396042838692665,
0.0676879733800888
] |
CLTL/icf-levels-att | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 32 | 2021-02-13T22:43:57Z | ---
tags:
- summarization
widget:
- text: "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
---
# CodeTrans model for code documentation generation javascript
Pretrained model on programming language javascript using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_javascript_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_javascript_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/javascript/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 120,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.008307039737701416,
-0.02354823797941208,
-0.007061618380248547,
0.016305997967720032,
0.03740685433149338,
0.032629478722810745,
-0.038389988243579865,
-0.011199879460036755,
-0.018008656799793243,
0.06627336889505386,
0.033217210322618484,
-0.012604794465005398,
-0.011379020288586617,
0.04123978689312935,
-0.03743048757314682,
-0.05187324807047844,
-0.0265171118080616,
-0.023283738642930984,
-0.0399760901927948,
-0.031996723264455795,
0.026624266058206558,
-0.006976640783250332,
0.007588572800159454,
0.008549172431230545,
-0.001282576471567154,
0.017585154622793198,
0.0026536595541983843,
0.024541955441236496,
0.04115665331482887,
-0.05909138545393944,
-0.04045485332608223,
-0.007308479398488998,
-0.04671647772192955,
-0.007727637887001038,
-0.017352677881717682,
0.02590027265250683,
0.009566622786223888,
0.0360293835401535,
0.029238998889923096,
0.0646129697561264,
0.007121169939637184,
0.021255619823932648,
0.024608870968222618,
-0.03747120127081871,
0.04925975948572159,
0.005222296807914972,
-0.028793420642614365,
-0.02514941431581974,
0.013884784653782845,
-0.0028594767209142447,
-0.06287295371294022,
-0.07143397629261017,
-0.02996320091187954,
0.048346854746341705,
-0.003172296565026045,
-0.018300000578165054,
-0.06450637429952621,
-0.01736547239124775,
0.06474615633487701,
-0.044204700738191605,
-0.02827243134379387,
0.01611104980111122,
-0.04583040252327919,
0.010276108048856258,
0.021963614970445633,
-0.004281478002667427,
0.015437093563377857,
-0.05384361371397972,
0.03241794556379318,
0.002418949268758297,
0.05199628323316574,
-0.030949430540204048,
0.02087279036641121,
-0.10195065289735794,
0.013442369177937508,
-0.007868674583733082,
0.022211650386452675,
0.01372203603386879,
-0.009535255841910839,
0.06501961499452591,
-0.01798825152218342,
0.01711646281182766,
0.05145525932312012,
0.016586167737841606,
-0.0031886950600892305,
0.02466043084859848,
-0.0333753302693367,
-0.014761817641556263,
0.0003567620588000864,
0.0562751367688179,
-0.05987155809998512,
-0.05796912685036659,
-0.009605457074940205,
-0.029389891773462296,
-0.03359616920351982,
0.022926704958081245,
0.05494309216737747,
-0.014344225637614727,
0.022304030135273933,
-0.00013934809248894453,
0.04399481043219566,
0.052992746233940125,
-0.005648440215736628,
0.055524274706840515,
0.014310020953416824,
0.016587909311056137,
-0.014164494350552559,
-0.042668960988521576,
-0.01370477769523859,
0.045290157198905945,
0.011672443710267544,
-0.03688846901059151,
-0.044915102422237396,
0.04206114262342453,
0.022382862865924835,
-0.048483796417713165,
0.05548407509922981,
-0.018986541777849197,
-0.06656666845083237,
-0.03351154178380966,
0.03197916969656944,
-0.0057936375960707664,
-0.004415052477270365,
0.027437375858426094,
-0.03569778427481651,
0.004373513162136078,
-0.04596954211592674,
-0.030212635174393654,
0.009125270880758762,
0.028941137716174126,
-0.012381498701870441,
0.0918329581618309,
-0.00046809541527181864,
-0.03984636068344116,
0.005680061411112547,
0.014773242175579071,
-0.05980617552995682,
0.06606265157461166,
0.022333674132823944,
0.10145741701126099,
-0.07948499172925949,
-0.04385000094771385,
0.028341002762317657,
0.012668716721236706,
-0.010558267123997211,
0.01715979538857937,
-0.0029223745223134756,
-0.08417969942092896,
-0.02901664935052395,
0.0058091855607926846,
0.07173590362071991,
-0.05449393764138222,
-0.022124769166111946,
0.03106861375272274,
0.011672435328364372,
0.0223090723156929,
-0.03841887414455414,
0.0020695598796010017,
0.008460122160613537,
-0.025352664291858673,
-0.0679030790925026,
0.030793985351920128,
-0.0002355334727326408,
-0.019668174907565117,
-0.023609744384884834,
-0.03448524698615074,
0.003927965182811022,
0.09969112277030945,
0.022284792736172676,
-0.013813604600727558,
-0.06851233541965485,
0.017565757036209106,
0.0392906554043293,
0.03911200538277626,
-0.014155318960547447,
0.024036282673478127,
0.046236004680395126,
0.05131817236542702,
-0.02510790154337883,
0.07295513153076172,
-0.013638517819344997,
-0.03614882007241249,
-0.031944211572408676,
0.031841941177845,
-0.01118957344442606,
-0.028944790363311768,
0.0005717711173929274,
0.014615299180150032,
-0.021796386688947678,
-0.015759438276290894,
-0.021055936813354492,
0.047482848167419434,
0.017068373039364815,
-0.02857562154531479,
-0.032905079424381256,
0.0024423478171229362,
-0.011062385514378548,
0.055195096880197525,
-0.03923327475786209,
-0.010928543284535408,
-0.024818867444992065,
-0.036386314779520035,
-0.006151553243398666,
0.019019341096282005,
0.04196903854608536,
0.026925327256321907,
-0.0020102784037590027,
0.09647929668426514,
-0.04902223125100136,
0.0015558599261566997,
-0.05895967409014702,
-0.053098857402801514,
0.007723379414528608,
0.04238338768482208,
0.02925635688006878,
0.019641349092125893,
0.00910850428044796,
-0.034969475120306015,
0.010198092088103294,
0.06690911948680878,
0.03845474496483803,
0.03557441383600235,
0.0012150731636211276,
-0.03670448809862137,
0.045576486736536026,
0.06985148042440414,
-0.04600396752357483,
-0.05816921591758728,
0.04264913499355316,
0.03402966633439064,
-0.016339566558599472,
0.038608647882938385,
0.00038095080526545644,
0.007533346302807331,
-0.04519075155258179,
-0.0579950287938118,
0.04968445003032684,
0.015091262757778168,
0.003851215587928891,
0.024481460452079773,
0.016199834644794464,
0.003471985924988985,
0.04086417704820633,
-0.01916840486228466,
-0.005530764814466238,
-0.06962582468986511,
0.01593751646578312,
0.005262185353785753,
0.05330345779657364,
-0.04405185952782631,
0.04685239866375923,
0.01243519876152277,
0.0071763331070542336,
0.06986385583877563,
-0.018233763054013252,
0.040097806602716446,
0.04496793821454048,
0.028546905145049095,
-0.017012272030115128,
0.01893853023648262,
0.023018285632133484,
0.021493514999747276,
0.06669329851865768,
0.007953557185828686,
0.054553598165512085,
0.0032182615250349045,
0.060478657484054565,
0.06838616728782654,
0.017375532537698746,
-0.004081644117832184,
0.02757479064166546,
0.0636620819568634,
0.0012636021710932255,
-0.014498966746032238,
0.060443662106990814,
-0.0578271821141243,
0.037875548005104065,
-0.02739613875746727,
0.024205941706895828,
-0.002202821895480156,
-0.023447521030902863,
0.040252700448036194,
0.004657355602830648,
-0.057892002165317535,
-0.0008588526397943497,
-0.04656815156340599,
-0.018971409648656845,
0.015226492658257484,
-0.00536474771797657,
-0.019553523510694504,
0.006794698536396027,
-0.02691011317074299,
0.0212346650660038,
-0.06478073447942734,
-0.03340777009725571,
0.0007903411169536412,
-0.04897213727235794,
0.013236979022622108,
-0.06579636037349701,
-0.04491043463349342,
-0.07640566676855087,
-0.013589886017143726,
0.05338752642273903,
-0.001552525907754898,
-0.014335893094539642,
-0.02169271744787693,
0.00827028602361679,
-0.04255972430109978,
-0.018635280430316925,
-0.07055433094501495,
-0.06954090297222137,
-0.005716331303119659,
-0.06580186635255814,
0.03669258579611778,
0.0031739019323140383,
0.018550056964159012,
0.011544519104063511,
-0.019732536748051643,
-0.02687271311879158,
-0.018960483372211456,
0.04682326316833496,
0.00895155593752861,
-0.006617494393140078,
-0.027714315801858902,
0.01019982062280178,
-0.017676422372460365,
0.043182194232940674,
-0.014349756762385368,
-0.04687607288360596,
0.11053349822759628,
0.052429914474487305,
0.03204195946455002,
-0.008008289150893688,
-0.040169477462768555,
-0.04562026262283325,
-0.06113019213080406,
-0.029510922729969025,
-0.021202994510531425,
-0.01678013615310192,
-0.008735963143408298,
-0.04156341403722763,
-0.022474845871329308,
-0.03767385333776474,
-0.05037452280521393,
-0.017717989161610603,
0.01701236329972744,
0.013660085387527943,
0.04355460777878761,
0.051814693957567215,
0.01856846548616886,
-0.05195033550262451,
-0.02390250191092491,
0.04737073928117752,
0.0003364267759025097,
-0.005389007739722729,
-0.06470432877540588,
-0.028606852516531944,
0.04394962638616562,
0.021610457450151443,
-0.016411127522587776,
-0.01066446490585804,
0.055013321340084076,
0.021187180653214455,
0.015194602310657501,
0.0016514715971425176,
-0.015211928635835648,
-0.012830114923417568,
-0.02217879518866539,
0.0006021660519763827,
-0.0499127097427845,
-0.04296913370490074,
-0.02850661799311638,
-0.02659408189356327,
0.041333552449941635,
-0.07477297633886337,
-0.055758070200681686,
-0.0012951861135661602,
0.02259681187570095,
0.03190889209508896,
0.034312184900045395,
-0.02018863707780838,
0.0005237231962382793,
-0.06074228137731552,
-0.045538656413555145,
0.03618158772587776,
0.032999154180288315,
-0.005062698386609554,
0.04456562176346779,
0.038007404655218124,
-0.05453149974346161,
0.04293954372406006,
0.03252531588077545,
0.03422446921467781,
0.024448402225971222,
-0.030587201938033104,
0.028029050678014755,
-0.05008532851934433,
0.019763154909014702,
0.0016268283361569047,
-0.029652949422597885,
-0.04564842954277992,
-0.08567774295806885,
-0.03160793334245682,
0.011779003776609898,
-0.02768094651401043,
0.003271825145930052,
0.05310644581913948,
-0.013289185240864754,
-0.02954522892832756,
-0.013986744917929173,
0.014649851247668266,
0.054492268711328506,
-0.03745768219232559,
0.033470891416072845,
0.0019435248104855418,
0.05782393738627434,
-0.025580070912837982,
0.00556927639991045,
-0.03077908791601658,
-0.026162108406424522,
0.013464787043631077,
0.05009246617555618,
0.028686517849564552,
0.0680324137210846,
0.08349796384572983,
-0.0008259169408120215,
-0.040208518505096436,
0.03137806057929993,
0.046871066093444824,
-0.00016355524712707847,
-0.02374194748699665,
0.0016989227151498199,
-0.0078866733238101,
-0.0314553864300251,
0.004735310561954975,
-0.003046493511646986,
0.012426530942320824,
0.025340160354971886,
-0.0262663085013628,
-0.0028195090126246214,
-0.011244472116231918,
-0.02588718570768833,
-0.049074724316596985,
-0.046916160732507706,
-0.005824635736644268,
-0.03658823296427727,
-0.05492476373910904,
0.03718356788158417,
0.04469427838921547,
0.03440599888563156,
0.047094039618968964,
0.04972252622246742,
-0.035328760743141174,
-0.03837618976831436,
0.0392935685813427,
0.036428824067115784,
-0.04260128363966942,
-0.04036500304937363,
-0.040539197623729706,
0.03040129877626896,
0.03928958624601364,
-0.027210036292672157,
-0.08892624080181122,
0.010133050382137299,
0.026085976511240005,
-0.020133405923843384,
0.07043061405420303,
0.0055160135962069035,
0.025933532044291496,
0.05473857372999191,
-0.005328809842467308,
0.03563184663653374,
-0.028623556718230247,
0.022592604160308838,
0.0024594676215201616,
0.03693750128149986,
-0.022619878873229027,
-0.03428829088807106,
-0.038318932056427,
0.026602663099765778,
0.021078215911984444,
0.03949164226651192,
0.0351676307618618,
-0.014886363409459591,
-0.0673883929848671,
-0.026094377040863037,
0.02712959796190262,
-0.02439362183213234,
0.014508082531392574,
0.02505233883857727,
0.034705955535173416,
-0.03755399212241173,
-0.030911201611161232,
-0.01145049650222063,
-0.009774302132427692,
0.030886728316545486,
-0.0012610007543116808,
-0.019469326362013817,
-0.05761397257447243,
0.021225111559033394,
-0.030954279005527496,
-0.016017096117138863,
-0.1021772101521492,
0.043307848274707794,
-0.011452823877334595,
0.0009224308305419981,
0.042858533561229706,
0.033690933138132095,
0.011376886628568172,
0.03456762433052063,
-0.008072955533862114,
0.017649328336119652,
-0.03158104419708252,
0.011935893446207047,
-0.006850977428257465,
-0.03132501617074013,
-0.027229219675064087,
-0.07161404192447662,
-0.017466511577367783,
-0.043856363743543625,
-0.039886292070150375,
-0.05073529854416847,
-0.032252803444862366,
0.007967215031385422,
-0.012413367629051208,
0.0035118749365210533,
-0.008725270628929138,
0.00590845663100481,
-0.032976534217596054,
-0.0222550667822361,
-0.02786370925605297,
-0.05164229869842529,
-0.09737880527973175,
-0.013863733969628811,
0.016995834186673164,
0.026173241436481476,
0.04689255356788635,
0.003936164081096649,
0.003197510028257966,
0.022389985620975494,
0.0032976141665130854,
-0.021248366683721542,
0.0026675693225115538,
0.017143255099654198,
-0.033144887536764145,
-0.014872291125357151,
-0.0042393868789076805,
0.01104762777686119,
0.01466866210103035,
-0.021670546382665634,
-0.0015620741760358214,
0.05475468188524246,
-0.030680732801556587,
0.0023755140136927366,
0.03506767377257347,
0.004811908584088087,
-0.07028330117464066,
-0.041399553418159485,
-0.0023062429390847683,
-0.0534173920750618,
0.03395531699061394,
0.0006588410469703376,
-0.03585074469447136,
-0.004041914828121662,
0.012404017150402069,
0.029005173593759537,
0.00010055918392026797,
-0.026441875845193863,
0.008414732292294502,
-0.03197747468948364,
0.04639987647533417,
-0.05958845838904381,
0.059305716305971146,
-0.03346109390258789,
-0.008337528444826603,
-0.007109179627150297,
-0.004869301803410053,
-0.027764160186052322,
0.05751325562596321,
-0.013693936169147491,
0.008705955930054188,
-0.00036458129761740565,
0.007539206650108099,
-0.032417844980955124,
0.031155362725257874,
-0.020952647551894188,
0.016641568392515182,
-0.021507523953914642,
0.016849566251039505,
-0.04659721255302429,
0.014382869005203247,
-0.029646681621670723,
-0.022649556398391724,
0.00022571890440303832,
-0.029143348336219788,
-0.004467076156288385,
-0.04964970424771309,
0.046035222709178925,
0.022318998351693153,
0.01501402072608471,
0.007298068609088659,
-0.029553309082984924,
-0.021737655624747276,
0.0202910378575325,
-0.08666423708200455,
-0.04849373549222946,
-0.028254877775907516,
0.016988707706332207,
-0.017014997079968452,
0.05326114594936371,
0.03561967983841896,
-0.04717063531279564,
-0.006143840029835701,
0.018416885286569595,
0.02342306263744831,
0.008873126469552517,
0.01685587875545025,
0.011980419978499413,
0.041515663266181946,
0.05355602502822876,
-0.04346325993537903,
-0.0031967908143997192,
-0.008750509470701218,
-0.012893958948552608,
-0.014849070459604263,
-0.01984587498009205,
0.01170421577990055,
-0.017099160701036453,
-0.05844677984714508,
-0.012298926711082458,
0.0619329996407032,
0.04833221063017845,
0.013018499128520489,
-0.0011971916537731886,
-0.03912090137600899,
0.009183100424706936,
0.02241426147520542,
-0.04265647754073143,
-0.026667414233088493,
0.027499215677380562,
-0.05443131923675537,
0.07185816019773483,
-0.011173163540661335,
-0.004167675971984863,
0.019584719091653824,
0.029834991320967674,
0.01724592223763466,
0.04812511056661606,
-0.04175540804862976,
-0.00906342826783657,
0.03210347145795822,
-0.044865015894174576,
-0.00838911347091198,
-0.009896892122924328,
0.06164468824863434,
-0.06021855026483536,
0.030568847432732582,
0.030639545992016792,
0.002353095216676593,
-0.02199169620871544,
-0.018714778125286102,
-0.04943611100316048,
0.03798472136259079,
-0.050643742084503174,
0.07052651047706604,
-0.03253260254859924,
-0.08092021197080612,
0.07689002901315689,
0.04774279147386551,
-0.08522594720125198,
0.0005721462075598538,
0.038872260600328445,
0.007354065775871277,
0.042032673954963684,
0.043994784355163574,
-0.07942667603492737,
0.0038096557836979628,
-0.03914504498243332,
0.01756574586033821,
-0.06858733296394348,
-0.0021724815014749765,
0.039724286645650864,
-0.055128101259469986,
-0.00967391487210989,
0.024001814424991608,
-0.020194774493575096,
-0.004312608391046524,
0.024724693968892097,
-0.03997509181499481,
-0.03870917484164238,
-0.009455553255975246,
0.009645449928939342,
-0.02201467752456665,
0.027487918734550476,
-0.004470915533602238,
0.043355442583560944,
0.012243199162185192,
0.008950955234467983,
-0.04244481027126312,
0.0022630123421549797,
0.028310243040323257,
-0.04147282615303993,
-0.02447921223938465,
0.028812415897846222,
0.005304346792399883,
-0.013767438009381294,
0.027092093601822853,
-0.016148431226611137,
0.015140287578105927,
0.0201139897108078,
-0.03543105721473694,
0.00829334557056427,
-0.04065978527069092,
-0.01052941381931305,
0.017059996724128723,
0.014453197829425335,
0.031047727912664413,
-0.014717690646648407,
0.03187139704823494,
0.04331189766526222,
0.042147427797317505,
-0.02910955809056759,
-0.018582940101623535,
-0.012466007843613625,
0.023719729855656624,
-0.04771982133388519,
0.018737373873591423,
0.018650224432349205,
-0.040798600763082504,
-0.05251124128699303,
-0.04759194329380989,
-0.023807168006896973,
0.048248086124658585,
-0.03552507609128952,
0.01516858208924532,
0.057301055639982224,
-0.002664172323420644,
-0.05715266242623329,
-0.07266800105571747,
-0.015342372469604015,
-0.025358814746141434,
0.014896496199071407,
0.02463003620505333,
-0.030266571789979935,
-0.01394252572208643,
-0.042083512991666794,
-0.07187101244926453,
0.05334877222776413,
0.026127206161618233,
-0.0317530557513237,
0.042850133031606674,
0.029545515775680542,
-0.0100411931052804,
0.00971439853310585,
0.004187930375337601,
-0.05151136964559555,
0.0200575590133667,
-0.0045006368309259415,
0.021293828263878822,
0.03804716095328331,
0.05823839455842972,
-0.001701684552244842,
-0.034176986664533615,
-0.05942748486995697,
-0.033047355711460114,
-0.03335791453719139,
-0.005408940836787224,
0.08498986810445786
] |
CLTL/icf-levels-ber | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 33 | null | ---
tags:
- summarization
widget:
- text: "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
---
# CodeTrans model for code documentation generation javascript
Pretrained model on programming language javascript using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the javascript function/method.
## Intended uses & limitations
The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_javascript_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_javascript_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/javascript/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 2,500 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing javascript code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.00529145821928978,
-0.021283060312271118,
-0.0038937977515161037,
0.013216990046203136,
0.03542149439454079,
0.03267747908830643,
-0.039317868649959564,
-0.010774370282888412,
-0.01732819899916649,
0.06633973121643066,
0.0326368510723114,
-0.01564117893576622,
-0.010143601335585117,
0.04064952954649925,
-0.03583536297082901,
-0.05441161245107651,
-0.026955097913742065,
-0.026272239163517952,
-0.03897221386432648,
-0.030749114230275154,
0.028117327019572258,
-0.007285577245056629,
0.007191756274551153,
0.0071210856549441814,
-0.003882184624671936,
0.017053214833140373,
0.0026776944287121296,
0.02274836227297783,
0.04280833527445793,
-0.05721480771899223,
-0.03955341503024101,
-0.003155514830723405,
-0.045370928943157196,
-0.011607261374592781,
-0.016863955184817314,
0.026936788111925125,
0.008758819662034512,
0.03581105172634125,
0.029676243662834167,
0.06422922015190125,
0.007170369382947683,
0.022628135979175568,
0.02681620419025421,
-0.037147101014852524,
0.0483352430164814,
0.0019754678942263126,
-0.028448453173041344,
-0.0276022981852293,
0.01086004450917244,
-0.004809385631233454,
-0.06155703589320183,
-0.07298202812671661,
-0.031206810846924782,
0.046714067459106445,
0.0008263849304057658,
-0.016643928363919258,
-0.06603549420833588,
-0.021817540749907494,
0.06297692656517029,
-0.04519015923142433,
-0.029287919402122498,
0.015011950396001339,
-0.047955892980098724,
0.009151590056717396,
0.01999068073928356,
-0.0014317483874037862,
0.014746407978236675,
-0.05828005447983742,
0.03331120312213898,
0.0025291424244642258,
0.053910743445158005,
-0.03197174146771431,
0.020052140578627586,
-0.10127287358045578,
0.014229296706616879,
-0.007520639803260565,
0.02028070203959942,
0.013985545374453068,
-0.008758392184972763,
0.06496426463127136,
-0.020653244107961655,
0.016332680359482765,
0.05082506686449051,
0.020575761795043945,
-0.003969976212829351,
0.023160159587860107,
-0.03165299445390701,
-0.014483338221907616,
-0.0010800356976687908,
0.05303400009870529,
-0.05800392106175423,
-0.060078542679548264,
-0.00850095134228468,
-0.02994653768837452,
-0.033642951399087906,
0.02328438125550747,
0.05280135199427605,
-0.015194447711110115,
0.019396090880036354,
-0.001731834257952869,
0.039672307670116425,
0.05454874783754349,
-0.006015497725456953,
0.05827561393380165,
0.01723809726536274,
0.018429996445775032,
-0.015480957925319672,
-0.04441888630390167,
-0.014825074002146721,
0.04443506523966789,
0.010197070427238941,
-0.03795609995722771,
-0.04405282437801361,
0.03814864158630371,
0.01889290101826191,
-0.05504542216658592,
0.05475648492574692,
-0.018840668722987175,
-0.06480627506971359,
-0.03557993844151497,
0.0296415276825428,
-0.009301353245973587,
-0.003712360979989171,
0.02803650312125683,
-0.03498740494251251,
0.004180784337222576,
-0.046051591634750366,
-0.03203827515244484,
0.01040258351713419,
0.027851516380906105,
-0.014204608276486397,
0.09555111080408096,
-0.0003399036650080234,
-0.04207855835556984,
0.005660071503371,
0.015642015263438225,
-0.06276015192270279,
0.0644703209400177,
0.021571286022663116,
0.1008625328540802,
-0.07613389194011688,
-0.04668045789003372,
0.028914734721183777,
0.013407782651484013,
-0.00905531831085682,
0.018678398802876472,
-0.004304651636630297,
-0.08693797141313553,
-0.02883118949830532,
0.009109587408602238,
0.07291460782289505,
-0.0532459020614624,
-0.023844657465815544,
0.03109985776245594,
0.015234347432851791,
0.02213357947766781,
-0.037851035594940186,
0.0012103684712201357,
0.00857388973236084,
-0.02362181805074215,
-0.06911326944828033,
0.030406340956687927,
-0.0009421053691767156,
-0.021217280998826027,
-0.021918604150414467,
-0.03824914991855621,
0.0026793659199029207,
0.10068470239639282,
0.022955074906349182,
-0.01457946840673685,
-0.07170252501964569,
0.019605938345193863,
0.04127371683716774,
0.03710243105888367,
-0.013390843756496906,
0.022607702761888504,
0.04550018161535263,
0.052381161600351334,
-0.028403254225850105,
0.07233399152755737,
-0.015979643911123276,
-0.03631117194890976,
-0.02911127544939518,
0.032587554305791855,
-0.007724379654973745,
-0.027919692918658257,
0.0013075616443529725,
0.013019673526287079,
-0.020052006468176842,
-0.015126506797969341,
-0.02075538970530033,
0.049026887863874435,
0.015294559299945831,
-0.031166093423962593,
-0.0332690067589283,
0.0032239940483123064,
-0.012483258731663227,
0.05518292263150215,
-0.03861964866518974,
-0.009506786242127419,
-0.02332909218966961,
-0.0368255153298378,
-0.0036660030018538237,
0.020886827260255814,
0.0419379398226738,
0.027493445202708244,
-0.0028228566516190767,
0.09849473088979721,
-0.049888577312231064,
-0.0014719244791194797,
-0.05955309420824051,
-0.05030687153339386,
0.008228079415857792,
0.04365475848317146,
0.028628263622522354,
0.01923375576734543,
0.00782962515950203,
-0.033710163086652756,
0.011597913689911366,
0.06755922734737396,
0.03998744860291481,
0.03468015044927597,
0.0018540035234764218,
-0.03928124159574509,
0.04921303316950798,
0.0683286041021347,
-0.04589606449007988,
-0.05807730555534363,
0.04524725675582886,
0.03079076297581196,
-0.018011512234807014,
0.035299576818943024,
0.001815087627619505,
0.007535838522017002,
-0.043928470462560654,
-0.061007097363471985,
0.04998281970620155,
0.014098337851464748,
0.005484289955347776,
0.02523585595190525,
0.014313699677586555,
0.003267701016739011,
0.0426793172955513,
-0.017330246046185493,
-0.004660765174776316,
-0.06995789706707001,
0.018240738660097122,
0.0035868671257048845,
0.05150892212986946,
-0.04237152636051178,
0.0467388890683651,
0.010851594619452953,
0.005723811686038971,
0.06982840597629547,
-0.017557406798005104,
0.039481401443481445,
0.044620659202337265,
0.029401326552033424,
-0.019451433792710304,
0.019163481891155243,
0.0240230243653059,
0.020786376670002937,
0.07012707740068436,
0.007200309075415134,
0.054287221282720566,
0.001548198633827269,
0.0630890354514122,
0.06637413799762726,
0.015693573281168938,
-0.0034237660001963377,
0.02689656987786293,
0.059240106493234634,
-0.0009714823681861162,
-0.01614614948630333,
0.061111364513635635,
-0.05905822291970253,
0.03547845035791397,
-0.03165990486741066,
0.023842735216021538,
-0.0001235331583302468,
-0.022534560412168503,
0.03941391408443451,
0.007310755550861359,
-0.06083352118730545,
-0.0010663560824468732,
-0.04301327094435692,
-0.019855471327900887,
0.013058376498520374,
-0.005865976680070162,
-0.017467135563492775,
0.006142336409538984,
-0.02479432336986065,
0.023731324821710587,
-0.06628991663455963,
-0.0333419144153595,
-0.000527798430994153,
-0.049304381012916565,
0.014993063174188137,
-0.06697813421487808,
-0.04493105039000511,
-0.07575946301221848,
-0.014247626066207886,
0.0537959560751915,
0.0026244018226861954,
-0.013505594804883003,
-0.02366233430802822,
0.009755237959325314,
-0.03941448777914047,
-0.018963731825351715,
-0.07084082812070847,
-0.06922097504138947,
-0.005941964685916901,
-0.06782028079032898,
0.036335304379463196,
0.0028848566580563784,
0.020799988880753517,
0.01265605166554451,
-0.01972336508333683,
-0.025520455092191696,
-0.0178995318710804,
0.04731685668230057,
0.01009972020983696,
-0.005467182956635952,
-0.027717437595129013,
0.013097168877720833,
-0.018453402444720268,
0.04397962614893913,
-0.014233174733817577,
-0.04736194387078285,
0.11174911260604858,
0.05189300328493118,
0.032354582101106644,
-0.006741020362824202,
-0.03948580101132393,
-0.044479817152023315,
-0.06156972423195839,
-0.030866090208292007,
-0.020228417590260506,
-0.020002664998173714,
-0.006470425520092249,
-0.04255412891507149,
-0.02149459719657898,
-0.034147556871175766,
-0.04908851906657219,
-0.02080032229423523,
0.018384940922260284,
0.012605743482708931,
0.043387915939092636,
0.05046357586979866,
0.018004193902015686,
-0.05147629603743553,
-0.024812327697873116,
0.04791005700826645,
0.0007496061734855175,
-0.0035700995940715075,
-0.06353285163640976,
-0.029117221012711525,
0.040440309792757034,
0.020841233432292938,
-0.01775945909321308,
-0.010263565927743912,
0.051369793713092804,
0.019713187590241432,
0.016383392736315727,
-0.0007470881682820618,
-0.01622674986720085,
-0.01532257441431284,
-0.021600138396024704,
0.0006875519757159054,
-0.04882073774933815,
-0.04148126766085625,
-0.028112543746829033,
-0.023663710802793503,
0.04101385921239853,
-0.07262914627790451,
-0.05419516563415527,
0.003285033628344536,
0.024269115179777145,
0.03514372184872627,
0.033333923667669296,
-0.02034120261669159,
-0.0008491812041029334,
-0.0629241019487381,
-0.044729284942150116,
0.036592110991477966,
0.03380899131298065,
-0.0068811336532235146,
0.04342079535126686,
0.041074998676776886,
-0.054670218378305435,
0.04464861750602722,
0.0317239835858345,
0.032291851937770844,
0.02164839766919613,
-0.02949666790664196,
0.025393053889274597,
-0.05173925310373306,
0.02136925235390663,
0.00270697008818388,
-0.028231697157025337,
-0.04479273408651352,
-0.08439404517412186,
-0.03287636861205101,
0.01386968046426773,
-0.02559659071266651,
0.003444334492087364,
0.05227719992399216,
-0.011461206711828709,
-0.03443141654133797,
-0.014669855125248432,
0.012175683863461018,
0.05386922135949135,
-0.036251723766326904,
0.03222168982028961,
0.001648037345148623,
0.05871245265007019,
-0.026730675250291824,
0.002076233271509409,
-0.03241054713726044,
-0.026706373319029808,
0.013525739312171936,
0.05055001750588417,
0.02525612898170948,
0.06654467433691025,
0.08075251430273056,
-0.0023561855778098106,
-0.03915257751941681,
0.03322324529290199,
0.0469893217086792,
-0.0000029809398256475106,
-0.022605393081903458,
0.000017415377442375757,
-0.005199308507144451,
-0.028981033712625504,
0.004997389391064644,
-0.003768491791561246,
0.016030006110668182,
0.022676797583699226,
-0.029232149943709373,
-0.003729915479198098,
-0.011193954385817051,
-0.028158608824014664,
-0.04935887083411217,
-0.04566136747598648,
-0.0028666795697063208,
-0.036913689225912094,
-0.05714705213904381,
0.03792409226298332,
0.0448642298579216,
0.033679693937301636,
0.04805362597107887,
0.05203739553689957,
-0.03782607614994049,
-0.036987096071243286,
0.03991910070180893,
0.036791447550058365,
-0.04263940081000328,
-0.040198519825935364,
-0.040401823818683624,
0.03157835453748703,
0.03964361175894737,
-0.024849480018019676,
-0.08860081434249878,
0.009280136786401272,
0.023322302848100662,
-0.019798431545495987,
0.06873766332864761,
0.003934353590011597,
0.02436264604330063,
0.05495611950755119,
-0.002426658757030964,
0.03517654165625572,
-0.025411605834960938,
0.022825825959444046,
0.0006138233002275229,
0.038296669721603394,
-0.019808802753686905,
-0.034408919513225555,
-0.03724399954080582,
0.025123892351984978,
0.01829611510038376,
0.039798248559236526,
0.035691484808921814,
-0.01604466326534748,
-0.06566876918077469,
-0.025997214019298553,
0.02422618865966797,
-0.024164587259292603,
0.015380123630166054,
0.026545632630586624,
0.033783141523599625,
-0.03605728968977928,
-0.0332469567656517,
-0.010841859504580498,
-0.010529265739023685,
0.03247854858636856,
-0.002443315228447318,
-0.021045662462711334,
-0.05990057438611984,
0.019664611667394638,
-0.029059594497084618,
-0.017262276262044907,
-0.10356596857309341,
0.04442577064037323,
-0.007251383271068335,
-0.002295858459547162,
0.04301442950963974,
0.03609119728207588,
0.012109269388020039,
0.03759319707751274,
-0.008864290080964565,
0.0162834320217371,
-0.02976154163479805,
0.01490730606019497,
-0.004817368928343058,
-0.03259846568107605,
-0.029473531991243362,
-0.0703437328338623,
-0.020028769969940186,
-0.04314683377742767,
-0.04007003456354141,
-0.05193331465125084,
-0.031233303248882294,
0.006904479116201401,
-0.01231467630714178,
0.002036746358498931,
-0.011166049167513847,
0.007060732692480087,
-0.031003663316369057,
-0.02207762748003006,
-0.027136417105793953,
-0.051418934017419815,
-0.09837274253368378,
-0.011740474961698055,
0.01688181236386299,
0.0246328953653574,
0.0456092543900013,
0.005407185293734074,
0.0042748539708554745,
0.023013276979327202,
0.005276098381727934,
-0.023259984329342842,
0.0014499195385724306,
0.016249436885118484,
-0.03450942412018776,
-0.015859317034482956,
-0.0030856237281113863,
0.011435553431510925,
0.01498393900692463,
-0.020456792786717415,
-0.0006668767891824245,
0.05462528392672539,
-0.030713070183992386,
0.003708222880959511,
0.036509107798337936,
0.0070698997005820274,
-0.06826362758874893,
-0.04059726744890213,
-0.00449641328305006,
-0.0531381256878376,
0.0371415913105011,
0.003227482084184885,
-0.037959419190883636,
-0.00608201464638114,
0.008760025724768639,
0.027666352689266205,
0.0029762438498437405,
-0.02973111718893051,
0.010526776313781738,
-0.03063882887363434,
0.04161696135997772,
-0.0584385022521019,
0.059468016028404236,
-0.03421314060688019,
-0.005349328275769949,
-0.008595621213316917,
-0.003592458087950945,
-0.02844266965985298,
0.05865800380706787,
-0.012633833102881908,
0.010033911094069481,
0.001334044267423451,
0.0048333401791751385,
-0.0320182703435421,
0.03132513165473938,
-0.018877964466810226,
0.017392175272107124,
-0.02128639630973339,
0.018814660608768463,
-0.042442649602890015,
0.014683680608868599,
-0.029376357793807983,
-0.02318875677883625,
-0.00032523131812922657,
-0.02383459359407425,
-0.005552127957344055,
-0.04918234422802925,
0.0448589101433754,
0.0221848227083683,
0.014868714846670628,
0.008186600171029568,
-0.027926860377192497,
-0.02139711193740368,
0.022847691550850868,
-0.08672761917114258,
-0.04743260145187378,
-0.027252471074461937,
0.01636996679008007,
-0.01689424365758896,
0.05641587823629379,
0.03570127114653587,
-0.04593322053551674,
-0.002954967552796006,
0.018883228302001953,
0.02307390235364437,
0.0077608320862054825,
0.01634810119867325,
0.014330293983221054,
0.04253990575671196,
0.05202078819274902,
-0.04701672121882439,
-0.006156317889690399,
-0.00819362886250019,
-0.011063584126532078,
-0.014432291500270367,
-0.017349781468510628,
0.009293116629123688,
-0.01589040458202362,
-0.05601000785827637,
-0.011723988689482212,
0.05976109206676483,
0.04975045099854469,
0.011355777271091938,
-0.004342335741966963,
-0.03873681277036667,
0.009496026672422886,
0.023030545562505722,
-0.043545790016651154,
-0.026827510446310043,
0.02567308396100998,
-0.056076664477586746,
0.06799507141113281,
-0.011263822205364704,
-0.002564102876931429,
0.018331000581383705,
0.031784623861312866,
0.018076447769999504,
0.04737604409456253,
-0.04170273616909981,
-0.009571952745318413,
0.03150160238146782,
-0.04446447640657425,
-0.009007196873426437,
-0.010606014169752598,
0.06143706664443016,
-0.057643044739961624,
0.026902830228209496,
0.033423930406570435,
0.002904469147324562,
-0.02129218354821205,
-0.01888393796980381,
-0.04561325162649155,
0.03688451647758484,
-0.049485016614198685,
0.06998573988676071,
-0.031379397958517075,
-0.08331664651632309,
0.07332988828420639,
0.04716352000832558,
-0.08583919703960419,
-0.0009636568720452487,
0.03943675756454468,
0.007145123090595007,
0.04162915423512459,
0.04401136934757233,
-0.07960517704486847,
0.0037557000759989023,
-0.041639529168605804,
0.016987357288599014,
-0.06934969872236252,
-0.001957220956683159,
0.040891002863645554,
-0.05610446259379387,
-0.00896921195089817,
0.022229744121432304,
-0.01900991052389145,
-0.003559986362233758,
0.02447720244526863,
-0.03740530461072922,
-0.038151782006025314,
-0.008552754297852516,
0.007659387309104204,
-0.022108981385827065,
0.02643016166985035,
-0.0073150163516402245,
0.04235069453716278,
0.010631268844008446,
0.010156631469726562,
-0.042694393545389175,
0.003914752975106239,
0.027979940176010132,
-0.03850540891289711,
-0.023745987564325333,
0.030946295708417892,
0.007632807362824678,
-0.012677127495408058,
0.026251474395394325,
-0.01661081612110138,
0.013806560076773167,
0.02058250643312931,
-0.035184845328330994,
0.007369685918092728,
-0.040415629744529724,
-0.010135446675121784,
0.017263025045394897,
0.011321654543280602,
0.033766258507966995,
-0.01445795688778162,
0.0348312072455883,
0.045160677284002304,
0.04195050150156021,
-0.028936894610524178,
-0.01673366315662861,
-0.008818165399134159,
0.026639429852366447,
-0.04667321965098381,
0.01729809306561947,
0.016400588676333427,
-0.043815456330776215,
-0.0502031147480011,
-0.04738228768110275,
-0.027268370613455772,
0.04902517423033714,
-0.03777245432138443,
0.015352200716733932,
0.059536512941122055,
-0.002770791295915842,
-0.05625925958156586,
-0.07490856200456619,
-0.014881808310747147,
-0.024621507152915,
0.011939515359699726,
0.02326095476746559,
-0.02743917889893055,
-0.011607416905462742,
-0.04383968934416771,
-0.07169665396213531,
0.047464217990636826,
0.023940011858940125,
-0.03298177570104599,
0.04265943169593811,
0.030941812321543694,
-0.010494599118828773,
0.009026686660945415,
0.007230393588542938,
-0.04824720695614815,
0.021080181002616882,
-0.0062980554066598415,
0.022406745702028275,
0.03754711523652077,
0.05569422245025635,
-0.004479676019400358,
-0.03389753773808479,
-0.06138843670487404,
-0.03614334389567375,
-0.036026615649461746,
-0.006570941302925348,
0.08717482537031174
] |
CLTL/icf-levels-enr | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 30 | 2021-02-17T18:58:50Z | ---
tags:
- summarization
widget:
- text: "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
---
# CodeTrans model for code documentation generation javascript
Pretrained model on programming language javascript using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the code documentation generation task for the javascript function/method.
## Intended uses & limitations
The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_javascript_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_javascript_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/javascript/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V3-8 for 4,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing javascript code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.008081725798547268,
-0.01962202973663807,
-0.004632981028407812,
0.013044292107224464,
0.03637176379561424,
0.02931138686835766,
-0.0364702045917511,
-0.009338784962892532,
-0.01656823605298996,
0.06549640744924545,
0.03357086330652237,
-0.016625316813588142,
-0.008922304958105087,
0.04099882021546364,
-0.03493322432041168,
-0.05137355625629425,
-0.03335843235254288,
-0.02697213925421238,
-0.043105144053697586,
-0.03087518736720085,
0.026833320036530495,
-0.012288548052310944,
0.003708150004968047,
0.008994493633508682,
-0.004784965422004461,
0.019490161910653114,
0.003718720516189933,
0.01810433529317379,
0.04534902051091194,
-0.05374618619680405,
-0.03768022730946541,
-0.0027969011571258307,
-0.04790784418582916,
-0.012033851817250252,
-0.018565073609352112,
0.026528844609856606,
0.009405190125107765,
0.03346162289381027,
0.027305113151669502,
0.06640266627073288,
0.007496512960642576,
0.02487281896173954,
0.030789626762270927,
-0.03369729593396187,
0.0470283105969429,
0.0001759145816322416,
-0.026796037331223488,
-0.029086699709296227,
0.011015422642230988,
-0.005030045751482248,
-0.06279578804969788,
-0.07208552956581116,
-0.03468813747167587,
0.04767696559429169,
0.0006419754936359823,
-0.01719152368605137,
-0.06683668494224548,
-0.021818779408931732,
0.06634405255317688,
-0.04511502385139465,
-0.030648494139313698,
0.014183281920850277,
-0.04580802842974663,
0.008246170356869698,
0.0203333031386137,
-0.000667941989377141,
0.013937459327280521,
-0.05356709286570549,
0.03310655057430267,
0.004681428894400597,
0.051987890154123306,
-0.029663654044270515,
0.02210874669253826,
-0.09974978864192963,
0.013120620511472225,
-0.00820448063313961,
0.02121911756694317,
0.013244877569377422,
-0.010267569683492184,
0.06810206174850464,
-0.02076936885714531,
0.01806808076798916,
0.052886512130498886,
0.020657092332839966,
-0.0015804952709004283,
0.02653929591178894,
-0.026767201721668243,
-0.016744505614042282,
-0.0006012028898112476,
0.05136742815375328,
-0.0583958700299263,
-0.06068781763315201,
-0.0072444588877260685,
-0.03255542367696762,
-0.03290814533829689,
0.020281581208109856,
0.05385947227478027,
-0.014311018399894238,
0.02127220295369625,
-0.0022355816327035427,
0.03969050198793411,
0.059319525957107544,
-0.006329345516860485,
0.05525270104408264,
0.017951473593711853,
0.021559305489063263,
-0.013420451432466507,
-0.04305535927414894,
-0.015412936918437481,
0.04238412529230118,
0.008242666721343994,
-0.03708953037858009,
-0.045300956815481186,
0.03713981434702873,
0.017535097897052765,
-0.05773245170712471,
0.057624898850917816,
-0.021074526011943817,
-0.06408822536468506,
-0.034506652504205704,
0.03133564814925194,
-0.008754216134548187,
-0.00628494331613183,
0.02555079199373722,
-0.03866119682788849,
0.003975885454565287,
-0.047530900686979294,
-0.03168034926056862,
0.01048251986503601,
0.02765585482120514,
-0.0072897556237876415,
0.09421344846487045,
-0.0017079624813050032,
-0.03894728422164917,
0.0038157356902956963,
0.015644514933228493,
-0.060381945222616196,
0.0647951290011406,
0.02277839183807373,
0.10070035606622696,
-0.07756213843822479,
-0.046737220138311386,
0.027177076786756516,
0.012052030302584171,
-0.00996564794331789,
0.018578791990876198,
-0.006892104633152485,
-0.0862351655960083,
-0.031020982190966606,
0.00835060141980648,
0.07376965135335922,
-0.05481146648526192,
-0.023971982300281525,
0.030475206673145294,
0.00894206389784813,
0.021906184032559395,
-0.04094643145799637,
0.0002725163649301976,
0.007527308072894812,
-0.024060549214482307,
-0.06853943318128586,
0.03194214031100273,
-0.0036324963439255953,
-0.018275637179613113,
-0.02053999900817871,
-0.03678269684314728,
0.001338204019702971,
0.0997581034898758,
0.01935035176575184,
-0.01605416275560856,
-0.07644573599100113,
0.023081205785274506,
0.039986900985240936,
0.037985365837812424,
-0.011158372275531292,
0.017600486055016518,
0.04559832438826561,
0.05124789848923683,
-0.026086771860718727,
0.0743396207690239,
-0.01607523299753666,
-0.03849878907203674,
-0.032038915902376175,
0.03297778218984604,
-0.00461450032889843,
-0.029430923983454704,
0.0013496133033186197,
0.016018107533454895,
-0.01756250485777855,
-0.014906605705618858,
-0.01582845114171505,
0.048830173909664154,
0.014130069874227047,
-0.03195693716406822,
-0.031873032450675964,
0.005192507058382034,
-0.01406889408826828,
0.06079961359500885,
-0.03584928810596466,
-0.008608208037912846,
-0.025974975898861885,
-0.03492220863699913,
-0.006336616817861795,
0.01926082745194435,
0.04299287125468254,
0.022594505921006203,
-0.0019218206871300936,
0.0982990637421608,
-0.05098159611225128,
-0.004033123608678579,
-0.06372860819101334,
-0.053065743297338486,
0.010127423331141472,
0.0442558154463768,
0.03039608523249626,
0.018414519727230072,
0.00726941367611289,
-0.03693980351090431,
0.01243459153920412,
0.06939605623483658,
0.037931300699710846,
0.03378831595182419,
0.0032207334879785776,
-0.04125354811549187,
0.04974387586116791,
0.06658744812011719,
-0.05317993462085724,
-0.0590696819126606,
0.04359755292534828,
0.03581876680254936,
-0.019140608608722687,
0.03571723774075508,
0.004321516491472721,
0.007714978884905577,
-0.03932064771652222,
-0.06233583763241768,
0.049052197486162186,
0.017020002007484436,
0.006982876919209957,
0.025037473067641258,
0.015462001785635948,
0.0011765091912820935,
0.04093218594789505,
-0.01555625069886446,
-0.006526883225888014,
-0.06900033354759216,
0.018726911395788193,
0.0030910952482372522,
0.048601578921079636,
-0.04061045125126839,
0.04734473302960396,
0.015542974695563316,
0.007092562038451433,
0.0646684467792511,
-0.016123635694384575,
0.03919221833348274,
0.04843175411224365,
0.02922992780804634,
-0.01962130516767502,
0.020937344059348106,
0.025471435859799385,
0.018462102860212326,
0.06928582489490509,
0.006075670011341572,
0.05301022157073021,
0.0016507867258042097,
0.061619263142347336,
0.06818178296089172,
0.016606712713837624,
-0.007123363669961691,
0.027555864304304123,
0.06091129779815674,
-0.005052076652646065,
-0.01791280321776867,
0.06317028403282166,
-0.056600090116262436,
0.035479944199323654,
-0.028831860050559044,
0.02547125332057476,
-0.0022407998330891132,
-0.024696333333849907,
0.03885355964303017,
0.00593363493680954,
-0.06442657113075256,
-0.0021695189643651247,
-0.0441473014652729,
-0.01654602214694023,
0.011611404828727245,
-0.0041875396855175495,
-0.012942529283463955,
0.004453184083104134,
-0.024620382115244865,
0.02777188830077648,
-0.06417213380336761,
-0.03666126728057861,
0.00008131852518999949,
-0.05034463480114937,
0.01494202483445406,
-0.06695699691772461,
-0.04710441827774048,
-0.07550564408302307,
-0.01227129902690649,
0.0515836626291275,
-0.0018783069681376219,
-0.013520327396690845,
-0.01884738728404045,
0.007321520708501339,
-0.03507862985134125,
-0.018370889127254486,
-0.07136929780244827,
-0.06917445361614227,
-0.005927086807787418,
-0.07052883505821228,
0.03581330552697182,
0.002912949537858367,
0.02125348336994648,
0.01209446880966425,
-0.018509699031710625,
-0.025158926844596863,
-0.01775594800710678,
0.04559285193681717,
0.011314689181745052,
-0.009971551597118378,
-0.029325952753424644,
0.012925628572702408,
-0.016437454149127007,
0.044547487050294876,
-0.016369616612792015,
-0.04942711442708969,
0.11001069098711014,
0.050463564693927765,
0.032490238547325134,
-0.0072827693074941635,
-0.036879174411296844,
-0.04192764684557915,
-0.05749864503741264,
-0.03073853626847267,
-0.01910020224750042,
-0.019251203164458275,
-0.009078169241547585,
-0.04053476080298424,
-0.022794846445322037,
-0.03265164792537689,
-0.051694877445697784,
-0.02214241214096546,
0.01563943363726139,
0.010077215731143951,
0.045709073543548584,
0.052002422511577606,
0.019881289452314377,
-0.048691920936107635,
-0.02880588360130787,
0.0504365898668766,
-0.0019042579224333167,
-0.007930214516818523,
-0.06087585911154747,
-0.03423219174146652,
0.03966503217816353,
0.021596500650048256,
-0.018675167113542557,
-0.00862977746874094,
0.05224364995956421,
0.020395904779434204,
0.014874660409986973,
-0.0010030078701674938,
-0.014871562831103802,
-0.02068995125591755,
-0.020568395033478737,
-0.004557292442768812,
-0.05036836117506027,
-0.04402054473757744,
-0.025577545166015625,
-0.02852008491754532,
0.041271865367889404,
-0.07120710611343384,
-0.05302874371409416,
0.002412055153399706,
0.01973101496696472,
0.0384148508310318,
0.03396931663155556,
-0.02361401729285717,
-0.002536317566409707,
-0.06440793722867966,
-0.04440613463521004,
0.03639209643006325,
0.034845441579818726,
-0.005545208230614662,
0.04342351108789444,
0.04189884290099144,
-0.05333707481622696,
0.04137546941637993,
0.032034069299697876,
0.031231220811605453,
0.019020946696400642,
-0.030226590111851692,
0.025826768949627876,
-0.056483663618564606,
0.022644037380814552,
0.0014397568302229047,
-0.029162557795643806,
-0.04150017350912094,
-0.08228402584791183,
-0.035027530044317245,
0.00937279500067234,
-0.023477092385292053,
0.0019057148601859808,
0.051127225160598755,
-0.013782961294054985,
-0.03523968160152435,
-0.017275581136345863,
0.010618194937705994,
0.051861245185136795,
-0.0349351167678833,
0.03149256482720375,
0.003967755939811468,
0.0597718320786953,
-0.02662874199450016,
-0.002926758024841547,
-0.031320054084062576,
-0.028389019891619682,
0.012868501245975494,
0.04874439537525177,
0.02641998790204525,
0.06674733012914658,
0.07610491663217545,
-0.008985933847725391,
-0.0405062772333622,
0.03756024315953255,
0.04641018435359001,
0.0001718884304864332,
-0.023517277091741562,
0.00016831506218295544,
-0.006611516233533621,
-0.02774777263402939,
0.005767233669757843,
-0.0014643826289102435,
0.015081336721777916,
0.024878885596990585,
-0.027340117841959,
-0.003943430259823799,
-0.011541353538632393,
-0.019934069365262985,
-0.048017192631959915,
-0.04794242978096008,
-0.0010494040325284004,
-0.0366852842271328,
-0.05634302645921707,
0.034417152404785156,
0.04101374372839928,
0.03511865437030792,
0.05050637945532799,
0.05054815486073494,
-0.03987554833292961,
-0.03896666690707207,
0.04333896562457085,
0.03378012776374817,
-0.04228312894701958,
-0.040763042867183685,
-0.04242011532187462,
0.02933950535953045,
0.04015343636274338,
-0.018987005576491356,
-0.09217538684606552,
0.007455911487340927,
0.023277701810002327,
-0.019610704854130745,
0.06923094391822815,
0.003368364879861474,
0.027348985895514488,
0.05605652928352356,
-0.0007525320979766548,
0.03412139043211937,
-0.02453611232340336,
0.019701985642313957,
-0.0013755147811025381,
0.035009633749723434,
-0.020961971953511238,
-0.03446659818291664,
-0.03833070769906044,
0.027149248868227005,
0.017410144209861755,
0.037537023425102234,
0.034546859562397,
-0.018199782818555832,
-0.06556161493062973,
-0.027778398245573044,
0.02244793251156807,
-0.019715411588549614,
0.015808477997779846,
0.03024405799806118,
0.03105504997074604,
-0.034438300877809525,
-0.03250483050942421,
-0.009518495760858059,
-0.009413579478859901,
0.036497630178928375,
-0.00004427854219102301,
-0.02152896299958229,
-0.05860290676355362,
0.021322740241885185,
-0.029003527015447617,
-0.016136569902300835,
-0.1011161059141159,
0.0435098372399807,
-0.009605242870748043,
-0.006321906112134457,
0.043369926512241364,
0.03497615084052086,
0.012742329388856888,
0.03584226593375206,
-0.012001206167042255,
0.01744229346513748,
-0.02734115719795227,
0.015039562247693539,
-0.0022855838760733604,
-0.03389779105782509,
-0.031983211636543274,
-0.07071039080619812,
-0.021906107664108276,
-0.03820357844233513,
-0.040923070162534714,
-0.05391222611069679,
-0.029674706980586052,
0.006587267387658358,
-0.012817831709980965,
0.0004612348275259137,
-0.009734350256621838,
0.009001955389976501,
-0.03317074850201607,
-0.02390405721962452,
-0.02527635730803013,
-0.049439333379268646,
-0.09862697869539261,
-0.012613420374691486,
0.018088461831212044,
0.024120431393384933,
0.05020934343338013,
0.0027495715767145157,
0.0024593325797468424,
0.025471897795796394,
0.005039359908550978,
-0.026737624779343605,
-0.0037769386544823647,
0.01755497045814991,
-0.03527144342660904,
-0.018680965527892113,
-0.0020007090643048286,
0.011200910434126854,
0.011896983720362186,
-0.023997627198696136,
-0.0032344404608011246,
0.0565207339823246,
-0.03135358542203903,
0.001234022667631507,
0.039481278508901596,
0.005714497994631529,
-0.06729026138782501,
-0.040536556392908096,
-0.006019660271704197,
-0.056343019008636475,
0.035543616861104965,
0.00021628395188599825,
-0.03668936342000961,
-0.007948104292154312,
0.016541827470064163,
0.024199217557907104,
-0.0003757442464120686,
-0.03083435632288456,
0.005301889032125473,
-0.02798810973763466,
0.04507020488381386,
-0.0545303151011467,
0.05735934153199196,
-0.03455071151256561,
-0.004492986481636763,
-0.011541105806827545,
-0.00019050696573685855,
-0.02992629073560238,
0.06047851964831352,
-0.013688215054571629,
0.009020639583468437,
0.002897834638133645,
0.01107534859329462,
-0.028297023847699165,
0.030457541346549988,
-0.02247571386396885,
0.017251266166567802,
-0.024530041962862015,
0.02592764049768448,
-0.044445816427469254,
0.015460168942809105,
-0.031065335497260094,
-0.025398725643754005,
-0.002057996578514576,
-0.022742338478565216,
-0.0024772929027676582,
-0.04691706970334053,
0.044930294156074524,
0.02179093472659588,
0.014659043401479721,
0.00976515281945467,
-0.028550054877996445,
-0.019698837772011757,
0.019050471484661102,
-0.08584577590227127,
-0.04899490624666214,
-0.022285539656877518,
0.018383461982011795,
-0.015561617910861969,
0.055355556309223175,
0.034573618322610855,
-0.046971872448921204,
-0.0013534333556890488,
0.018814295530319214,
0.025673672556877136,
0.0014933694619685411,
0.012528748251497746,
0.012293950654566288,
0.043985024094581604,
0.049095503985881805,
-0.04520656540989876,
-0.011064217425882816,
-0.009919797070324421,
-0.009562568739056587,
-0.015889272093772888,
-0.016917455941438675,
0.011615660041570663,
-0.010571622289717197,
-0.05520953610539436,
-0.013925609178841114,
0.060069095343351364,
0.04841923713684082,
0.011364543810486794,
-0.0039733885787427425,
-0.03917146474123001,
0.011115474626421928,
0.0196884386241436,
-0.04057067260146141,
-0.026150964200496674,
0.02361384592950344,
-0.05934163182973862,
0.0678597018122673,
-0.009883411228656769,
-0.003484722226858139,
0.017854806035757065,
0.031916115432977676,
0.01817232370376587,
0.046705782413482666,
-0.04209195449948311,
-0.013656978495419025,
0.027355067431926727,
-0.04380034655332565,
-0.010342717170715332,
-0.009759877808392048,
0.05997469648718834,
-0.05599669739603996,
0.03238307312130928,
0.03453771397471428,
-0.0010273547377437353,
-0.020107870921492577,
-0.018589969724416733,
-0.041798509657382965,
0.036998048424720764,
-0.0549946203827858,
0.06746868044137955,
-0.029884496703743935,
-0.08741109818220139,
0.07236900925636292,
0.04725560545921326,
-0.08321226388216019,
-0.004563230089843273,
0.03852725774049759,
0.004861835390329361,
0.03978940472006798,
0.044323939830064774,
-0.07947859168052673,
0.005792614538222551,
-0.04233444482088089,
0.020786674693226814,
-0.07203879207372665,
-0.007120987866073847,
0.041070424020290375,
-0.05508202686905861,
-0.008290911093354225,
0.025378277525305748,
-0.018226347863674164,
-0.0014843503013253212,
0.028434084728360176,
-0.034635692834854126,
-0.03444727510213852,
-0.010646176524460316,
0.006474348716437817,
-0.018157199025154114,
0.02036350779235363,
-0.0050527965649962425,
0.04396597295999527,
0.00969826802611351,
0.011922833509743214,
-0.041227083653211594,
0.005857167765498161,
0.029236724600195885,
-0.03876093029975891,
-0.023110369220376015,
0.03160077705979347,
0.005145885515958071,
-0.011786410585045815,
0.028247978538274765,
-0.01680515520274639,
0.011147323064506054,
0.021313168108463287,
-0.037945281714200974,
0.0060676210559904575,
-0.03503130003809929,
-0.012801621109247208,
0.014413860626518726,
0.008248589932918549,
0.03342652693390846,
-0.013826563023030758,
0.03754761442542076,
0.0444679781794548,
0.04263816028833389,
-0.028833605349063873,
-0.01714974269270897,
-0.006480084266513586,
0.025901800021529198,
-0.04651326686143875,
0.01898159459233284,
0.01600419357419014,
-0.045116398483514786,
-0.050474002957344055,
-0.049465861171483994,
-0.029021209105849266,
0.04965773597359657,
-0.034590985625982285,
0.018765123561024666,
0.06034426763653755,
0.0001661088172113523,
-0.05466759204864502,
-0.07279463857412338,
-0.017547624185681343,
-0.02518012933433056,
0.007759883999824524,
0.0223595779389143,
-0.027330899611115456,
-0.011135251261293888,
-0.0398426353931427,
-0.07001202553510666,
0.04836101830005646,
0.026618443429470062,
-0.034893568605184555,
0.0427156537771225,
0.028705812990665436,
-0.01135037187486887,
0.0096743730828166,
0.0008732485584914684,
-0.04534073546528816,
0.015321178361773491,
-0.01029912754893303,
0.02457822859287262,
0.03765568882226944,
0.0561208575963974,
-0.00594211695715785,
-0.03665538504719734,
-0.06130317226052284,
-0.030865848064422607,
-0.03461357206106186,
-0.004360911436378956,
0.08778433501720428
] |
CLTL/icf-levels-etn | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 31 | 2021-02-14T21:49:50Z | ---
tags:
- summarization
widget:
- text: "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
---
# CodeTrans model for code documentation generation php
Pretrained model on programming language php using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized php code functions: it works best with tokenized php functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the php function or be fine-tuned on other php code tasks. It can be used on unparsed and untokenized php code. However, if the php code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate php function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/php/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.0022356435656547546,
-0.02776276133954525,
0.008185015060007572,
0.01671278290450573,
0.029535526409745216,
0.03358248993754387,
-0.03594972565770149,
0.004918834660202265,
-0.0038516635540872812,
0.06451434642076492,
0.04674109071493149,
0.004477533511817455,
0.0024061158765107393,
0.04012581333518028,
-0.04335329309105873,
-0.049415040761232376,
-0.029530204832553864,
-0.022852014750242233,
-0.03671756386756897,
0.0038902191445231438,
0.023427054286003113,
-0.011357394978404045,
0.0009057559072971344,
0.008507538586854935,
-0.007461185101419687,
0.01566966250538826,
-0.009604256600141525,
0.04719500243663788,
0.035734206438064575,
-0.0635795146226883,
-0.019625235348939896,
-0.0057454961352050304,
-0.03803420066833496,
-0.024793041869997978,
-0.028277073055505753,
0.02880980633199215,
0.00824861042201519,
0.04586932063102722,
0.03228102996945381,
0.050213102251291275,
0.002472957130521536,
0.019255341961979866,
0.022902686148881912,
-0.053799211978912354,
0.06977386027574539,
0.016558894887566566,
-0.04044206812977791,
-0.027604464441537857,
0.03386421129107475,
0.0011179287685081363,
-0.05367555096745491,
-0.0660230815410614,
-0.025525953620672226,
0.04676917940378189,
-0.0001956008345587179,
-0.009080453775823116,
-0.07077983766794205,
-0.015559886582195759,
0.050942517817020416,
-0.05141257494688034,
-0.015100573189556599,
0.010975505225360394,
-0.05648108199238777,
0.0291478019207716,
0.012651779688894749,
-0.011359176598489285,
0.009269596077501774,
-0.044181495904922485,
0.03374601900577545,
-0.006518934853374958,
0.05537829548120499,
-0.022423502057790756,
0.02302928827702999,
-0.10101673007011414,
0.0015225674724206328,
-0.0008184632752090693,
0.02829585410654545,
0.02268395945429802,
-0.0032723841723054647,
0.052258726209402084,
-0.007517946884036064,
-0.0027209825348109007,
0.040166255086660385,
0.01784372515976429,
-0.005830524954944849,
0.03982653096318245,
-0.0399157740175724,
-0.007465806789696217,
-0.009735414758324623,
0.06358245760202408,
-0.06286945194005966,
-0.06492038816213608,
-0.0026250341907143593,
-0.019278142601251602,
-0.023434776812791824,
0.037055853754282,
0.042261894792318344,
-0.008431155234575272,
0.018447406589984894,
0.004801301751285791,
0.03901654854416847,
0.05232170596718788,
-0.007048080209642649,
0.04710407555103302,
0.027156049385666847,
0.01353535894304514,
-0.023706868290901184,
-0.04052167385816574,
-0.032680694013834,
0.032362841069698334,
0.022775297984480858,
-0.045165713876485825,
-0.04610614851117134,
0.03395397216081619,
0.015497277490794659,
-0.048809587955474854,
0.04445035755634308,
-0.029834935441613197,
-0.05338352918624878,
-0.04175214841961861,
0.040179383009672165,
-0.007263559382408857,
-0.012250738218426704,
-0.00030034431256353855,
-0.04483165219426155,
0.00255733379162848,
-0.06448870152235031,
-0.03210330754518509,
0.0052988710813224316,
0.011991300620138645,
-0.028969721868634224,
0.08514661341905594,
0.021251263096928596,
-0.040257345885038376,
0.006559307686984539,
0.027562536299228668,
-0.06166054680943489,
0.06392209976911545,
0.03557742387056351,
0.10552779585123062,
-0.06726290285587311,
-0.04374424368143082,
0.01544168684631586,
0.006491382140666246,
-0.02289861999452114,
0.02817545272409916,
-0.004715983755886555,
-0.07555360347032547,
-0.012372723780572414,
-0.012277968227863312,
0.06472167372703552,
-0.044932324439287186,
-0.0174089502543211,
0.02455425076186657,
0.004555221181362867,
0.016723837703466415,
-0.03216902166604996,
-0.00028667968581430614,
0.00020971189951524138,
-0.03062053956091404,
-0.06049943342804909,
0.019895296543836594,
0.001351326471194625,
-0.002901619067415595,
-0.03582169860601425,
-0.0380888432264328,
0.022293465211987495,
0.10395142436027527,
0.02395729161798954,
-0.01794268935918808,
-0.05019594356417656,
0.014301811344921589,
0.03413120657205582,
0.05679820850491524,
-0.029061786830425262,
0.039722077548503876,
0.053171563893556595,
0.056734614074230194,
-0.02909615822136402,
0.05923977121710777,
-0.02108209952712059,
-0.03999785706400871,
-0.02539314515888691,
0.028856530785560608,
-0.026165584102272987,
-0.0471736341714859,
-0.00981696043163538,
0.026387296617031097,
-0.020144326612353325,
-0.014370412565767765,
-0.015264266170561314,
0.05782393366098404,
0.019296245649456978,
-0.021682988852262497,
-0.033144012093544006,
0.011996340937912464,
-0.018477004021406174,
0.06500010937452316,
-0.03306456655263901,
-0.0005748059484176338,
-0.01658719591796398,
-0.03411639481782913,
0.0016217643860727549,
0.02543182484805584,
0.043543338775634766,
0.02744182199239731,
-0.01599813997745514,
0.11479590833187103,
-0.04658062011003494,
0.013412367552518845,
-0.045827269554138184,
-0.041397422552108765,
0.024988148361444473,
0.024425828829407692,
0.028946982696652412,
0.03188245743513107,
0.014048735611140728,
-0.031935468316078186,
0.01658519357442856,
0.07490412890911102,
0.048108555376529694,
0.041301410645246506,
-0.009683054871857166,
-0.022260190919041634,
0.03290005773305893,
0.05744464322924614,
-0.04178522527217865,
-0.040589507669210434,
0.03334128484129906,
0.03379199653863907,
-0.018161408603191376,
0.021268518641591072,
-0.01096156146377325,
0.011576789431273937,
-0.04076027870178223,
-0.05080071836709976,
0.03287997469305992,
0.029738616198301315,
0.012875850312411785,
0.043675824999809265,
0.015307735651731491,
-0.001332117710262537,
0.03264178708195686,
-0.005197134334594011,
0.015235494822263718,
-0.0729028657078743,
-0.002490969141945243,
-0.009203200228512287,
0.055321261286735535,
-0.04455433785915375,
0.03855367749929428,
0.009936721995472908,
0.006310417316854,
0.06269673258066177,
-0.02935175411403179,
0.032186124473810196,
0.04531685262918472,
0.027901101857423782,
-0.01900196261703968,
0.011386423371732235,
0.023197732865810394,
0.021268239244818687,
0.08467648923397064,
0.007346566300839186,
0.06338679790496826,
0.0076400418765842915,
0.045911189168691635,
0.06025055795907974,
0.02905166521668434,
0.012570626102387905,
0.023193707689642906,
0.07393871992826462,
0.004507516976445913,
-0.01658814027905464,
0.06327123194932938,
-0.05762648209929466,
0.041746605187654495,
-0.04563899338245392,
0.023760387673974037,
-0.00754533102735877,
-0.02101851813495159,
0.05267385393381119,
0.007654680870473385,
-0.05107330530881882,
0.018605191260576248,
-0.024061188101768494,
-0.022260937839746475,
0.029359767213463783,
0.006317103281617165,
-0.015497982501983643,
0.013489630073308945,
-0.026198677718639374,
0.03500385209918022,
-0.061911698430776596,
-0.03140154853463173,
-0.006850783247500658,
-0.046665169298648834,
0.018539130687713623,
-0.06578733026981354,
-0.0458783358335495,
-0.05951875075697899,
-0.016233518719673157,
0.03922276198863983,
0.005385227035731077,
0.0008948732283897698,
-0.028347481042146683,
0.017932746559381485,
-0.03713967278599739,
-0.025769291445612907,
-0.050643131136894226,
-0.06477002799510956,
-0.006710404064506292,
-0.06762541085481644,
0.03582977131009102,
-0.02017681859433651,
0.027700046077370644,
0.01015486940741539,
-0.019778458401560783,
-0.02166123501956463,
-0.021402399986982346,
0.05672711133956909,
0.013324822299182415,
-0.017094312235713005,
-0.027680587023496628,
0.007562961895018816,
-0.03229127079248428,
0.03487185388803482,
-0.01898804120719433,
-0.04287653788924217,
0.11253003776073456,
0.057656195014715195,
0.05155554413795471,
-0.009210057556629181,
-0.04500783234834671,
-0.05343375355005264,
-0.04985831305384636,
-0.025198888033628464,
-0.023236574605107307,
-0.02798577770590782,
-0.005858603399246931,
-0.0527850016951561,
-0.025217760354280472,
-0.04405966028571129,
-0.05364753305912018,
-0.007015895564109087,
0.010412972420454025,
0.021215248852968216,
0.031334880739450455,
0.048146191984415054,
0.02332259528338909,
-0.01988186128437519,
-0.03279154747724533,
0.03658883273601532,
0.001625167322345078,
-0.004029537551105022,
-0.073414146900177,
-0.03286796063184738,
0.03187708556652069,
0.01616727188229561,
-0.0023383963853120804,
-0.02256106212735176,
0.05279277265071869,
0.023205291479825974,
0.01052993442863226,
0.007303589954972267,
-0.02316390536725521,
-0.020880011841654778,
-0.012528120540082455,
-0.0005818253848701715,
-0.02710862085223198,
-0.027798203751444817,
-0.005889370106160641,
0.007748437579721212,
0.03812304139137268,
-0.07124392688274384,
-0.04622844234108925,
0.001802623737603426,
0.03010418266057968,
0.03782859072089195,
0.01876651681959629,
-0.03379073739051819,
0.005573471076786518,
-0.05721717327833176,
-0.04765941947698593,
0.03562603145837784,
0.03781461343169212,
-0.002365336287766695,
0.037852559238672256,
0.04125140607357025,
-0.05846993252635002,
0.03709391504526138,
0.036103393882513046,
0.03929239138960838,
0.03579001501202583,
-0.020775428041815758,
0.017086012288928032,
-0.040797144174575806,
0.03031296096742153,
-0.0028532531578093767,
-0.025519542396068573,
-0.05657682195305824,
-0.0702752098441124,
-0.03646043688058853,
0.011519541963934898,
-0.03174128383398056,
-0.007431073114275932,
0.05277223885059357,
-0.0036986980121582747,
-0.04047920182347298,
-0.0166160985827446,
0.013824447058141232,
0.07244335860013962,
-0.026291366666555405,
0.02593686431646347,
0.013359099626541138,
0.04108278453350067,
-0.038050923496484756,
0.0038610370829701424,
-0.01595260575413704,
-0.01704065501689911,
0.008119150996208191,
0.038862813264131546,
0.03142949193716049,
0.07300833612680435,
0.0633423924446106,
0.0037584463134407997,
-0.03386390209197998,
0.043814703822135925,
0.05321495234966278,
0.0037167142145335674,
-0.02075597271323204,
-0.0034682773984968662,
-0.014713533222675323,
-0.03223268315196037,
0.012746396474540234,
-0.021264800801873207,
0.021583160385489464,
0.027030760422348976,
-0.009927523322403431,
0.003672584192827344,
-0.003510082606226206,
-0.006141794379800558,
-0.0560423880815506,
-0.047612931579351425,
-0.002415799768641591,
-0.03638048470020294,
-0.054018426686525345,
0.02397010661661625,
0.047539204359054565,
0.030429551377892494,
0.06287060678005219,
0.03392431512475014,
-0.050477173179388046,
-0.02773505263030529,
0.04450467973947525,
0.04382210224866867,
-0.03987758606672287,
-0.03923283889889717,
-0.06047562509775162,
0.03072197735309601,
0.04064039885997772,
-0.027190476655960083,
-0.08888980001211166,
-0.000587629503570497,
0.029851986095309258,
-0.035639893263578415,
0.0648939236998558,
0.01772277243435383,
0.007894645445048809,
0.043888188898563385,
-0.013668249361217022,
0.03054690547287464,
-0.031194131821393967,
0.008145053870975971,
-0.008759865537285805,
0.040182553231716156,
-0.010586510412395,
-0.027587519958615303,
-0.038517892360687256,
0.023026330396533012,
0.007393145002424717,
0.05635923519730568,
0.02184283547103405,
-0.006707597989588976,
-0.06389991194009781,
-0.00044329860247671604,
0.03420408442616463,
-0.026454951614141464,
0.02518625743687153,
0.03241204470396042,
0.03745075687766075,
-0.0329737588763237,
-0.03737696260213852,
-0.030710412189364433,
-0.03799482434988022,
0.03526151552796364,
-0.0077735562808811665,
-0.02560299262404442,
-0.06760021299123764,
0.016369637101888657,
-0.028741009533405304,
-0.02095639333128929,
-0.1003834679722786,
0.039684414863586426,
0.006726355757564306,
-0.010856634005904198,
0.04582883417606354,
0.03708717226982117,
0.022751599550247192,
0.033427853137254715,
-0.01096215471625328,
0.02303723618388176,
-0.023571569472551346,
0.03255167603492737,
-0.014441358856856823,
-0.016734331846237183,
-0.007930400781333447,
-0.06494905799627304,
-0.03301384672522545,
-0.046095188707113266,
-0.04140249267220497,
-0.03361004590988159,
-0.01955876126885414,
-0.0024701778311282396,
-0.014830440282821655,
-0.00715746870264411,
-0.010683302767574787,
0.012536225840449333,
-0.019714809954166412,
-0.014611135236918926,
-0.022958986461162567,
-0.05142633989453316,
-0.09689360857009888,
-0.031622424721717834,
0.01931873895227909,
0.04494037479162216,
0.040509939193725586,
-0.0066040558740496635,
0.00454767607152462,
0.022915376350283623,
-0.0032541994005441666,
-0.01777750626206398,
0.030888324603438377,
0.007516113109886646,
-0.035149771720170975,
-0.036517731845378876,
-0.006528116296976805,
0.016108153387904167,
0.021037692204117775,
-0.027128033339977264,
0.006968701258301735,
0.050170306116342545,
-0.039335642009973526,
0.0000034916436106868787,
0.03743796795606613,
-0.0020668457727879286,
-0.08847513049840927,
-0.03871569782495499,
0.010662287473678589,
-0.03935243561863899,
0.022668329998850822,
-0.0012830644845962524,
-0.014679796062409878,
-0.016962723806500435,
0.0022537345066666603,
0.036176979541778564,
0.012141929008066654,
-0.03329533711075783,
-0.004754963796585798,
-0.038692180067300797,
0.044883888214826584,
-0.06456253677606583,
0.05112958326935768,
-0.025216905400156975,
-0.009842319414019585,
-0.0042687044478952885,
0.006660408806055784,
-0.038500942289829254,
0.05986149236559868,
-0.004364781081676483,
0.0018747340654954314,
-0.017290418967604637,
0.012756596319377422,
-0.03031935542821884,
0.031720809638500214,
-0.02283320389688015,
0.01443873718380928,
-0.016045182943344116,
0.016098784282803535,
-0.04185285046696663,
-0.0011930589098483324,
-0.028719576075673103,
-0.018748488277196884,
-0.010336088016629219,
-0.011441471055150032,
-0.008595208637416363,
-0.051424700766801834,
0.0424116849899292,
0.016281476244330406,
0.0329098105430603,
0.017756422981619835,
-0.033083509653806686,
-0.015873679891228676,
0.02410152740776539,
-0.07489967346191406,
-0.036997731775045395,
-0.029921405017375946,
0.013433304615318775,
-0.012635947205126286,
0.06513990461826324,
0.033626072108745575,
-0.04487292096018791,
-0.018583646044135094,
0.003454860532656312,
0.024660274386405945,
0.01194653008133173,
0.024027235805988312,
-0.0015291933668777347,
0.04720507189631462,
0.05212397500872612,
-0.030644843354821205,
0.00014848052524030209,
-0.010407057590782642,
-0.011991992592811584,
-0.002454475499689579,
-0.016030801460146904,
0.02395644411444664,
-0.01802951842546463,
-0.042384445667266846,
-0.016010349616408348,
0.0682651624083519,
0.037541743367910385,
0.013132601045072079,
-0.006768535356968641,
-0.03206787258386612,
0.029937168583273888,
0.02139584720134735,
-0.043719999492168427,
-0.028782829642295837,
0.01948203518986702,
-0.04960053414106369,
0.06736009567975998,
-0.008574381470680237,
0.011581706814467907,
0.027562769129872322,
0.02892136014997959,
0.002537428867071867,
0.026499005034565926,
-0.03603586181998253,
-0.01652487739920616,
0.030522052198648453,
-0.04401466250419617,
0.01188595686107874,
0.0016025237273424864,
0.06611432135105133,
-0.05565729737281799,
0.04138045758008957,
0.030429266393184662,
0.027434969320893288,
-0.006177463103085756,
-0.018010517582297325,
-0.042891472578048706,
0.0355699397623539,
-0.04538474604487419,
0.060237105935811996,
-0.02066291868686676,
-0.07365310192108154,
0.0722990408539772,
0.03909379243850708,
-0.08750645816326141,
-0.0027790837921202183,
0.035721421241760254,
0.014489362016320229,
0.03164452686905861,
0.04391605034470558,
-0.07906457781791687,
0.004787882324308157,
-0.04980536550283432,
0.013875148259103298,
-0.08025889843702316,
-0.005056841764599085,
0.038551561534404755,
-0.07202202081680298,
0.008803239092230797,
0.04436403885483742,
-0.029567794874310493,
0.005312382709234953,
0.023782728239893913,
-0.03445269912481308,
-0.0460328571498394,
-0.024533580988645554,
0.009361780248582363,
-0.032434362918138504,
0.030309107154607773,
-0.028367888182401657,
0.04029381647706032,
0.021234180778265,
-0.0046655782498419285,
-0.04899294301867485,
0.012851891107857227,
0.02027602680027485,
-0.03448117524385452,
-0.0316697359085083,
0.010815922170877457,
0.012667459435760975,
-0.006730814930051565,
0.02812017872929573,
-0.01342527661472559,
0.022786321118474007,
0.03126850351691246,
-0.017408061772584915,
0.028447814285755157,
-0.05567933991551399,
-0.00567480968311429,
0.006103456951677799,
0.016587253659963608,
0.03353416919708252,
-0.020137477666139603,
0.03545093536376953,
0.025287769734859467,
0.03567182272672653,
-0.023986678570508957,
-0.013162397779524326,
-0.017979556694626808,
0.02213001251220703,
-0.03869030624628067,
0.026181666180491447,
0.02412363700568676,
-0.044634487479925156,
-0.04072033613920212,
-0.05490434169769287,
-0.03811633959412575,
0.04622580483555794,
-0.03642568737268448,
0.007539302576333284,
0.06120928376913071,
-0.013101302087306976,
-0.05782265216112137,
-0.07351092249155045,
-0.004933423362672329,
-0.024923520162701607,
0.020543960854411125,
0.025995030999183655,
-0.027167964726686478,
-0.012103482149541378,
-0.050706688314676285,
-0.08387225866317749,
0.0382038950920105,
0.0074740927666425705,
-0.01330213900655508,
0.0569719523191452,
0.02726578153669834,
-0.023834381252527237,
0.022790534421801567,
0.030910562723875046,
-0.06161019951105118,
0.03481247276067734,
0.014520701952278614,
0.008077917620539665,
0.03875091299414635,
0.044228553771972656,
-0.008274832740426064,
-0.03742888942360878,
-0.05570666864514351,
-0.036351632326841354,
-0.035813987255096436,
-0.00007586835272377357,
0.09040985256433487
] |
CLTL/icf-levels-fac | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 32 | 2021-02-15T21:16:45Z | ---
tags:
- summarization
widget:
- text: "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
---
# CodeTrans model for code documentation generation php
Pretrained model on programming language php using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized php code functions: it works best with tokenized php functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the php function/method.
## Intended uses & limitations
The model could be used to generate the description for the php function or be fine-tuned on other php code tasks. It can be used on unparsed and untokenized php code. However, if the php code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate php function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/php/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 8000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing php code.
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.004162386059761047,
-0.025060422718524933,
0.010159168392419815,
0.012199829332530499,
0.027621760964393616,
0.033655717968940735,
-0.03684671223163605,
0.005113157909363508,
-0.0014748149551451206,
0.06385824084281921,
0.046427495777606964,
0.0007182016270235181,
0.0031445680651813745,
0.040712639689445496,
-0.04104248061776161,
-0.05293653905391693,
-0.02962157502770424,
-0.026391755789518356,
-0.035988595336675644,
0.003125593066215515,
0.02309742383658886,
-0.009344019927084446,
-0.00041006470564752817,
0.00685817701742053,
-0.008983548730611801,
0.013455760665237904,
-0.008526669815182686,
0.04539322853088379,
0.036747418344020844,
-0.06198836490511894,
-0.018758462741971016,
-0.0008442682446911931,
-0.036973051726818085,
-0.027942456305027008,
-0.02736072987318039,
0.031190866604447365,
0.008775325492024422,
0.046895887702703476,
0.03248215094208717,
0.04947603866457939,
0.0027822202537208796,
0.020905375480651855,
0.02440251037478447,
-0.053275320678949356,
0.06908830255270004,
0.011110593564808369,
-0.041434817016124725,
-0.030505908653140068,
0.029876291751861572,
-0.001500319573096931,
-0.05127875879406929,
-0.06603680551052094,
-0.02564159967005253,
0.0435771681368351,
0.004722934681922197,
-0.006298453081399202,
-0.0722479522228241,
-0.019675763323903084,
0.048152461647987366,
-0.05223143473267555,
-0.01679978147149086,
0.010177409276366234,
-0.05900990962982178,
0.027021655812859535,
0.009936287999153137,
-0.00893848855048418,
0.008853948675096035,
-0.04796259477734566,
0.03519807010889053,
-0.006814199965447187,
0.05793941393494606,
-0.024088069796562195,
0.022184884175658226,
-0.10180933773517609,
0.00190742255654186,
0.000049381669668946415,
0.024517951533198357,
0.023606520146131516,
-0.001897452399134636,
0.051953498274087906,
-0.011164005845785141,
-0.0019045098451897502,
0.04049444943666458,
0.018727082759141922,
-0.006286542396992445,
0.03836322948336601,
-0.03598739951848984,
-0.00737143587321043,
-0.011009017936885357,
0.06178716942667961,
-0.06135411560535431,
-0.0677080973982811,
-0.001516134710982442,
-0.019769996404647827,
-0.024946415796875954,
0.03570541366934776,
0.03976346179842949,
-0.011874672956764698,
0.01430919487029314,
0.0034210828598588705,
0.03553052246570587,
0.055103786289691925,
-0.008212380111217499,
0.04776093363761902,
0.0298142246901989,
0.01714499108493328,
-0.026592470705509186,
-0.042435843497514725,
-0.0342978797852993,
0.03406713530421257,
0.02101673185825348,
-0.04615556821227074,
-0.044926565140485764,
0.03077368624508381,
0.012381362728774548,
-0.05516083911061287,
0.044143207371234894,
-0.030141225084662437,
-0.052580609917640686,
-0.04343780130147934,
0.03734966367483139,
-0.010564167983829975,
-0.012744897045195103,
0.0009843140142038465,
-0.04367135092616081,
0.0024638467002660036,
-0.06389740854501724,
-0.03423937410116196,
0.005842996761202812,
0.011984462849795818,
-0.030771758407354355,
0.09100706875324249,
0.01935586892068386,
-0.04261748492717743,
0.005028907209634781,
0.0291641503572464,
-0.06326845288276672,
0.06176411733031273,
0.036350347101688385,
0.1028640866279602,
-0.06377941370010376,
-0.043652161955833435,
0.017115771770477295,
0.009802122600376606,
-0.018909594044089317,
0.029246801510453224,
-0.004967685788869858,
-0.07725469022989273,
-0.013413463719189167,
-0.009226071648299694,
0.06532618403434753,
-0.04510181397199631,
-0.02082734927535057,
0.024066468700766563,
0.00851143803447485,
0.015381393022835255,
-0.032356325536966324,
-0.0010143989929929376,
-0.0012168873799964786,
-0.029625369235873222,
-0.06236565485596657,
0.019984537735581398,
0.0010870161931961775,
-0.005314275156706572,
-0.0339236855506897,
-0.042631298303604126,
0.0193062424659729,
0.10594984889030457,
0.023027820512652397,
-0.017028700560331345,
-0.05370477959513664,
0.01872401311993599,
0.03720368817448616,
0.054605886340141296,
-0.027707215398550034,
0.03687907010316849,
0.05254330486059189,
0.060182902961969376,
-0.031540647149086,
0.0591176375746727,
-0.024510720744729042,
-0.04151907190680504,
-0.023832686245441437,
0.029889527708292007,
-0.021816249936819077,
-0.04695459082722664,
-0.008908477611839771,
0.022997524589300156,
-0.018286027014255524,
-0.012788405641913414,
-0.014706619083881378,
0.06025371700525284,
0.01833251118659973,
-0.025626113638281822,
-0.03263155370950699,
0.011420713737607002,
-0.02000606060028076,
0.06589291244745255,
-0.03375463932752609,
-0.0012341997353360057,
-0.012982579879462719,
-0.03499258682131767,
0.005317507777363062,
0.026371052488684654,
0.0420406274497509,
0.02765744924545288,
-0.01583804190158844,
0.11411260813474655,
-0.047416869550943375,
0.009218987077474594,
-0.04472285881638527,
-0.03699224069714546,
0.023926401510834694,
0.02504863403737545,
0.02889016829431057,
0.029050422832369804,
0.010853842832148075,
-0.030561324208974838,
0.017379889264702797,
0.07553394883871078,
0.05063639208674431,
0.041324958205223083,
-0.008884329348802567,
-0.02489818073809147,
0.03758931905031204,
0.055140748620033264,
-0.042681921273469925,
-0.0407150499522686,
0.0369957834482193,
0.030278032645583153,
-0.020905183628201485,
0.01669631153345108,
-0.009288111701607704,
0.01131079625338316,
-0.04107292369008064,
-0.054081935435533524,
0.034405723214149475,
0.028745872899889946,
0.013557575643062592,
0.044548071920871735,
0.013943659141659737,
-0.0005159042775630951,
0.03430972620844841,
-0.004954412579536438,
0.01540298666805029,
-0.07296791672706604,
0.0006980947800911963,
-0.008997637778520584,
0.05364709720015526,
-0.0426306314766407,
0.03907415643334389,
0.007332890294492245,
0.003521390026435256,
0.06247907876968384,
-0.026688769459724426,
0.033178240060806274,
0.04359287768602371,
0.028644360601902008,
-0.02235700935125351,
0.012276616878807545,
0.022792553529143333,
0.018958358094096184,
0.09013617783784866,
0.007986601442098618,
0.06363242119550705,
0.004396334756165743,
0.05018344521522522,
0.05864883214235306,
0.02767486684024334,
0.012051583267748356,
0.022538285702466965,
0.06602825969457626,
0.0006790276383981109,
-0.01863223873078823,
0.0643698126077652,
-0.05846073850989342,
0.0377945750951767,
-0.050453830510377884,
0.025044703856110573,
-0.0067835100926458836,
-0.02078956551849842,
0.05069325119256973,
0.008775552734732628,
-0.054421521723270416,
0.019106877967715263,
-0.022468863055109978,
-0.023511335253715515,
0.027112862095236778,
0.00517914118245244,
-0.014062183909118176,
0.011459286324679852,
-0.025182748213410378,
0.03725476562976837,
-0.06413141638040543,
-0.03297630697488785,
-0.0077922469936311245,
-0.04774796590209007,
0.020673034712672234,
-0.06804989278316498,
-0.046131815761327744,
-0.059320345520973206,
-0.017051685601472855,
0.04027452692389488,
0.009697549045085907,
0.0008862800896167755,
-0.0284077450633049,
0.016696937382221222,
-0.0331667996942997,
-0.02596668340265751,
-0.05279631167650223,
-0.06439314782619476,
-0.007524388842284679,
-0.06844018399715424,
0.03725842386484146,
-0.02082257904112339,
0.03079916536808014,
0.011659396812319756,
-0.020897958427667618,
-0.021529223769903183,
-0.019036663696169853,
0.05882299691438675,
0.01479300856590271,
-0.015276691876351833,
-0.027096368372440338,
0.008060209453105927,
-0.031309183686971664,
0.03721393644809723,
-0.019125699996948242,
-0.043773259967565536,
0.11374468356370926,
0.05672048032283783,
0.05148877203464508,
-0.007591198198497295,
-0.0447535514831543,
-0.0537462942302227,
-0.04947401583194733,
-0.027608634904026985,
-0.019608255475759506,
-0.03163357451558113,
-0.0050102174282073975,
-0.0547255203127861,
-0.02488691918551922,
-0.04147912934422493,
-0.05271562933921814,
-0.01110924780368805,
0.011497133411467075,
0.019128013402223587,
0.031189749017357826,
0.04630355164408684,
0.02142573706805706,
-0.018188610672950745,
-0.03390597924590111,
0.03820466250181198,
0.00345727545209229,
-0.003081363858655095,
-0.07138743251562119,
-0.032405029982328415,
0.026828426867723465,
0.016918446868658066,
-0.005003701895475388,
-0.019837800413370132,
0.04844508320093155,
0.021240893751382828,
0.01193102914839983,
0.004578196909278631,
-0.024098824709653854,
-0.023231392726302147,
-0.013206109404563904,
0.00020561949349939823,
-0.026107555255293846,
-0.02545689046382904,
-0.005684421863406897,
0.010120556689798832,
0.038472797721624374,
-0.06960400193929672,
-0.04674796387553215,
0.004403563216328621,
0.030856043100357056,
0.04042201489210129,
0.018806539475917816,
-0.035067684948444366,
0.005070236045867205,
-0.0596727579832077,
-0.045434173196554184,
0.03784460574388504,
0.03873631730675697,
-0.004739986266940832,
0.03819945082068443,
0.04331756383180618,
-0.057507313787937164,
0.03895073011517525,
0.035227734595537186,
0.037148572504520416,
0.03349456191062927,
-0.018947653472423553,
0.015894480049610138,
-0.042781442403793335,
0.030228666961193085,
0.00046421008300967515,
-0.023816542699933052,
-0.0537605956196785,
-0.07057204842567444,
-0.03692782297730446,
0.0146011458709836,
-0.02850467339158058,
-0.0072130197659134865,
0.0524807944893837,
-0.0040762219578027725,
-0.04585874080657959,
-0.015888389199972153,
0.010715192183852196,
0.07169922441244125,
-0.026815835386514664,
0.024645311757922173,
0.012569556944072247,
0.04348985105752945,
-0.04059303179383278,
0.0009372441563755274,
-0.0184419434517622,
-0.018983008340001106,
0.01094092521816492,
0.039671819657087326,
0.02708395943045616,
0.06925736367702484,
0.06157127767801285,
0.0021911028306931257,
-0.03278469666838646,
0.04504021257162094,
0.05279035493731499,
0.005293573718518019,
-0.018662625923752785,
-0.005223683547228575,
-0.011225133202970028,
-0.029662126675248146,
0.011342169716954231,
-0.023351067677140236,
0.024735096842050552,
0.023665649816393852,
-0.012563271448016167,
0.0025938188191503286,
-0.0035294941626489162,
-0.010079698637127876,
-0.054146360605955124,
-0.04665254056453705,
0.0022792613599449396,
-0.0376029834151268,
-0.057128675282001495,
0.02512533590197563,
0.046461544930934906,
0.029947269707918167,
0.06230904534459114,
0.03542874753475189,
-0.05166256055235863,
-0.026796454563736916,
0.045531176030635834,
0.04360610246658325,
-0.039832040667533875,
-0.03794294223189354,
-0.059582725167274475,
0.031593210995197296,
0.041878946125507355,
-0.02606324292719364,
-0.08972258865833282,
-0.002108408836647868,
0.02682117186486721,
-0.035697780549526215,
0.06292212754487991,
0.017314257100224495,
0.005758785642683506,
0.04555926471948624,
-0.009030722081661224,
0.0296722874045372,
-0.028100498020648956,
0.009581907652318478,
-0.009861279278993607,
0.04390189051628113,
-0.008727970533072948,
-0.028677387163043022,
-0.0364995039999485,
0.02212841808795929,
0.005261513404548168,
0.05630924925208092,
0.021252494305372238,
-0.008113116025924683,
-0.06182137876749039,
-0.0021702421363443136,
0.02986614964902401,
-0.026514073833823204,
0.025717997923493385,
0.032624561339616776,
0.037926677614450455,
-0.031270336359739304,
-0.03818938881158829,
-0.029801510274410248,
-0.03780960664153099,
0.0366884209215641,
-0.008675232529640198,
-0.0258460883051157,
-0.07071096450090408,
0.01563003659248352,
-0.027780842036008835,
-0.02152257040143013,
-0.10318834334611893,
0.04199165850877762,
0.010853775776922703,
-0.015002057887613773,
0.04538864269852638,
0.03680102527141571,
0.024623990058898926,
0.03505805507302284,
-0.013033232651650906,
0.023031629621982574,
-0.021514885127544403,
0.035960037261247635,
-0.011853708885610104,
-0.018322892487049103,
-0.008770184591412544,
-0.06360732018947601,
-0.03483310714364052,
-0.043898437172174454,
-0.03999650105834007,
-0.03376438096165657,
-0.019213225692510605,
-0.001766000990755856,
-0.014068249613046646,
-0.010926548391580582,
-0.013022701255977154,
0.011776030994951725,
-0.017004717141389847,
-0.014026393182575703,
-0.021770751103758812,
-0.049309141933918,
-0.09652592241764069,
-0.028557652607560158,
0.018183277919888496,
0.0446300134062767,
0.038696832954883575,
-0.00396540155634284,
0.005255047231912613,
0.024047527462244034,
-0.0025094011798501015,
-0.019598498940467834,
0.031056249514222145,
0.007177002727985382,
-0.03667057678103447,
-0.03722132369875908,
-0.005692566279321909,
0.017377860844135284,
0.01885339990258217,
-0.02494940720498562,
0.00747285271063447,
0.04951925575733185,
-0.03903806954622269,
0.001430303556844592,
0.03815195709466934,
-0.0011398813221603632,
-0.08757421374320984,
-0.03904537111520767,
0.007226137910038233,
-0.03844068944454193,
0.028242077678442,
0.0013613292248919606,
-0.018230898305773735,
-0.017478104680776596,
-0.0016746388282626867,
0.032887835055589676,
0.014995402656495571,
-0.03581271320581436,
-0.002899858634918928,
-0.035772889852523804,
0.04219459742307663,
-0.06433647125959396,
0.052036453038454056,
-0.026876458898186684,
-0.006562202703207731,
-0.004971050191670656,
0.007435912732034922,
-0.038542043417692184,
0.06162150949239731,
-0.002549113007262349,
0.004104128573089838,
-0.01652650535106659,
0.008222993463277817,
-0.030187956988811493,
0.0301324762403965,
-0.019905297085642815,
0.013151370920240879,
-0.017010213807225227,
0.0182133037596941,
-0.03892441838979721,
-0.0021029640920460224,
-0.029699167236685753,
-0.01927199773490429,
-0.01142987608909607,
-0.007211619056761265,
-0.010121800936758518,
-0.050931669771671295,
0.04134499654173851,
0.015628455206751823,
0.03190675005316734,
0.018909649923443794,
-0.03270572051405907,
-0.016382643952965736,
0.02736223302781582,
-0.07619006931781769,
-0.03729921206831932,
-0.028803426772356033,
0.010609252378344536,
-0.011085138656198978,
0.06844893097877502,
0.03532768040895462,
-0.04534178599715233,
-0.014627600088715553,
0.0040690116584300995,
0.022802377119660378,
0.009306428022682667,
0.02416374161839485,
0.00008298458124045283,
0.04933907464146614,
0.05252404883503914,
-0.03306792676448822,
-0.003742536762729287,
-0.009955506771802902,
-0.008116157725453377,
-0.004064188338816166,
-0.014406191185116768,
0.022553663700819016,
-0.016162380576133728,
-0.04130525514483452,
-0.015682963654398918,
0.06577351689338684,
0.03967604786157608,
0.011459161527454853,
-0.008620395325124264,
-0.03181722015142441,
0.02905985899269581,
0.02220282144844532,
-0.045303136110305786,
-0.029668159782886505,
0.018507853150367737,
-0.05048959702253342,
0.06315137445926666,
-0.008423134684562683,
0.011941990815103054,
0.02758549340069294,
0.030698416754603386,
0.00457101222127676,
0.02726975828409195,
-0.03473972901701927,
-0.018390150740742683,
0.028197625651955605,
-0.04324157163500786,
0.00969434343278408,
-0.0010082813678309321,
0.06575918197631836,
-0.051272179931402206,
0.03909316658973694,
0.03358684480190277,
0.028230952098965645,
-0.007324302103370428,
-0.018564416095614433,
-0.03951023891568184,
0.03414160758256912,
-0.04468954727053642,
0.060738757252693176,
-0.01865767315030098,
-0.07557516545057297,
0.06909997761249542,
0.03844049200415611,
-0.08921108394861221,
-0.005312194582074881,
0.03592350333929062,
0.015211519785225391,
0.03161909803748131,
0.043989524245262146,
-0.07815439254045486,
0.005744436290115118,
-0.05110469087958336,
0.010734970681369305,
-0.08083048462867737,
-0.005444131791591644,
0.03792142495512962,
-0.07232215255498886,
0.009237712249159813,
0.04072234779596329,
-0.03007415495812893,
0.007903453893959522,
0.022068243473768234,
-0.03174758329987526,
-0.045281048864126205,
-0.023253945633769035,
0.0049306470900774,
-0.03151458874344826,
0.026957489550113678,
-0.029722226783633232,
0.03858315944671631,
0.02063986472785473,
-0.0018205243395641446,
-0.048683494329452515,
0.014061648398637772,
0.0209319069981575,
-0.03205795958638191,
-0.029100783169269562,
0.011614096350967884,
0.01538290735334158,
-0.0057801310904324055,
0.025615697726607323,
-0.014296583831310272,
0.022869205102324486,
0.030727090314030647,
-0.01905347965657711,
0.02558751218020916,
-0.053929492831230164,
-0.003941740840673447,
0.006287488620728254,
0.013221030123531818,
0.03390621021389961,
-0.018883492797613144,
0.039039626717567444,
0.02722683735191822,
0.034618161618709564,
-0.022941337898373604,
-0.012389066629111767,
-0.014794562943279743,
0.02471405826508999,
-0.0367247499525547,
0.02429414726793766,
0.020703285932540894,
-0.04712963476777077,
-0.04083506390452385,
-0.05435958504676819,
-0.04052083194255829,
0.04661157354712486,
-0.03729744628071785,
0.00848759151995182,
0.06402858346700668,
-0.012629845179617405,
-0.055561479181051254,
-0.07578077912330627,
-0.004092768765985966,
-0.023612888529896736,
0.017331141978502274,
0.025768008083105087,
-0.024260682985186577,
-0.00973721593618393,
-0.052250929176807404,
-0.08213727176189423,
0.0320713073015213,
0.004284166730940342,
-0.015487296506762505,
0.05676357448101044,
0.02930632047355175,
-0.024471677839756012,
0.022842567414045334,
0.032404836267232895,
-0.05736098811030388,
0.037888411432504654,
0.012313374318182468,
0.010920381173491478,
0.037870511412620544,
0.04044019430875778,
-0.008421383798122406,
-0.03890052065253258,
-0.05815504491329193,
-0.037600886076688766,
-0.03901008516550064,
-0.001472263247705996,
0.09147992730140686
] |
CLTL/icf-levels-ins | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 32 | 2021-02-17T10:06:51Z | ---
tags:
- summarization
widget:
- text: "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
---
# CodeTrans model for code documentation generation php
Pretrained model on programming language php using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized php code functions: it works best with tokenized php functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the code documentation generation task for the php function/method.
## Intended uses & limitations
The model could be used to generate the description for the php function or be fine-tuned on other php code tasks. It can be used on unparsed and untokenized php code. However, if the php code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate php function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/php/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 18,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing php code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.0015559891471639276,
-0.022982077673077583,
0.010213036090135574,
0.011735617183148861,
0.027986429631710052,
0.029363570734858513,
-0.03373657912015915,
0.005507110618054867,
-0.0014989222399890423,
0.06328944861888885,
0.04800243675708771,
0.0008330527343787253,
0.006969464011490345,
0.04085996374487877,
-0.03997306898236275,
-0.04956001788377762,
-0.03680902346968651,
-0.027908451855182648,
-0.04081115126609802,
0.004953114781528711,
0.023214327171444893,
-0.01447260845452547,
-0.003786845598369837,
0.008519026450812817,
-0.010141177102923393,
0.01491631381213665,
-0.00824552122503519,
0.04230939969420433,
0.03901980072259903,
-0.05882444232702255,
-0.01392356213182211,
-0.0014957943931221962,
-0.03906072676181793,
-0.028931114822626114,
-0.02982253022491932,
0.03133982792496681,
0.009051037952303886,
0.0442272424697876,
0.0302458256483078,
0.05135751888155937,
0.003930273931473494,
0.021934594959020615,
0.028768684715032578,
-0.05081440135836601,
0.0677734762430191,
0.010055969469249249,
-0.04138980805873871,
-0.033094458281993866,
0.030529337003827095,
-0.001895508961752057,
-0.051673270761966705,
-0.06400781869888306,
-0.029208388179540634,
0.045021120458841324,
0.004415287636220455,
-0.005994366481900215,
-0.0745580717921257,
-0.020203525200486183,
0.052177831530570984,
-0.052757274359464645,
-0.017466582357883453,
0.009253935888409615,
-0.057562291622161865,
0.02700851298868656,
0.010994513519108295,
-0.009103449992835522,
0.007917709648609161,
-0.042438656091690063,
0.034145984798669815,
-0.0042997244745492935,
0.05481477081775665,
-0.02143106423318386,
0.02436029724776745,
-0.0982949286699295,
0.001464857836253941,
-0.0008669896051287651,
0.025085166096687317,
0.023781508207321167,
-0.004077864345163107,
0.054556652903556824,
-0.011242269538342953,
-0.002086886903271079,
0.04210904613137245,
0.019121164456009865,
-0.003981886897236109,
0.04194899648427963,
-0.032141897827386856,
-0.008737055584788322,
-0.010467277839779854,
0.059567712247371674,
-0.06222393736243248,
-0.06959058344364166,
-0.00036221061600372195,
-0.02304474450647831,
-0.023626593872904778,
0.03322388231754303,
0.04163732752203941,
-0.011253489181399345,
0.015237845480442047,
0.0032603342551738024,
0.03467201814055443,
0.06057261303067207,
-0.008212102577090263,
0.04371944069862366,
0.030210256576538086,
0.019596388563513756,
-0.02497381530702114,
-0.040799856185913086,
-0.03577490895986557,
0.03129512071609497,
0.019477516412734985,
-0.04497944191098213,
-0.04519403725862503,
0.028808658942580223,
0.010910174809396267,
-0.05819787085056305,
0.0467195063829422,
-0.033109985291957855,
-0.050683725625276566,
-0.04282533749938011,
0.039886217564344406,
-0.010644076392054558,
-0.015112328343093395,
-0.002973511815071106,
-0.04925961419939995,
0.0014308295212686062,
-0.0666452944278717,
-0.03383980318903923,
0.006088473368436098,
0.010782883502542973,
-0.025161756202578545,
0.08930841833353043,
0.019138973206281662,
-0.039694543927907944,
0.0029602390713989735,
0.03056042082607746,
-0.06025967374444008,
0.06188066676259041,
0.03843125328421593,
0.10368803888559341,
-0.0633067935705185,
-0.04420838877558708,
0.014010893180966377,
0.007995846681296825,
-0.021327879279851913,
0.02952069789171219,
-0.00629437156021595,
-0.07577736675739288,
-0.014492313377559185,
-0.011023147031664848,
0.06462152302265167,
-0.04558820277452469,
-0.02129106968641281,
0.023456629365682602,
0.0017522519920021296,
0.014100758358836174,
-0.03460094332695007,
-0.002499173628166318,
-0.0020544584840536118,
-0.02988038957118988,
-0.060980986803770065,
0.020586682483553886,
-0.0017055163625627756,
-0.00203746953047812,
-0.03309367597103119,
-0.04056078940629959,
0.01880437135696411,
0.1054602861404419,
0.019415676593780518,
-0.018750421702861786,
-0.05872637405991554,
0.021945923566818237,
0.035300113260746,
0.055870313197374344,
-0.025573180988430977,
0.03307580202817917,
0.05281675606966019,
0.05984418839216232,
-0.029607370495796204,
0.060635045170784,
-0.025838438421487808,
-0.0437760166823864,
-0.027797391638159752,
0.030902117490768433,
-0.018306834623217583,
-0.04918769747018814,
-0.009584365412592888,
0.027738915756344795,
-0.015404993668198586,
-0.012697805650532246,
-0.010013818740844727,
0.06093784049153328,
0.017317933961749077,
-0.02636643312871456,
-0.03220637887716293,
0.013398493640124798,
-0.022227155044674873,
0.07262119650840759,
-0.029935987666249275,
0.0011112100910395384,
-0.01654452085494995,
-0.03439362719655037,
0.0020373316947370768,
0.02493082359433174,
0.043674394488334656,
0.02367011457681656,
-0.015694137662649155,
0.11544488370418549,
-0.04948101565241814,
0.007337171584367752,
-0.047860633581876755,
-0.04002847522497177,
0.026632679626345634,
0.02567090280354023,
0.02930278703570366,
0.028631946071982384,
0.009824344888329506,
-0.034219950437545776,
0.0175162386149168,
0.07878581434488297,
0.04887619987130165,
0.040161505341529846,
-0.007286155596375465,
-0.02713179402053356,
0.03866320103406906,
0.053562961518764496,
-0.049365561455488205,
-0.04175567999482155,
0.03460397571325302,
0.033560577780008316,
-0.0229901485145092,
0.01659150794148445,
-0.006402167957276106,
0.010552460327744484,
-0.03538276627659798,
-0.054747868329286575,
0.033506568521261215,
0.031386494636535645,
0.01469259150326252,
0.04485819488763809,
0.013091693632304668,
-0.002696029841899872,
0.03294358775019646,
-0.0033590944949537516,
0.013524672947824001,
-0.07153571397066116,
0.0012722776737064123,
-0.011374151334166527,
0.05119241774082184,
-0.04056776687502861,
0.03871726244688034,
0.011946727521717548,
0.004948901943862438,
0.056460194289684296,
-0.02745071053504944,
0.0317581444978714,
0.04756365716457367,
0.029013581573963165,
-0.0221556406468153,
0.014125416055321693,
0.025937877595424652,
0.016733674332499504,
0.08962380886077881,
0.006679452955722809,
0.062094949185848236,
0.0056770555675029755,
0.047804515808820724,
0.06040751934051514,
0.029573554173111916,
0.008633174933493137,
0.02347266674041748,
0.0691138431429863,
-0.003962055779993534,
-0.021658599376678467,
0.06706982105970383,
-0.05586984008550644,
0.03946906700730324,
-0.04933677241206169,
0.027042098343372345,
-0.007594088092446327,
-0.022139204666018486,
0.049422357231378555,
0.006665460765361786,
-0.05746598169207573,
0.018913302570581436,
-0.023256881162524223,
-0.01949194446206093,
0.026820873841643333,
0.008564535528421402,
-0.009860215708613396,
0.01084138173609972,
-0.025228464975953102,
0.042502403259277344,
-0.06252484023571014,
-0.03688213974237442,
-0.005967461504042149,
-0.049415215849876404,
0.022130746394395828,
-0.06825851649045944,
-0.048644229769706726,
-0.0580635592341423,
-0.01481711771339178,
0.0386473648250103,
0.005888231564313173,
0.0017764258664101362,
-0.022732963785529137,
0.014833971858024597,
-0.02887899987399578,
-0.026755673810839653,
-0.05244351178407669,
-0.0638953372836113,
-0.006268905475735664,
-0.07006022334098816,
0.03587445989251137,
-0.022570332512259483,
0.031832024455070496,
0.011242427863180637,
-0.01941133663058281,
-0.02062062732875347,
-0.019701087847352028,
0.05751819163560867,
0.015170159749686718,
-0.020860865712165833,
-0.027816636487841606,
0.007509004324674606,
-0.029304638504981995,
0.03687310963869095,
-0.022552987560629845,
-0.04557870328426361,
0.1111874058842659,
0.054339949041604996,
0.05253123119473457,
-0.0074544320814311504,
-0.041475895792245865,
-0.052036721259355545,
-0.04401556774973869,
-0.02870711125433445,
-0.018752118572592735,
-0.03221508115530014,
-0.0073191700503230095,
-0.053415488451719284,
-0.026385139673948288,
-0.03990257903933525,
-0.05539407953619957,
-0.013360937125980854,
0.00784795917570591,
0.017393236979842186,
0.032403409481048584,
0.0488007552921772,
0.024987690150737762,
-0.014711554162204266,
-0.03847986087203026,
0.040559571236371994,
0.0014077479718253016,
-0.006780428811907768,
-0.06823278963565826,
-0.037981558591127396,
0.026484789326786995,
0.01692133955657482,
-0.0053832437843084335,
-0.018938641995191574,
0.0490853376686573,
0.023063404485583305,
0.011456042528152466,
0.0052900961600244045,
-0.02264857478439808,
-0.0284091979265213,
-0.010396271012723446,
-0.005566858220845461,
-0.02749985083937645,
-0.026794342324137688,
-0.001089683035388589,
0.005967305973172188,
0.03885316848754883,
-0.06817040592432022,
-0.04479483887553215,
0.0038547085132449865,
0.02659289352595806,
0.044649653136730194,
0.019582359120249748,
-0.03793769329786301,
0.0033877298701554537,
-0.06028617173433304,
-0.04489576816558838,
0.03719018027186394,
0.03918249160051346,
-0.003141008084639907,
0.03811939060688019,
0.0450323224067688,
-0.05656156316399574,
0.03491036221385002,
0.03710388392210007,
0.03616050258278847,
0.030734743922948837,
-0.01781751960515976,
0.01583673804998398,
-0.047376565635204315,
0.031442273408174515,
-0.0010737152770161629,
-0.025088008493185043,
-0.05115838721394539,
-0.06625117361545563,
-0.03906962648034096,
0.010967632755637169,
-0.0263241995126009,
-0.008346887305378914,
0.05154044181108475,
-0.0071962131187319756,
-0.0469447523355484,
-0.01817557029426098,
0.009305581450462341,
0.06984695047140121,
-0.024619409814476967,
0.023134857416152954,
0.01594614051282406,
0.044303782284259796,
-0.04167160019278526,
-0.003734299913048744,
-0.01585751213133335,
-0.021312957629561424,
0.009661722928285599,
0.037701062858104706,
0.0284535251557827,
0.06878818571567535,
0.05651208385825157,
-0.005170444026589394,
-0.033625613898038864,
0.05005975067615509,
0.0530257523059845,
0.006566009018570185,
-0.02041611634194851,
-0.0051415665075182915,
-0.013751247897744179,
-0.02906665951013565,
0.013270828872919083,
-0.022109560668468475,
0.023577598854899406,
0.02483910322189331,
-0.010257761925458908,
0.00238143652677536,
-0.0025543340016156435,
0.00021462002769112587,
-0.0521404892206192,
-0.04976162686944008,
0.0032399643678218126,
-0.036446671932935715,
-0.05771089717745781,
0.022247878834605217,
0.04276805371046066,
0.0310184508562088,
0.06547298282384872,
0.03299974650144577,
-0.05597072094678879,
-0.028465282171964645,
0.0488581582903862,
0.04129024222493172,
-0.03961357846856117,
-0.03856028988957405,
-0.060927726328372955,
0.029823340475559235,
0.042614810168743134,
-0.019429294392466545,
-0.09293408691883087,
-0.004558242857456207,
0.027891099452972412,
-0.03633628040552139,
0.0632440447807312,
0.017803287133574486,
0.007707491517066956,
0.04595514386892319,
-0.008306489326059818,
0.027998212724924088,
-0.02695205621421337,
0.00555762043222785,
-0.011783570051193237,
0.04065881669521332,
-0.01054062694311142,
-0.0290057472884655,
-0.03754537180066109,
0.023905258625745773,
0.003157304134219885,
0.05379664525389671,
0.018894940614700317,
-0.010919037275016308,
-0.06121304631233215,
-0.0019144245889037848,
0.028034647926688194,
-0.022109463810920715,
0.026650624349713326,
0.036905255168676376,
0.03571205586194992,
-0.029294732958078384,
-0.03652266785502434,
-0.02975238300859928,
-0.03678782656788826,
0.041396237909793854,
-0.005841648206114769,
-0.026490136981010437,
-0.06903093308210373,
0.015963664278388023,
-0.02728080563247204,
-0.020675942301750183,
-0.10145211219787598,
0.04037461802363396,
0.009881780482828617,
-0.01983807235956192,
0.04612979292869568,
0.03626358509063721,
0.02675648033618927,
0.03472291678190231,
-0.017233291640877724,
0.024625297635793686,
-0.01773911342024803,
0.03619352728128433,
-0.008946596644818783,
-0.020178131759166718,
-0.01045001856982708,
-0.06355749070644379,
-0.03869425877928734,
-0.03920510411262512,
-0.041845567524433136,
-0.03474540263414383,
-0.017292315140366554,
-0.0017813645536080003,
-0.014760376885533333,
-0.010981447994709015,
-0.012183590792119503,
0.013622596859931946,
-0.01835024170577526,
-0.014824253506958485,
-0.019136859104037285,
-0.04782349243760109,
-0.09728225320577621,
-0.030803069472312927,
0.019223975017666817,
0.04560866579413414,
0.043565910309553146,
-0.008366349153220654,
0.004086848348379135,
0.026879509910941124,
-0.002589026466012001,
-0.02341117151081562,
0.0265628844499588,
0.008764666505157948,
-0.03755776956677437,
-0.041939351707696915,
-0.005347934551537037,
0.018331360071897507,
0.017190471291542053,
-0.02994067408144474,
0.005493376404047012,
0.05123384669423103,
-0.0403389073908329,
-0.0006242461386136711,
0.04187646880745888,
-0.0037132648285478354,
-0.08605927228927612,
-0.03815792128443718,
0.005989199969917536,
-0.040557485073804855,
0.026852065697312355,
-0.0014753025025129318,
-0.015101288445293903,
-0.019826870411634445,
0.00633303401991725,
0.029388949275016785,
0.01187898963689804,
-0.037018343806266785,
-0.009456158615648746,
-0.03448770195245743,
0.045381490141153336,
-0.06053795665502548,
0.04946204274892807,
-0.02534693107008934,
-0.005753452889621258,
-0.007914810441434383,
0.010953715071082115,
-0.04106200858950615,
0.06349638104438782,
-0.0032167951576411724,
0.002988556632772088,
-0.015732457861304283,
0.015374480746686459,
-0.026834433898329735,
0.029543785378336906,
-0.02389967441558838,
0.012666271068155766,
-0.02062498778104782,
0.025410929694771767,
-0.04052378609776497,
-0.002806990873068571,
-0.031216846778988838,
-0.022077305242419243,
-0.013093537651002407,
-0.00550555856898427,
-0.006840559653937817,
-0.04920927435159683,
0.0410022959113121,
0.014223316684365273,
0.032201047986745834,
0.02196183241903782,
-0.032491520047187805,
-0.014929565601050854,
0.02377171441912651,
-0.0745910182595253,
-0.037801019847393036,
-0.02436862140893936,
0.012693463824689388,
-0.010358016937971115,
0.06822875142097473,
0.03398921713232994,
-0.04602493345737457,
-0.014109810814261436,
0.0032077315263450146,
0.025485755875706673,
0.0027779387310147285,
0.01998591236770153,
-0.00210209796205163,
0.05121919512748718,
0.04820988327264786,
-0.03163760527968407,
-0.00849368330091238,
-0.013003777712583542,
-0.006494792178273201,
-0.005943702068179846,
-0.01444818265736103,
0.02493729442358017,
-0.010873613879084587,
-0.03966214880347252,
-0.01820702850818634,
0.06537242233753204,
0.037180956453084946,
0.011507256887853146,
-0.00912467297166586,
-0.03233152627944946,
0.031794555485248566,
0.019841734319925308,
-0.042860209941864014,
-0.028760014101862907,
0.015795841813087463,
-0.05371806025505066,
0.06210590526461601,
-0.007235403172671795,
0.01232856884598732,
0.027423281222581863,
0.03009168431162834,
0.00468651857227087,
0.02529512345790863,
-0.035848721861839294,
-0.02450367622077465,
0.02423233352601528,
-0.042047809809446335,
0.009698119014501572,
-0.0000011696014325934811,
0.06330788880586624,
-0.04838484525680542,
0.0459175705909729,
0.03485797345638275,
0.02486339956521988,
-0.005300918128341436,
-0.018682822585105896,
-0.03446052968502045,
0.03393064811825752,
-0.04963017255067825,
0.058435969054698944,
-0.018240423873066902,
-0.08096342533826828,
0.06640132516622543,
0.038574814796447754,
-0.086221843957901,
-0.008587734773755074,
0.034926943480968475,
0.01369430497288704,
0.030669569969177246,
0.04449363052845001,
-0.07724141329526901,
0.007649383042007685,
-0.05139285698533058,
0.015625176951289177,
-0.08367998152971268,
-0.009980647824704647,
0.03845549747347832,
-0.07084153592586517,
0.011027923785150051,
0.04501365125179291,
-0.030686208978295326,
0.010087545029819012,
0.026214322075247765,
-0.028705373406410217,
-0.04128146171569824,
-0.02499365620315075,
0.004320127889513969,
-0.027307378128170967,
0.02037625201046467,
-0.028508905321359634,
0.04112697392702103,
0.01963341236114502,
-0.001631808583624661,
-0.04703105241060257,
0.017549874261021614,
0.02070922590792179,
-0.032342445105314255,
-0.029033560305833817,
0.012038175947964191,
0.01293017528951168,
-0.0038579560350626707,
0.02725132927298546,
-0.014581308700144291,
0.020177694037556648,
0.031636711210012436,
-0.019999394193291664,
0.025350863113999367,
-0.048836588859558105,
-0.006345128174871206,
0.002929729875177145,
0.010843906551599503,
0.034134700894355774,
-0.017218178138136864,
0.041677504777908325,
0.026455726474523544,
0.035270772874355316,
-0.022366106510162354,
-0.013351134024560452,
-0.012572890147566795,
0.024539846926927567,
-0.0362788625061512,
0.026203397661447525,
0.020085370168089867,
-0.04914643242955208,
-0.04006803408265114,
-0.0563993826508522,
-0.04378363862633705,
0.04726261645555496,
-0.03295618295669556,
0.011529039591550827,
0.06535538285970688,
-0.010301347821950912,
-0.052465733140707016,
-0.0732647031545639,
-0.006058957893401384,
-0.025480598211288452,
0.011817571707069874,
0.02426007390022278,
-0.02388739585876465,
-0.009186300449073315,
-0.04964650794863701,
-0.08032171428203583,
0.03268100321292877,
0.006005855742841959,
-0.01689031720161438,
0.059074461460113525,
0.02719862386584282,
-0.02603578194975853,
0.023360857740044594,
0.027162374928593636,
-0.054584551602602005,
0.03222855180501938,
0.008560365997254848,
0.011815804056823254,
0.038565266877412796,
0.040708377957344055,
-0.011712372303009033,
-0.04264356940984726,
-0.056979063898324966,
-0.03271394595503807,
-0.037627723067998886,
0.00043872045353055,
0.09186987578868866
] |
CLTL/icf-levels-mbw | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 30 | 2021-02-12T14:59:30Z | ---
tags:
- summarization
widget:
- text: "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
---
# CodeTrans model for code documentation generation python
Pretrained model on programming language python using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_python_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_python_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/python/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 80,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.012908213771879673,
-0.021694490686058998,
-0.006517102476209402,
0.022341623902320862,
0.04154166579246521,
0.03963138163089752,
-0.029928065836429596,
-0.006739205215126276,
-0.02263990230858326,
0.0584009625017643,
0.0456022247672081,
-0.0025948574766516685,
-0.008134371601045132,
0.048386283218860626,
-0.032823748886585236,
-0.05940983071923256,
-0.01835193857550621,
-0.03226065635681152,
-0.04009068012237549,
-0.007218035403639078,
0.013732165098190308,
0.0038524335250258446,
0.007916887290775776,
0.003986021503806114,
0.0012816893868148327,
0.01170724630355835,
0.0006207266706041992,
0.0297407079488039,
0.03971948102116585,
-0.07644523680210114,
-0.019438069313764572,
-0.005522525403648615,
-0.03692248463630676,
-0.007250751368701458,
-0.021155286580324173,
0.02146172896027565,
0.009370648302137852,
0.029005195945501328,
0.020226892083883286,
0.0536855049431324,
0.004231696017086506,
0.02266523241996765,
0.019553346559405327,
-0.043195467442274094,
0.0640641450881958,
0.006616823375225067,
-0.03779996931552887,
-0.027016641572117805,
0.01835314743220806,
-0.001326752477325499,
-0.054906491190195084,
-0.06990301609039307,
-0.01931670494377613,
0.058289721608161926,
-0.006623260676860809,
-0.00245186360552907,
-0.07507511973381042,
-0.019298655912280083,
0.049602653831243515,
-0.043125756084918976,
-0.03632182627916336,
0.01784585788846016,
-0.06817788630723953,
0.016821444034576416,
0.015067750588059425,
0.007209423929452896,
0.008560122922062874,
-0.05365243926644325,
0.016080647706985474,
0.00303880893625319,
0.05769958347082138,
-0.01193815004080534,
0.019295884296298027,
-0.11112978309392929,
0.011084121651947498,
-0.015458996407687664,
0.024430451914668083,
0.005326216109097004,
-0.010738376528024673,
0.051410529762506485,
-0.007769444491714239,
0.001529560424387455,
0.040179360657930374,
0.012623044662177563,
-0.008909804746508598,
0.032699283212423325,
-0.046093717217445374,
-0.013093681074678898,
-0.013025077991187572,
0.06911356002092361,
-0.06327315419912338,
-0.0626857727766037,
-0.016695961356163025,
-0.021705659106373787,
-0.026428135111927986,
0.02518725022673607,
0.04276833310723305,
-0.013885196298360825,
0.019337385892868042,
0.007599789649248123,
0.04699838533997536,
0.05200916901230812,
-0.006381155923008919,
0.04986410215497017,
0.02422938123345375,
0.01616181619465351,
-0.013252262957394123,
-0.04362555220723152,
-0.030259890481829643,
0.043499384075403214,
0.010475319810211658,
-0.030043134465813637,
-0.04954466596245766,
0.029510803520679474,
0.017483148723840714,
-0.04372029006481171,
0.04882130026817322,
-0.019483717158436775,
-0.05009347200393677,
-0.02882455103099346,
0.04027591645717621,
-0.011716483160853386,
-0.01993936486542225,
0.015634853392839432,
-0.04414530470967293,
-0.0029693765100091696,
-0.05665431544184685,
-0.033489733934402466,
0.003904544748365879,
0.02462076023221016,
-0.019609203562140465,
0.09146393090486526,
0.011615196242928505,
-0.03013175167143345,
0.008811653591692448,
0.02442622184753418,
-0.07641765475273132,
0.06590265780687332,
0.023418812081217766,
0.10254450142383575,
-0.06785616278648376,
-0.043248120695352554,
0.016694510355591774,
0.007494378834962845,
-0.013746991753578186,
0.027255801483988762,
-0.012066179886460304,
-0.07179633527994156,
-0.03188442438840866,
0.002407170133665204,
0.06846454739570618,
-0.047636523842811584,
-0.022250406444072723,
0.025482214987277985,
0.006102719809859991,
0.018856991082429886,
-0.03216242790222168,
-0.0014649054501205683,
-0.006787908263504505,
-0.032010093331336975,
-0.06521355360746384,
0.03208516165614128,
-0.0009137487504631281,
-0.02700238861143589,
-0.030666397884488106,
-0.04375626519322395,
0.013765665702521801,
0.1077072024345398,
0.011634930968284607,
-0.006952343508601189,
-0.04293927922844887,
0.012907158583402634,
0.03684787079691887,
0.04662492498755455,
-0.028218237683176994,
0.024580907076597214,
0.04468374326825142,
0.06345560401678085,
-0.035706501454114914,
0.06873872131109238,
-0.01658482849597931,
-0.0432075597345829,
-0.028858821839094162,
0.020640308037400246,
-0.022027190774679184,
-0.0472152978181839,
-0.005912839900702238,
0.019999932497739792,
-0.020948123186826706,
-0.004693012218922377,
-0.01223453413695097,
0.05426780879497528,
0.031659625470638275,
-0.016474321484565735,
-0.03402173891663551,
0.0018946679774671793,
-0.012467997148633003,
0.06026541069149971,
-0.03370692580938339,
-0.009656365029513836,
-0.02197730354964733,
-0.027122508734464645,
-0.0060509564355015755,
0.01495841983705759,
0.04490366205573082,
0.034349288791418076,
-0.009836386889219284,
0.09483163058757782,
-0.04653245210647583,
0.0046267262659966946,
-0.04708190634846687,
-0.05268087983131409,
0.01212812215089798,
0.03318575769662857,
0.040015459060668945,
0.029688436537981033,
0.018459700047969818,
-0.02385108917951584,
0.016562707722187042,
0.07152099162340164,
0.038799040019512177,
0.03035459853708744,
-0.02032146230340004,
-0.014798253774642944,
0.042734336107969284,
0.06853380799293518,
-0.02992142364382744,
-0.034412577748298645,
0.04314572364091873,
0.02921142429113388,
-0.024366607889533043,
0.021369943395256996,
-0.006873521488159895,
0.012407854199409485,
-0.05239235609769821,
-0.06781347841024399,
0.04541734978556633,
0.018660949543118477,
0.011746048927307129,
0.027094492688775063,
0.0002144162863260135,
-0.0021640032064169645,
0.03960716351866722,
-0.0026695970445871353,
0.0034343795850872993,
-0.06570904701948166,
0.011769785545766354,
0.0024624038487672806,
0.06182091683149338,
-0.038011979311704636,
0.044447287917137146,
0.010866532102227211,
-0.004194534383714199,
0.05591125786304474,
-0.02468016929924488,
0.0369076281785965,
0.028328385204076767,
0.029925275593996048,
-0.02246270887553692,
0.013153081759810448,
0.010991360060870647,
0.020000385120511055,
0.0817292332649231,
0.00842297077178955,
0.06327056139707565,
-0.002374953357502818,
0.05890814960002899,
0.06162277236580849,
0.018198484554886818,
0.009670541621744633,
0.032445941120386124,
0.06019704043865204,
0.004058674909174442,
-0.007833573035895824,
0.062263067811727524,
-0.04937312752008438,
0.02402244135737419,
-0.04572513327002525,
0.04125456511974335,
-0.009656335227191448,
-0.022530004382133484,
0.04612813517451286,
0.003203943371772766,
-0.044247210025787354,
0.006207671016454697,
-0.028114456683397293,
-0.027580512687563896,
0.018007654696702957,
-0.001020384137518704,
-0.028411906212568283,
0.01728924736380577,
-0.02175597846508026,
0.023220907896757126,
-0.07782750576734543,
-0.03688932582736015,
-0.0035067147109657526,
-0.05251632258296013,
0.013265288434922695,
-0.0747760683298111,
-0.04888707399368286,
-0.06818951666355133,
-0.005635435227304697,
0.045980434864759445,
0.007767605595290661,
-0.01095462404191494,
-0.031085843220353127,
0.006511174142360687,
-0.0368664413690567,
-0.023771677166223526,
-0.05945621430873871,
-0.06402309983968735,
-0.006363910157233477,
-0.06679155677556992,
0.03894762694835663,
-0.01516698393970728,
0.025713415816426277,
0.01078214030712843,
-0.01578102819621563,
-0.02539958246052265,
-0.02189481072127819,
0.060497839003801346,
0.0025261477567255497,
-0.008298159576952457,
-0.041797179728746414,
0.0077821556478738785,
-0.02281777374446392,
0.04808869957923889,
-0.00484594376757741,
-0.03420914337038994,
0.10782673209905624,
0.05647619813680649,
0.03728465735912323,
-0.013105373829603195,
-0.04111018404364586,
-0.05371593311429024,
-0.051124803721904755,
-0.02234703302383423,
-0.01830972544848919,
-0.028055977076292038,
-0.006510316859930754,
-0.05387184023857117,
-0.027698110789060593,
-0.03542221710085869,
-0.042520616203546524,
-0.012932098470628262,
0.018717676401138306,
0.030097659677267075,
0.04359932616353035,
0.05040502920746803,
0.03148854523897171,
-0.031931448727846146,
-0.031566519290208817,
0.03117937035858631,
0.005416427738964558,
0.0018432814395055175,
-0.08442191779613495,
-0.03373833745718002,
0.02643929421901703,
0.02743082121014595,
-0.013634170405566692,
-0.020294170826673508,
0.04940863326191902,
0.024952322244644165,
0.0012388837058097124,
0.0058305892162024975,
-0.016273165121674538,
-0.008336926810443401,
-0.026324378326535225,
-0.0005890398751944304,
-0.034022606909275055,
-0.030938679352402687,
-0.01452767662703991,
-0.011211042292416096,
0.04199962317943573,
-0.06250645220279694,
-0.058545876294374466,
0.0045579783618450165,
0.03177085146307945,
0.03952553868293762,
0.020980386063456535,
-0.027859339490532875,
-0.000044754524424206465,
-0.0659087747335434,
-0.03538414463400841,
0.03687773272395134,
0.022334082052111626,
-0.01107828225940466,
0.048198577016592026,
0.038478776812553406,
-0.04513859003782272,
0.035690680146217346,
0.0249309204518795,
0.04629741981625557,
0.0307356808334589,
-0.03611459210515022,
0.01857277937233448,
-0.047424592077732086,
0.023030731827020645,
0.00819359254091978,
-0.030037283897399902,
-0.046161942183971405,
-0.08781228214502335,
-0.03391079604625702,
0.011137202382087708,
-0.023594696074724197,
0.0030706627294421196,
0.042595040053129196,
-0.023572880774736404,
-0.04653133451938629,
-0.006501447409391403,
0.0022382871247828007,
0.06958943605422974,
-0.03803278133273125,
0.03276177868247032,
0.007235295604914427,
0.061616748571395874,
-0.037327542901039124,
0.00477295508608222,
-0.02498566545546055,
-0.023218393325805664,
0.0060838693752884865,
0.045629728585481644,
0.020967738702893257,
0.06215525045990944,
0.07648639380931854,
0.01454166416078806,
-0.03929849714040756,
0.04682990908622742,
0.04808332771062851,
0.001103533897548914,
-0.025426171720027924,
-0.004974825773388147,
-0.007343157660216093,
-0.028975799679756165,
0.019132699817419052,
-0.01094857044517994,
0.02167588844895363,
0.021500011906027794,
-0.0035321281757205725,
0.0023789035622030497,
0.0007405102951452136,
-0.0251142717897892,
-0.047358471900224686,
-0.04009068384766579,
-0.010905289091169834,
-0.04130563884973526,
-0.049184419214725494,
0.02208663336932659,
0.036034684628248215,
0.015520566143095493,
0.05352252721786499,
0.04222855344414711,
-0.04307771474123001,
-0.039034564048051834,
0.04427545517683029,
0.045628227293491364,
-0.03786143660545349,
-0.04559307172894478,
-0.05242675170302391,
0.03700673580169678,
0.04703693464398384,
-0.024203568696975708,
-0.0922517329454422,
0.003207308938726783,
0.03218699246644974,
-0.02386704832315445,
0.06473534554243088,
0.02403910830616951,
0.016855286434292793,
0.05552355945110321,
-0.006383039988577366,
0.027617454528808594,
-0.027887064963579178,
0.014791393652558327,
-0.0028544298838824034,
0.04423041641712189,
-0.019359884783625603,
-0.03131767362356186,
-0.040259044617414474,
0.02470982074737549,
0.018789317458868027,
0.038791608065366745,
0.03081549145281315,
-0.00705713452771306,
-0.07147176563739777,
-0.0072189695201814175,
0.030692048370838165,
-0.028933163732290268,
0.011852310039103031,
0.01948368176817894,
0.04708670452237129,
-0.05093958228826523,
-0.02911652997136116,
-0.017659347504377365,
-0.015056062489748001,
0.03279544413089752,
-0.0011165998876094818,
-0.016717635095119476,
-0.06968844681978226,
0.007590051740407944,
-0.027415059506893158,
-0.02511659823358059,
-0.08640417456626892,
0.04254777356982231,
-0.003554751630872488,
-0.0022765863686800003,
0.04899498447775841,
0.036214325577020645,
0.014153161086142063,
0.0385412871837616,
-0.01859721541404724,
0.035704806447029114,
-0.030504727736115456,
0.01935267075896263,
-0.008164925500750542,
-0.02135792002081871,
-0.019746234640479088,
-0.07146791368722916,
-0.023428140208125114,
-0.05005810037255287,
-0.037056002765893936,
-0.044446416199207306,
-0.02572799101471901,
0.009437358006834984,
-0.008403420448303223,
-0.011489542201161385,
-0.004665904678404331,
0.01003528293222189,
-0.025175610557198524,
-0.01452831644564867,
-0.03349604830145836,
-0.043616313487291336,
-0.09582984447479248,
-0.03546485677361488,
0.0010311633814126253,
0.04043780639767647,
0.03577394410967827,
-0.0004559530352707952,
0.010199888609349728,
0.02656688541173935,
-0.008417057804763317,
-0.012708739377558231,
0.01564297080039978,
0.012097196653485298,
-0.04118344932794571,
-0.03209046646952629,
0.008508766070008278,
0.01952941343188286,
0.013036854565143585,
-0.01077994704246521,
0.009861916303634644,
0.04714050143957138,
-0.030535604804754257,
-0.004100356716662645,
0.04020687937736511,
-0.004552642349153757,
-0.07681559026241302,
-0.03517254441976547,
-0.0005103591247461736,
-0.04304074868559837,
0.03309612721204758,
0.00021793563792016357,
-0.017844824120402336,
-0.0198394563049078,
-0.002891787327826023,
0.03287280350923538,
-0.013324248604476452,
-0.024258818477392197,
0.0020189012866467237,
-0.04166533797979355,
0.0392952635884285,
-0.06250558793544769,
0.05553509667515755,
-0.02727469801902771,
-0.006358007434755564,
-0.012511253356933594,
-0.001211280468851328,
-0.03632368892431259,
0.06031396985054016,
-0.004396507516503334,
0.0005878739757463336,
-0.009174710139632225,
0.005784322507679462,
-0.023563021793961525,
0.031170474365353584,
-0.009295240975916386,
0.012879551388323307,
-0.031809255480766296,
0.008369112387299538,
-0.03897704556584358,
0.008608880452811718,
-0.029545167461037636,
-0.015220348723232746,
-0.014426012523472309,
-0.023103848099708557,
-0.009270214475691319,
-0.05643599107861519,
0.041344817727804184,
0.028456419706344604,
0.026235993951559067,
0.012606535106897354,
-0.029407160356640816,
-0.013420531526207924,
0.028170716017484665,
-0.09066718071699142,
-0.04159627482295036,
-0.02281750552356243,
0.008717233315110207,
-0.025864962488412857,
0.06629256904125214,
0.05649517849087715,
-0.05012860521674156,
-0.014246861450374126,
0.026033863425254822,
0.014481778256595135,
0.006248843856155872,
0.027180273085832596,
0.021063461899757385,
0.04431493207812309,
0.05633779242634773,
-0.04221031814813614,
-0.006391093134880066,
-0.005647680256515741,
-0.0073629105463624,
-0.023112764582037926,
-0.012797705829143524,
0.017698023468255997,
-0.005139050539582968,
-0.05039818584918976,
-0.01955939456820488,
0.058796968311071396,
0.05523150414228439,
0.020767124369740486,
0.010837788693606853,
-0.028932830318808556,
0.03180539980530739,
0.0016891701379790902,
-0.052581630647182465,
-0.037963055074214935,
0.018397673964500427,
-0.04360366240143776,
0.08117712289094925,
-0.01006899494677782,
0.014504382386803627,
0.02377997897565365,
0.03191569074988365,
0.011430926620960236,
0.04579553008079529,
-0.0324874147772789,
-0.0021915212273597717,
0.032785359770059586,
-0.05639726296067238,
-0.006601843982934952,
-0.002126509789377451,
0.06247897818684578,
-0.05017450079321861,
0.03845278173685074,
0.020683763548731804,
0.024745574221014977,
-0.0084232771769166,
-0.025598719716072083,
-0.04751456901431084,
0.04228953272104263,
-0.058902062475681305,
0.06408360600471497,
-0.019049515947699547,
-0.0757800042629242,
0.08378779888153076,
0.02782469056546688,
-0.09459234029054642,
0.00781422108411789,
0.040972426533699036,
0.012066129595041275,
0.029640095308423042,
0.044542212039232254,
-0.07045114040374756,
0.0015980630414560437,
-0.048510681837797165,
0.010254849679768085,
-0.0628938153386116,
-0.003646882250905037,
0.02840527333319187,
-0.05392361804842949,
0.006064769811928272,
0.03375185653567314,
-0.014664796181023121,
0.0005081946728751063,
0.017891166731715202,
-0.05502543970942497,
-0.039996493607759476,
-0.0212451983243227,
0.0015626465901732445,
-0.02569892816245556,
0.02582300268113613,
-0.019511239603161812,
0.04131999611854553,
0.013470773585140705,
0.007256895769387484,
-0.041791610419750214,
0.00868204515427351,
0.028385667130351067,
-0.035691630095243454,
-0.026758817955851555,
0.02266022376716137,
0.008176330476999283,
-0.012488645501434803,
0.02257988229393959,
-0.01851060800254345,
0.018152620643377304,
0.032717712223529816,
-0.021792447194457054,
0.014324554242193699,
-0.041440799832344055,
-0.0005425465060397983,
0.021227864548563957,
0.01815984770655632,
0.03796270862221718,
-0.008280402980744839,
0.03494252264499664,
0.026735855266451836,
0.033266760408878326,
-0.015342634171247482,
-0.02422800287604332,
-0.021824678406119347,
0.014274361543357372,
-0.03824726492166519,
0.02479339949786663,
0.023254593834280968,
-0.042117033153772354,
-0.04581083729863167,
-0.02951751835644245,
-0.01925240084528923,
0.05579807609319687,
-0.03978380560874939,
0.013128241524100304,
0.06037129461765289,
-0.010434734635055065,
-0.05911031365394592,
-0.06638982146978378,
-0.012315962463617325,
-0.014781959354877472,
0.028230922296643257,
0.029888566583395004,
-0.03070780634880066,
-0.011397787369787693,
-0.050094157457351685,
-0.07166344672441483,
0.042271994054317474,
0.01716967113316059,
-0.01488178689032793,
0.05547713860869408,
0.04887676239013672,
-0.02506271004676819,
0.0193245317786932,
0.014236108399927616,
-0.04976505786180496,
0.03433283790946007,
0.008487188257277012,
0.015721959993243217,
0.03394569829106331,
0.041328731924295425,
-0.00804087147116661,
-0.042880937457084656,
-0.0750221312046051,
-0.025095446035265923,
-0.03388962149620056,
-0.01681399717926979,
0.07007306069135666
] |
CLTL/icf-levels-stm | [
"pytorch",
"roberta",
"text-classification",
"nl",
"transformers",
"license:mit"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 32 | null | ---
tags:
- summarization
widget:
- text: "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
---
# CodeTrans model for code documentation generation python
Pretrained model on programming language python using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the python function/method.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_python_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_python_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/python/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 500 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing python code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.009801963344216347,
-0.022252142429351807,
-0.006241681519895792,
0.022626839578151703,
0.03818712383508682,
0.04022527486085892,
-0.03042970597743988,
-0.0054535330273211,
-0.018629606813192368,
0.05834469199180603,
0.0471431165933609,
-0.0019398838048800826,
-0.008354896679520607,
0.04785200208425522,
-0.03291524201631546,
-0.061189912259578705,
-0.020124852657318115,
-0.036407146602869034,
-0.040853433310985565,
-0.007111278362572193,
0.01655041053891182,
0.0016414020210504532,
0.008718354627490044,
0.002138200681656599,
-0.0005594893591478467,
0.008884075097739697,
-0.0011775768361985683,
0.030079174786806107,
0.04016689211130142,
-0.0753394290804863,
-0.021483181044459343,
-0.00026007925043813884,
-0.034799132496118546,
-0.007265880703926086,
-0.022119494155049324,
0.02227739244699478,
0.0086674764752388,
0.03154205530881882,
0.02013479359447956,
0.05398396775126457,
0.005938927177339792,
0.025640437379479408,
0.021887974813580513,
-0.039901312440633774,
0.06399920582771301,
0.0060699391178786755,
-0.036950644105672836,
-0.03029012866318226,
0.01795578934252262,
-0.00040714122587814927,
-0.05267717316746712,
-0.070101298391819,
-0.021495092660188675,
0.05919403210282326,
-0.003941591363400221,
-0.0002288656833115965,
-0.0774938315153122,
-0.020672360435128212,
0.04728459194302559,
-0.04548206925392151,
-0.03412612900137901,
0.017732765525579453,
-0.06700780987739563,
0.015655022114515305,
0.014215309172868729,
0.006284136790782213,
0.007543983869254589,
-0.05569971352815628,
0.017364734783768654,
0.002480006543919444,
0.05764293298125267,
-0.014631256461143494,
0.02011973410844803,
-0.11231187731027603,
0.015035578981041908,
-0.010660523548722267,
0.023017946630716324,
0.003849373897537589,
-0.009806429035961628,
0.050106629729270935,
-0.010476500727236271,
0.0027408183086663485,
0.03943865746259689,
0.013460238464176655,
-0.009198237210512161,
0.03433071821928024,
-0.04133089631795883,
-0.012964779511094093,
-0.01527406182140112,
0.06647946685552597,
-0.06384570151567459,
-0.06425164639949799,
-0.01572805643081665,
-0.02240518480539322,
-0.028745222836732864,
0.023217294365167618,
0.04243936389684677,
-0.014485951513051987,
0.014469816349446774,
0.003997488878667355,
0.041712094098329544,
0.05332363024353981,
-0.0071417223662137985,
0.0473778173327446,
0.026810549199581146,
0.016390977427363396,
-0.014490388333797455,
-0.04658863693475723,
-0.03205780312418938,
0.042976442724466324,
0.009540919214487076,
-0.03007941134274006,
-0.04846399649977684,
0.026363015174865723,
0.015424351207911968,
-0.049895331263542175,
0.04770716279745102,
-0.021355681121349335,
-0.05085548385977745,
-0.02860555425286293,
0.040548473596572876,
-0.014992277137935162,
-0.019405975937843323,
0.015906527638435364,
-0.0433848537504673,
-0.0013226722367107868,
-0.06076301261782646,
-0.03816819190979004,
0.004237029701471329,
0.025711026042699814,
-0.02343592792749405,
0.0938776433467865,
0.010416511446237564,
-0.03180748224258423,
0.007811069488525391,
0.025832336395978928,
-0.07468265295028687,
0.06634891778230667,
0.02677089162170887,
0.10259021073579788,
-0.0658240020275116,
-0.044544074684381485,
0.018440306186676025,
0.007599537260830402,
-0.012578390538692474,
0.029086841270327568,
-0.016516277566552162,
-0.0743231475353241,
-0.030899206176400185,
0.004273980390280485,
0.07064826786518097,
-0.04633817449212074,
-0.02249167487025261,
0.02568952552974224,
0.0092705599963665,
0.02081693522632122,
-0.034368596971035004,
-0.0015564017230644822,
-0.004907652735710144,
-0.03305262699723244,
-0.06855417788028717,
0.030892403796315193,
0.0021716298069804907,
-0.02621164359152317,
-0.02947976067662239,
-0.04494963586330414,
0.010944783687591553,
0.10861949622631073,
0.01126413606107235,
-0.00809897668659687,
-0.0458528958261013,
0.013953073881566525,
0.036049023270606995,
0.04631659761071205,
-0.028706148266792297,
0.02691914699971676,
0.0418647900223732,
0.06529126316308975,
-0.0360904261469841,
0.06853590160608292,
-0.02105254866182804,
-0.04454752802848816,
-0.02944972738623619,
0.021202782168984413,
-0.020152902230620384,
-0.04778726398944855,
-0.007619987241923809,
0.01928134262561798,
-0.018856791779398918,
-0.0016864443896338344,
-0.01077364943921566,
0.055062100291252136,
0.029470816254615784,
-0.01886775903403759,
-0.03246680647134781,
0.004470592364668846,
-0.011241225525736809,
0.061762187629938126,
-0.0358174592256546,
-0.009137257002294064,
-0.01936790719628334,
-0.028427954763174057,
-0.004030594602227211,
0.016324376687407494,
0.04534614831209183,
0.03348236158490181,
-0.009871105663478374,
0.09666744619607925,
-0.04746382310986519,
0.0011789877898991108,
-0.04596555233001709,
-0.048517659306526184,
0.01381969079375267,
0.03294309228658676,
0.03791635483503342,
0.026856176555156708,
0.017672915011644363,
-0.024763064458966255,
0.01752159744501114,
0.07139144837856293,
0.041000738739967346,
0.033572968095541,
-0.01948775351047516,
-0.01909833401441574,
0.04559183120727539,
0.0679534524679184,
-0.029786892235279083,
-0.03558783978223801,
0.04094656556844711,
0.02676806040108204,
-0.0253688283264637,
0.01853334717452526,
-0.007073421496897936,
0.01245605293661356,
-0.052364498376846313,
-0.0697045624256134,
0.04670526832342148,
0.01906442642211914,
0.012873081490397453,
0.03092188388109207,
0.0002308089897269383,
0.0005094962543807924,
0.03960193321108818,
-0.004006754141300917,
0.004672585055232048,
-0.06544972211122513,
0.011116325855255127,
-0.0008749015396460891,
0.05887223407626152,
-0.03812423348426819,
0.0444110631942749,
0.008144133724272251,
-0.005605028476566076,
0.056366726756095886,
-0.02564324252307415,
0.036176759749650955,
0.025171495974063873,
0.030081812292337418,
-0.023242438212037086,
0.01624254696071148,
0.01282556913793087,
0.022975482046604156,
0.08491767197847366,
0.007115174550563097,
0.06142202392220497,
-0.002327977679669857,
0.062056686729192734,
0.06310275197029114,
0.018688540905714035,
0.007894384674727917,
0.029492657631635666,
0.055830929428339005,
-0.0002780337235890329,
-0.008284504525363445,
0.06414064764976501,
-0.051616501063108444,
0.022742800414562225,
-0.04804304987192154,
0.03919640928506851,
-0.009566675871610641,
-0.023731965571641922,
0.04478459432721138,
0.005673270206898451,
-0.047027625143527985,
0.00703682703897357,
-0.026623666286468506,
-0.026470329612493515,
0.014765901491045952,
-0.001293014152906835,
-0.029743438586592674,
0.017115749418735504,
-0.01940688118338585,
0.02048625610768795,
-0.07496163994073868,
-0.03564773127436638,
-0.0037974833976477385,
-0.0521576888859272,
0.013586081564426422,
-0.07476437836885452,
-0.05231976881623268,
-0.06698325276374817,
-0.008038782514631748,
0.04380397871136665,
0.00967281125485897,
-0.008646494708955288,
-0.032846685498952866,
0.0044225119054317474,
-0.035275883972644806,
-0.02390139549970627,
-0.06035485491156578,
-0.061695896089076996,
-0.006708495318889618,
-0.0653572604060173,
0.04037964344024658,
-0.01918492093682289,
0.028637472540140152,
0.010810180567204952,
-0.017551137134432793,
-0.025216011330485344,
-0.019350755959749222,
0.0616225004196167,
0.0033047653269022703,
-0.008002083748579025,
-0.03911037743091583,
0.007358331233263016,
-0.022841278463602066,
0.04988682270050049,
-0.0058540841564536095,
-0.03569541499018669,
0.10778430104255676,
0.05883762612938881,
0.03944877162575722,
-0.009982689283788204,
-0.0433117039501667,
-0.05364349111914635,
-0.05152202770113945,
-0.02254001423716545,
-0.01756657473742962,
-0.030593959614634514,
-0.004959303420037031,
-0.05602853372693062,
-0.02590690180659294,
-0.032424986362457275,
-0.040325045585632324,
-0.013635814189910889,
0.019710995256900787,
0.027157675474882126,
0.04094235971570015,
0.05041241645812988,
0.027687212452292442,
-0.02907990664243698,
-0.03334416449069977,
0.03132699802517891,
0.006436345633119345,
0.0020995698869228363,
-0.08228243887424469,
-0.033672086894512177,
0.026142267510294914,
0.027210649102926254,
-0.012991140596568584,
-0.017390552908182144,
0.04601803049445152,
0.0211196206510067,
0.003222846193239093,
0.004059776198118925,
-0.01831565983593464,
-0.0069954777136445045,
-0.02764214389026165,
0.001618596725165844,
-0.03491411730647087,
-0.030278729274868965,
-0.015605301596224308,
-0.007247502449899912,
0.04110682010650635,
-0.0623677521944046,
-0.0578995905816555,
0.00877654179930687,
0.03157854452729225,
0.04102697968482971,
0.021420642733573914,
-0.029479356482625008,
0.0005228865775279701,
-0.06705121695995331,
-0.03494122996926308,
0.03938327729701996,
0.025293169543147087,
-0.014041303656995296,
0.04662550985813141,
0.03914432227611542,
-0.045720379799604416,
0.03710984066128731,
0.02787248231470585,
0.046582967042922974,
0.030230922624468803,
-0.03340141847729683,
0.019572313874959946,
-0.049164459109306335,
0.0229813065379858,
0.005794632714241743,
-0.02946118451654911,
-0.04812786355614662,
-0.08440614491701126,
-0.03334769979119301,
0.01080339029431343,
-0.02019251137971878,
0.0013811432290822268,
0.041111838072538376,
-0.022711263969540596,
-0.050747986882925034,
-0.003919981420040131,
0.0008525086450390518,
0.07183222472667694,
-0.03889552503824234,
0.03132132068276405,
0.009854755364358425,
0.06268011778593063,
-0.03693680092692375,
0.002964169252663851,
-0.023325838148593903,
-0.023077504709362984,
0.00804849248379469,
0.04561799392104149,
0.019736839458346367,
0.06232540309429169,
0.07444067299365997,
0.012039197608828545,
-0.03644940257072449,
0.04733283817768097,
0.04753188416361809,
0.003159709507599473,
-0.024294672533869743,
-0.004329321905970573,
-0.004268737509846687,
-0.030924109742045403,
0.01988314650952816,
-0.011403837241232395,
0.02368188090622425,
0.021470844745635986,
-0.005872886162251234,
0.0019000440370291471,
-0.0006605082890018821,
-0.02559822052717209,
-0.04809367284178734,
-0.03961745277047157,
-0.009050029329955578,
-0.04625498875975609,
-0.05373623967170715,
0.023524457588791847,
0.03794873505830765,
0.017864204943180084,
0.05246112868189812,
0.04472940415143967,
-0.04259214177727699,
-0.03670058771967888,
0.045948658138513565,
0.048253610730171204,
-0.03948007524013519,
-0.04331348091363907,
-0.05463235825300217,
0.035693030804395676,
0.04871170595288277,
-0.025227954611182213,
-0.09283607453107834,
0.0010565873235464096,
0.02843140810728073,
-0.024196123704314232,
0.06537741422653198,
0.025849096477031708,
0.016238735988736153,
0.05449435114860535,
-0.0027605737559497356,
0.028635025024414062,
-0.027284711599349976,
0.016823507845401764,
-0.003707079915329814,
0.04588957875967026,
-0.01697331666946411,
-0.029118523001670837,
-0.037370745092630386,
0.025658011436462402,
0.01587623916566372,
0.03766518458724022,
0.02990756370127201,
-0.006969572044909,
-0.06964226812124252,
-0.0054695699363946915,
0.027526529505848885,
-0.031208282336592674,
0.015604382380843163,
0.019770804792642593,
0.0456438809633255,
-0.047684457153081894,
-0.03087671659886837,
-0.020171131938695908,
-0.016732776537537575,
0.033527571707963943,
0.0015892870724201202,
-0.018708324059844017,
-0.07180097699165344,
0.006251056678593159,
-0.027128081768751144,
-0.0244996789842844,
-0.09103164821863174,
0.04113467037677765,
0.0009205673704855144,
-0.004331700038164854,
0.04802289605140686,
0.03525078669190407,
0.015223009511828423,
0.03704826906323433,
-0.01700677163898945,
0.03198632597923279,
-0.03021887317299843,
0.020820433273911476,
-0.005945596378296614,
-0.023836972191929817,
-0.017402181401848793,
-0.06837142258882523,
-0.025987109169363976,
-0.04850655421614647,
-0.03699681907892227,
-0.044921327382326126,
-0.02418888732790947,
0.008169970475137234,
-0.010147289372980595,
-0.012913713231682777,
-0.006767037324607372,
0.008282924070954323,
-0.021058907732367516,
-0.014003705233335495,
-0.0321841686964035,
-0.04452546685934067,
-0.09423608332872391,
-0.030185380950570107,
0.002098865108564496,
0.039206039160490036,
0.03633837774395943,
-0.0013337269192561507,
0.007728376891463995,
0.026469409465789795,
-0.0049856118857860565,
-0.012804616242647171,
0.016997333616018295,
0.010067061521112919,
-0.04152306169271469,
-0.03391324356198311,
0.008848058991134167,
0.019592421129345894,
0.008031776174902916,
-0.011209691874682903,
0.009468263015151024,
0.046400390565395355,
-0.029712621122598648,
-0.003671617479994893,
0.03951922059059143,
-0.0035186558961868286,
-0.0788542777299881,
-0.0332828164100647,
-0.0021889808122068644,
-0.0427311472594738,
0.03698749095201492,
0.004172142595052719,
-0.020253019407391548,
-0.021632103249430656,
-0.005489896517246962,
0.03298627585172653,
-0.013111413456499577,
-0.023817799985408783,
0.0017490844475105405,
-0.042160555720329285,
0.03802414983510971,
-0.06224357709288597,
0.05608624592423439,
-0.028838729485869408,
-0.005242285784333944,
-0.013023007661104202,
0.00010577436478342861,
-0.03865788131952286,
0.061791252344846725,
-0.003878933610394597,
0.0008245552890002728,
-0.009728938341140747,
0.0028260117396712303,
-0.024568835273385048,
0.030583295971155167,
-0.011052564717829227,
0.013832585886120796,
-0.030067523941397667,
0.008652901276946068,
-0.03754962980747223,
0.006451496388763189,
-0.03228307515382767,
-0.01691892184317112,
-0.014058769680559635,
-0.021249091252684593,
-0.010854693129658699,
-0.054091211408376694,
0.04288051649928093,
0.028923770412802696,
0.027193717658519745,
0.011116620153188705,
-0.027586091309785843,
-0.013570387847721577,
0.031230321153998375,
-0.09199203550815582,
-0.04080761969089508,
-0.021741412580013275,
0.0076620024628937244,
-0.02250739000737667,
0.0676666647195816,
0.05662824586033821,
-0.04640277102589607,
-0.01288579311221838,
0.023836005479097366,
0.01307829562574625,
0.0064325095154345036,
0.027714427560567856,
0.01959906332194805,
0.04506934434175491,
0.056682899594306946,
-0.044692859053611755,
-0.00837954692542553,
-0.002916214521974325,
-0.0062070582062006,
-0.022882511839270592,
-0.012219212017953396,
0.019411101937294006,
-0.004293009173125029,
-0.04955538362264633,
-0.018926048651337624,
0.055885810405015945,
0.05424885451793671,
0.01839401014149189,
0.008473986759781837,
-0.028593305498361588,
0.030547894537448883,
0.005003317724913359,
-0.05394219607114792,
-0.03869037330150604,
0.01897621899843216,
-0.04697108641266823,
0.07680109888315201,
-0.00934845581650734,
0.01339035015553236,
0.020804818719625473,
0.03207952156662941,
0.011318235658109188,
0.04525971785187721,
-0.03384261950850487,
-0.005893112160265446,
0.029758473858237267,
-0.05377219244837761,
-0.006470309104770422,
-0.0037651427555829287,
0.06072811782360077,
-0.04800878092646599,
0.034007154405117035,
0.02386685088276863,
0.02458801493048668,
-0.010021883994340897,
-0.02460995316505432,
-0.045392245054244995,
0.040440138429403305,
-0.05712644383311272,
0.06479015201330185,
-0.018823200836777687,
-0.07842235267162323,
0.08269856125116348,
0.025725822895765305,
-0.0956442654132843,
0.006608756259083748,
0.042662084102630615,
0.014753365889191628,
0.03060227632522583,
0.040988046675920486,
-0.07005714625120163,
0.0017057715449482203,
-0.04932115599513054,
0.010532024316489697,
-0.0634242445230484,
-0.003990224562585354,
0.02735724486410618,
-0.05815305933356285,
0.0072793252766132355,
0.031772516667842865,
-0.01631796732544899,
0.003534389194101095,
0.01710626296699047,
-0.050039809197187424,
-0.03674963489174843,
-0.022135041654109955,
0.0012298632645979524,
-0.02540517970919609,
0.025447189807891846,
-0.019785666838288307,
0.03888577222824097,
0.012677300721406937,
0.006473048124462366,
-0.04083021730184555,
0.010737675242125988,
0.02630595676600933,
-0.03543662652373314,
-0.027217717841267586,
0.024413999170064926,
0.009376338683068752,
-0.012963932007551193,
0.022143473848700523,
-0.015104063786566257,
0.017732396721839905,
0.032107818871736526,
-0.024356963112950325,
0.013189371675252914,
-0.04146363586187363,
0.0003780435072258115,
0.021856028586626053,
0.014227569103240967,
0.03965361416339874,
-0.008927657268941402,
0.035061344504356384,
0.027388136833906174,
0.03406350687146187,
-0.016592225059866905,
-0.023284971714019775,
-0.019910449162125587,
0.015950651839375496,
-0.03726252540946007,
0.022232022136449814,
0.022063158452510834,
-0.04359467327594757,
-0.04286281764507294,
-0.02943841926753521,
-0.02441825345158577,
0.05633842200040817,
-0.04222030192613602,
0.011645221151411533,
0.06085216626524925,
-0.00842753704637289,
-0.05624121055006981,
-0.06561069935560226,
-0.011880875565111637,
-0.013305837288498878,
0.025078793987631798,
0.028121361508965492,
-0.02975701168179512,
-0.01128773670643568,
-0.05306271091103554,
-0.06842131912708282,
0.040474385023117065,
0.016895191743969917,
-0.01585458777844906,
0.05115523561835289,
0.04494372382760048,
-0.023388367146253586,
0.01915445551276207,
0.01799616403877735,
-0.048470623791217804,
0.03260089457035065,
0.007025308907032013,
0.016967248171567917,
0.03545771539211273,
0.03784951567649841,
-0.008626651018857956,
-0.0443769171833992,
-0.07602600008249283,
-0.026842135936021805,
-0.03393232822418213,
-0.015986623242497444,
0.070906862616539
] |
CM-CA/Cartman | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | 2021-02-17T09:00:04Z | ---
tags:
- summarization
widget:
- text: "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
---
# CodeTrans model for code documentation generation python
Pretrained model on programming language python using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the code documentation generation task for the python function/method.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_python_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_python_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/python/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 500 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing python code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.012244763784110546,
-0.01889462023973465,
-0.006415656302124262,
0.021898049861192703,
0.03885267302393913,
0.03629385679960251,
-0.02795579843223095,
-0.002023915760219097,
-0.01882178708910942,
0.05690763145685196,
0.048101697117090225,
-0.005274207331240177,
-0.005456885322928429,
0.04809615761041641,
-0.03176551312208176,
-0.05962144210934639,
-0.027702325955033302,
-0.03779652342200279,
-0.04587397351861,
-0.00452504213899374,
0.015596837736666203,
-0.0031102849170565605,
0.004929684102535248,
0.003345528384670615,
-0.0029073322657495737,
0.01128313597291708,
-0.0006972244009375572,
0.02446555718779564,
0.044113270938396454,
-0.07165677100419998,
-0.017514286562800407,
-0.0014955948572605848,
-0.03828806057572365,
-0.008436146192252636,
-0.024192124605178833,
0.021360181272029877,
0.009776891209185123,
0.02882843278348446,
0.017087819054722786,
0.056784626096487045,
0.007256811019033194,
0.028511231765151024,
0.02641202323138714,
-0.03547593578696251,
0.06430592387914658,
0.004676789045333862,
-0.03594589605927467,
-0.03455280140042305,
0.017318779602646828,
-0.0007441111956723034,
-0.05312555283308029,
-0.06885683536529541,
-0.024143237620592117,
0.05966755375266075,
-0.0034506074152886868,
0.000994846923276782,
-0.08063648641109467,
-0.019494354724884033,
0.051516707986593246,
-0.04549534246325493,
-0.03519294783473015,
0.01829623617231846,
-0.06732004135847092,
0.015651727095246315,
0.014428787864744663,
0.007635115645825863,
0.006311385426670313,
-0.05195975676178932,
0.01615995727479458,
0.005567107815295458,
0.05369216948747635,
-0.01060341764241457,
0.02307993173599243,
-0.11145098507404327,
0.01503999624401331,
-0.01223695557564497,
0.02399139292538166,
0.002379177138209343,
-0.01139467116445303,
0.0530674085021019,
-0.010289316065609455,
0.0033523321617394686,
0.0402396135032177,
0.015061898157000542,
-0.008086257614195347,
0.03806445375084877,
-0.037014901638031006,
-0.014643770642578602,
-0.015556257218122482,
0.06376387923955917,
-0.06488491594791412,
-0.06671459227800369,
-0.015600175596773624,
-0.025218134745955467,
-0.029116900637745857,
0.020248396322131157,
0.043059851974248886,
-0.012937325984239578,
0.013909720815718174,
0.00456875329837203,
0.041256364434957504,
0.05864635109901428,
-0.008112149313092232,
0.04497222974896431,
0.028470758348703384,
0.019210556522011757,
-0.012401175685226917,
-0.045804351568222046,
-0.03227423503994942,
0.04089236631989479,
0.007637566886842251,
-0.029525920748710632,
-0.05003955215215683,
0.024799473583698273,
0.014022703282535076,
-0.05340658873319626,
0.04989415779709816,
-0.02392508089542389,
-0.05047212913632393,
-0.028009478002786636,
0.04237433895468712,
-0.014730619266629219,
-0.022196220234036446,
0.013244527392089367,
-0.04806194454431534,
-0.0021682227961719036,
-0.0634489357471466,
-0.037717923521995544,
0.003960203379392624,
0.025548748672008514,
-0.01801316626369953,
0.09306617826223373,
0.008894397877156734,
-0.028581220656633377,
0.00454228650778532,
0.026766475290060043,
-0.0737001970410347,
0.06650889664888382,
0.027715211734175682,
0.10316698253154755,
-0.06427973508834839,
-0.044258635491132736,
0.015317674726247787,
0.005774500779807568,
-0.015147464349865913,
0.02804032899439335,
-0.020535357296466827,
-0.07334843277931213,
-0.031773388385772705,
0.0032302436884492636,
0.07103249430656433,
-0.046581145375967026,
-0.02296357974410057,
0.02461095340549946,
0.0030834884382784367,
0.02030709572136402,
-0.03716123476624489,
-0.0027751962188631296,
-0.00789552927017212,
-0.03390073403716087,
-0.06869490444660187,
0.03249547258019447,
-0.0011950304033234715,
-0.024102983996272087,
-0.02911352552473545,
-0.04225685074925423,
0.010094688273966312,
0.10761288553476334,
0.009387410245835781,
-0.009961526840925217,
-0.05175396427512169,
0.017206139862537384,
0.034276533871889114,
0.048425525426864624,
-0.027352433651685715,
0.021856365725398064,
0.04019409045577049,
0.06469082087278366,
-0.03495350852608681,
0.07010659575462341,
-0.02396135963499546,
-0.04646654054522514,
-0.03306305781006813,
0.02353663183748722,
-0.01620148867368698,
-0.049436427652835846,
-0.005620654206722975,
0.023502245545387268,
-0.016283411532640457,
-0.0011213412508368492,
-0.005033586639910936,
0.055273644626140594,
0.027998950332403183,
-0.020423205569386482,
-0.031223053112626076,
0.007856812328100204,
-0.01476718857884407,
0.06870149821043015,
-0.032911963760852814,
-0.008802867494523525,
-0.022698622196912766,
-0.02698749676346779,
-0.006401084829121828,
0.015268637798726559,
0.04463374987244606,
0.029397588223218918,
-0.008558271452784538,
0.09687113016843796,
-0.05030183866620064,
-0.002954759169369936,
-0.050231754779815674,
-0.05117034167051315,
0.01461738720536232,
0.03241618722677231,
0.039023298770189285,
0.0262974351644516,
0.017128337174654007,
-0.028940042480826378,
0.018764469772577286,
0.07325182855129242,
0.03886330872774124,
0.03196675330400467,
-0.017025789245963097,
-0.022158479318022728,
0.047317441552877426,
0.06675293296575546,
-0.0366678349673748,
-0.03506240248680115,
0.04019542410969734,
0.028224339708685875,
-0.026256559416651726,
0.01936359703540802,
-0.0044911643490195274,
0.012241479009389877,
-0.045634675770998,
-0.06955345720052719,
0.04508521035313606,
0.021403657272458076,
0.016267061233520508,
0.031125014647841454,
-0.0008810898871161044,
-0.002377026015892625,
0.03703251853585243,
-0.001414224854670465,
0.003139178268611431,
-0.0642818808555603,
0.013002418912947178,
-0.002345535671338439,
0.0558588020503521,
-0.034944839775562286,
0.04425332322716713,
0.01408761739730835,
-0.004467185121029615,
0.04810013994574547,
-0.0239946860820055,
0.03488798439502716,
0.028797080740332603,
0.030921531841158867,
-0.02415221557021141,
0.018549293279647827,
0.014715878292918205,
0.02061380073428154,
0.08548863977193832,
0.003940308000892401,
0.06005147472023964,
-0.0004601060354616493,
0.06139800697565079,
0.06449393928050995,
0.019436530768871307,
0.0047392044216394424,
0.029940741136670113,
0.056737300008535385,
-0.005584379658102989,
-0.011680393479764462,
0.06734860688447952,
-0.04855101555585861,
0.023265386000275612,
-0.04726496338844299,
0.04197920113801956,
-0.010730711743235588,
-0.025334320962429047,
0.04425269365310669,
0.0046368916518986225,
-0.0524480938911438,
0.00515836663544178,
-0.027201304212212563,
-0.02230672352015972,
0.013147115707397461,
0.001429630327038467,
-0.02341696433722973,
0.017207752913236618,
-0.01925068348646164,
0.024814872071146965,
-0.07360320538282394,
-0.03928964212536812,
-0.0035590713378041983,
-0.05422108620405197,
0.01389898918569088,
-0.07440312206745148,
-0.05553743988275528,
-0.06613333523273468,
-0.005051241721957922,
0.042492080479860306,
0.004578176885843277,
-0.008017090149223804,
-0.02983810380101204,
0.0017363055376335979,
-0.030508920550346375,
-0.025286143645644188,
-0.059727512300014496,
-0.06172836199402809,
-0.005266628693789244,
-0.0684739500284195,
0.04129824787378311,
-0.021112633869051933,
0.031548187136650085,
0.009778669103980064,
-0.015156242065131664,
-0.023382697254419327,
-0.018818702548742294,
0.05958681181073189,
0.003269111504778266,
-0.012588545680046082,
-0.04106666520237923,
0.007442973554134369,
-0.021049996837973595,
0.050321150571107864,
-0.008637349121272564,
-0.036541733890771866,
0.10478171706199646,
0.0572226382791996,
0.04047282412648201,
-0.00961971003562212,
-0.04018392413854599,
-0.051185764372348785,
-0.04487454518675804,
-0.02290935255587101,
-0.01668759621679783,
-0.03203846514225006,
-0.007319952826946974,
-0.05453198030591011,
-0.02679974026978016,
-0.03033951297402382,
-0.04335954412817955,
-0.014939834363758564,
0.015502763912081718,
0.024242188781499863,
0.043505795300006866,
0.052808910608291626,
0.0313883014023304,
-0.02291388437151909,
-0.038512811064720154,
0.032559093087911606,
0.004862689413130283,
-0.0009559118188917637,
-0.07963069528341293,
-0.04067237675189972,
0.023790962994098663,
0.026640407741069794,
-0.013210223987698555,
-0.01769649237394333,
0.0453958623111248,
0.022113829851150513,
0.0023968894965946674,
0.0030482544098049402,
-0.016814129427075386,
-0.015445798635482788,
-0.025575412437319756,
-0.0043993666768074036,
-0.036007557064294815,
-0.03157413750886917,
-0.01270826905965805,
-0.010433913208544254,
0.04143930971622467,
-0.05995908007025719,
-0.05730387195944786,
0.008510155603289604,
0.02766854502260685,
0.04621942341327667,
0.021181486546993256,
-0.033364858478307724,
-0.0019181134412065148,
-0.06794341653585434,
-0.034588247537612915,
0.03833000734448433,
0.025732116773724556,
-0.013615063391625881,
0.04617852717638016,
0.04335501044988632,
-0.043746720999479294,
0.03288134187459946,
0.02891424298286438,
0.045041125267744064,
0.027055472135543823,
-0.032980505377054214,
0.019594479352235794,
-0.055413324385881424,
0.02626909501850605,
0.005756014958024025,
-0.02893155813217163,
-0.045053109526634216,
-0.08061724901199341,
-0.03653797507286072,
0.005703142378479242,
-0.018052510917186737,
0.0007699294365011156,
0.038374997675418854,
-0.024721095338463783,
-0.0530417300760746,
-0.007273287978023291,
-0.0019572742749005556,
0.06979460269212723,
-0.03634147346019745,
0.029239242896437645,
0.013155798427760601,
0.06440193951129913,
-0.038097210228443146,
-0.00255113048478961,
-0.022315794602036476,
-0.02565963938832283,
0.008522868156433105,
0.04379640519618988,
0.01939277909696102,
0.06369512528181076,
0.07028354704380035,
0.005978298373520374,
-0.036997031420469284,
0.05187549814581871,
0.047807373106479645,
0.0037497393786907196,
-0.026287434622645378,
-0.004177454859018326,
-0.005626423750072718,
-0.029408669099211693,
0.021975092589855194,
-0.009760425426065922,
0.02254754677414894,
0.022831421345472336,
-0.0038443435914814472,
0.0013665558071807027,
-0.0004319631843827665,
-0.017180543392896652,
-0.04679473862051964,
-0.0419374443590641,
-0.007332483772188425,
-0.04607311636209488,
-0.05236469581723213,
0.020689746364951134,
0.034284889698028564,
0.020080115646123886,
0.05667031183838844,
0.04182276129722595,
-0.04483344778418541,
-0.038730598986148834,
0.05063680186867714,
0.045777030289173126,
-0.03989040106534958,
-0.043332476168870926,
-0.053523216396570206,
0.035088762640953064,
0.049859192222356796,
-0.017567310482263565,
-0.09641426056623459,
-0.0011277943849563599,
0.027106547728180885,
-0.024829436093568802,
0.06479837745428085,
0.025371035560965538,
0.019333692267537117,
0.057085052132606506,
-0.0014904951676726341,
0.02693137340247631,
-0.026316935196518898,
0.012347728945314884,
-0.006312718614935875,
0.04246477037668228,
-0.01750551164150238,
-0.030495164915919304,
-0.038629721850156784,
0.02631017193198204,
0.014658032916486263,
0.035141486674547195,
0.02820500358939171,
-0.009174441918730736,
-0.06899955868721008,
-0.005916832014918327,
0.025353433564305305,
-0.027408022433519363,
0.014940562658011913,
0.022946640849113464,
0.04212988540530205,
-0.04608088359236717,
-0.031541407108306885,
-0.019539805129170418,
-0.01509428583085537,
0.03961851820349693,
0.0031495511066168547,
-0.019989030435681343,
-0.07248178869485855,
0.008262336254119873,
-0.026644418016076088,
-0.02478407695889473,
-0.0882241427898407,
0.040393829345703125,
-0.0016885516233742237,
-0.009623655118048191,
0.048272505402565,
0.0355462022125721,
0.015482245944440365,
0.03564475104212761,
-0.020167028531432152,
0.03425479680299759,
-0.02560517005622387,
0.019739780575037003,
-0.0031345339957624674,
-0.026582473888993263,
-0.020356331020593643,
-0.06804399937391281,
-0.030312830582261086,
-0.04395640641450882,
-0.03780385106801987,
-0.04594902694225311,
-0.022181009873747826,
0.008541704155504704,
-0.011994382366538048,
-0.015938136726617813,
-0.005773307289928198,
0.0092344731092453,
-0.023371612653136253,
-0.017102817073464394,
-0.030131248757243156,
-0.04243139550089836,
-0.09788980334997177,
-0.03309135511517525,
0.0029933874029666185,
0.03985527157783508,
0.040330495685338974,
-0.004850205034017563,
0.005671532358974218,
0.029066666960716248,
-0.004866589326411486,
-0.017316192388534546,
0.012827020138502121,
0.011852148920297623,
-0.04255533590912819,
-0.038884855806827545,
0.010741815902292728,
0.02004040591418743,
0.00479886494576931,
-0.014323221519589424,
0.007644277531653643,
0.04714680835604668,
-0.0313565768301487,
-0.0067435372620821,
0.04215055704116821,
-0.00511122914031148,
-0.07766323536634445,
-0.0327911339700222,
-0.0043434458784759045,
-0.04497283697128296,
0.036829665303230286,
0.0016855746507644653,
-0.018016861751675606,
-0.024362290278077126,
0.002801348688080907,
0.030453532934188843,
-0.016359711065888405,
-0.02511393092572689,
-0.00305241160094738,
-0.03862972930073738,
0.040421489626169205,
-0.05782485380768776,
0.053862378001213074,
-0.02879369631409645,
-0.0030650815460830927,
-0.016855938360095024,
0.004670574329793453,
-0.040249500423669815,
0.06253710389137268,
-0.0040348065085709095,
0.0005854537594132125,
-0.007423879578709602,
0.009257488884031773,
-0.01928587444126606,
0.029924748465418816,
-0.014638409949839115,
0.014337603934109211,
-0.033692870289087296,
0.017820952460169792,
-0.03979467228055,
0.006519469432532787,
-0.03225010633468628,
-0.019564364105463028,
-0.01646598055958748,
-0.01920465938746929,
-0.007832681760191917,
-0.05217871069908142,
0.04189278185367584,
0.028259897604584694,
0.026894323527812958,
0.012835939414799213,
-0.027811573818325996,
-0.01099179033190012,
0.026124214753508568,
-0.09123344719409943,
-0.041804902255535126,
-0.01619187742471695,
0.009379994124174118,
-0.022195201367139816,
0.068606436252594,
0.05587027221918106,
-0.04776419326663017,
-0.010933359153568745,
0.024233859032392502,
0.014405672438442707,
-0.0014626325573772192,
0.023816047236323357,
0.017214128747582436,
0.047597553580999374,
0.0521405003964901,
-0.04401411488652229,
-0.012610910460352898,
-0.002621765248477459,
-0.003402536269277334,
-0.025630926713347435,
-0.009998388588428497,
0.02096203900873661,
0.0022960458882153034,
-0.04730407893657684,
-0.021586058661341667,
0.05638158693909645,
0.05511993542313576,
0.01781814731657505,
0.00838641170412302,
-0.027861814945936203,
0.03306164592504501,
0.001002707751467824,
-0.05039504915475845,
-0.03862394765019417,
0.015584811568260193,
-0.04940247908234596,
0.07554839551448822,
-0.007966717705130577,
0.013629425317049026,
0.021116701886057854,
0.030717115849256516,
0.010472423397004604,
0.044661443680524826,
-0.03450945019721985,
-0.011098455637693405,
0.02437179535627365,
-0.05338113382458687,
-0.008172594010829926,
-0.0046769180335104465,
0.05875362455844879,
-0.04401731118559837,
0.038022592663764954,
0.026695232838392258,
0.0199846550822258,
-0.008211621083319187,
-0.024959702044725418,
-0.03950110450387001,
0.04167232662439346,
-0.06399184465408325,
0.061654284596443176,
-0.016775479540228844,
-0.08346562087535858,
0.08137659728527069,
0.02461341768503189,
-0.09355983138084412,
0.0033558125142008066,
0.042396239936351776,
0.012425779365003109,
0.02815438248217106,
0.042512815445661545,
-0.07030162960290909,
0.004368001129478216,
-0.04839417710900307,
0.014749427326023579,
-0.06640323996543884,
-0.00903697032481432,
0.028520306572318077,
-0.05671607330441475,
0.0076568820513784885,
0.03569602966308594,
-0.015505790710449219,
0.006253957748413086,
0.02216947264969349,
-0.04696528613567352,
-0.03193219378590584,
-0.02485671453177929,
0.0005706807714886963,
-0.021338898688554764,
0.018054893240332603,
-0.01744127832353115,
0.04108213633298874,
0.011703141033649445,
0.006943253334611654,
-0.03988159820437431,
0.01414710097014904,
0.027769047766923904,
-0.03566377982497215,
-0.02675236016511917,
0.02516099065542221,
0.006539528723806143,
-0.011970249935984612,
0.0236909631639719,
-0.014663223177194595,
0.015850044786930084,
0.034065891057252884,
-0.025927599519491196,
0.011242333799600601,
-0.034623775631189346,
-0.0017601987347006798,
0.018043294548988342,
0.011085799895226955,
0.03981170430779457,
-0.007679671049118042,
0.037378743290901184,
0.027416203171014786,
0.03500406816601753,
-0.016390882432460785,
-0.024332091212272644,
-0.018428204581141472,
0.01619470678269863,
-0.03680040314793587,
0.025096295401453972,
0.02102450095117092,
-0.04485691338777542,
-0.04264746978878975,
-0.030562082305550575,
-0.02575327455997467,
0.05817151814699173,
-0.038754720240831375,
0.014845279045403004,
0.06284794211387634,
-0.006457998417317867,
-0.05357156693935394,
-0.064521923661232,
-0.014432251453399658,
-0.014630586840212345,
0.01997627317905426,
0.028629012405872345,
-0.029385555535554886,
-0.009948299266397953,
-0.04981376230716705,
-0.0673762708902359,
0.04239653795957565,
0.01972947269678116,
-0.018009478226304054,
0.051619477570056915,
0.043881963938474655,
-0.02419159561395645,
0.01936880126595497,
0.012788753025233746,
-0.04476301744580269,
0.027101583778858185,
0.0023420744109898806,
0.018637165427207947,
0.035086195915937424,
0.038165681064128876,
-0.010868540965020657,
-0.04711764305830002,
-0.07748584449291229,
-0.022635657340288162,
-0.03268958628177643,
-0.01553893368691206,
0.07105299085378647
] |
CM-CA/DialoGPT-small-cartman | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
---
# CodeTrans model for code documentation generation ruby
Pretrained model on programming language ruby using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized ruby code functions: it works best with tokenized ruby functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the ruby function or be fine-tuned on other ruby code tasks. It can be used on unparsed and untokenized ruby code. However, if the ruby code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate ruby function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_ruby_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_ruby_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/ruby/base_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 80,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. (We have trained in total 260,000 steps.)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.001478595077060163,
-0.02056748792529106,
-0.009275779128074646,
0.024441592395305634,
0.04810251295566559,
0.03701433911919594,
-0.0369868166744709,
-0.008389560505747795,
-0.017247362062335014,
0.06376253813505173,
0.04805807024240494,
0.0007428718963637948,
-0.009401481598615646,
0.045675020664930344,
-0.030702844262123108,
-0.06198742240667343,
-0.02242506854236126,
-0.02265886776149273,
-0.04452989995479584,
-0.011381067335605621,
0.0172444935888052,
-0.0041762120090425014,
0.002363945124670863,
-0.0035637670662254095,
0.007878320291638374,
0.011412469670176506,
-0.009255698882043362,
0.026136668398976326,
0.03361646458506584,
-0.0733414888381958,
-0.023549553006887436,
0.0009009563946165144,
-0.03641914576292038,
-0.0026674019172787666,
-0.01733097992837429,
0.024932052940130234,
0.015962650999426842,
0.03771720081567764,
0.013324498198926449,
0.0492689274251461,
0.016737984493374825,
0.020454110577702522,
0.01601182296872139,
-0.04652989283204079,
0.05481432005763054,
0.004483601078391075,
-0.03543340042233467,
-0.026316508650779724,
0.021931370720267296,
-0.0093794921413064,
-0.057997383177280426,
-0.06521469354629517,
-0.017295043915510178,
0.0526496022939682,
-0.0060102432034909725,
-0.00781994964927435,
-0.06952043622732162,
-0.021536950021982193,
0.049878936260938644,
-0.04422032833099365,
-0.029333602637052536,
0.013425419107079506,
-0.06279084086418152,
0.01921226643025875,
0.014296155422925949,
-0.005519535392522812,
0.006662857253104448,
-0.046599749475717545,
0.026676012203097343,
0.000858963408973068,
0.05694887042045593,
-0.019687434658408165,
0.029742000624537468,
-0.10910335183143616,
0.013873649761080742,
-0.004149272572249174,
0.02117309905588627,
0.010462628677487373,
-0.005125254858285189,
0.0548073835670948,
-0.009807024151086807,
0.002332923002541065,
0.04830770567059517,
0.010754071176052094,
-0.001431393320672214,
0.03493015468120575,
-0.036181166768074036,
-0.009596099145710468,
-0.02077210135757923,
0.06307834386825562,
-0.06178988143801689,
-0.06433714181184769,
-0.02209020033478737,
-0.018445689231157303,
-0.039457958191633224,
0.028092985972762108,
0.048180900514125824,
-0.022423770278692245,
0.021818118169903755,
0.005674796178936958,
0.038905031979084015,
0.052170585840940475,
-0.006759310606867075,
0.03695594146847725,
0.02489948458969593,
0.015600218437612057,
-0.02393614500761032,
-0.03471013903617859,
-0.03037235327064991,
0.049803294241428375,
0.008491388522088528,
-0.03522457554936409,
-0.04769565910100937,
0.01816178858280182,
0.014487127773463726,
-0.042960528284311295,
0.043849293142557144,
-0.02087872102856636,
-0.05103210732340813,
-0.04152227193117142,
0.04431604966521263,
-0.010210840031504631,
-0.02407555840909481,
0.03201015666127205,
-0.045950986444950104,
0.008227236568927765,
-0.061521176248788834,
-0.04139476269483566,
0.00728365546092391,
0.023216014727950096,
-0.015561245381832123,
0.09613336622714996,
0.010888551361858845,
-0.04191787913441658,
0.0038118166849017143,
0.025196567177772522,
-0.07222802937030792,
0.06677205860614777,
0.03003004752099514,
0.11064765602350235,
-0.05945815145969391,
-0.04575303941965103,
0.030459465458989143,
0.007439031731337309,
-0.014464229345321655,
0.03137614205479622,
-0.012403822503983974,
-0.07381730526685715,
-0.02208678238093853,
0.000482916715554893,
0.05795695632696152,
-0.05001705512404442,
-0.030036065727472305,
0.023546649143099785,
0.009345173835754395,
0.021278688684105873,
-0.030119741335511208,
-0.003838389413431287,
-0.0016339640133082867,
-0.03163643553853035,
-0.06875582039356232,
0.0340176559984684,
-0.009787091054022312,
-0.02571169286966324,
-0.023491254076361656,
-0.04050532728433609,
0.010318244807422161,
0.10354765504598618,
0.013856501318514347,
-0.0076914760284125805,
-0.03822539746761322,
0.01454145833849907,
0.03777989372611046,
0.04833923280239105,
-0.025108173489570618,
0.02561725676059723,
0.03504336252808571,
0.06472782045602798,
-0.03758610412478447,
0.07272005826234818,
-0.018049616366624832,
-0.04832765460014343,
-0.027874130755662918,
0.023444166406989098,
-0.014141980558633804,
-0.04205571115016937,
-0.00048594584222882986,
0.02240091934800148,
-0.01261780597269535,
-0.009537438862025738,
-0.01342223770916462,
0.051539771258831024,
0.016773518174886703,
-0.014658196829259396,
-0.02671394869685173,
0.01997767947614193,
-0.0035443289671093225,
0.05923197790980339,
-0.03586363047361374,
-0.014831037260591984,
-0.024985304102301598,
-0.02898591198027134,
0.0028298087418079376,
0.02114015631377697,
0.04057466983795166,
0.03561161831021309,
-0.012761106714606285,
0.10377456992864609,
-0.0468352772295475,
0.009413477964699268,
-0.04722174257040024,
-0.04456809535622597,
0.01224181056022644,
0.03255680575966835,
0.03499295562505722,
0.02649660035967827,
0.011384079232811928,
-0.026365036144852638,
0.0179611723870039,
0.07908329367637634,
0.04179924353957176,
0.035646677017211914,
-0.01134224608540535,
-0.023426325991749763,
0.034133922308683395,
0.05902066454291344,
-0.032855574041604996,
-0.03883717954158783,
0.04577077552676201,
0.02509264275431633,
-0.019743215292692184,
0.025721825659275055,
-0.00737345777451992,
0.005323614925146103,
-0.049396999180316925,
-0.06353000551462173,
0.04153924807906151,
0.012058173306286335,
0.005115237087011337,
0.0361422561109066,
0.0007665704470127821,
-0.002764842240139842,
0.03643755242228508,
0.002856302075088024,
0.004251334350556135,
-0.062262050807476044,
0.007060142233967781,
0.004483899101614952,
0.06127937138080597,
-0.03226785734295845,
0.037244003266096115,
0.01594441384077072,
0.0007059309864416718,
0.05511375516653061,
-0.026315681636333466,
0.029774397611618042,
0.03612537309527397,
0.02363043837249279,
-0.0185711570084095,
0.01680307649075985,
0.01944641023874283,
0.021926207467913628,
0.08521102368831635,
0.01027850341051817,
0.06586174666881561,
0.0005447859293781221,
0.05573262274265289,
0.06650853902101517,
0.024096334353089333,
0.00261169602163136,
0.028414286673069,
0.06236131861805916,
-0.003017473267391324,
-0.013759813271462917,
0.061978988349437714,
-0.05858808010816574,
0.024613549932837486,
-0.041673172265291214,
0.027145985513925552,
-0.014591000974178314,
-0.030634736642241478,
0.03609069809317589,
0.011544314213097095,
-0.03788362070918083,
0.00861796922981739,
-0.024475855752825737,
-0.028722507879137993,
0.014094214886426926,
-0.00028703344287350774,
-0.020142441615462303,
0.012908143922686577,
-0.02646784298121929,
0.019372815266251564,
-0.07882429659366608,
-0.04548347741365433,
-0.01064315252006054,
-0.0407412126660347,
0.015650028362870216,
-0.08008184283971786,
-0.060908541083335876,
-0.06895769387483597,
-0.016217105090618134,
0.039651528000831604,
0.004353953059762716,
-0.011543333530426025,
-0.026376282796263695,
0.005578787997364998,
-0.029261797666549683,
-0.02347145788371563,
-0.061894237995147705,
-0.06849111616611481,
-0.01407618448138237,
-0.0641288012266159,
0.03126974776387215,
-0.019019709900021553,
0.02847619727253914,
0.005712864920496941,
-0.020031418651342392,
-0.030048176646232605,
-0.02411583624780178,
0.06320793181657791,
0.002714423229917884,
-0.005926915910094976,
-0.02439950779080391,
0.008569040335714817,
-0.025071557611227036,
0.043118465691804886,
0.007962518371641636,
-0.04588145390152931,
0.10474176704883575,
0.05393189936876297,
0.04359756037592888,
-0.007475799880921841,
-0.04426399990916252,
-0.0517825148999691,
-0.05133341997861862,
-0.024647526443004608,
-0.017715858295559883,
-0.032295674085617065,
-0.009122905321419239,
-0.05469328537583351,
-0.018445787951350212,
-0.028978869318962097,
-0.03345766291022301,
-0.010530422441661358,
0.026969745755195618,
0.02365196868777275,
0.03620021045207977,
0.05604475364089012,
0.022371109575033188,
-0.02650631219148636,
-0.026524879038333893,
0.03476565331220627,
0.006430806126445532,
0.0024779499508440495,
-0.08363424241542816,
-0.02462475374341011,
0.03288297355175018,
0.0245412215590477,
-0.005437531042844057,
-0.017249878495931625,
0.03528584912419319,
0.021419543772935867,
0.008764561265707016,
0.005502406507730484,
-0.010905932635068893,
-0.006051554344594479,
-0.017979061231017113,
-0.0012090947711840272,
-0.036800701171159744,
-0.029602985829114914,
-0.025218673050403595,
-0.007267162203788757,
0.04174808785319328,
-0.059028707444667816,
-0.0561993308365345,
-0.0012575468281283975,
0.032016415148973465,
0.03529176115989685,
0.0185023695230484,
-0.022779615595936775,
0.009114124812185764,
-0.05277365818619728,
-0.04252849146723747,
0.04109238460659981,
0.014311237260699272,
-0.01011443231254816,
0.037683453410863876,
0.03875679150223732,
-0.05152410268783569,
0.04265185818076134,
0.02368946373462677,
0.042770009487867355,
0.02610795944929123,
-0.03621332347393036,
0.014918264001607895,
-0.044162213802337646,
0.02703462354838848,
0.004710512701421976,
-0.03740401566028595,
-0.04778685048222542,
-0.08696026355028152,
-0.027926616370677948,
0.016758104786276817,
-0.024609126150608063,
0.008188900537788868,
0.04824010655283928,
-0.01690252497792244,
-0.04237787798047066,
-0.008038491010665894,
0.004852300509810448,
0.06574618071317673,
-0.032037969678640366,
0.029995182529091835,
0.01033452246338129,
0.06311551481485367,
-0.042664237320423126,
0.006410074420273304,
-0.03116602450609207,
-0.024513239040970802,
0.008526977151632309,
0.05759945511817932,
0.027716904878616333,
0.06623983383178711,
0.07617660611867905,
0.01707334816455841,
-0.036227427423000336,
0.03873113915324211,
0.05713718757033348,
-0.0013951942091807723,
-0.01678507775068283,
-0.0001212839488289319,
0.001621900824829936,
-0.020708097144961357,
0.015336128883063793,
-0.006191630382090807,
0.02059609815478325,
0.027894258499145508,
-0.005078726448118687,
0.00755819259211421,
-0.004420301876962185,
-0.03929613158106804,
-0.05466201901435852,
-0.045048680156469345,
0.0029864697717130184,
-0.04113730415701866,
-0.05666162446141243,
0.027908142656087875,
0.04609445482492447,
0.02178375795483589,
0.05302957817912102,
0.041856683790683746,
-0.03401761129498482,
-0.035081978887319565,
0.044044025242328644,
0.045234564691782,
-0.045293211936950684,
-0.039632219821214676,
-0.051911599934101105,
0.030064444988965988,
0.05055225268006325,
-0.023907287046313286,
-0.08891354501247406,
0.012428592890501022,
0.03568599373102188,
-0.027615759521722794,
0.06942585110664368,
0.024783020839095116,
0.0183631032705307,
0.04719516634941101,
-0.01305902935564518,
0.027764292433857918,
-0.026398196816444397,
0.030196066945791245,
0.000565775204449892,
0.039995577186346054,
-0.008038042113184929,
-0.020232902839779854,
-0.03397403284907341,
0.023256003856658936,
0.003047121921554208,
0.040953487157821655,
0.03432992845773697,
-0.011816597543656826,
-0.06943559646606445,
-0.0011984586017206311,
0.03306782990694046,
-0.03685431554913521,
0.01677582785487175,
0.024158477783203125,
0.050454407930374146,
-0.04395708814263344,
-0.02239479310810566,
-0.024690166115760803,
-0.0053155007772147655,
0.03582296520471573,
-0.004507753532379866,
-0.01580795831978321,
-0.06670459359884262,
0.012351546436548233,
-0.02671118453145027,
-0.0295170359313488,
-0.09182118624448776,
0.04763173311948776,
0.005293871276080608,
-0.0075097219087183475,
0.04517526179552078,
0.027409328147768974,
0.019788937643170357,
0.035279203206300735,
-0.017749695107340813,
0.028635181486606598,
-0.034560900181531906,
0.014452292583882809,
-0.01053309440612793,
-0.021850192919373512,
-0.016591815277934074,
-0.06630069762468338,
-0.030905168503522873,
-0.03414583206176758,
-0.03593726456165314,
-0.048365119844675064,
-0.020147373899817467,
0.009556042030453682,
-0.010470429435372353,
-0.011354335583746433,
-0.007414812222123146,
0.014031379483640194,
-0.016068223863840103,
-0.012793836183845997,
-0.022654566913843155,
-0.05038291588425636,
-0.1020784080028534,
-0.03128284215927124,
0.01011260412633419,
0.048198599368333817,
0.026400409638881683,
0.0025320088025182486,
0.00570142874494195,
0.03572073578834534,
-0.007470404263585806,
-0.014517155475914478,
0.0137979406863451,
0.011365152895450592,
-0.026695113629102707,
-0.043037742376327515,
0.0031836037524044514,
0.017706140875816345,
0.007987581193447113,
-0.023908333852887154,
0.015700748190283775,
0.04183800145983696,
-0.026373542845249176,
-0.004644669592380524,
0.030492499470710754,
-0.004958645440638065,
-0.0794060155749321,
-0.041860420256853104,
-0.006823782809078693,
-0.042399812489748,
0.03240154683589935,
0.0038742765318602324,
-0.016674358397722244,
-0.018821775913238525,
-0.0005228387890383601,
0.03173072636127472,
-0.007142684888094664,
-0.02850421704351902,
0.003561353776603937,
-0.033063460141420364,
0.04610700160264969,
-0.053293343633413315,
0.06242706626653671,
-0.0402945950627327,
-0.014854105189442635,
-0.01522153802216053,
-0.008546900935471058,
-0.040021494030952454,
0.058421239256858826,
-0.007178809959441423,
0.0006711157620884478,
-0.012237926945090294,
0.011869180016219616,
-0.02045982889831066,
0.032658010721206665,
0.0018135526916012168,
0.013246165588498116,
-0.02761167287826538,
0.012611850164830685,
-0.04277971386909485,
0.0004989057779312134,
-0.027163632214069366,
-0.015798410400748253,
-0.012155293487012386,
-0.02730727568268776,
-0.01460609957575798,
-0.05982184782624245,
0.044125545769929886,
0.0307000745087862,
0.0277644582092762,
0.014076340943574905,
-0.019704338163137436,
-0.013061554171144962,
0.02508397027850151,
-0.08386380225419998,
-0.04340752586722374,
-0.030994635075330734,
0.00042173705878667533,
-0.015627706423401833,
0.06471172720193863,
0.049392279237508774,
-0.04666977748274803,
-0.01977720856666565,
0.016217494383454323,
0.016010308638215065,
0.012890130281448364,
0.025348633527755737,
0.020358335226774216,
0.0534963384270668,
0.05790774151682854,
-0.038672756403684616,
-0.008870548568665981,
-0.002903801156207919,
-0.007015745155513287,
-0.016453102231025696,
-0.013263534754514694,
0.008767307735979557,
-0.018331371247768402,
-0.05504720285534859,
-0.025688080117106438,
0.06508725136518478,
0.049043700098991394,
0.017301218584179878,
0.0038418902549892664,
-0.03430994972586632,
0.02735077403485775,
0.008083716966211796,
-0.055983591824769974,
-0.03207767382264137,
0.02083195000886917,
-0.0535554476082325,
0.07691372185945511,
-0.010352099314332008,
0.009969299659132957,
0.02205491065979004,
0.029970942065119743,
0.008832639083266258,
0.037459298968315125,
-0.037066709250211716,
-0.01566711626946926,
0.03930164501070976,
-0.05050691217184067,
-0.0035240056458860636,
-0.009909498505294323,
0.054864656180143356,
-0.0539158433675766,
0.045979972928762436,
0.017465852200984955,
0.032088156789541245,
-0.005712449550628662,
-0.018492359668016434,
-0.04996348172426224,
0.04028725251555443,
-0.05519989877939224,
0.06643407791852951,
-0.02335415594279766,
-0.08074766397476196,
0.08652304112911224,
0.03352313116192818,
-0.09776205569505692,
0.005099313799291849,
0.041180264204740524,
0.02251465804874897,
0.03401085361838341,
0.045743878930807114,
-0.07726975530385971,
0.011230298317968845,
-0.05309939384460449,
0.018686024472117424,
-0.0658969059586525,
-0.004423331469297409,
0.035418447107076645,
-0.05606045946478844,
-0.0026289329398423433,
0.025360528379678726,
-0.020778583362698555,
0.009619288146495819,
0.021735792979598045,
-0.05256161838769913,
-0.04410068318247795,
-0.023123392835259438,
0.004914982710033655,
-0.020811887457966805,
0.034999310970306396,
-0.02276303991675377,
0.03274548053741455,
0.01649223081767559,
-0.003069173777475953,
-0.045273758471012115,
0.01059537474066019,
0.02770199254155159,
-0.03567968308925629,
-0.03454943373799324,
0.025898326188325882,
0.008166825398802757,
-0.00958970095962286,
0.037205856293439865,
-0.008527313359081745,
0.013561181724071503,
0.03019566647708416,
-0.01543582696467638,
0.016880730167031288,
-0.04162931069731712,
0.009882745333015919,
0.020609388127923012,
0.017127664759755135,
0.03380366787314415,
-0.009148068726062775,
0.02485029399394989,
0.033967889845371246,
0.03236033022403717,
-0.01718978025019169,
-0.014329088851809502,
-0.022699380293488503,
0.023419054225087166,
-0.04635573923587799,
0.018087301403284073,
0.01795148104429245,
-0.03872078284621239,
-0.04161328822374344,
-0.03550843521952629,
-0.03495347872376442,
0.05879335105419159,
-0.04080395773053169,
0.012214905582368374,
0.06284224987030029,
-0.016851497814059258,
-0.053082820028066635,
-0.07342815399169922,
-0.003774931188672781,
-0.014001294039189816,
0.02558782696723938,
0.026007894426584244,
-0.02551428973674774,
-0.01263627503067255,
-0.048566143959760666,
-0.07248952239751816,
0.040870293974876404,
0.011915070004761219,
-0.021102668717503548,
0.05578784644603729,
0.04205559194087982,
-0.019863387569785118,
0.003103707917034626,
0.01711619272828102,
-0.05407876521348953,
0.029180685058236122,
0.013017400167882442,
0.006048286333680153,
0.037484053522348404,
0.03062346763908863,
0.0016336087137460709,
-0.03697717562317848,
-0.06009732186794281,
-0.029549354687333107,
-0.028877560049295425,
-0.0164292324334383,
0.0778115838766098
] |
CNT-UPenn/Bio_ClinicalBERT_for_seizureFreedom_classification | [
"pytorch",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 28 | 2021-02-16T09:26:42Z | ---
tags:
- summarization
widget:
- text: "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
---
# CodeTrans model for code documentation generation ruby
Pretrained model on programming language ruby using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized ruby code functions: it works best with tokenized ruby functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the ruby function/method.
## Intended uses & limitations
The model could be used to generate the description for the ruby function or be fine-tuned on other ruby code tasks. It can be used on unparsed and untokenized ruby code. However, if the ruby code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate ruby function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_ruby_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_ruby_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/ruby/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 2,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing ruby code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.003821650054305792,
-0.019012494012713432,
-0.008108090609312057,
0.021948974579572678,
0.044306278228759766,
0.03745364770293236,
-0.0378866046667099,
-0.006822359282523394,
-0.016205452382564545,
0.06318848580121994,
0.047056615352630615,
-0.0013393205590546131,
-0.007344917394220829,
0.04397503659129143,
-0.03158934414386749,
-0.06304995715618134,
-0.02387053333222866,
-0.02490444853901863,
-0.04293500632047653,
-0.011159642599523067,
0.018752368167042732,
-0.0030950652435421944,
0.004044435918331146,
-0.0059554255567491055,
0.007302347104996443,
0.010072034783661366,
-0.008345145732164383,
0.02620319090783596,
0.035528577864170074,
-0.07252995669841766,
-0.023692384362220764,
0.0018824751023203135,
-0.03544279932975769,
-0.003831004723906517,
-0.018392154946923256,
0.027181414887309074,
0.014904726296663284,
0.0399867407977581,
0.013224807567894459,
0.051186371594667435,
0.016695426777005196,
0.02140735648572445,
0.018544889986515045,
-0.04569661617279053,
0.05350151285529137,
0.004145382903516293,
-0.034650448709726334,
-0.02643110789358616,
0.019607221707701683,
-0.007898545823991299,
-0.05591895058751106,
-0.06559243053197861,
-0.017468422651290894,
0.05345730111002922,
-0.0026904079131782055,
-0.0035719468723982573,
-0.07222120463848114,
-0.022742928937077522,
0.04937327280640602,
-0.04456308111548424,
-0.028396258130669594,
0.012455471791327,
-0.06250954419374466,
0.019912008196115494,
0.013509183190762997,
-0.003898093942552805,
0.006810677703469992,
-0.04916416481137276,
0.027170052751898766,
0.0017782063223421574,
0.05733928829431534,
-0.020536670461297035,
0.02964159846305847,
-0.11083260923624039,
0.01462995819747448,
-0.0031049996614456177,
0.021795324981212616,
0.011087523773312569,
-0.0037940649781376123,
0.05359635129570961,
-0.0135917654260993,
0.004140838515013456,
0.047706954181194305,
0.010793901979923248,
-0.0045130872167646885,
0.03394265100359917,
-0.03383716568350792,
-0.009286625310778618,
-0.01980469562113285,
0.06212521716952324,
-0.06176869571208954,
-0.06565757095813751,
-0.021171685308218002,
-0.019724112004041672,
-0.03929365426301956,
0.026919566094875336,
0.04946741461753845,
-0.02319932170212269,
0.018793875351548195,
0.003833897178992629,
0.0362289734184742,
0.0543070025742054,
-0.007109681144356728,
0.0352834090590477,
0.026388563215732574,
0.01564917340874672,
-0.02363649755716324,
-0.037921540439128876,
-0.03118142858147621,
0.04926033318042755,
0.007786531466990709,
-0.03537430986762047,
-0.04642917588353157,
0.016150934621691704,
0.012263738550245762,
-0.04984818771481514,
0.04328783228993416,
-0.02251611091196537,
-0.052165687084198,
-0.03942687436938286,
0.04479239881038666,
-0.011754726059734821,
-0.023922281339764595,
0.03110920451581478,
-0.04663025960326195,
0.008858085609972477,
-0.06395603716373444,
-0.04339279606938362,
0.0074717202223837376,
0.022412892431020737,
-0.019827425479888916,
0.09908853471279144,
0.011591145768761635,
-0.040974076837301254,
0.001918541849590838,
0.02658035233616829,
-0.07078995555639267,
0.06632324308156967,
0.03141823410987854,
0.10795467346906662,
-0.05905167758464813,
-0.04447006806731224,
0.03191225603222847,
0.0096941152587533,
-0.011931385844945908,
0.03201274201273918,
-0.015151475556194782,
-0.07682526111602783,
-0.024762215092778206,
0.003864759113639593,
0.06079035997390747,
-0.05023323744535446,
-0.03063599206507206,
0.02143017202615738,
0.01091035921126604,
0.022101350128650665,
-0.030431998893618584,
-0.004307040944695473,
-0.0028177588246762753,
-0.03289337456226349,
-0.07080738991498947,
0.0333840474486351,
-0.007410501129925251,
-0.02442309446632862,
-0.023491153493523598,
-0.04311986640095711,
0.008024143055081367,
0.10396365821361542,
0.014518516138195992,
-0.010287388227880001,
-0.040163930505514145,
0.016896134242415428,
0.036510124802589417,
0.050381023436784744,
-0.02421998418867588,
0.025514572858810425,
0.03500929847359657,
0.0668676495552063,
-0.03902791440486908,
0.07417074590921402,
-0.021234575659036636,
-0.04960700869560242,
-0.026273615658283234,
0.024749165400862694,
-0.01295838225632906,
-0.04290912300348282,
-0.002615169854834676,
0.018679389730095863,
-0.012900004163384438,
-0.006663134321570396,
-0.011862353421747684,
0.05086340755224228,
0.016972901299595833,
-0.01605304516851902,
-0.025454457849264145,
0.01725507527589798,
-0.004871984012424946,
0.060284558683633804,
-0.03646799176931381,
-0.014522233977913857,
-0.020992498844861984,
-0.028600027784705162,
0.002805090742185712,
0.01973826065659523,
0.03804345428943634,
0.03549151495099068,
-0.012553452514111996,
0.10405819118022919,
-0.045794595032930374,
0.006936092860996723,
-0.04751753434538841,
-0.04259108379483223,
0.012150689028203487,
0.03155085816979408,
0.035338569432497025,
0.022464625537395477,
0.010087896138429642,
-0.027689795941114426,
0.016202518716454506,
0.08093389123678207,
0.04313949868083,
0.036474645137786865,
-0.00991235300898552,
-0.025685759261250496,
0.037956833839416504,
0.0588705837726593,
-0.0329875685274601,
-0.03934433311223984,
0.04614580422639847,
0.024698738008737564,
-0.018987704068422318,
0.024254456162452698,
-0.006988202221691608,
0.0022897771559655666,
-0.05060384050011635,
-0.06533510237932205,
0.041935987770557404,
0.014966332353651524,
0.0071038417518138885,
0.037794049829244614,
0.002274519531056285,
-0.00026512282784096897,
0.03498788923025131,
0.0007044532685540617,
0.005390222184360027,
-0.0642816573381424,
0.005144305527210236,
0.0021002544090151787,
0.05806576833128929,
-0.03307870030403137,
0.03814651444554329,
0.01446445006877184,
-0.0018999017775058746,
0.05428706854581833,
-0.02596006914973259,
0.029418228194117546,
0.03398986905813217,
0.023346636444330215,
-0.02088773623108864,
0.017271175980567932,
0.020286694169044495,
0.023222820833325386,
0.08849526196718216,
0.008689655922353268,
0.06379726529121399,
0.0007624808931723237,
0.059197671711444855,
0.06477902084589005,
0.02431044541299343,
0.0020413806196302176,
0.025540970265865326,
0.058379143476486206,
-0.006918107159435749,
-0.014997132122516632,
0.06414766609668732,
-0.058092739433050156,
0.022748922929167747,
-0.043767549097537994,
0.027866091579198837,
-0.012970075942575932,
-0.030678262934088707,
0.03759492561221123,
0.012666352093219757,
-0.04137667641043663,
0.007196662947535515,
-0.02397160232067108,
-0.02812919393181801,
0.011703744530677795,
0.0004185837460681796,
-0.020800350233912468,
0.011994880624115467,
-0.024170400574803352,
0.019252553582191467,
-0.07696269452571869,
-0.04452425613999367,
-0.009725070558488369,
-0.03905408829450607,
0.015634411945939064,
-0.07738807797431946,
-0.06289538741111755,
-0.06688416004180908,
-0.015450011007487774,
0.04133519530296326,
0.006616795901209116,
-0.011809473857283592,
-0.02781503088772297,
0.004675144329667091,
-0.02816092036664486,
-0.02377183735370636,
-0.06212195008993149,
-0.06679908186197281,
-0.014763856306672096,
-0.0620083212852478,
0.03425567224621773,
-0.020593302324414253,
0.03241816163063049,
0.00643629627302289,
-0.02100844494998455,
-0.029129110276699066,
-0.02249082177877426,
0.06349833309650421,
0.0038747061043977737,
-0.006457217037677765,
-0.023442404344677925,
0.006304920185357332,
-0.02311450056731701,
0.04479695111513138,
0.006852139253169298,
-0.04670669138431549,
0.1056925505399704,
0.05328912287950516,
0.045104462653398514,
-0.002735440619289875,
-0.04462674632668495,
-0.05234755948185921,
-0.05135555565357208,
-0.025726625695824623,
-0.016200147569179535,
-0.03505752608180046,
-0.008160745725035667,
-0.05668722093105316,
-0.018496233969926834,
-0.027433637529611588,
-0.03377393260598183,
-0.011126301251351833,
0.025721462443470955,
0.021264739334583282,
0.035898979753255844,
0.05338692665100098,
0.021462565287947655,
-0.023549232631921768,
-0.028175242245197296,
0.033961519598960876,
0.006156850140541792,
0.0025067750830203295,
-0.08092653006315231,
-0.02548126131296158,
0.02928723394870758,
0.024014145135879517,
-0.008006015792489052,
-0.01548515073955059,
0.032074201852083206,
0.017804669216275215,
0.010961498133838177,
0.0031268205493688583,
-0.014252928085625172,
-0.007107619661837816,
-0.018000610172748566,
-0.00017472164472565055,
-0.038101255893707275,
-0.02732698991894722,
-0.026871833950281143,
-0.004443833138793707,
0.04265003651380539,
-0.05898956209421158,
-0.05644292011857033,
0.0023929451126605272,
0.03011610545217991,
0.037839341908693314,
0.02035346068441868,
-0.022883007302880287,
0.01025527436286211,
-0.05486420542001724,
-0.041549623012542725,
0.04370499402284622,
0.016697505488991737,
-0.011711139231920242,
0.03856129199266434,
0.04218317195773125,
-0.050480909645557404,
0.04172300547361374,
0.023386672139167786,
0.040838126093149185,
0.02678576670587063,
-0.033718645572662354,
0.015478959307074547,
-0.0476447157561779,
0.02658884972333908,
0.005391390062868595,
-0.03749760240316391,
-0.04921631142497063,
-0.08281387388706207,
-0.029947100207209587,
0.016055425629019737,
-0.0231307540088892,
0.007828094065189362,
0.048267118632793427,
-0.016812635585665703,
-0.04674181714653969,
-0.00771754514425993,
0.0031138232443481684,
0.06738525629043579,
-0.03175869956612587,
0.02966366894543171,
0.0113742146641016,
0.06606685370206833,
-0.041871633380651474,
0.003651907667517662,
-0.029545912519097328,
-0.02698083408176899,
0.010205211117863655,
0.057899799197912216,
0.023967469111084938,
0.06622974574565887,
0.0750075951218605,
0.013512356206774712,
-0.036923255771398544,
0.03951016068458557,
0.05660831183195114,
0.0010656696977093816,
-0.0156590323895216,
-0.0013156718341633677,
0.0010760497534647584,
-0.02296925149857998,
0.0151697201654315,
-0.006347795482724905,
0.02179284393787384,
0.025902224704623222,
-0.007192865014076233,
0.008654613047838211,
-0.0043819681741297245,
-0.038235925137996674,
-0.05411452427506447,
-0.04304312914609909,
0.00435645692050457,
-0.04450045898556709,
-0.059942662715911865,
0.026935290545225143,
0.04665687680244446,
0.024652615189552307,
0.05228465422987938,
0.042342379689216614,
-0.035639408975839615,
-0.034438613802194595,
0.04515703022480011,
0.045683521777391434,
-0.045115817338228226,
-0.03592410311102867,
-0.05442081019282341,
0.028176849707961082,
0.050280679017305374,
-0.023543624207377434,
-0.08897984772920609,
0.011114166118204594,
0.031908199191093445,
-0.027211839333176613,
0.0675879418849945,
0.025056885555386543,
0.016586903482675552,
0.04909919947385788,
-0.008850371465086937,
0.027037402614951134,
-0.025224585086107254,
0.03035425953567028,
-0.0007348924991674721,
0.04178931191563606,
-0.008462569676339626,
-0.019152814522385597,
-0.0316125750541687,
0.02424655668437481,
0.002086849883198738,
0.040202546864748,
0.032968562096357346,
-0.012166569009423256,
-0.06701790541410446,
-0.000904781452845782,
0.029461126774549484,
-0.03785347193479538,
0.01767289824783802,
0.024487053975462914,
0.04980912059545517,
-0.041056256741285324,
-0.02328111045062542,
-0.025314321741461754,
-0.0074191223829984665,
0.03807085007429123,
-0.0021303382236510515,
-0.016744324937462807,
-0.06974851340055466,
0.01261621993035078,
-0.026307644322514534,
-0.02828972600400448,
-0.09681946039199829,
0.04631537199020386,
0.007450468372553587,
-0.007440628483891487,
0.04435628652572632,
0.026682673022150993,
0.020489830523729324,
0.0338444709777832,
-0.016794832423329353,
0.02878020703792572,
-0.0324668288230896,
0.015269527211785316,
-0.00847107358276844,
-0.023218775168061256,
-0.015327643603086472,
-0.06550103425979614,
-0.03203536570072174,
-0.03321899101138115,
-0.03650769218802452,
-0.05048537254333496,
-0.017836259678006172,
0.009195100516080856,
-0.012370732612907887,
-0.01454841811209917,
-0.01019846647977829,
0.012693755328655243,
-0.014053858816623688,
-0.012000905349850655,
-0.02181362919509411,
-0.050554271787405014,
-0.10208164155483246,
-0.026683814823627472,
0.010340061038732529,
0.04854654148221016,
0.028676006942987442,
0.002874215831980109,
0.0050661140121519566,
0.035409796983003616,
-0.006279241293668747,
-0.015109202824532986,
0.014855089597404003,
0.00995022151619196,
-0.028232209384441376,
-0.04217992722988129,
0.004569826181977987,
0.018039394170045853,
0.0052057974971830845,
-0.025006869807839394,
0.015205582603812218,
0.04161892458796501,
-0.02688244916498661,
-0.0014960531843826175,
0.030609555542469025,
-0.0051065715961158276,
-0.08016864210367203,
-0.040392886847257614,
-0.007516507524996996,
-0.041469719260931015,
0.03708549961447716,
0.005157876294106245,
-0.019760990515351295,
-0.021072298288345337,
-0.004284082446247339,
0.03198982775211334,
-0.005047425162047148,
-0.028022050857543945,
0.004461429547518492,
-0.030705738812685013,
0.04347986727952957,
-0.05275413766503334,
0.06329116225242615,
-0.039522282779216766,
-0.0126000065356493,
-0.01402398943901062,
-0.00507468031719327,
-0.041172340512275696,
0.06015405058860779,
-0.007401932030916214,
0.00344102387316525,
-0.010041768662631512,
0.009018581360578537,
-0.02007092349231243,
0.033869095146656036,
-0.0007159150554798543,
0.013190085999667645,
-0.027429599314928055,
0.01205891277641058,
-0.04293503984808922,
-0.002268332988023758,
-0.028948934748768806,
-0.018082352355122566,
-0.011934437789022923,
-0.02426980622112751,
-0.014207690954208374,
-0.0582905150949955,
0.04366345703601837,
0.029325058683753014,
0.02702980674803257,
0.013638830743730068,
-0.01723180152475834,
-0.014308204874396324,
0.0275976974517107,
-0.0839630514383316,
-0.041801128536462784,
-0.030560841783881187,
0.00020586204482242465,
-0.01425995584577322,
0.06619182974100113,
0.049145594239234924,
-0.04537324979901314,
-0.016405772417783737,
0.014251992106437683,
0.013511600904166698,
0.010915824212133884,
0.028132537379860878,
0.020730387419462204,
0.05821213126182556,
0.05875207856297493,
-0.041381433606147766,
-0.009468961507081985,
-0.002808103570714593,
-0.006147101055830717,
-0.018856005743145943,
-0.011615016497671604,
0.008479820564389229,
-0.01604483649134636,
-0.05459093675017357,
-0.02555428259074688,
0.06220387667417526,
0.04826845973730087,
0.01590804010629654,
0.0038247371558099985,
-0.03402062505483627,
0.025547219440340996,
0.008453061804175377,
-0.053436294198036194,
-0.03146196901798248,
0.019957805052399635,
-0.05560780689120293,
0.07407661527395248,
-0.0091409208253026,
0.011751429177820683,
0.019214149564504623,
0.031058605760335922,
0.0096095260232687,
0.03856974467635155,
-0.03668321296572685,
-0.018563738092780113,
0.03652346506714821,
-0.04958246275782585,
-0.00629924051463604,
-0.011542879976332188,
0.05590985715389252,
-0.05082600563764572,
0.04296235367655754,
0.020456133410334587,
0.03166801854968071,
-0.009260199964046478,
-0.01682324707508087,
-0.048465143889188766,
0.04166797176003456,
-0.05430389195680618,
0.0651632696390152,
-0.021801110357046127,
-0.08257254958152771,
0.0840938612818718,
0.032278355211019516,
-0.09966499358415604,
0.0029145025182515383,
0.0439637191593647,
0.022214168682694435,
0.03340916335582733,
0.04697937145829201,
-0.07646098732948303,
0.01130590122193098,
-0.05357719957828522,
0.01680060103535652,
-0.06603328138589859,
-0.004463065415620804,
0.03411327674984932,
-0.059251099824905396,
-0.0017942239064723253,
0.02402542345225811,
-0.02207515574991703,
0.011741677299141884,
0.02030349336564541,
-0.04897407814860344,
-0.042174749076366425,
-0.02329791896045208,
0.0020476432982832193,
-0.019284572452306747,
0.03397076576948166,
-0.021920979022979736,
0.031695857644081116,
0.014944507740437984,
-0.002657761098816991,
-0.0433805026113987,
0.012390938587486744,
0.026020321995019913,
-0.035772066563367844,
-0.03260282054543495,
0.025833256542682648,
0.011053281836211681,
-0.007496700156480074,
0.035165123641490936,
-0.009448250755667686,
0.013152701780200005,
0.031525541096925735,
-0.01809084787964821,
0.015645157545804977,
-0.040748123079538345,
0.00961062777787447,
0.020131954923272133,
0.013598199933767319,
0.035216107964515686,
-0.009940462186932564,
0.025670433416962624,
0.034008629620075226,
0.032561738044023514,
-0.016986479982733727,
-0.015687892213463783,
-0.01999073103070259,
0.02390749752521515,
-0.04341532662510872,
0.017639510333538055,
0.016271859407424927,
-0.04001101851463318,
-0.039956022053956985,
-0.03561455383896828,
-0.037298768758773804,
0.059781063348054886,
-0.04235308989882469,
0.01220535859465599,
0.06376449763774872,
-0.014669254422187805,
-0.05009373277425766,
-0.07196604460477829,
-0.00523345684632659,
-0.012636298313736916,
0.021271666511893272,
0.02593979239463806,
-0.026037821546196938,
-0.01328781433403492,
-0.049950890243053436,
-0.07155405730009079,
0.03960525617003441,
0.012319229543209076,
-0.01996009238064289,
0.054007381200790405,
0.03929959982633591,
-0.020463842898607254,
0.0020140078850090504,
0.01908538118004799,
-0.05232179909944534,
0.028873596340417862,
0.009919486939907074,
0.007844214327633381,
0.03690009564161301,
0.02887539379298687,
0.0011271717958152294,
-0.03823336586356163,
-0.06023073196411133,
-0.029527215287089348,
-0.030247516930103302,
-0.017199788242578506,
0.07840891182422638
] |
CSResearcher/TestModel | [
"license:mit"
] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
---
# CodeTrans model for git commit message generation
Pretrained model on git commit using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized git commit: it works best with tokenized git commit.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the git commit message for the git commit changes or be fine-tuned on other relevant tasks. It can be used on unparsed and untokenized commit changes. However, if the change is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate git commit message using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_commit_generation_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_commit_generation_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/commit%20generation/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 220,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the git commit message generation task, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 39.61 |
| CodeTrans-ST-Base | 38.67 |
| CodeTrans-TF-Small | 44.22 |
| CodeTrans-TF-Base | 44.17 |
| CodeTrans-TF-Large | **44.41** |
| CodeTrans-MT-Small | 36.17 |
| CodeTrans-MT-Base | 39.25 |
| CodeTrans-MT-Large | 41.18 |
| CodeTrans-MT-TF-Small | 43.96 |
| CodeTrans-MT-TF-Base | 44.19 |
| CodeTrans-MT-TF-Large | 44.34 |
| State of the art | 32.81 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.01304919458925724,
-0.027678489685058594,
-0.004748545121401548,
0.019302647560834885,
0.0405389703810215,
0.038540974259376526,
-0.01721266470849514,
0.001494280295446515,
-0.025531085208058357,
0.07568744570016861,
0.04532207176089287,
0.004090546164661646,
0.0043916888535022736,
0.04652756080031395,
-0.007428937591612339,
-0.054511718451976776,
-0.02335383929312229,
-0.023369677364826202,
-0.041236549615859985,
-0.017080111429095268,
0.013373149558901787,
-0.015902599319815636,
0.010940070264041424,
-0.0022037108428776264,
0.0010760792065411806,
0.012333515100181103,
-0.006048763170838356,
0.025952044874429703,
0.017965592443943024,
-0.0765894204378128,
-0.015551125630736351,
-0.015786023810505867,
-0.04586279019713402,
0.0011926654260605574,
-0.016129950061440468,
0.032162293791770935,
0.03252822533249855,
0.016812220215797424,
0.015206362120807171,
0.05040176212787628,
0.029035672545433044,
0.012645241804420948,
0.01025319192558527,
-0.052655670791864395,
0.05936115235090256,
0.002206833567470312,
-0.027693066745996475,
-0.027259916067123413,
0.020529087632894516,
-0.011350844986736774,
-0.07168501615524292,
-0.05217409133911133,
-0.05564124882221222,
0.037079066038131714,
-0.0029909962322562933,
-0.013404223136603832,
-0.06781774759292603,
-0.024862339720129967,
0.05261034518480301,
-0.06257207691669464,
-0.03484542295336723,
0.03014996089041233,
-0.04855787009000778,
0.022625386714935303,
0.02361210435628891,
-0.024359330534934998,
-0.0006761475233361125,
-0.030519042164087296,
0.02971525862812996,
-0.0011538859689608216,
0.04616456478834152,
-0.023136310279369354,
0.03726590797305107,
-0.08858966827392578,
-0.006863069720566273,
-0.015101292170584202,
0.026201292872428894,
0.019972940906882286,
-0.008326342329382896,
0.04535837098956108,
0.00909886322915554,
-0.006351664662361145,
0.04006536304950714,
0.02564931847155094,
0.010070974007248878,
0.02944999560713768,
-0.05464472994208336,
-0.004938660655170679,
-0.028962142765522003,
0.05294666066765785,
-0.053589947521686554,
-0.043574683368206024,
-0.03185422345995903,
-0.02833774872124195,
-0.04900175333023071,
0.01999111846089363,
0.051420729607343674,
-0.004781958181411028,
0.031152239069342613,
0.0206891018897295,
0.04170995578169823,
0.0662335753440857,
-0.0030319381039589643,
0.04043334722518921,
0.020020173862576485,
0.024588286876678467,
-0.02629968710243702,
-0.03230724483728409,
-0.04418031498789787,
0.04726732149720192,
0.01943347603082657,
-0.02051219344139099,
-0.04534414783120155,
0.027744226157665253,
0.02421085722744465,
-0.026397336274385452,
0.02595340833067894,
-0.013742550276219845,
-0.04034208506345749,
-0.03297748789191246,
0.05540301650762558,
0.004784360062330961,
-0.017311880365014076,
0.02910865657031536,
-0.040588900446891785,
0.005018938332796097,
-0.04255267605185509,
-0.02365174889564514,
0.007432976737618446,
0.02714066207408905,
-0.004344888962805271,
0.08127797394990921,
0.011449525132775307,
-0.04198110103607178,
0.03206175938248634,
0.015558482147753239,
-0.07138032466173172,
0.055483393371105194,
0.052165545523166656,
0.08309890329837799,
-0.0609968826174736,
-0.061941370368003845,
0.0012337751686573029,
0.007127616088837385,
-0.005445538554340601,
0.030099021270871162,
0.00007634499343112111,
-0.06994132697582245,
-0.018283728510141373,
-0.009820671752095222,
0.0649898499250412,
-0.046301305294036865,
-0.02430582046508789,
0.02548537217080593,
0.0006262847455218434,
0.004017376806586981,
-0.041088808327913284,
-0.0008283705683425069,
0.015045957639813423,
-0.03502346947789192,
-0.05284297466278076,
0.01996970921754837,
-0.00474428990855813,
-0.044857800006866455,
-0.023214973509311676,
-0.03696537762880325,
0.019259562715888023,
0.07631576806306839,
0.007358079310506582,
-0.020553886890411377,
-0.039444129914045334,
0.0035339356400072575,
0.021976878866553307,
0.03906011953949928,
-0.02524552308022976,
0.028917215764522552,
0.055137861520051956,
0.057364191859960556,
-0.016834422945976257,
0.05208268016576767,
0.0017634885152801871,
-0.033966612070798874,
-0.018893690779805183,
0.001513828057795763,
-0.020796475932002068,
-0.04245395213365555,
0.006165061611682177,
0.028051242232322693,
-0.03128198906779289,
-0.02936287596821785,
-0.014536481350660324,
0.06345364451408386,
0.01779632456600666,
-0.0034602577798068523,
-0.028676146641373634,
-0.00004855868246522732,
0.0015929810469970107,
0.04566701501607895,
-0.02838834561407566,
-0.020642271265387535,
-0.031345345079898834,
-0.029974602162837982,
-0.005891166161745787,
0.015120657160878181,
0.0383698008954525,
0.026406969875097275,
-0.025211483240127563,
0.08606557548046112,
-0.05491524189710617,
0.0075388881377875805,
-0.04246310889720917,
-0.05570193752646446,
0.00040716081275604665,
0.034945257008075714,
0.00009820370905799791,
0.04519914463162422,
0.0031637726351618767,
0.004961577709764242,
0.018611125648021698,
0.0593777671456337,
0.010371416807174683,
0.01981767639517784,
-0.00842143315821886,
-0.020966922864317894,
0.027447404339909554,
0.06018369644880295,
-0.03932369500398636,
-0.04750543460249901,
0.04773624241352081,
0.054985031485557556,
-0.014034450054168701,
0.023954546079039574,
-0.018107302486896515,
0.014447568915784359,
-0.0393139086663723,
-0.04923243448138237,
0.03881043568253517,
0.020172175019979477,
-0.0034603055100888014,
0.028768153861165047,
-0.003062757197767496,
-0.010840306989848614,
0.03292931243777275,
-0.0012814383953809738,
-0.00008040524699026719,
-0.06102945655584335,
0.01966492459177971,
0.010086738504469395,
0.06592319160699844,
-0.03242165967822075,
0.03923898562788963,
0.017994338646531105,
0.014221256598830223,
0.06485042721033096,
-0.027118289843201637,
0.023004939779639244,
0.04118691757321358,
0.01500606257468462,
-0.0069039491936564445,
0.00042991555528715253,
0.01827593334019184,
0.0200925525277853,
0.07506216317415237,
0.0036321666557341814,
0.08406849205493927,
0.004627894144505262,
0.04005669802427292,
0.07685218006372452,
0.03276322782039642,
0.024500202387571335,
0.04232575744390488,
0.06027565896511078,
0.015915241092443466,
-0.012430869042873383,
0.06996394693851471,
-0.060511209070682526,
0.04326273500919342,
-0.028401628136634827,
0.026621438562870026,
-0.0005170097574591637,
-0.017934437841176987,
0.03844745084643364,
0.007204643916338682,
-0.030316276475787163,
0.004791496321558952,
-0.020740758627653122,
-0.03138568624854088,
0.01927756331861019,
-0.007341654971241951,
-0.02830536663532257,
0.034385550767183304,
-0.0290586706250906,
0.018234848976135254,
-0.0761948898434639,
-0.04696657881140709,
-0.005234857089817524,
-0.04116198420524597,
0.01307554729282856,
-0.08492672443389893,
-0.05865342170000076,
-0.06666982173919678,
-0.020623641088604927,
0.04272560402750969,
0.00606011925265193,
-0.0024080772418528795,
-0.005371340084820986,
0.00842498429119587,
-0.03283371776342392,
-0.018933095037937164,
-0.05921071395277977,
-0.060119595378637314,
-0.026760399341583252,
-0.09172867238521576,
0.020493872463703156,
-0.0037860225420445204,
0.023540956899523735,
-0.018069403246045113,
-0.002207291079685092,
-0.04019135981798172,
-0.030024508014321327,
0.06967373937368393,
0.0018634605221450329,
-0.005834186915308237,
-0.011991132982075214,
0.020997224375605583,
-0.04331623762845993,
0.02188158966600895,
-0.019267674535512924,
-0.04563714563846588,
0.09120914340019226,
0.05736920237541199,
0.03983522951602936,
-0.006465135607868433,
-0.04785475879907608,
-0.048755448311567307,
-0.05771176144480705,
-0.030863715335726738,
-0.03441442921757698,
-0.041175998747348785,
-0.016899606212973595,
-0.04897226020693779,
-0.025243530049920082,
-0.035829756408929825,
-0.03333219140768051,
-0.010972781106829643,
0.02174854837357998,
0.03963421285152435,
0.0354733020067215,
0.0702495127916336,
0.02519843354821205,
-0.03936893120408058,
-0.016318781301379204,
0.04544598236680031,
0.0017825596733018756,
0.006952929776161909,
-0.08156577497720718,
-0.04269672557711601,
0.04957747086882591,
0.007828458212316036,
0.0005057782400399446,
-0.005781381856650114,
0.05794508755207062,
0.03471612185239792,
0.0061038038693368435,
0.02716272510588169,
0.01296823937445879,
-0.0030042955186218023,
-0.020423993468284607,
-0.005430035293102264,
-0.031392283737659454,
-0.031675390899181366,
-0.024295348674058914,
-0.026521362364292145,
0.033528588712215424,
-0.0694783553481102,
-0.055524151772260666,
-0.002190056024119258,
0.038423266261816025,
0.021025825291872025,
0.009986278600990772,
-0.023188820108771324,
-0.02809690497815609,
-0.04259096458554268,
-0.028227295726537704,
0.03535875678062439,
0.011567849665880203,
-0.0014662881148979068,
0.04988115280866623,
0.020088164135813713,
-0.04759803041815758,
0.02858990803360939,
0.02815895900130272,
0.04497643560171127,
0.016551245003938675,
-0.03293881192803383,
0.026176799088716507,
-0.04753400757908821,
0.015429644845426083,
0.012233080342411995,
-0.03264589235186577,
-0.05130228027701378,
-0.08335115760564804,
-0.02813340164721012,
0.015961213037371635,
-0.027949662879109383,
-0.004391604568809271,
0.0446997731924057,
-0.030801793560385704,
-0.028916412964463234,
-0.00963714998215437,
0.022692976519465446,
0.06110559403896332,
-0.034313734620809555,
0.028549397364258766,
-0.003968070726841688,
0.05908394977450371,
-0.055010516196489334,
-0.005343063734471798,
-0.02279757149517536,
-0.020341549068689346,
0.004290179815143347,
0.03764919191598892,
0.014405541121959686,
0.05878368392586708,
0.06077080965042114,
0.04245302081108093,
-0.03688519820570946,
0.032568614929914474,
0.060575470328330994,
-0.008876288309693336,
-0.025558240711688995,
0.009603078477084637,
0.011240353807806969,
-0.03478114679455757,
0.001142582157626748,
-0.0023086965084075928,
0.016133572906255722,
0.03198573738336563,
-0.014611013233661652,
0.016167037189006805,
0.013280940242111683,
-0.03556904196739197,
-0.052265267819166183,
-0.0625358521938324,
-0.01275864988565445,
-0.021218417212367058,
-0.04303288459777832,
0.016850145533680916,
0.05170486494898796,
0.010574930347502232,
0.05501158908009529,
0.04647097364068031,
-0.042430490255355835,
-0.04540646821260452,
0.04685875028371811,
0.06473220884799957,
-0.04537869244813919,
-0.066373310983181,
-0.05345543846487999,
0.03241618722677231,
0.045800745487213135,
-0.03227819874882698,
-0.09297768026590347,
0.025392526760697365,
0.06454206258058548,
-0.026131093502044678,
0.07217811048030853,
0.013723509386181831,
0.04093506559729576,
0.061096638441085815,
-0.017521504312753677,
0.02349141798913479,
-0.017725203186273575,
0.0024880734272301197,
-0.013315490446984768,
0.035288598388433456,
-0.030287494882941246,
-0.02993217296898365,
-0.04356054216623306,
0.02711866982281208,
0.014912711456418037,
0.041594184935092926,
0.034845203161239624,
-0.0010949668940156698,
-0.07055298984050751,
0.0034348901826888323,
0.03517206385731697,
-0.039332613348960876,
0.01615225337445736,
0.020059388130903244,
0.04492948576807976,
-0.04344871640205383,
-0.011513229459524155,
-0.030584445223212242,
-0.006353337783366442,
0.04210195690393448,
-0.013775908388197422,
-0.025121847167611122,
-0.037350259721279144,
0.017901262268424034,
-0.007884224876761436,
-0.03292946517467499,
-0.07455890625715256,
0.053337033838033676,
0.0075478521175682545,
-0.0006173110450617969,
0.04651571437716484,
0.03082861751317978,
0.02259170264005661,
0.048539746552705765,
-0.003162080654874444,
0.015375791117548943,
-0.03960617631673813,
0.0225661750882864,
-0.019936587661504745,
-0.0289460401982069,
-0.01033642515540123,
-0.08253652602434158,
-0.029336009174585342,
-0.04247194901108742,
-0.03835470229387283,
-0.034444913268089294,
-0.030426207929849625,
0.010156823322176933,
-0.006885609123855829,
0.0004470192070584744,
0.008026530966162682,
0.01265972014516592,
-0.03912241756916046,
-0.029224125668406487,
-0.04730965942144394,
-0.05411021411418915,
-0.10859771072864532,
-0.03513070195913315,
-0.00005000716555514373,
0.05302092060446739,
0.018422840163111687,
0.007201686967164278,
0.004634520038962364,
0.010681633837521076,
0.010353535413742065,
-0.02329852059483528,
0.013560676947236061,
0.0143333924934268,
-0.04629867523908615,
-0.035814739763736725,
0.003671718528494239,
0.031990621238946915,
0.027849694713950157,
-0.022519942373037338,
0.009926059283316135,
0.02778829261660576,
-0.02202134020626545,
-0.0019596675410866737,
0.034435197710990906,
0.0026011629961431026,
-0.07980044186115265,
-0.044233113527297974,
0.0022912800777703524,
-0.05347844958305359,
0.029753204435110092,
-0.01866864040493965,
-0.026726216077804565,
-0.0009110697428695858,
0.024413080886006355,
0.01824929378926754,
-0.02847990393638611,
-0.021520143374800682,
0.008925586938858032,
-0.044848255813121796,
0.04154291749000549,
-0.049112748354673386,
0.0487627238035202,
-0.038026388734579086,
-0.004231467843055725,
-0.01412337925285101,
-0.011790690943598747,
-0.03138361871242523,
0.07789337635040283,
-0.000532940961420536,
0.0038529299199581146,
-0.02150493487715721,
0.025786511600017548,
-0.02146613970398903,
0.03795303404331207,
0.010280987247824669,
0.012405659072101116,
-0.02788756787776947,
0.014004401862621307,
-0.049582239240407944,
0.00985038373619318,
-0.017051171511411667,
-0.02785196527838707,
-0.0026660377625375986,
-0.033421553671360016,
-0.007093807682394981,
-0.058814872056245804,
0.04752982035279274,
0.03541959449648857,
0.02073649689555168,
0.021278375759720802,
-0.02863118052482605,
-0.010006113909184933,
0.0169740691781044,
-0.0703231617808342,
-0.028401164337992668,
-0.019104836508631706,
0.013833322562277317,
-0.021198183298110962,
0.04844144731760025,
0.054880909621715546,
-0.04099509119987488,
-0.04197104647755623,
0.01965309865772724,
0.008033784106373787,
0.0159295704215765,
0.011386314406991005,
0.01498273853212595,
0.0562739372253418,
0.04773208498954773,
-0.0327729731798172,
0.006239092443138361,
-0.006806822493672371,
-0.027409568428993225,
-0.003777043893933296,
-0.014175863936543465,
0.030925052240490913,
-0.007090024650096893,
-0.04564494639635086,
-0.03095633164048195,
0.06750863045454025,
0.025082970038056374,
0.022760888561606407,
0.002098475582897663,
-0.026459990069270134,
0.0428466834127903,
0.006494385655969381,
-0.055145636200904846,
-0.025610407814383507,
0.02593151666224003,
-0.040920305997133255,
0.09083365648984909,
-0.01210822444409132,
0.01425951812416315,
0.031900521367788315,
0.006095459219068289,
0.016621701419353485,
0.046811871230602264,
-0.04844086244702339,
-0.0017881292151287198,
0.05705966055393219,
-0.047820914536714554,
0.00990281905978918,
-0.02068202570080757,
0.05287979915738106,
-0.0597013384103775,
0.06333766132593155,
0.0141071742400527,
0.03909348323941231,
-0.003068522084504366,
-0.010458139702677727,
-0.07033746689558029,
0.0357191227376461,
-0.053484976291656494,
0.0661180391907692,
-0.017691856250166893,
-0.06783255934715271,
0.0882960706949234,
0.029453469440340996,
-0.09523588418960571,
0.020988881587982178,
0.02463727630674839,
0.01835932396352291,
0.01762700453400612,
0.04414500296115875,
-0.059498004615306854,
-0.0066338651813566685,
-0.047994233667850494,
0.030430275946855545,
-0.06650396436452866,
-0.013679602183401585,
0.014554540626704693,
-0.03208710625767708,
-0.006959504447877407,
0.04146112874150276,
0.0023951129987835884,
0.012527724727988243,
0.027044856920838356,
-0.06770114600658417,
-0.04534624516963959,
-0.024979455396533012,
0.024050230160355568,
-0.04374765604734421,
0.0404292494058609,
-0.007040555123239756,
0.04104753956198692,
0.007143723778426647,
-0.0007634281646460295,
-0.03172425553202629,
0.006228069309145212,
0.03498760610818863,
-0.039103444665670395,
-0.024717863649129868,
0.026325711980462074,
0.009468655101954937,
-0.01734754629433155,
0.03896418958902359,
-0.012741158716380596,
0.030940407887101173,
0.03862535580992699,
-0.01572764292359352,
0.019040465354919434,
-0.04554281011223793,
-0.008392691612243652,
0.01511575561016798,
0.022056251764297485,
0.0190124474465847,
-0.003873498411849141,
0.010479875840246677,
0.041105177253484726,
0.023589156568050385,
-0.017589904367923737,
-0.011600300669670105,
-0.03217680752277374,
0.0157228522002697,
-0.04727354645729065,
0.020557960495352745,
0.019074585288763046,
-0.02655165269970894,
-0.04143128544092178,
-0.04121018201112747,
-0.011718698777258396,
0.04565459489822388,
-0.047289807349443436,
-0.003886409103870392,
0.05918988212943077,
-0.02694113925099373,
-0.07268485426902771,
-0.06371928006410599,
-0.008015429601073265,
-0.023748354986310005,
0.03224204480648041,
0.029700150713324547,
-0.022469118237495422,
0.01358800195157528,
-0.026059797033667564,
-0.07463189959526062,
0.04568425565958023,
0.014539613388478756,
-0.024271724745631218,
0.04377996176481247,
0.0443393774330616,
-0.007940460927784443,
0.017575740814208984,
0.015374436974525452,
-0.05794277787208557,
0.02044355869293213,
0.007121112663298845,
0.014603814110159874,
0.025678668171167374,
0.0504918098449707,
-0.02095409296452999,
-0.02443639747798443,
-0.043888386338949203,
-0.026119308546185493,
-0.025210106745362282,
-0.013899866491556168,
0.06907571852207184
] |
CTBC/ATS | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
---
# CodeTrans model for git commit message generation
Pretrained model on git commit using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized git commit: it works best with tokenized git commit.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the git commit message generation task for the java commit changes.
## Intended uses & limitations
The model could be used to generate the git commit message for the git commit changes or be fine-tuned on other relevant tasks. It can be used on unparsed and untokenized commit changes. However, if the change is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate git commit message using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_commit_generation_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_commit_generation_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/commit%20generation/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 4,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing commit changes.
## Evaluation results
For the git commit message generation task, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 39.61 |
| CodeTrans-ST-Base | 38.67 |
| CodeTrans-TF-Small | 44.22 |
| CodeTrans-TF-Base | 44.17 |
| CodeTrans-TF-Large | **44.41** |
| CodeTrans-MT-Small | 36.17 |
| CodeTrans-MT-Base | 39.25 |
| CodeTrans-MT-Large | 41.18 |
| CodeTrans-MT-TF-Small | 43.96 |
| CodeTrans-MT-TF-Base | 44.19 |
| CodeTrans-MT-TF-Large | 44.34 |
| State of the art | 32.81 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.011630347929894924,
-0.024386271834373474,
-0.0026400152128189802,
0.014897916465997696,
0.04054635763168335,
0.03791806474328041,
-0.015648098662495613,
0.009811937808990479,
-0.0188902597874403,
0.0705098807811737,
0.04472782090306282,
-0.001965830335393548,
0.013506060466170311,
0.044352393597364426,
-0.0024036827962845564,
-0.05252062901854515,
-0.03352577984333038,
-0.026207292452454567,
-0.042815811932086945,
-0.017069578170776367,
0.019668076187372208,
-0.0225931778550148,
0.006716394331306219,
-0.0021508887875825167,
0.0009375211084261537,
0.014363987371325493,
-0.008060087449848652,
0.01992921531200409,
0.022778481245040894,
-0.07289218157529831,
-0.011636749841272831,
-0.016284432262182236,
-0.04659534618258476,
-0.0013828047085553408,
-0.021064048632979393,
0.03675423935055733,
0.0384177640080452,
0.017759377136826515,
0.012179042212665081,
0.05068959668278694,
0.033861227333545685,
0.015252390876412392,
0.013100485317409039,
-0.04751986265182495,
0.0608360581099987,
-0.0027309427969157696,
-0.022322561591863632,
-0.029510732740163803,
0.015569522976875305,
-0.013155530206859112,
-0.06899258494377136,
-0.052861444652080536,
-0.06561923027038574,
0.033110667020082474,
0.0009301261161454022,
-0.006975363940000534,
-0.07103201001882553,
-0.024719251319766045,
0.057061515748500824,
-0.06767833977937698,
-0.03570347651839256,
0.02927052415907383,
-0.05232556536793709,
0.01950165070593357,
0.024704836308956146,
-0.026763884350657463,
-0.0009762823465280235,
-0.027963874861598015,
0.030605722218751907,
0.005148559808731079,
0.040264006704092026,
-0.018363017588853836,
0.04431716725230217,
-0.0852636843919754,
-0.009502594359219074,
-0.01682359352707863,
0.02920326590538025,
0.01691269502043724,
-0.010598577558994293,
0.04974546283483505,
0.006240797229111195,
-0.0032864699605852365,
0.043161775916814804,
0.02896195277571678,
0.011182226240634918,
0.02939443662762642,
-0.04908575862646103,
-0.004372516646981239,
-0.028439851477742195,
0.046735960990190506,
-0.054391514509916306,
-0.045338138937950134,
-0.03331731632351875,
-0.02965608611702919,
-0.054091889411211014,
0.016675926744937897,
0.05495360121130943,
-0.002163233468309045,
0.03210991993546486,
0.022465979680418968,
0.03836634010076523,
0.07481726258993149,
-0.0051171560771763325,
0.03501753509044647,
0.025229325518012047,
0.02915322221815586,
-0.029219236224889755,
-0.029578974470496178,
-0.050712935626506805,
0.04890916123986244,
0.014195523224771023,
-0.02134174481034279,
-0.04553408920764923,
0.02562529221177101,
0.022199952974915504,
-0.03147849068045616,
0.023276951164007187,
-0.014261217787861824,
-0.03719900920987129,
-0.033374905586242676,
0.05357562005519867,
0.005268088076263666,
-0.02379135973751545,
0.02392914518713951,
-0.04457604140043259,
0.004002476576715708,
-0.04251394048333168,
-0.023138977587223053,
0.007005692925304174,
0.026596276089549065,
-0.002232171595096588,
0.07991985231637955,
0.01160456147044897,
-0.039701979607343674,
0.03076539933681488,
0.018493006005883217,
-0.06933393329381943,
0.05460045859217644,
0.054846666753292084,
0.07679948210716248,
-0.05571698024868965,
-0.06243661418557167,
-0.004153827205300331,
0.005648941267281771,
-0.007493128534406424,
0.031052609905600548,
-0.006509697996079922,
-0.07159958779811859,
-0.018357951194047928,
-0.015756819397211075,
0.06741421669721603,
-0.0507914200425148,
-0.022078322246670723,
0.026183567941188812,
-0.0024006469175219536,
0.0031765340827405453,
-0.04565834254026413,
-0.0014515641378238797,
0.016161708161234856,
-0.03476937860250473,
-0.050600532442331314,
0.020247820764780045,
-0.00705705676227808,
-0.04479772597551346,
-0.021476466208696365,
-0.03895032778382301,
0.019023984670639038,
0.07279086858034134,
0.005746170878410339,
-0.024900153279304504,
-0.04688471555709839,
0.008318817242980003,
0.018992535769939423,
0.04165355861186981,
-0.022498302161693573,
0.024396352469921112,
0.05252907797694206,
0.05777202919125557,
-0.01507470291107893,
0.05274388939142227,
-0.00026231317315250635,
-0.03147333487868309,
-0.021095016971230507,
0.002527874894440174,
-0.013492227531969547,
-0.04572448134422302,
0.007176616229116917,
0.0287349671125412,
-0.0314028263092041,
-0.027624821290373802,
-0.007926021702587605,
0.06087112799286842,
0.012706328183412552,
-0.006878779735416174,
-0.024881992489099503,
0.004657516721636057,
0.0016539886128157377,
0.0466720312833786,
-0.029130417853593826,
-0.01872008480131626,
-0.03528667986392975,
-0.023287806659936905,
-0.0063720098696649075,
0.01037631742656231,
0.03860219940543175,
0.022272350266575813,
-0.03025803156197071,
0.08378544449806213,
-0.05815697833895683,
0.0018630365375429392,
-0.0464930534362793,
-0.055648140609264374,
0.001899132039397955,
0.033243197947740555,
0.0014774225419387221,
0.044661086052656174,
-0.002476924564689398,
0.0033344135154038668,
0.022487428039312363,
0.06015360727906227,
0.010356709361076355,
0.02228740230202675,
-0.00437795277684927,
-0.021242249757051468,
0.028796901926398277,
0.05509606748819351,
-0.04836481437087059,
-0.05019726976752281,
0.048881836235523224,
0.058499280363321304,
-0.014235069043934345,
0.027968592941761017,
-0.016132930293679237,
0.010981478728353977,
-0.033543240278959274,
-0.050268564373254776,
0.03721298649907112,
0.024329209700226784,
0.002412059810012579,
0.027583209797739983,
-0.008828558959066868,
-0.014330670237541199,
0.031881049275398254,
0.0001434945297660306,
-0.0022324933670461178,
-0.06270100176334381,
0.021551629528403282,
0.00732955988496542,
0.06691507250070572,
-0.025978591293096542,
0.0405673012137413,
0.02563454955816269,
0.014601854607462883,
0.0568758063018322,
-0.024945959448814392,
0.016957474872469902,
0.04064088314771652,
0.010240476578474045,
-0.0047960467636585236,
0.0030907487962394953,
0.022808194160461426,
0.01986299455165863,
0.08088722079992294,
0.001878688228316605,
0.08566302806138992,
0.0048238360323011875,
0.03817889839410782,
0.07675628364086151,
0.03342864662408829,
0.026217980310320854,
0.040010690689086914,
0.05518632382154465,
0.011680224910378456,
-0.017437275499105453,
0.07566621154546738,
-0.05712604895234108,
0.04164820909500122,
-0.024837231263518333,
0.029232144355773926,
-0.0019786921329796314,
-0.017514731734991074,
0.036165159195661545,
0.0078062089160084724,
-0.035878974944353104,
-0.0008476147195324302,
-0.02072901464998722,
-0.024981368333101273,
0.01580267958343029,
-0.007383339572697878,
-0.02164418064057827,
0.033407047390937805,
-0.026178959757089615,
0.02070724219083786,
-0.07766459882259369,
-0.05045943707227707,
-0.004369223490357399,
-0.04062379151582718,
0.014184889383614063,
-0.0854000598192215,
-0.0644439235329628,
-0.06641284376382828,
-0.020915277302265167,
0.04740873724222183,
0.0043105254881083965,
-0.0020007372368127108,
-0.0017150755738839507,
0.0049443598836660385,
-0.027666958048939705,
-0.018531890586018562,
-0.06350193172693253,
-0.058659203350543976,
-0.027153266593813896,
-0.09815188497304916,
0.01954255811870098,
-0.0025451115798205137,
0.028776347637176514,
-0.021314017474651337,
-0.0017463958356529474,
-0.04007945582270622,
-0.029623042792081833,
0.0669117197394371,
-0.0005884094862267375,
-0.011048933491110802,
-0.014971505850553513,
0.021944304928183556,
-0.037644777446985245,
0.019618911668658257,
-0.021654294803738594,
-0.05053114891052246,
0.0876905545592308,
0.05904240533709526,
0.041091762483119965,
-0.006179547403007746,
-0.0449681282043457,
-0.04963618516921997,
-0.05365734547376633,
-0.03147124871611595,
-0.030208690091967583,
-0.046845514327287674,
-0.017265748232603073,
-0.04518640786409378,
-0.026229964569211006,
-0.032245296984910965,
-0.032183848321437836,
-0.014906170777976513,
0.01952911727130413,
0.03060225211083889,
0.039356548339128494,
0.07360479980707169,
0.02680126763880253,
-0.031590890139341354,
-0.021419646218419075,
0.044069044291973114,
-0.0032034842297434807,
0.005538556724786758,
-0.07865187525749207,
-0.05350612848997116,
0.049884725362062454,
0.004621246363967657,
-0.0013670468470081687,
-0.003067056182771921,
0.053624752908945084,
0.03787261247634888,
0.006738987751305103,
0.025020884349942207,
0.012880060821771622,
-0.009639161638915539,
-0.01935901865363121,
-0.009223244152963161,
-0.03167516738176346,
-0.03242645412683487,
-0.01992289535701275,
-0.02861044555902481,
0.033284734934568405,
-0.0688997432589531,
-0.05564628168940544,
0.0006689844885841012,
0.033900149166584015,
0.028415042906999588,
0.007861947640776634,
-0.02686239592730999,
-0.031576383858919144,
-0.04439752176403999,
-0.026684436947107315,
0.03510075807571411,
0.010117173194885254,
0.00029734865529462695,
0.049165595322847366,
0.020646315068006516,
-0.0410286970436573,
0.02578754350543022,
0.02835547737777233,
0.04133293032646179,
0.013956589624285698,
-0.032042328268289566,
0.025676773861050606,
-0.05264192074537277,
0.016509516164660454,
0.0172578077763319,
-0.030786169692873955,
-0.049979954957962036,
-0.0774422213435173,
-0.030766090378165245,
0.010656391270458698,
-0.02271357923746109,
-0.007105185184627771,
0.0392056480050087,
-0.031970053911209106,
-0.034741390496492386,
-0.013349417597055435,
0.02003978006541729,
0.05846080929040909,
-0.0270874984562397,
0.026137318462133408,
-0.0036691513378173113,
0.06650511920452118,
-0.056288883090019226,
-0.01272408477962017,
-0.024369314312934875,
-0.025169219821691513,
0.005785610526800156,
0.036224909126758575,
0.009647414088249207,
0.05708267539739609,
0.0511309988796711,
0.041229553520679474,
-0.032845959067344666,
0.03804473951458931,
0.06100556626915932,
-0.008812022395431995,
-0.027174007147550583,
0.010397365316748619,
0.011609169654548168,
-0.031708650290966034,
0.0038353162817656994,
-0.002176242880523205,
0.017447680234909058,
0.03190037980675697,
-0.016418449580669403,
0.018873563036322594,
0.017427479848265648,
-0.027334051206707954,
-0.05185569077730179,
-0.06493178009986877,
-0.00782724004238844,
-0.02095416933298111,
-0.04254579916596413,
0.013698313385248184,
0.04831640422344208,
0.012825760059058666,
0.059650398790836334,
0.04918387532234192,
-0.04598016291856766,
-0.050130780786275864,
0.052212148904800415,
0.06549698114395142,
-0.04829975962638855,
-0.07018793374300003,
-0.05133015289902687,
0.02775357849895954,
0.0486481748521328,
-0.02543502300977707,
-0.09536951780319214,
0.026323659345507622,
0.06326655298471451,
-0.025150861591100693,
0.06921425461769104,
0.011211089789867401,
0.04343118518590927,
0.06727056205272675,
-0.01222875528037548,
0.016621578484773636,
-0.0149238845333457,
-0.004028031602501869,
-0.016510875895619392,
0.03130578249692917,
-0.031369030475616455,
-0.029739828780293465,
-0.04217788204550743,
0.02584591507911682,
0.014232992194592953,
0.040728166699409485,
0.03141001611948013,
-0.001353802508674562,
-0.06449414044618607,
0.0010844013886526227,
0.03275143727660179,
-0.03473297506570816,
0.017679812386631966,
0.023055486381053925,
0.041060689836740494,
-0.03497544676065445,
-0.007634999230504036,
-0.03179630637168884,
-0.006267991382628679,
0.05135852098464966,
-0.014357026666402817,
-0.027600103989243507,
-0.036889687180519104,
0.018389331176877022,
-0.005839429330080748,
-0.03527124226093292,
-0.06856987625360489,
0.0564335435628891,
0.00680411234498024,
-0.004124755505472422,
0.04940897971391678,
0.02833695523440838,
0.024240383878350258,
0.04762883856892586,
-0.007585658226162195,
0.013417134992778301,
-0.036330193281173706,
0.02333877608180046,
-0.014717504382133484,
-0.030831066891551018,
-0.011866339482367039,
-0.08303157240152359,
-0.034872960299253464,
-0.03643621504306793,
-0.038540326058864594,
-0.03538985550403595,
-0.028105249628424644,
0.007999349385499954,
-0.008737113326787949,
-0.0032655345275998116,
0.009089038707315922,
0.0120931938290596,
-0.03948243707418442,
-0.035947151482105255,
-0.0477970689535141,
-0.0525025948882103,
-0.11232052743434906,
-0.03757401928305626,
0.0019428725354373455,
0.05616744980216026,
0.022154266014695168,
0.0029245188925415277,
0.0011523354332894087,
0.009638667106628418,
0.011697078123688698,
-0.02619333378970623,
0.007917824201285839,
0.010697944089770317,
-0.04620354622602463,
-0.04123371094465256,
0.00278639467433095,
0.03513544425368309,
0.025533445179462433,
-0.02330036088824272,
0.0092195188626647,
0.02453083172440529,
-0.021308382973074913,
-0.003978359047323465,
0.03549502417445183,
0.0033461323473602533,
-0.08135936409235,
-0.04560666158795357,
-0.0015601475024595857,
-0.05236709490418434,
0.02922630123794079,
-0.025084014981985092,
-0.02976461872458458,
0.0014521015109494328,
0.031214993447065353,
0.01584802381694317,
-0.03029164858162403,
-0.020139561966061592,
0.00734702916815877,
-0.03989693894982338,
0.041904717683792114,
-0.04286357760429382,
0.0475652776658535,
-0.039997246116399765,
-0.0024430202320218086,
-0.019628707319498062,
-0.003088484751060605,
-0.03436395898461342,
0.08550456911325455,
-0.00004249126141075976,
0.007398600690066814,
-0.021684303879737854,
0.034065019339323044,
-0.01913534291088581,
0.03554238751530647,
0.008142506703734398,
0.01143492478877306,
-0.03342965245246887,
0.019238075241446495,
-0.05469508096575737,
0.011334109120070934,
-0.017260169610381126,
-0.03202299028635025,
-0.005227935966104269,
-0.031064355745911598,
-0.0037825885228812695,
-0.0542888380587101,
0.04235139489173889,
0.0337279811501503,
0.021230850368738174,
0.022827034816145897,
-0.026098914444446564,
-0.006310261320322752,
0.013026915490627289,
-0.06924839317798615,
-0.026341697201132774,
-0.012147615663707256,
0.016831792891025543,
-0.02074650302529335,
0.045625850558280945,
0.05450782924890518,
-0.042109984904527664,
-0.04142211377620697,
0.02297910861670971,
0.006344432942569256,
0.0096007464453578,
0.0062239766120910645,
0.008299787528812885,
0.060566917061805725,
0.04290269687771797,
-0.029071839526295662,
0.0026575285010039806,
-0.005900275427848101,
-0.0220927856862545,
-0.0034628799185156822,
-0.01139151118695736,
0.030579008162021637,
0.003938207868486643,
-0.04275889694690704,
-0.034762777388095856,
0.07139063626527786,
0.02088204212486744,
0.022958870977163315,
0.0011867787688970566,
-0.026373203843832016,
0.04785343259572983,
0.005012954119592905,
-0.05070282518863678,
-0.02652585692703724,
0.0203388798981905,
-0.045522984117269516,
0.08758193254470825,
-0.008567778393626213,
0.017529577016830444,
0.02606232278048992,
0.004050671588629484,
0.019363446161150932,
0.04531560093164444,
-0.05022384971380234,
-0.006076326128095388,
0.054232120513916016,
-0.04409264400601387,
0.010971536859869957,
-0.021746257320046425,
0.05091866850852966,
-0.05496107041835785,
0.06769071519374847,
0.015809841454029083,
0.0392729751765728,
0.00023402560327667743,
-0.010762075893580914,
-0.06253457814455032,
0.03707949072122574,
-0.0562521331012249,
0.06149349361658096,
-0.013683748431503773,
-0.07040556520223618,
0.08564375340938568,
0.029147151857614517,
-0.09636392444372177,
0.01849149912595749,
0.022118959575891495,
0.016240941360592842,
0.01397309172898531,
0.0471932478249073,
-0.05672734975814819,
-0.005421555135399103,
-0.04674578830599785,
0.03268355876207352,
-0.07368237525224686,
-0.01649942249059677,
0.014208418317139149,
-0.029559411108493805,
-0.010618312284350395,
0.043577101081609726,
0.004214251413941383,
0.01636367291212082,
0.03253864869475365,
-0.06352143734693527,
-0.043220069259405136,
-0.025361301377415657,
0.026236701756715775,
-0.04526973143219948,
0.03195109963417053,
-0.007329332642257214,
0.038922399282455444,
0.003377745393663645,
0.0017185729229822755,
-0.026101836934685707,
0.009409238584339619,
0.042371757328510284,
-0.04089898616075516,
-0.02279832400381565,
0.030088573694229126,
0.009011403657495975,
-0.015980813652276993,
0.04087573662400246,
-0.01656438410282135,
0.027865618467330933,
0.04052995517849922,
-0.020391328260302544,
0.018379783257842064,
-0.03707785904407501,
-0.013318144716322422,
0.012069948948919773,
0.012575956992805004,
0.020839598029851913,
-0.0010415908182039857,
0.008284798823297024,
0.03848204016685486,
0.02096923254430294,
-0.020049916580319405,
-0.015485631301999092,
-0.03343185782432556,
0.015664326027035713,
-0.04493528604507446,
0.020900320261716843,
0.016072509810328484,
-0.02683343179523945,
-0.042015351355075836,
-0.04300256073474884,
-0.014838865958154202,
0.04779757186770439,
-0.046083904802799225,
-0.005617812741547823,
0.06394139677286148,
-0.02556288242340088,
-0.06817411631345749,
-0.06358560174703598,
-0.008176933042705059,
-0.026468997821211815,
0.027282416820526123,
0.029867177829146385,
-0.020288463681936264,
0.020253274589776993,
-0.01973339356482029,
-0.07459203898906708,
0.045389726758003235,
0.017626013606786728,
-0.029320700094103813,
0.040069207549095154,
0.04201655462384224,
-0.007606017868965864,
0.01781921461224556,
0.011137975379824638,
-0.05530523136258125,
0.015087038278579712,
0.0005800079670734704,
0.01615493930876255,
0.022484643384814262,
0.05166659131646156,
-0.02383202128112316,
-0.021289324387907982,
-0.048267751932144165,
-0.021619463339447975,
-0.022326257079839706,
-0.01293181348592043,
0.06843115389347076
] |
Caddy/UD | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
---
# CodeTrans model for program synthesis
Pretrained model on programming language lisp inspired DSL using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the program synthesis task for the lisp inspired DSL code.
## Intended uses & limitations
The model could be used to generate lisp inspired DSL code given the human language description tasks.
### How to use
Here is how to use this model to generate lisp inspired DSL code using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_program_synthese_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_program_synthese_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/program%20synthesis/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 2,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing lisp inspired DSL data.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | LISP |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 89.43 |
| CodeTrans-ST-Base | 89.65 |
| CodeTrans-TF-Small | 90.30 |
| CodeTrans-TF-Base | 90.24 |
| CodeTrans-TF-Large | 90.21 |
| CodeTrans-MT-Small | 82.88 |
| CodeTrans-MT-Base | 86.99 |
| CodeTrans-MT-Large | 90.27 |
| CodeTrans-MT-TF-Small | **90.31** |
| CodeTrans-MT-TF-Base | 90.30 |
| CodeTrans-MT-TF-Large | 90.17 |
| State of the art | 85.80 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.03174808248877525,
-0.03171053156256676,
-0.015204292722046375,
0.040597882121801376,
0.027676528319716454,
0.030680770054459572,
-0.033421993255615234,
-0.00133204844314605,
-0.0121434535831213,
0.06385814398527145,
0.05155407264828682,
0.013595722615718842,
-0.03459804132580757,
0.055315230041742325,
-0.03980400040745735,
-0.05754045769572258,
-0.020291170105338097,
-0.03411302715539932,
-0.023773297667503357,
-0.025457484647631645,
0.01832813210785389,
-0.011433394625782967,
0.01962493360042572,
0.005036328919231892,
-0.004971126094460487,
0.018453555181622505,
0.0008748138789087534,
0.030673064291477203,
0.025051333010196686,
-0.08006458729505539,
-0.0242366474121809,
-0.02136276662349701,
-0.0434904582798481,
-0.0014493790222331882,
-0.01889556646347046,
0.03010115772485733,
0.012370395474135876,
0.026820873841643333,
0.02366355061531067,
0.05440419912338257,
0.007752267178148031,
0.002080577192828059,
-0.004415850155055523,
-0.03935582563281059,
0.05559716373682022,
0.010655867867171764,
-0.01942528784275055,
-0.019381718710064888,
0.023551790043711662,
0.006485270336270332,
-0.05327800661325455,
-0.05663676932454109,
-0.037462443113327026,
0.039262816309928894,
-0.00847566593438387,
-0.011784645728766918,
-0.05685817077755928,
-0.01094115898013115,
0.0554816909134388,
-0.049515217542648315,
-0.02910950407385826,
0.023471802473068237,
-0.059079259634017944,
0.018033668398857117,
0.031044501811265945,
-0.01627267710864544,
0.012062068097293377,
-0.036749664694070816,
0.014215928502380848,
-0.010720619931817055,
0.05749223008751869,
-0.019773293286561966,
0.021398507058620453,
-0.1091279610991478,
0.021005066111683846,
-0.0028860936872661114,
0.023848317563533783,
0.019667284563183784,
-0.024770241230726242,
0.047506142407655716,
0.014833196997642517,
-0.00987196248024702,
0.035163767635822296,
0.012646014802157879,
-0.003453352488577366,
0.05200369656085968,
-0.03903017193078995,
-0.0060578626580536366,
-0.015286315232515335,
0.06076096370816231,
-0.0553581677377224,
-0.049675311893224716,
-0.029042668640613556,
-0.021981246769428253,
-0.025132527574896812,
0.01748763583600521,
0.027958214282989502,
-0.004127010237425566,
0.03242330998182297,
0.016648538410663605,
0.04368738830089569,
0.04158017039299011,
-0.01651124842464924,
0.04658626765012741,
0.02660338208079338,
0.018949778750538826,
0.0031908652745187283,
-0.04350470006465912,
-0.040184617042541504,
0.045839376747608185,
0.02637082152068615,
-0.03317958489060402,
-0.04642927646636963,
0.043267663568258286,
0.01145972777158022,
-0.025064583867788315,
0.04552953317761421,
-0.02144501358270645,
-0.052299387753009796,
-0.025775298476219177,
0.03237376734614372,
0.0008391942828893661,
-0.015504579059779644,
0.022203190252184868,
-0.05086119472980499,
0.0048874919302761555,
-0.06985392421483994,
-0.045056067407131195,
0.01829836517572403,
0.027119342237710953,
-0.010482316836714745,
0.08143068850040436,
0.0053285653702914715,
-0.05346863716840744,
0.00889307539910078,
0.017732853069901466,
-0.08059843629598618,
0.05188348516821861,
0.044761352241039276,
0.13367582857608795,
-0.062008097767829895,
-0.04418240115046501,
0.008509257808327675,
-0.006693008355796337,
-0.03668897971510887,
0.02347745932638645,
0.000006467891580541618,
-0.06034843623638153,
-0.023067642003297806,
-0.02180565521121025,
0.06952255964279175,
-0.05225834622979164,
-0.018766457214951515,
0.03808450698852539,
0.002956841140985489,
0.018987638875842094,
-0.04179048910737038,
-0.0008587717893533409,
-0.014439978636801243,
-0.023501044139266014,
-0.04810859635472298,
0.029246721416711807,
-0.008984471671283245,
-0.0268727857619524,
-0.038701269775629044,
-0.02753988653421402,
0.010816628113389015,
0.08532130718231201,
0.011278062127530575,
-0.02165145054459572,
-0.028604654595255852,
0.009194635786116123,
0.03305857256054878,
0.037851542234420776,
-0.046471964567899704,
0.027028830721974373,
0.0499194972217083,
0.05322175472974777,
-0.025836998596787453,
0.06865106523036957,
-0.008019858971238136,
-0.03217573091387749,
-0.02428869530558586,
-0.0033614991698414087,
-0.012328927405178547,
-0.0372801311314106,
-0.0005237722652964294,
0.031708724796772,
-0.015561513602733612,
0.001311511849053204,
-0.021493276581168175,
0.06570646911859512,
0.01782849431037903,
-0.01439278107136488,
-0.027104582637548447,
0.002488993341103196,
-0.02121863327920437,
0.05919332429766655,
-0.03177729994058609,
-0.005011092405766249,
-0.012955854646861553,
-0.04314500465989113,
-0.011908968910574913,
0.018101848661899567,
0.04694515839219093,
0.03174082189798355,
0.006257150322198868,
0.09575869143009186,
-0.04615471139550209,
0.010055966675281525,
-0.051600381731987,
-0.03793052211403847,
0.01314436737447977,
0.05420420691370964,
0.008241692557930946,
0.04228801652789116,
0.007188920862972736,
-0.029848909005522728,
0.020217232406139374,
0.05769616365432739,
0.022504249587655067,
0.020111756399273872,
-0.030284736305475235,
-0.028486477211117744,
0.033540595322847366,
0.070635125041008,
-0.04725431278347969,
-0.03228772059082985,
0.03758392482995987,
0.036054227501153946,
-0.019550692290067673,
0.02681044489145279,
-0.011005725711584091,
0.017908751964569092,
-0.056799907237291336,
-0.05837344005703926,
0.028338290750980377,
0.0078904302790761,
0.010438843630254269,
0.01542767696082592,
0.0037901410833001137,
-0.016860701143741608,
0.04392530024051666,
-0.004731285385787487,
-0.0034423451870679855,
-0.06649846583604813,
-0.0107130641117692,
0.0013963262317702174,
0.03428797051310539,
-0.035510919988155365,
0.0410015843808651,
0.005984228104352951,
0.007874653674662113,
0.057972293347120285,
-0.02482854388654232,
0.02535473182797432,
0.03434964641928673,
0.022762823849916458,
-0.013554371893405914,
0.016877658665180206,
0.012366409413516521,
0.03564029932022095,
0.06425272673368454,
-0.005771548021584749,
0.07459209859371185,
-0.008443163707852364,
0.057803843170404434,
0.060000255703926086,
0.01737341098487377,
0.00627959193661809,
0.040848005563020706,
0.07505299150943756,
-0.0020316478330641985,
-0.010446911677718163,
0.0451107956469059,
-0.06854266673326492,
0.03717134892940521,
-0.018110275268554688,
0.029043791815638542,
-0.018859945237636566,
-0.019798003137111664,
0.057345375418663025,
0.0045905951410532,
-0.02270839549601078,
-0.005255117081105709,
-0.036028120666742325,
-0.02460881881415844,
0.00870391447097063,
-0.012262046337127686,
-0.02306283637881279,
0.02728692814707756,
-0.0256778784096241,
0.008012106642127037,
-0.08979348093271255,
-0.05359054356813431,
-0.01168022770434618,
-0.04030846804380417,
0.023181485012173653,
-0.07517964392900467,
-0.05672885850071907,
-0.06173836067318916,
-0.020298568531870842,
0.02855125069618225,
0.002996469149366021,
0.006853391882032156,
-0.023693017661571503,
0.02336086705327034,
-0.04694588482379913,
-0.02158999629318714,
-0.05746404454112053,
-0.05885910987854004,
-0.011689985170960426,
-0.051467519253492355,
0.029268549755215645,
-0.0010320856235921383,
0.011954025365412235,
-0.005646103527396917,
-0.004274409264326096,
-0.03382067382335663,
-0.02276078797876835,
0.07551302015781403,
0.012964013032615185,
-0.018049126490950584,
-0.028416763991117477,
0.011842380277812481,
-0.02370453253388405,
0.030185101553797722,
-0.031046774238348007,
-0.036948561668395996,
0.08884876221418381,
0.05610477924346924,
0.02847239002585411,
-0.0070188636891543865,
-0.03801451623439789,
-0.059577576816082,
-0.06016405299305916,
-0.0192034263163805,
-0.0371466688811779,
-0.030361421406269073,
-0.0009316257201135159,
-0.04327099025249481,
-0.010094832628965378,
-0.039989180862903595,
-0.031502485275268555,
0.00003754912540898658,
0.028696676716208458,
0.0443650521337986,
0.03094397857785225,
0.053097959607839584,
0.02035372518002987,
-0.0377819649875164,
-0.01896826922893524,
0.043023303151130676,
0.006378795485943556,
0.011716299690306187,
-0.07757720351219177,
-0.02112298086285591,
0.032760631293058395,
0.034057293087244034,
0.00214944570325315,
-0.015014811418950558,
0.07544516026973724,
0.028139010071754456,
0.004390730056911707,
0.007825372740626335,
0.009361139498651028,
-0.013876324519515038,
-0.008695462718605995,
-0.000978010706603527,
-0.03053649328649044,
-0.04684162884950638,
-0.013289058580994606,
-0.0260092131793499,
0.0421137660741806,
-0.05042846500873566,
-0.04469527304172516,
-0.02129737287759781,
0.03498166799545288,
0.024828458204865456,
0.019989825785160065,
-0.022531231865286827,
-0.011259923689067364,
-0.05542294308543205,
-0.03619907423853874,
0.03625727444887161,
0.013269538059830666,
-0.015036134980618954,
0.039236880838871,
0.023388853296637535,
-0.04971737787127495,
0.021221591159701347,
0.018564237281680107,
0.05061892420053482,
0.039280883967876434,
-0.03994788974523544,
0.018087077885866165,
-0.0401570089161396,
0.02746082842350006,
0.007926595397293568,
-0.043938618153333664,
-0.06360545009374619,
-0.08585724979639053,
-0.024203797802329063,
0.004023335408419371,
-0.02887750044465065,
0.003887391649186611,
0.049179110676050186,
-0.026069512590765953,
-0.022646043449640274,
0.006624151486903429,
0.01858353056013584,
0.052764348685741425,
-0.03772525116801262,
0.03514711558818817,
0.00733180483803153,
0.05661185085773468,
-0.039085302501916885,
0.0085438322275877,
-0.025817804038524628,
-0.020456776022911072,
0.01652437634766102,
0.03963758796453476,
0.04055497795343399,
0.05931755155324936,
0.06412042677402496,
0.02856493555009365,
-0.041283853352069855,
0.035821639001369476,
0.05835839733481407,
0.002551202429458499,
-0.035842686891555786,
0.01030589360743761,
-0.0026030130684375763,
-0.03752809017896652,
0.014299692586064339,
-0.01616690866649151,
0.021270425990223885,
0.033848412334918976,
-0.009620863944292068,
-0.006541373673826456,
-0.0014065749710425735,
-0.03061780333518982,
-0.038917459547519684,
-0.05612810328602791,
-0.020778125151991844,
-0.025952043011784554,
-0.07336600124835968,
0.0439688116312027,
0.036793775856494904,
0.028564948588609695,
0.05074058473110199,
0.04796754941344261,
-0.03411661088466644,
-0.038884732872247696,
0.051783639937639236,
0.036731500178575516,
-0.04969453439116478,
-0.05131620168685913,
-0.06689849495887756,
0.029624177142977715,
0.03950880095362663,
-0.030555980280041695,
-0.08818031847476959,
0.014027968980371952,
0.049356359988451004,
-0.02830035798251629,
0.07464736700057983,
0.008079145103693008,
0.02730829454958439,
0.04265475645661354,
-0.013652260415256023,
0.027615642175078392,
-0.02425701729953289,
0.02352237142622471,
0.01694658398628235,
0.05781417712569237,
-0.03366639465093613,
-0.034807443618774414,
-0.051815710961818695,
0.03636549413204193,
0.024008968845009804,
0.047965385019779205,
0.04114408418536186,
-0.009143363684415817,
-0.06926698237657547,
-0.0003029283252544701,
0.015559051185846329,
-0.03265224024653435,
0.012836637906730175,
0.029378816485404968,
0.04950185492634773,
-0.051006998866796494,
-0.01501049567013979,
-0.016718454658985138,
-0.0031825632322579622,
0.028948292136192322,
-0.003982706926763058,
-0.027522504329681396,
-0.06039540842175484,
0.010976972989737988,
-0.028714030981063843,
-0.017132453620433807,
-0.09887043386697769,
0.04513734579086304,
-0.00978841632604599,
-0.015621575526893139,
0.057809438556432724,
0.043790847063064575,
0.03313223272562027,
0.04193440079689026,
-0.015738505870103836,
0.026318438351154327,
-0.03211619332432747,
0.04270154610276222,
-0.011157260276377201,
-0.020389460027217865,
-0.016452956944704056,
-0.08204301446676254,
-0.019472116604447365,
-0.029322974383831024,
-0.037319134920835495,
-0.042213018983602524,
-0.04786873236298561,
0.0038773948326706886,
0.00009642978693591431,
0.010683958418667316,
0.003223853185772896,
0.02172304503619671,
-0.01983019895851612,
-0.017815999686717987,
-0.036137014627456665,
-0.05318515747785568,
-0.09577938169240952,
-0.028498223051428795,
0.00457724928855896,
0.02685737796127796,
0.025372348725795746,
-0.0024383312556892633,
0.004267819691449404,
0.02686048485338688,
0.004918177146464586,
-0.025451164692640305,
0.02818901650607586,
0.010809959843754768,
-0.05537724494934082,
-0.01985914260149002,
-0.010349373333156109,
-0.004629450850188732,
0.0126403933390975,
-0.04187992215156555,
0.010951420292258263,
0.020664174109697342,
-0.03115137852728367,
-0.007227842230349779,
0.02614160068333149,
0.0070408103056252,
-0.07833176851272583,
-0.05173145979642868,
-0.01859012432396412,
-0.05991463363170624,
0.02496291510760784,
-0.001787082408554852,
-0.024170011281967163,
-0.003837890224531293,
0.017416303977370262,
0.015151836909353733,
-0.01220204122364521,
-0.023102037608623505,
-0.007249739486724138,
-0.045943453907966614,
0.03797796368598938,
-0.06089651957154274,
0.05769754946231842,
-0.03824341669678688,
-0.0034890875685960054,
-0.01148921623826027,
-0.02598208375275135,
-0.03502821922302246,
0.050228267908096313,
-0.010186875239014626,
0.003054054919630289,
-0.020240582525730133,
0.02134300023317337,
-0.03928206115961075,
0.0501251183450222,
-0.00222374452278018,
0.012168374843895435,
-0.031271617859601974,
0.013779292814433575,
-0.040430694818496704,
0.01247673574835062,
-0.01549968309700489,
-0.020436134189367294,
-0.011674925684928894,
-0.02772202342748642,
-0.02975374460220337,
-0.04608449339866638,
0.04841979965567589,
0.031016690656542778,
0.029409272596240044,
0.00839806254953146,
-0.007255565375089645,
-0.017544656991958618,
0.017237268388271332,
-0.077232226729393,
-0.03582466393709183,
-0.015667637810111046,
0.020949846133589745,
-0.02285492978990078,
0.06200909614562988,
0.04119211807847023,
-0.04688152298331261,
-0.02732960693538189,
0.013690019957721233,
0.0030519538559019566,
0.005892162676900625,
0.022936929017305374,
0.029661111533641815,
0.04283576458692551,
0.05307500436902046,
-0.030490044504404068,
-0.00031210831366479397,
-0.0019676685333251953,
-0.0105438856408,
-0.014374823309481144,
-0.015362557955086231,
0.02209443226456642,
-0.009494072757661343,
-0.039895765483379364,
-0.023909015581011772,
0.05866716429591179,
0.029462328180670738,
0.0239179078489542,
0.0068769012577831745,
-0.03816106170415878,
0.015711603686213493,
0.021076206117868423,
-0.05166906490921974,
-0.035074323415756226,
0.014447343535721302,
-0.04546817019581795,
0.08206605911254883,
-0.018639545887708664,
0.02354590594768524,
0.04113352298736572,
0.029138844460248947,
0.00519981887191534,
0.035528384149074554,
-0.03839386999607086,
0.012368738651275635,
0.04759528860449791,
-0.05434628948569298,
-0.011071182787418365,
-0.013229047879576683,
0.06521888077259064,
-0.05630116909742355,
0.06364002078771591,
0.014652226120233536,
0.01982126198709011,
0.005521995946764946,
-0.008037426508963108,
-0.06904218345880508,
0.02813427522778511,
-0.04526492580771446,
0.07226545363664627,
-0.019789252430200577,
-0.06463659554719925,
0.08425457775592804,
0.02969266101717949,
-0.08460124582052231,
0.013463207520544529,
0.03985496982932091,
0.019823085516691208,
0.035649802535772324,
0.02482582814991474,
-0.08162757009267807,
-0.011180263012647629,
-0.03243337199091911,
0.01454081479460001,
-0.058134667575359344,
-0.009098711423575878,
0.027634937316179276,
-0.049998123198747635,
0.00006684638356091455,
0.02364302985370159,
0.00010887652751989663,
0.0031612790189683437,
0.01609199307858944,
-0.0572524257004261,
-0.041908372193574905,
-0.023050112649798393,
0.01542716845870018,
-0.04227782040834427,
0.02030334062874317,
-0.014808215200901031,
0.034116633236408234,
0.023039190098643303,
0.0045640491880476475,
-0.047800347208976746,
0.007488730829209089,
0.029833074659109116,
-0.0522882416844368,
-0.027806399390101433,
0.01861487329006195,
0.016242844983935356,
-0.028321314603090286,
0.03220275044441223,
-0.021198689937591553,
0.033030107617378235,
0.03021802008152008,
-0.015439956448972225,
0.009004350751638412,
-0.03750231862068176,
-0.009483822621405125,
0.019678955897688866,
0.005868547596037388,
0.010014211758971214,
-0.006274797488003969,
0.03310203179717064,
0.050348859280347824,
0.043326277285814285,
-0.014627451077103615,
-0.009747634641826153,
-0.011304189451038837,
0.015367300249636173,
-0.038069598376750946,
0.02097698301076889,
0.022945567965507507,
-0.030072204768657684,
-0.034203581511974335,
-0.04514630511403084,
-0.02587621659040451,
0.04014096036553383,
-0.040452200919389725,
0.00649139191955328,
0.04333142191171646,
-0.017533443868160248,
-0.048976391553878784,
-0.06496836990118027,
-0.0005947582540102303,
-0.020537810400128365,
0.04754653200507164,
0.030994918197393417,
-0.033367983996868134,
-0.003081235336139798,
-0.04466576501727104,
-0.06294142454862595,
0.040223605930805206,
0.025259191170334816,
-0.012791717424988747,
0.046237118542194366,
0.02851864881813526,
-0.02472994104027748,
0.017681384459137917,
0.022922374308109283,
-0.05261971428990364,
0.03226470574736595,
0.01946767047047615,
0.01686372421681881,
0.039743367582559586,
0.034223660826683044,
-0.03274911642074585,
-0.040866460651159286,
-0.07307126373052597,
-0.01441454328596592,
-0.03817803040146828,
-0.005730006843805313,
0.06811758130788803
] |
Callidior/bert2bert-base-arxiv-titlegen | [
"pytorch",
"safetensors",
"encoder-decoder",
"text2text-generation",
"en",
"dataset:arxiv_dataset",
"transformers",
"summarization",
"license:apache-2.0",
"autotrain_compatible",
"has_space"
] | summarization | {
"architectures": [
"EncoderDecoderModel"
],
"model_type": "encoder-decoder",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 145 | null | ---
tags:
- summarization
widget:
- text: "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
---
# CodeTrans model for source code summarization csharp
Pretrained model on programming language csharp using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized csharp code functions: it works best with tokenized csharp functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the csharp function or be fine-tuned on other csharp code tasks. It can be used on unparsed and untokenized csharp code. However, if the csharp code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate csharp function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_csharp_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_csharp_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/source%20code%20summarization/csharp/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 120,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.002238734858110547,
-0.025311484932899475,
-0.011544624343514442,
0.022003352642059326,
0.031058985739946365,
0.0339805968105793,
-0.027645085006952286,
0.003116224892437458,
-0.02295585535466671,
0.0630522072315216,
0.04894905537366867,
0.013383666053414345,
-0.007376770488917828,
0.046778950840234756,
-0.033789604902267456,
-0.07081855088472366,
-0.019016796723008156,
-0.03853961452841759,
-0.03132961690425873,
-0.014102878980338573,
0.024946263059973717,
0.0027790148742496967,
0.003871629014611244,
0.0007765139453113079,
-0.0012060200097039342,
0.020300354808568954,
0.005343286786228418,
0.026604270562529564,
0.032941561192274094,
-0.08106186985969543,
-0.03649887070059776,
0.0013180662645027041,
-0.05325484648346901,
-0.015033320523798466,
-0.00811338797211647,
0.021251723170280457,
-0.0021801069378852844,
0.04140797257423401,
0.022979270666837692,
0.05228869989514351,
0.0001513646711828187,
0.01699792593717575,
0.014921829104423523,
-0.038170892745256424,
0.05963485687971115,
0.008915015496313572,
-0.02614404819905758,
-0.030758021399378777,
0.024031300097703934,
-0.0016995272599160671,
-0.06390832364559174,
-0.05374797433614731,
-0.029271600767970085,
0.050173621624708176,
-0.01153597328811884,
-0.002026996109634638,
-0.0643235445022583,
-0.019665023311972618,
0.05211871489882469,
-0.052687861025333405,
-0.02845599502325058,
0.014664432033896446,
-0.055290527641773224,
0.018977712839841843,
0.023500097915530205,
0.003991595469415188,
0.003986076917499304,
-0.045624587684869766,
0.0307090412825346,
0.0029561398550868034,
0.057214315980672836,
-0.02411963790655136,
0.027751298621296883,
-0.10929083824157715,
0.014431801624596119,
0.0054244305938482285,
0.0224960558116436,
0.016583075746893883,
-0.004918999038636684,
0.05464184284210205,
0.0010379482991993427,
-0.0120603758841753,
0.04900052770972252,
0.010942187160253525,
-0.008639109320938587,
0.03913440555334091,
-0.040650948882102966,
-0.018641764298081398,
-0.020339373499155045,
0.059064436703920364,
-0.058840878307819366,
-0.06255611777305603,
-0.017147477716207504,
-0.02542009763419628,
-0.03355445712804794,
0.01278003305196762,
0.05273084715008736,
-0.015325646847486496,
0.023294948041439056,
0.019942332059144974,
0.039724718779325485,
0.05031943693757057,
-0.01315636932849884,
0.03218597546219826,
0.03183196485042572,
0.014816039241850376,
-0.010338514111936092,
-0.04082642123103142,
-0.013231317512691021,
0.04983891174197197,
0.019976457580924034,
-0.04251379147171974,
-0.0441310852766037,
0.02947668917477131,
0.020871367305517197,
-0.03899097815155983,
0.04352743923664093,
-0.028623053804039955,
-0.046273767948150635,
-0.03467089682817459,
0.031030546873807907,
-0.01270418893545866,
-0.024170486256480217,
0.012818269431591034,
-0.04116865620017052,
0.004672347567975521,
-0.05670403689146042,
-0.027402030304074287,
0.016264650970697403,
0.04457547515630722,
-0.0021911715157330036,
0.08400031179189682,
0.023900732398033142,
-0.04078429564833641,
0.026258811354637146,
0.022966226562857628,
-0.06423841416835785,
0.05533227324485779,
0.04440382122993469,
0.10831780731678009,
-0.06381669640541077,
-0.04623644798994064,
0.026322968304157257,
-0.0027406588196754456,
-0.029404614120721817,
0.02501741424202919,
-0.010528434999287128,
-0.07233859598636627,
-0.02988390065729618,
-0.00534410122781992,
0.05510248616337776,
-0.05069663003087044,
-0.012830478139221668,
0.02323244884610176,
0.0014147126348689198,
0.014803650788962841,
-0.039951592683792114,
-0.004390294197946787,
-0.002905983943492174,
-0.025216558948159218,
-0.06439077854156494,
0.03436633571982384,
0.002379146171733737,
-0.028355605900287628,
-0.03544585779309273,
-0.03619102016091347,
0.009002306498587132,
0.10475218296051025,
0.012935918755829334,
-0.010189359076321125,
-0.0604252852499485,
0.007265156134963036,
0.022618049755692482,
0.04734334722161293,
-0.027400797232985497,
0.03155593201518059,
0.043711479753255844,
0.07798020541667938,
-0.022520560771226883,
0.07534252852201462,
-0.015551828779280186,
-0.03741757571697235,
-0.03174035996198654,
0.0222285408526659,
-0.00002942071296274662,
-0.029276004061102867,
0.0027578952722251415,
0.026011023670434952,
-0.018959546461701393,
-0.008327784948050976,
-0.03003004379570484,
0.056695375591516495,
0.011520233936607838,
-0.0026116506196558475,
-0.02809295617043972,
0.015498889610171318,
-0.016540953889489174,
0.055027641355991364,
-0.03214261308312416,
-0.01697036437690258,
-0.004147011321038008,
-0.02910296618938446,
-0.014757982455193996,
0.024263709783554077,
0.04031940549612045,
0.025208286941051483,
-0.011485162191092968,
0.11243744194507599,
-0.04696788638830185,
-0.006574958562850952,
-0.042831409722566605,
-0.03725166246294975,
0.022569892928004265,
0.03999921306967735,
0.0343787707388401,
0.03249525651335716,
0.006654436234384775,
-0.023473888635635376,
0.02562667429447174,
0.08164350688457489,
0.02293458767235279,
0.03400038927793503,
-0.008665378205478191,
-0.02819107659161091,
0.051416847854852676,
0.06457103788852692,
-0.028132759034633636,
-0.04860179126262665,
0.046463534235954285,
0.01983914151787758,
0.005494604352861643,
0.027675431221723557,
-0.01151063572615385,
0.02177177183330059,
-0.0488138310611248,
-0.06024768203496933,
0.05704979971051216,
0.012097498401999474,
-0.008477389812469482,
0.03921813890337944,
0.00009876481635728851,
0.002083491301164031,
0.028590843081474304,
-0.006772153545171022,
0.0026127160526812077,
-0.0622689425945282,
0.001528003253042698,
0.003891190281137824,
0.06131511554121971,
-0.04224477335810661,
0.02973722293972969,
0.021907463669776917,
-0.0016934947343543172,
0.06259483844041824,
-0.031840939074754715,
0.030186109244823456,
0.04106361046433449,
0.02654666267335415,
-0.017266539856791496,
0.016993209719657898,
0.018265508115291595,
0.039175283163785934,
0.07999460399150848,
0.014324154704809189,
0.0626523569226265,
0.006749356165528297,
0.057862237095832825,
0.06629794090986252,
0.0189976803958416,
0.013827329501509666,
0.02623371221125126,
0.04999896511435509,
0.0008805060060694814,
-0.012000820599496365,
0.0655985176563263,
-0.06340915709733963,
0.026792902499437332,
-0.029784047976136208,
0.020223159343004227,
-0.0116118174046278,
-0.023064926266670227,
0.043522585183382034,
-0.002450361382216215,
-0.041203729808330536,
0.008925437927246094,
-0.030493874102830887,
-0.026630880311131477,
0.015395252034068108,
-0.0008456483483314514,
-0.025434419512748718,
0.013708977960050106,
-0.02487693913280964,
0.014736772514879704,
-0.07692436128854752,
-0.04504530131816864,
-0.012457958422601223,
-0.04579911381006241,
0.011882944032549858,
-0.07104051858186722,
-0.050476353615522385,
-0.06981544941663742,
-0.022159818559885025,
0.02837466448545456,
0.004911903291940689,
-0.017926450818777084,
-0.022650619968771935,
0.015222180634737015,
-0.03732604533433914,
-0.029440468177199364,
-0.057052403688430786,
-0.059759579598903656,
-0.004906236659735441,
-0.06825513392686844,
0.03644759953022003,
-0.017208721488714218,
0.0190450306981802,
0.005279421806335449,
-0.01190951094031334,
-0.026490559801459312,
-0.023080646991729736,
0.07469552010297775,
0.01268372405320406,
-0.015665728598833084,
-0.03416527435183525,
0.019439201802015305,
-0.03017980232834816,
0.03945603221654892,
-0.020327821373939514,
-0.047887273132801056,
0.09727843850851059,
0.05907192826271057,
0.05543380603194237,
-0.010788969695568085,
-0.03917790576815605,
-0.04282841458916664,
-0.061342183500528336,
-0.03026372753083706,
-0.039233386516571045,
-0.02990197390317917,
-0.0013718506088480353,
-0.05386469513177872,
-0.025206146761775017,
-0.01945009082555771,
-0.03406462073326111,
-0.027625935152173042,
0.022822676226496696,
0.019034160301089287,
0.03667124733328819,
0.056831952184438705,
0.007598678581416607,
-0.042879585176706314,
-0.03432946652173996,
0.04146457463502884,
0.00386833562515676,
0.011435864493250847,
-0.07573169469833374,
-0.029700448736548424,
0.04373878613114357,
0.014255833812057972,
0.010841960087418556,
-0.027235738933086395,
0.0469132736325264,
0.01798008568584919,
0.006983801256865263,
0.012306518852710724,
0.0030998196452856064,
-0.015044369734823704,
-0.026472140103578568,
0.009674998000264168,
-0.03656812757253647,
-0.03458818793296814,
-0.024771373718976974,
-0.003984583076089621,
0.040546316653490067,
-0.05968787521123886,
-0.05596251040697098,
0.0005968656041659415,
0.0300048366189003,
0.03931933641433716,
0.02312455326318741,
-0.017314964905381203,
-0.012488394044339657,
-0.061463985592126846,
-0.031608887016773224,
0.045030929148197174,
0.026396630331873894,
-0.00903770700097084,
0.03914634510874748,
0.037208441644907,
-0.05202389135956764,
0.024959813803434372,
0.026779435575008392,
0.04246470332145691,
0.030863992869853973,
-0.03487890213727951,
0.013055164366960526,
-0.05284024029970169,
0.011181328445672989,
0.009920126758515835,
-0.02645936980843544,
-0.04765991121530533,
-0.07476598024368286,
-0.03367036581039429,
0.023551946505904198,
-0.01564979925751686,
-0.01095470879226923,
0.044868264347314835,
-0.025424910709261894,
-0.04018775746226311,
-0.009774820879101753,
-0.004497482907027006,
0.06430713832378387,
-0.03831121325492859,
0.021198812872171402,
0.007271921262145042,
0.04832538217306137,
-0.04315212741494179,
0.00259331869892776,
-0.03383664786815643,
-0.01712922751903534,
0.003793612588196993,
0.044607311487197876,
0.021558871492743492,
0.06497938185930252,
0.0784073993563652,
0.007501468062400818,
-0.02705162577331066,
0.042138248682022095,
0.046698033809661865,
0.0028477099258452654,
-0.02118365466594696,
0.014141942374408245,
0.018531208857893944,
-0.026975272223353386,
0.012158401310443878,
-0.005313936620950699,
0.026044130325317383,
0.02648153156042099,
-0.015049606561660767,
0.00023861914814915508,
0.004557575564831495,
-0.0249723419547081,
-0.040001243352890015,
-0.05532895773649216,
-0.019135957583785057,
-0.025672215968370438,
-0.05478588119149208,
0.026882562786340714,
0.035476651042699814,
0.02702830545604229,
0.0432940348982811,
0.03529316186904907,
-0.04462692141532898,
-0.025801019743084908,
0.04830767959356308,
0.05206805095076561,
-0.04711129516363144,
-0.025926856324076653,
-0.0595649890601635,
0.03789951279759407,
0.0466424897313118,
-0.02247365191578865,
-0.08384431153535843,
0.000031626521376892924,
0.0259846318513155,
-0.020273946225643158,
0.06554465740919113,
0.018154527992010117,
0.02209767885506153,
0.042583588510751724,
-0.003475356847047806,
0.029815075919032097,
-0.014157794415950775,
0.022040022537112236,
0.006819335278123617,
0.03661840409040451,
-0.023599429056048393,
-0.031983815133571625,
-0.03187645599246025,
0.020176906138658524,
0.007312157656997442,
0.030566783621907234,
0.033053919672966,
-0.012638131156563759,
-0.07698775827884674,
0.012069658376276493,
0.037056975066661835,
-0.030723001807928085,
0.01907854899764061,
0.015604715794324875,
0.04332268610596657,
-0.0557708777487278,
-0.027331827208399773,
-0.021639004349708557,
-0.014068769291043282,
0.029682831838726997,
0.011963807046413422,
-0.028575297445058823,
-0.06463808566331863,
0.014103810302913189,
-0.022981006652116776,
-0.027572114020586014,
-0.08360091596841812,
0.036355700343847275,
0.009246277622878551,
-0.004917111247777939,
0.05364377796649933,
0.03590025380253792,
0.02763725444674492,
0.03471057116985321,
-0.020517274737358093,
0.037826940417289734,
-0.01779317855834961,
0.02432255446910858,
-0.016081560403108597,
-0.029453158378601074,
-0.01143236830830574,
-0.06863954663276672,
-0.028441311791539192,
-0.035149700939655304,
-0.03938699886202812,
-0.04594205319881439,
-0.03500436246395111,
0.007736180908977985,
-0.006457645911723375,
-0.00754468934610486,
-0.016324762254953384,
0.004246999509632587,
-0.02059881016612053,
-0.028530938550829887,
-0.0336938239634037,
-0.048131294548511505,
-0.09466969966888428,
-0.02525118924677372,
0.00978253223001957,
0.04354475066065788,
0.03676307946443558,
0.006270646583288908,
0.011426975019276142,
0.013245251029729843,
0.013658417388796806,
-0.022239338606595993,
0.00903690978884697,
0.003799468744546175,
-0.04468178376555443,
-0.022647224366664886,
-0.009116805158555508,
0.01227767113596201,
0.013213086873292923,
-0.031965527683496475,
0.0037233377806842327,
0.04820698872208595,
-0.029228318482637405,
-0.0005507958703674376,
0.0393802784383297,
0.001730201649479568,
-0.08458931744098663,
-0.04864144325256348,
0.0060457042418420315,
-0.044867467135190964,
0.04274289682507515,
-0.0011790163116529584,
-0.02813413366675377,
-0.005587487481534481,
0.005027656443417072,
0.03773990273475647,
-0.010840246453881264,
-0.027051892131567,
0.005894048139452934,
-0.031016968190670013,
0.04580007493495941,
-0.06218009814620018,
0.055135130882263184,
-0.039512600749731064,
0.0025355685502290726,
-0.007844849489629269,
-0.0044978610239923,
-0.02860250696539879,
0.06476522237062454,
-0.006919204257428646,
-0.0096060112118721,
-0.00750324409455061,
0.0279090516269207,
-0.024797936901450157,
0.04257502034306526,
0.009522374719381332,
0.01327086053788662,
-0.02975098229944706,
0.0104955043643713,
-0.035009656101465225,
0.008690782822668552,
-0.031110309064388275,
-0.02071823738515377,
-0.025074172765016556,
-0.03312806040048599,
-0.01018605101853609,
-0.05173984915018082,
0.05667947232723236,
0.035567786544561386,
0.0326920822262764,
0.01723587140440941,
-0.02640693262219429,
-0.02193068154156208,
0.027756663039326668,
-0.08845467865467072,
-0.04519638419151306,
-0.03547811880707741,
0.022621192038059235,
-0.02675514854490757,
0.066263847053051,
0.04411732777953148,
-0.05881606414914131,
-0.013040074147284031,
0.011819005943834782,
0.006988918874412775,
0.004156604874879122,
0.027146080508828163,
0.022414643317461014,
0.05115317925810814,
0.03744872659444809,
-0.03562868386507034,
-0.009324893355369568,
-0.011098154820501804,
-0.02717132307589054,
-0.01744948886334896,
-0.02319958433508873,
0.029067082330584526,
-0.010141916573047638,
-0.038477975875139236,
-0.022876376286149025,
0.05684683844447136,
0.05217629298567772,
0.015868723392486572,
-0.004944707732647657,
-0.036095380783081055,
0.03114762343466282,
0.021507084369659424,
-0.0503741130232811,
-0.026728902012109756,
0.015265063382685184,
-0.04532960429787636,
0.0814252570271492,
-0.007673516403883696,
0.014781839214265347,
0.03986077010631561,
0.020139966160058975,
-0.002079735044389963,
0.033128153532743454,
-0.04085617884993553,
-0.0003939106536563486,
0.03661568835377693,
-0.05661487579345703,
0.0001863854267867282,
-0.01573554426431656,
0.05564966797828674,
-0.05784012749791145,
0.03949463367462158,
0.026975460350513458,
0.020075595006346703,
-0.008624833077192307,
-0.013236894272267818,
-0.06038954108953476,
0.04551783204078674,
-0.050950728356838226,
0.06898437440395355,
-0.016132228076457977,
-0.08540259301662445,
0.08089135587215424,
0.02274826169013977,
-0.0952754020690918,
0.0004377830191515386,
0.024537956342101097,
0.017183814197778702,
0.029961884021759033,
0.042609792202711105,
-0.09279462695121765,
-0.001968294382095337,
-0.04289339482784271,
0.015516728162765503,
-0.05410377308726311,
-0.005944800563156605,
0.03670627623796463,
-0.05669108033180237,
0.00013508160191122442,
0.031826987862586975,
-0.020354170352220535,
0.0021569840610027313,
0.021943707019090652,
-0.05430680885910988,
-0.04430833458900452,
-0.01600734330713749,
0.013112572021782398,
-0.034825485199689865,
0.033193137496709824,
-0.014861004427075386,
0.026723027229309082,
0.014436245895922184,
0.00037030995008535683,
-0.03494974970817566,
0.008444630540907383,
0.03285984694957733,
-0.03428532928228378,
-0.023052789270877838,
0.02081071212887764,
0.018765950575470924,
-0.011401043273508549,
0.026157062500715256,
-0.01628880575299263,
0.019900064915418625,
0.03246624022722244,
-0.014868752099573612,
0.02393238991498947,
-0.04533912241458893,
-0.011366089805960655,
0.024684298783540726,
0.012995400466024876,
0.03319644182920456,
-0.01155864167958498,
0.045027341693639755,
0.03751599043607712,
0.032067570835351944,
-0.021236209198832512,
-0.016513913869857788,
-0.019407693296670914,
0.009734215214848518,
-0.044121503829956055,
0.024118611589074135,
0.02130497433245182,
-0.04207153618335724,
-0.04318933188915253,
-0.04521691054105759,
-0.01639210619032383,
0.04480341821908951,
-0.035458553582429886,
0.012431626208126545,
0.051605451852083206,
-0.015396610833704472,
-0.049688324332237244,
-0.06189979612827301,
-0.0022470131516456604,
-0.02099267579615116,
0.02123701199889183,
0.01923123374581337,
-0.020508890971541405,
-0.020692728459835052,
-0.052408818155527115,
-0.07719538360834122,
0.034300416707992554,
0.013128376565873623,
-0.025724438950419426,
0.05062047392129898,
0.03608936816453934,
-0.017090849578380585,
0.002792590530589223,
0.02785245142877102,
-0.05436159670352936,
0.025925666093826294,
0.0006618091138079762,
0.008408263325691223,
0.036188721656799316,
0.03380567207932472,
-0.00919555313885212,
-0.044189926236867905,
-0.04992109537124634,
-0.0339384451508522,
-0.03290423005819321,
-0.014184586703777313,
0.07861584424972534
] |
CalvinHuang/mt5-small-finetuned-amazon-en-es | [
"pytorch",
"tensorboard",
"mt5",
"text2text-generation",
"transformers",
"summarization",
"generated_from_trainer",
"license:apache-2.0",
"autotrain_compatible"
] | summarization | {
"architectures": [
"MT5ForConditionalGeneration"
],
"model_type": "mt5",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 16 | null | ---
tags:
- summarization
widget:
- text: "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
---
# CodeTrans model for source code summarization csharp
Pretrained model on programming language csharp using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized csharp code functions: it works best with tokenized csharp functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the source code summarization task for the csharp code snippets.
## Intended uses & limitations
The model could be used to generate the description for the csharp function or be fine-tuned on other csharp code tasks. It can be used on unparsed and untokenized csharp code. However, if the csharp code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate csharp function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_csharp_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_csharp_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/source%20code%20summarization/csharp/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 200 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing csharp code.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.001589893363416195,
-0.023488257080316544,
-0.011340481229126453,
0.022858737036585808,
0.03163714334368706,
0.03044744022190571,
-0.025001084432005882,
0.005516689736396074,
-0.024173269048333168,
0.06364409625530243,
0.05232793092727661,
0.013437450863420963,
-0.0036798419896513224,
0.0460018627345562,
-0.03267918527126312,
-0.07041523605585098,
-0.03158009424805641,
-0.03819815069437027,
-0.0351811908185482,
-0.013038409873843193,
0.02623250149190426,
-0.003380760084837675,
0.003044519107788801,
0.00009243945532944053,
-0.001770701608620584,
0.021575454622507095,
0.008061975240707397,
0.02480958215892315,
0.03677813336253166,
-0.0748027116060257,
-0.03636965900659561,
0.0010836172150447965,
-0.0553136020898819,
-0.014603802934288979,
-0.0094250263646245,
0.022414101287722588,
-0.0017527614254504442,
0.04347606003284454,
0.019764702767133713,
0.057695720344781876,
0.001720390166155994,
0.01786130666732788,
0.01432921551167965,
-0.03069399856030941,
0.05739226192235947,
0.009570518508553505,
-0.024323372170329094,
-0.03506002947688103,
0.025076035410165787,
0.001294732908718288,
-0.06587132811546326,
-0.053019434213638306,
-0.030512003228068352,
0.052213553339242935,
-0.011925479397177696,
0.00003518072480801493,
-0.0655960738658905,
-0.01621740125119686,
0.05879876762628555,
-0.05250800773501396,
-0.025630459189414978,
0.014953258447349072,
-0.0515960156917572,
0.01940103992819786,
0.02489851787686348,
0.001007741317152977,
0.00587833346799016,
-0.0405631884932518,
0.031187474727630615,
0.003789993468672037,
0.055552754551172256,
-0.02109915018081665,
0.030791347846388817,
-0.10753767192363739,
0.015253942459821701,
0.0056359898298978806,
0.02742955833673477,
0.012955442070960999,
-0.00589895062148571,
0.05570027604699135,
0.001443342654965818,
-0.009567713364958763,
0.05172087997198105,
0.007704698946326971,
-0.006553791929036379,
0.043148137629032135,
-0.036109164357185364,
-0.02197987027466297,
-0.021622488275170326,
0.05646468698978424,
-0.06151491031050682,
-0.06230846792459488,
-0.01850702054798603,
-0.029801728203892708,
-0.03556535020470619,
0.009861276485025883,
0.05679335817694664,
-0.016402998939156532,
0.024906162172555923,
0.0225507952272892,
0.035525597631931305,
0.05299932137131691,
-0.014955803751945496,
0.02504504844546318,
0.030750760808587074,
0.014895719476044178,
-0.00704052671790123,
-0.03856608271598816,
-0.009893014095723629,
0.04934437572956085,
0.01790321059525013,
-0.03916924074292183,
-0.04428291693329811,
0.029272083193063736,
0.0221503097563982,
-0.03899529576301575,
0.04508629068732262,
-0.031458530575037,
-0.0478217788040638,
-0.033970966935157776,
0.035884588956832886,
-0.013225681148469448,
-0.027090327814221382,
0.010653830133378506,
-0.044468559324741364,
0.006337188184261322,
-0.05924707651138306,
-0.025253847241401672,
0.015915440395474434,
0.045682381838560104,
0.0021802689880132675,
0.08130903542041779,
0.026204746216535568,
-0.03848353773355484,
0.027363719418644905,
0.0264323428273201,
-0.05993160605430603,
0.055672548711299896,
0.047664541751146317,
0.1072128415107727,
-0.06513269245624542,
-0.04815034568309784,
0.027690043672919273,
-0.002561110770329833,
-0.03301512449979782,
0.022540271282196045,
-0.016506239771842957,
-0.07258527725934982,
-0.03325241059064865,
-0.003195102559402585,
0.05520395562052727,
-0.05252953991293907,
-0.00969731342047453,
0.022249387577176094,
-0.0030936487019062042,
0.017615634948015213,
-0.04403907060623169,
-0.004579213447868824,
-0.004146698862314224,
-0.02498539164662361,
-0.06443710625171661,
0.03753966838121414,
0.002339731901884079,
-0.02655845321714878,
-0.033616065979003906,
-0.03447994589805603,
0.0053629446774721146,
0.09958411008119583,
0.009868446737527847,
-0.01265358179807663,
-0.07035734504461288,
0.009405934251844883,
0.01736881025135517,
0.050381988286972046,
-0.023042956367135048,
0.02988498844206333,
0.042128462344408035,
0.07821439951658249,
-0.021275656297802925,
0.07890401780605316,
-0.01724771223962307,
-0.040837280452251434,
-0.036668598651885986,
0.023309363052248955,
0.005376928485929966,
-0.027352461591362953,
0.001611790619790554,
0.02976204641163349,
-0.017814699560403824,
-0.009547047317028046,
-0.02649848535656929,
0.05331961065530777,
0.006617726292461157,
-0.001334380591288209,
-0.02354915626347065,
0.014795259572565556,
-0.01671578921377659,
0.058645542711019516,
-0.032446008175611496,
-0.01598474197089672,
-0.0024550482630729675,
-0.02962327003479004,
-0.015051347203552723,
0.01863960362970829,
0.03976758196949959,
0.024449719116091728,
-0.006587129086256027,
0.1144450306892395,
-0.04545622691512108,
-0.010587895289063454,
-0.047980114817619324,
-0.03857641667127609,
0.023255258798599243,
0.038152649998664856,
0.03551805391907692,
0.030321765691041946,
0.004253965802490711,
-0.02930798940360546,
0.02588585577905178,
0.08421599864959717,
0.019128061830997467,
0.0319066047668457,
-0.007868790067732334,
-0.030281275510787964,
0.05583875998854637,
0.06260661035776138,
-0.03136862441897392,
-0.04925267770886421,
0.044458385556936264,
0.021869676187634468,
0.005899293348193169,
0.028840627521276474,
-0.0065548112615942955,
0.019500844180583954,
-0.04394101724028587,
-0.0614800862967968,
0.054921988397836685,
0.017759989947080612,
-0.005322952289134264,
0.03832247853279114,
0.001458539511077106,
0.0031278710812330246,
0.027551749721169472,
-0.007826000452041626,
0.0017584487795829773,
-0.060989804565906525,
-0.001969517907127738,
0.0007415480213239789,
0.05899714305996895,
-0.03940263390541077,
0.030134527012705803,
0.028967751190066338,
-0.0018026218749582767,
0.060568276792764664,
-0.030130749568343163,
0.030742598697543144,
0.04710112512111664,
0.025555044412612915,
-0.018122371286153793,
0.02003936842083931,
0.020421266555786133,
0.03982885181903839,
0.0758797749876976,
0.010237601585686207,
0.06363710016012192,
0.008364845998585224,
0.05531927943229675,
0.07129253447055817,
0.020629720762372017,
0.008770478889346123,
0.02230299450457096,
0.04753832146525383,
-0.0047796680592000484,
-0.014429733157157898,
0.07156633585691452,
-0.06388316303491592,
0.022665059193968773,
-0.026233132928609848,
0.022249171510338783,
-0.01098904013633728,
-0.02426525391638279,
0.03928980603814125,
-0.00776837021112442,
-0.04604633152484894,
0.006918236147612333,
-0.03206261992454529,
-0.0215087179094553,
0.015456701628863811,
0.00019316731777507812,
-0.021005814895033836,
0.010649999603629112,
-0.02402566373348236,
0.017595134675502777,
-0.07529520243406296,
-0.04403996467590332,
-0.011540370061993599,
-0.044947557151317596,
0.012171137146651745,
-0.07226162403821945,
-0.05597485601902008,
-0.06829981505870819,
-0.020795071497559547,
0.028447067365050316,
0.00021505147742573172,
-0.01577283814549446,
-0.018530288711190224,
0.012124509550631046,
-0.0333985760807991,
-0.029032273218035698,
-0.05662238225340843,
-0.05741080641746521,
-0.003930709790438414,
-0.0678042471408844,
0.038136132061481476,
-0.017903881147503853,
0.02021849900484085,
0.0038125396240502596,
-0.01206490769982338,
-0.026597924530506134,
-0.020987484604120255,
0.07300172746181488,
0.011479700915515423,
-0.02028767019510269,
-0.033909570425748825,
0.020114019513130188,
-0.02654225565493107,
0.04058191552758217,
-0.02334783785045147,
-0.05056973546743393,
0.09554847329854965,
0.05925633758306503,
0.05608029291033745,
-0.008750936947762966,
-0.03375500068068504,
-0.04207684472203255,
-0.060281068086624146,
-0.029988445341587067,
-0.037617940455675125,
-0.03297580033540726,
-0.003673586994409561,
-0.053303029388189316,
-0.026801131665706635,
-0.017586933448910713,
-0.03761087730526924,
-0.02828047052025795,
0.021114224568009377,
0.014697114005684853,
0.03846048191189766,
0.05873982235789299,
0.005569680593907833,
-0.03952048718929291,
-0.03827269747853279,
0.04307813197374344,
0.0010240786941722035,
0.009661038406193256,
-0.0728936716914177,
-0.036366067826747894,
0.04197033867239952,
0.011583587154746056,
0.012210031971335411,
-0.028998805209994316,
0.043294645845890045,
0.015861885622143745,
0.00987007562071085,
0.014877141453325748,
0.005794918164610863,
-0.019700130447745323,
-0.02407071180641651,
0.005990746431052685,
-0.039851680397987366,
-0.03826058283448219,
-0.021010002121329308,
-0.005851184017956257,
0.041705332696437836,
-0.059429559856653214,
-0.054771531373262405,
-0.0008545479504391551,
0.023409491404891014,
0.0465836264193058,
0.026215247809886932,
-0.02042900212109089,
-0.012080788612365723,
-0.05976226180791855,
-0.028451144695281982,
0.04739180579781532,
0.026407763361930847,
-0.010485203936696053,
0.03755563870072365,
0.038147348910570145,
-0.05087246000766754,
0.020559651777148247,
0.02865510620176792,
0.03951359540224075,
0.029460996389389038,
-0.03248325735330582,
0.01617521420121193,
-0.05577966570854187,
0.012559373863041401,
0.009603791870176792,
-0.027363382279872894,
-0.04704467952251434,
-0.07361560314893723,
-0.03294949233531952,
0.02167314663529396,
-0.012960486114025116,
-0.008849234320223331,
0.041761238127946854,
-0.03164859116077423,
-0.03746795654296875,
-0.011468318291008472,
-0.004979937337338924,
0.06446119397878647,
-0.03806104511022568,
0.0179232656955719,
0.006386277731508017,
0.050712257623672485,
-0.04459323734045029,
-0.0009242913220077753,
-0.032892435789108276,
-0.02047061175107956,
0.0027379763778299093,
0.04317253455519676,
0.020171968266367912,
0.06812415271997452,
0.07263987511396408,
0.000037288271414581686,
-0.02484632283449173,
0.046535518020391464,
0.04554654657840729,
0.00469221081584692,
-0.02195129729807377,
0.016883281990885735,
0.021097855642437935,
-0.02674337849020958,
0.014805413782596588,
-0.005449733696877956,
0.0265714842826128,
0.027315009385347366,
-0.014894473366439342,
-0.0004464687663130462,
0.0053314282558858395,
-0.018174167722463608,
-0.03810181841254234,
-0.05698272958397865,
-0.02192528359591961,
-0.02893468365073204,
-0.05611772462725639,
0.026482360437512398,
0.03330828249454498,
0.0284672062844038,
0.04602647200226784,
0.0335107184946537,
-0.04818379506468773,
-0.029055526480078697,
0.05577239766716957,
0.05277375131845474,
-0.05023978650569916,
-0.024915196001529694,
-0.061176691204309464,
0.03615601360797882,
0.04893844947218895,
-0.017252551391720772,
-0.08788331598043442,
-0.002358444035053253,
0.023865310475230217,
-0.01845981366932392,
0.0661623403429985,
0.01999334618449211,
0.02441369742155075,
0.04256725683808327,
-0.0026781121268868446,
0.028505094349384308,
-0.014659923501312733,
0.02229652740061283,
0.00678668450564146,
0.03188812732696533,
-0.023299239575862885,
-0.033637817949056625,
-0.028666503727436066,
0.023883972316980362,
0.0019816469866782427,
0.025870492681860924,
0.030320605263113976,
-0.014324432238936424,
-0.07794707268476486,
0.010263744741678238,
0.03827875852584839,
-0.028354180976748466,
0.02288157306611538,
0.016036365181207657,
0.04349098727107048,
-0.057810407131910324,
-0.025879165157675743,
-0.022938068956136703,
-0.01253439486026764,
0.03448574244976044,
0.013723084703087807,
-0.03128794580698013,
-0.06443291902542114,
0.013951846398413181,
-0.0202918890863657,
-0.026673657819628716,
-0.08188067376613617,
0.03683993220329285,
0.00555213401094079,
-0.01001580897718668,
0.0547807514667511,
0.03644398972392082,
0.02863038145005703,
0.031055234372615814,
-0.021141862496733665,
0.039203230291604996,
-0.012583944946527481,
0.024357227608561516,
-0.015052723698318005,
-0.0346192941069603,
-0.012641745619475842,
-0.06898652017116547,
-0.03069537878036499,
-0.030358942225575447,
-0.03996937349438667,
-0.0480445995926857,
-0.031899917870759964,
0.00883735902607441,
-0.0070578292943537235,
-0.008819356560707092,
-0.013564471155405045,
-0.001109410892240703,
-0.021562080830335617,
-0.03306856378912926,
-0.03131395950913429,
-0.05000075697898865,
-0.09286190569400787,
-0.02449874021112919,
0.012363511137664318,
0.04315335676074028,
0.0410749576985836,
0.0012258796487003565,
0.006784955505281687,
0.012227857485413551,
0.014539334923028946,
-0.02333017624914646,
0.007426586002111435,
0.0027169676031917334,
-0.04843739792704582,
-0.027268461883068085,
-0.011086052283644676,
0.011212851852178574,
0.007956511341035366,
-0.03634634613990784,
0.00444688880816102,
0.049701157957315445,
-0.0312514454126358,
-0.0017161954892799258,
0.042136285454034805,
-0.0003677989880088717,
-0.08375604450702667,
-0.045557521283626556,
0.006060453597456217,
-0.04657533019781113,
0.04314311966300011,
-0.0030957628041505814,
-0.02823408879339695,
-0.0066167875193059444,
0.011357489973306656,
0.03043016605079174,
-0.015134451910853386,
-0.02543010003864765,
0.00043214394827373326,
-0.027988724410533905,
0.04886416718363762,
-0.06243181973695755,
0.0550665520131588,
-0.04041370376944542,
0.001104723778553307,
-0.0077184513211250305,
0.0021241079084575176,
-0.02830425463616848,
0.06746888160705566,
-0.008926894515752792,
-0.014356215484440327,
-0.0031487704254686832,
0.03341583535075188,
-0.02180441841483116,
0.043482668697834015,
0.00670531764626503,
0.013641906902194023,
-0.03518806770443916,
0.018058503046631813,
-0.03965161368250847,
0.006165660917758942,
-0.03452369198203087,
-0.025978900492191315,
-0.02795450948178768,
-0.03599454462528229,
-0.00857455562800169,
-0.04812353104352951,
0.05742913857102394,
0.033439818769693375,
0.032124388962984085,
0.018483808264136314,
-0.02703414484858513,
-0.01866389438509941,
0.023011645302176476,
-0.08912931382656097,
-0.045182257890701294,
-0.030817441642284393,
0.02195708453655243,
-0.021011337637901306,
0.062240831553936005,
0.04021569713950157,
-0.06156618893146515,
-0.012549983337521553,
0.010706618428230286,
0.008464516140520573,
-0.003155673621222377,
0.026551567018032074,
0.016939209774136543,
0.055739764124155045,
0.03203170746564865,
-0.030733300372958183,
-0.012054397724568844,
-0.00977405346930027,
-0.02894187532365322,
-0.022904496639966965,
-0.02372826263308525,
0.03389348089694977,
-0.0036783278919756413,
-0.03624032437801361,
-0.02565566450357437,
0.05890745669603348,
0.05286979302763939,
0.013169831596314907,
-0.008235729299485683,
-0.03613923862576485,
0.033607177436351776,
0.021485453471541405,
-0.049531009048223495,
-0.025991147384047508,
0.012424892745912075,
-0.04775618761777878,
0.07648259401321411,
-0.0032201639842242002,
0.014513959176838398,
0.04224786162376404,
0.018195712938904762,
-0.004346893168985844,
0.03136112540960312,
-0.04175932705402374,
-0.003960866946727037,
0.03228447213768959,
-0.055355481803417206,
0.0006816238746978343,
-0.01676231436431408,
0.05470390245318413,
-0.057571571320295334,
0.04286010190844536,
0.029383383691310883,
0.014779937453567982,
-0.008580606430768967,
-0.013096846640110016,
-0.05800730362534523,
0.04945385456085205,
-0.05524463579058647,
0.06613216549158096,
-0.01213102973997593,
-0.08845265954732895,
0.08040226995944977,
0.021033573895692825,
-0.0905575230717659,
-0.001329620135948062,
0.023721983656287193,
0.013820209540426731,
0.027463749051094055,
0.04106978327035904,
-0.09321212768554688,
0.00019308432820253074,
-0.03915580362081528,
0.018254341557621956,
-0.0558803454041481,
-0.009339754469692707,
0.03402659296989441,
-0.05565417557954788,
-0.0010743617312982678,
0.03363059461116791,
-0.020843610167503357,
0.0024432046338915825,
0.02314802072942257,
-0.05168228968977928,
-0.03884264826774597,
-0.01418148260563612,
0.011751998215913773,
-0.03251092880964279,
0.026773786172270775,
-0.011110219173133373,
0.025271974503993988,
0.0134409349411726,
0.0009147162782028317,
-0.032176099717617035,
0.01302426028996706,
0.029133394360542297,
-0.03598373755812645,
-0.021873103454709053,
0.0237064678221941,
0.01418357715010643,
-0.009394248947501183,
0.02401365339756012,
-0.014390465803444386,
0.018856428563594818,
0.031644728034734726,
-0.018605954945087433,
0.020773209631443024,
-0.040316980332136154,
-0.012650717981159687,
0.024694697931408882,
0.010189062915742397,
0.03178822249174118,
-0.010090643540024757,
0.04674363136291504,
0.03575129806995392,
0.033351220190525055,
-0.022536659613251686,
-0.019248876720666885,
-0.017161069437861443,
0.005454449448734522,
-0.04407822713255882,
0.024990735575556755,
0.019765226170420647,
-0.04221725091338158,
-0.04189196601510048,
-0.044426631182432175,
-0.016172297298908234,
0.045167483389377594,
-0.035185933113098145,
0.0158095620572567,
0.050989024341106415,
-0.013750966638326645,
-0.043647658079862595,
-0.06005585193634033,
-0.006953367963433266,
-0.023385753855109215,
0.017269892618060112,
0.017545752227306366,
-0.01986529678106308,
-0.02334744483232498,
-0.05032718554139137,
-0.07506594806909561,
0.038851894438266754,
0.020009754225611687,
-0.02560519054532051,
0.04716873541474342,
0.03411773592233658,
-0.017612524330615997,
0.004127944819629192,
0.02551066316664219,
-0.051599785685539246,
0.022110965102910995,
-0.0049301981925964355,
0.00832109060138464,
0.03624214231967926,
0.03311927244067192,
-0.007525256369262934,
-0.04696379229426384,
-0.04582274705171585,
-0.030638495460152626,
-0.03215670958161354,
-0.013451849110424519,
0.0761256143450737
] |
Cameron/BERT-SBIC-offensive | [
"pytorch",
"jax",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 31 | null | ---
tags:
- summarization
widget:
- text: '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
---
# CodeTrans model for source code summarization python
Pretrained model on programming language python using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the source code summarization task for the python code snippets.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_python_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_python_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/source%20code%20summarization/python/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 100 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing python code.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.002507586497813463,
-0.029674630612134933,
-0.010805495083332062,
0.02887207642197609,
0.03143385052680969,
0.031640589237213135,
-0.028449228033423424,
-0.0033632314298301935,
-0.02332352288067341,
0.062386151403188705,
0.04799501225352287,
0.010751230642199516,
-0.008200136944651604,
0.049446940422058105,
-0.03488083556294441,
-0.06476382166147232,
-0.02289057895541191,
-0.03689951449632645,
-0.025535795837640762,
-0.015803737565875053,
0.021205700933933258,
-0.002887231996282935,
0.015794530510902405,
0.0058319587260484695,
-0.0026480136439204216,
0.012773439288139343,
0.0019107525004073977,
0.020584072917699814,
0.03472408652305603,
-0.08135104924440384,
-0.0259251669049263,
0.0017810099525377154,
-0.046426065266132355,
-0.009522338397800922,
-0.013492502272129059,
0.023474616929888725,
0.005816764663904905,
0.029004689306020737,
0.01786610297858715,
0.05839744955301285,
0.0005327177932485938,
0.019550412893295288,
0.01089995913207531,
-0.036703236401081085,
0.05696672946214676,
0.003138429718092084,
-0.02973315306007862,
-0.03034205362200737,
0.014060086570680141,
0.0026329797692596912,
-0.0545245036482811,
-0.06953763961791992,
-0.030421845614910126,
0.05298799276351929,
-0.005208814982324839,
-0.01149834506213665,
-0.06706525385379791,
-0.016247188672423363,
0.0423489511013031,
-0.05956364423036575,
-0.033445604145526886,
0.009858474135398865,
-0.05490981042385101,
0.016076724976301193,
0.008575115352869034,
0.006772845052182674,
0.007373574189841747,
-0.03812546655535698,
0.02832733280956745,
0.005483477376401424,
0.06416333466768265,
-0.018607934936881065,
0.02983732707798481,
-0.10872863233089447,
0.020483674481511116,
-0.006553707178682089,
0.01582689769566059,
0.011313652619719505,
-0.011373337358236313,
0.05115213617682457,
-0.001090854755602777,
-0.009900002740323544,
0.04111196845769882,
0.01815691776573658,
-0.013223957270383835,
0.03865814208984375,
-0.036204926669597626,
-0.012504993006587029,
-0.023564113304018974,
0.06464511901140213,
-0.066134974360466,
-0.06866719573736191,
-0.00882451981306076,
-0.02418344095349312,
-0.03656604140996933,
0.021822741255164146,
0.04428189620375633,
-0.013003024272620678,
0.02237318828701973,
0.006637545768171549,
0.0381598137319088,
0.048321835696697235,
-0.007364332675933838,
0.049747075885534286,
0.03001474030315876,
0.01906673051416874,
-0.01750907674431801,
-0.04109491780400276,
-0.020544176921248436,
0.04091932997107506,
0.01866145059466362,
-0.03620125725865364,
-0.04711918532848358,
0.030117526650428772,
0.018817337229847908,
-0.04224644601345062,
0.03741004317998886,
-0.024356335401535034,
-0.04499000683426857,
-0.03399258106946945,
0.03305453807115555,
-0.009391283616423607,
-0.014612307772040367,
0.015825903043150902,
-0.04338790476322174,
-0.0019198826048523188,
-0.05734053626656532,
-0.029771799221634865,
0.01413765549659729,
0.03853023424744606,
-0.011502339504659176,
0.08933097869157791,
0.015400438569486141,
-0.034228093922138214,
0.01052420400083065,
0.01894897036254406,
-0.07478407025337219,
0.06712368875741959,
0.0393947996199131,
0.11186068505048752,
-0.0647256001830101,
-0.04422930255532265,
0.02505514770746231,
-0.004339949227869511,
-0.01988835819065571,
0.02671893872320652,
-0.006206330377608538,
-0.08097145706415176,
-0.023571688681840897,
-0.007866769097745419,
0.06908120214939117,
-0.0411761999130249,
-0.025260629132390022,
0.024476882070302963,
0.007555935066193342,
0.006671577226370573,
-0.03900166228413582,
0.00017188253696076572,
-0.0004282311419956386,
-0.025803500786423683,
-0.06509456038475037,
0.032387565821409225,
0.0010836587753146887,
-0.03249385207891464,
-0.028590118512511253,
-0.04166191816329956,
0.013408876955509186,
0.1115560457110405,
0.003138582920655608,
-0.013257521204650402,
-0.04791945964097977,
0.014746011234819889,
0.027354363352060318,
0.04441181570291519,
-0.021462809294462204,
0.020856060087680817,
0.04112736135721207,
0.07113634794950485,
-0.02605248987674713,
0.07175683975219727,
-0.01577739603817463,
-0.03871491923928261,
-0.028396354988217354,
0.017992690205574036,
-0.014201062731444836,
-0.03936896473169327,
0.005558573640882969,
0.02528265304863453,
-0.016439108178019524,
-0.006953793577849865,
-0.015301695093512535,
0.0594729483127594,
0.026284437626600266,
-0.01108551025390625,
-0.033647701144218445,
0.016184356063604355,
-0.016631899401545525,
0.0611325167119503,
-0.042056191712617874,
-0.010232318192720413,
-0.012282953597605228,
-0.03637600690126419,
-0.008150841109454632,
0.0264449380338192,
0.047498058527708054,
0.022252274677157402,
-0.013643790036439896,
0.10432374477386475,
-0.042643096297979355,
0.002639008453115821,
-0.0475500263273716,
-0.034113314002752304,
0.02340206317603588,
0.03556141257286072,
0.03147955983877182,
0.02988889254629612,
0.014134813100099564,
-0.020734399557113647,
0.019790060818195343,
0.07072097063064575,
0.028080912306904793,
0.04433661326766014,
-0.010626398958265781,
-0.026269175112247467,
0.034427743405103683,
0.06724438071250916,
-0.03960515186190605,
-0.04068112373352051,
0.04762568324804306,
0.03137918934226036,
-0.009051917120814323,
0.027800338342785835,
-0.00953415222465992,
0.011856070719659328,
-0.04180096089839935,
-0.06478206068277359,
0.042351700365543365,
0.012554376386106014,
0.002253701677545905,
0.03224514052271843,
-0.0022952822037041187,
-0.0007391878752969205,
0.035925500094890594,
-0.000175272929482162,
0.0011138832196593285,
-0.06124124675989151,
0.008697262033820152,
-0.0011162905720993876,
0.06237760931253433,
-0.03833138197660446,
0.03759464621543884,
0.015674389898777008,
-0.0009707166464067996,
0.0631428137421608,
-0.027569591999053955,
0.028665149584412575,
0.03906571492552757,
0.024622049182653427,
-0.014043009839951992,
0.013627907261252403,
0.025568533688783646,
0.026574116200208664,
0.08400493860244751,
0.011731564067304134,
0.06377091258764267,
-0.005290310364216566,
0.05842773988842964,
0.06945397704839706,
0.016495253890752792,
0.013142114505171776,
0.027551133185625076,
0.06512268632650375,
-0.004049171693623066,
-0.013848100788891315,
0.06190178543329239,
-0.05277745798230171,
0.028973238542675972,
-0.034555450081825256,
0.026088327169418335,
-0.010586777701973915,
-0.017436694353818893,
0.040936145931482315,
0.003383479081094265,
-0.042970817536115646,
0.003279697382822633,
-0.026562634855508804,
-0.02613733522593975,
0.012293011881411076,
0.0005612512468360364,
-0.030710605904459953,
0.023886751383543015,
-0.01942978799343109,
0.021488966420292854,
-0.08477979898452759,
-0.04453851655125618,
-0.006844120565801859,
-0.04133163020014763,
0.019076144322752953,
-0.07584124803543091,
-0.06003861501812935,
-0.06409960240125656,
-0.02032949961721897,
0.036255527287721634,
0.007696620188653469,
-0.009576613083481789,
-0.027742095291614532,
0.009205021895468235,
-0.04212553799152374,
-0.023094667121767998,
-0.05715643987059593,
-0.06046099588274956,
-0.004910867661237717,
-0.0665554404258728,
0.037239182740449905,
-0.024801019579172134,
0.022868435829877853,
0.009419400244951248,
-0.016599034890532494,
-0.02982538565993309,
-0.018007781356573105,
0.07656192034482956,
0.0075979335233569145,
-0.0069394768215715885,
-0.031520821154117584,
0.013204870745539665,
-0.0264589861035347,
0.034888483583927155,
-0.006938760634511709,
-0.04304252937436104,
0.10159167647361755,
0.062057189643383026,
0.044008683413267136,
-0.014552539214491844,
-0.042774029076099396,
-0.047005653381347656,
-0.053117383271455765,
-0.021871287375688553,
-0.02976393513381481,
-0.03023158758878708,
0.0006725385901518166,
-0.053971435874700546,
-0.02324621193110943,
-0.025750450789928436,
-0.04248334467411041,
-0.02107846364378929,
0.02703814022243023,
0.028368370607495308,
0.03669792786240578,
0.05110400915145874,
0.014488717541098595,
-0.042347460985183716,
-0.028224674984812737,
0.04195570573210716,
0.0011950202751904726,
0.004211047664284706,
-0.0777253732085228,
-0.04076283425092697,
0.040940143167972565,
0.013019216246902943,
-0.0029822085052728653,
-0.022548146545886993,
0.04685626178979874,
0.01930280216038227,
0.011434812098741531,
0.0009371807682327926,
-0.006569594144821167,
-0.01361619308590889,
-0.022247856482863426,
0.0015139561146497726,
-0.0339977890253067,
-0.03700585290789604,
-0.01780335232615471,
-0.005337039940059185,
0.04289057105779648,
-0.061018574982881546,
-0.05997268855571747,
-0.0032422603107988834,
0.0370989628136158,
0.03766569495201111,
0.021589281037449837,
-0.01770620606839657,
-0.009771376848220825,
-0.06460317969322205,
-0.043802887201309204,
0.03482445701956749,
0.015965541824698448,
-0.01029184553772211,
0.04992659017443657,
0.04384748265147209,
-0.05821444094181061,
0.028156254440546036,
0.03288605064153671,
0.048083171248435974,
0.021757230162620544,
-0.03152284026145935,
0.0115546565502882,
-0.047162946313619614,
0.018773170188069344,
0.010064959526062012,
-0.029782550409436226,
-0.05129098892211914,
-0.0762660950422287,
-0.029531490057706833,
0.012408861890435219,
-0.012100888416171074,
-0.0019107336411252618,
0.04378022253513336,
-0.027303975075483322,
-0.050431136041879654,
-0.0033262649085372686,
0.003384110750630498,
0.07277076691389084,
-0.04193051531910896,
0.03197728842496872,
0.009494557976722717,
0.06026623398065567,
-0.03590020909905434,
0.0038626007735729218,
-0.032642073929309845,
-0.01722991280257702,
0.0016883178614079952,
0.04634394124150276,
0.028774145990610123,
0.058956511318683624,
0.07941152155399323,
0.012899336405098438,
-0.03266517445445061,
0.0452735461294651,
0.05391169339418411,
0.005902337376028299,
-0.01933366060256958,
0.005525981076061726,
0.01662985049188137,
-0.028432173654437065,
0.016068266704678535,
-0.003494413336738944,
0.019757773727178574,
0.026905937120318413,
-0.004102721344679594,
0.006268335971981287,
0.0013768451754003763,
-0.0243741013109684,
-0.04454510658979416,
-0.04893278330564499,
-0.004674353636801243,
-0.032734084874391556,
-0.05309511348605156,
0.026258382946252823,
0.04119877517223358,
0.02377251349389553,
0.046571239829063416,
0.04671797528862953,
-0.03521927818655968,
-0.03073248267173767,
0.044189371168613434,
0.05270327627658844,
-0.04350258782505989,
-0.04453583061695099,
-0.05402185767889023,
0.035781439393758774,
0.047104667872190475,
-0.021301543340086937,
-0.09704408794641495,
-0.0004947680281475186,
0.030958039686083794,
-0.01994968391954899,
0.05978531762957573,
0.02606821246445179,
0.022300254553556442,
0.05309349298477173,
-0.0025615703780204058,
0.025003774091601372,
-0.012071164324879646,
0.020818673074245453,
0.004464699886739254,
0.03931525722146034,
-0.021430015563964844,
-0.03308998420834541,
-0.04106709361076355,
0.021916214376688004,
0.009114601649343967,
0.03930392116308212,
0.032047782093286514,
-0.009519982151687145,
-0.074031300842762,
-0.00013488643162418157,
0.030103011056780815,
-0.026568233966827393,
0.01601303741335869,
0.027153894305229187,
0.035931579768657684,
-0.05354971066117287,
-0.029480695724487305,
-0.01954682730138302,
-0.013437021523714066,
0.030714841559529305,
0.0023877955973148346,
-0.013910116627812386,
-0.0672510489821434,
0.011732429265975952,
-0.018252141773700714,
-0.029553810134530067,
-0.08303262293338776,
0.040284350514411926,
0.010737854987382889,
-0.0032460547517985106,
0.05150853097438812,
0.032437633723020554,
0.021909868344664574,
0.03241521120071411,
-0.019047187641263008,
0.029532592743635178,
-0.02707603946328163,
0.023719152435660362,
-0.01565621607005596,
-0.02599465474486351,
-0.023298529908061028,
-0.06361889094114304,
-0.030697466805577278,
-0.039598241448402405,
-0.044373780488967896,
-0.04511255398392677,
-0.033212706446647644,
0.004284739959985018,
-0.009516207501292229,
-0.006481999531388283,
-0.012039322406053543,
0.0062213256023824215,
-0.02326112799346447,
-0.022707754746079445,
-0.03419720381498337,
-0.04587054252624512,
-0.09836321324110031,
-0.025083908811211586,
0.007061626296490431,
0.04229813069105148,
0.032450344413518906,
-0.00044398303725756705,
0.003993677906692028,
0.02342279814183712,
0.006295670755207539,
-0.007002254948019981,
0.021467898041009903,
0.005603157915174961,
-0.044494692236185074,
-0.030280862003564835,
0.001322700409218669,
0.014207483269274235,
0.00954157393425703,
-0.02475995197892189,
0.006620518397539854,
0.045639730989933014,
-0.03210446238517761,
0.000205300297238864,
0.04040544852614403,
0.0013657836243510246,
-0.08259577304124832,
-0.04110049828886986,
0.004535953979939222,
-0.04253619164228439,
0.035696208477020264,
0.002527897944673896,
-0.02904948964715004,
-0.010481088422238827,
0.01172833051532507,
0.03197428956627846,
-0.011587169952690601,
-0.03091701865196228,
-0.002213739324361086,
-0.03725346922874451,
0.03765774518251419,
-0.06477056443691254,
0.04525872692465782,
-0.03263091295957565,
-0.006321054417639971,
-0.008505597710609436,
-0.005288248881697655,
-0.03368842974305153,
0.06760179996490479,
-0.0100996820256114,
-0.008185680024325848,
-0.012526808306574821,
0.006925655994564295,
-0.02794758789241314,
0.0423179492354393,
-0.00843991432338953,
0.00597774563357234,
-0.030090095475316048,
0.01074313186109066,
-0.03950734809041023,
0.006826110649853945,
-0.028091266751289368,
-0.014739405363798141,
-0.021326132118701935,
-0.026478236541152,
-0.006257932633161545,
-0.0546928308904171,
0.0489443875849247,
0.023727331310510635,
0.03393613174557686,
0.01393107045441866,
-0.023232609033584595,
-0.01634209044277668,
0.024920355528593063,
-0.08907593786716461,
-0.05041339620947838,
-0.03146107867360115,
0.019493723288178444,
-0.025325868278741837,
0.06291286647319794,
0.0516638308763504,
-0.058536943048238754,
-0.010599981993436813,
0.010585096664726734,
0.013214020989835262,
0.007660426665097475,
0.027648640796542168,
0.026078980416059494,
0.03918471187353134,
0.04857199266552925,
-0.03852388262748718,
-0.006750231143087149,
-0.011101501993834972,
-0.017318326979875565,
-0.01317041926085949,
-0.016975315287709236,
0.02137567102909088,
-0.01607530564069748,
-0.03990931063890457,
-0.027523694559931755,
0.061375778168439865,
0.0645846277475357,
0.02236420288681984,
-0.0013570613227784634,
-0.035470254719257355,
0.02860637754201889,
0.014084335416555405,
-0.0541834831237793,
-0.030341409146785736,
0.014928952790796757,
-0.04404095560312271,
0.08528377115726471,
-0.003649976337328553,
0.015680093318223953,
0.02358309179544449,
0.02587694115936756,
0.0004442748031578958,
0.04041454941034317,
-0.035771820694208145,
-0.004821200389415026,
0.03920949622988701,
-0.04961264505982399,
-0.004714142065495253,
-0.009384349919855595,
0.04985387250781059,
-0.05332697182893753,
0.04411139711737633,
0.02330758050084114,
0.016853174194693565,
-0.013243167661130428,
-0.021038418635725975,
-0.05619388446211815,
0.037924375385046005,
-0.05633897706866264,
0.06807371973991394,
-0.022175846621394157,
-0.07383541017770767,
0.09041891247034073,
0.02042672596871853,
-0.09600596874952316,
0.002478965325281024,
0.02505720779299736,
0.0167592391371727,
0.03128654137253761,
0.04290594533085823,
-0.08602027595043182,
-0.0023980713449418545,
-0.041713111102581024,
0.012204703874886036,
-0.0629877895116806,
-0.003835994051769376,
0.03574197739362717,
-0.051132671535015106,
0.006022912450134754,
0.035325609147548676,
-0.01566217839717865,
0.008352339267730713,
0.01593475416302681,
-0.050754740834236145,
-0.03908659517765045,
-0.020709754899144173,
0.012678762897849083,
-0.03249582275748253,
0.034811832010746,
-0.014686192385852337,
0.033998455852270126,
0.01494815107434988,
-0.0004251955251675099,
-0.0425204262137413,
0.010537038557231426,
0.029876960441470146,
-0.03606850653886795,
-0.035499148070812225,
0.018690133467316628,
0.007694898173213005,
-0.01228342019021511,
0.030607061460614204,
-0.015532084740698338,
0.01946226693689823,
0.028466520830988884,
-0.01687341183423996,
0.018546858802437782,
-0.03682182356715202,
-0.0029781165067106485,
0.020689409226179123,
0.014331849291920662,
0.03436250239610672,
-0.009912843815982342,
0.032453492283821106,
0.029823770746588707,
0.03448043018579483,
-0.019900605082511902,
-0.018492471426725388,
-0.013146482408046722,
0.018287334591150284,
-0.03816922381520271,
0.02029946632683277,
0.023006107658147812,
-0.034971050918102264,
-0.043616633862257004,
-0.03529413416981697,
-0.02085382118821144,
0.05211937427520752,
-0.036394741386175156,
0.01501278206706047,
0.05249510332942009,
-0.020257044583559036,
-0.055798713117837906,
-0.0619375966489315,
-0.007648478262126446,
-0.022449562326073647,
0.03212187811732292,
0.020235814154148102,
-0.020059868693351746,
-0.012248816899955273,
-0.05251888930797577,
-0.07302562147378922,
0.04333589971065521,
0.018818087875843048,
-0.0176138523966074,
0.04333262890577316,
0.03433601185679436,
-0.020358461886644363,
0.006671220529824495,
0.026475561782717705,
-0.045026350766420364,
0.023842904716730118,
0.008855577558279037,
0.013044730760157108,
0.03964592143893242,
0.03621343895792961,
-0.014651077799499035,
-0.03687867894768715,
-0.0661771222949028,
-0.027755554765462875,
-0.03505108878016472,
-0.010765490122139454,
0.08040400594472885
] |
Cameron/BERT-SBIC-targetcategory | [
"pytorch",
"jax",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 30 | 2021-02-17T19:12:58Z | ---
tags:
- summarization
widget:
- text: '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
---
# CodeTrans model for source code summarization python
Pretrained model on programming language python using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the source code summarization task for the python code snippets.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_python_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_python_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/source%20code%20summarization/python/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 100 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing python code.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.00452203257009387,
-0.02758948691189289,
-0.011129469610750675,
0.028857432305812836,
0.03094870038330555,
0.028358055278658867,
-0.02454809471964836,
0.00029123344575054944,
-0.022807344794273376,
0.06150702014565468,
0.04828132688999176,
0.008458892814815044,
-0.006205779500305653,
0.049058184027671814,
-0.033485569059848785,
-0.06214382126927376,
-0.030560269951820374,
-0.03857898339629173,
-0.03107866831123829,
-0.013632535934448242,
0.019492132589221,
-0.007660021539777517,
0.01166844367980957,
0.007731718476861715,
-0.004477004054933786,
0.015639323741197586,
0.002613084390759468,
0.015965662896633148,
0.03794882446527481,
-0.07814344018697739,
-0.023380614817142487,
0.0018174160504713655,
-0.04909724369645119,
-0.008970802649855614,
-0.014974066987633705,
0.022058602422475815,
0.0065009091049432755,
0.026105262339115143,
0.015491836704313755,
0.060498178005218506,
0.0016000753967091441,
0.021811209619045258,
0.014299503527581692,
-0.03169643133878708,
0.056807003915309906,
0.0025160503573715687,
-0.0289625134319067,
-0.0326203815639019,
0.01402211468666792,
0.0027243332006037235,
-0.0549277737736702,
-0.06874440610408783,
-0.03395018354058266,
0.05303063243627548,
-0.005162981338799,
-0.010507282800972462,
-0.0690571665763855,
-0.016375763341784477,
0.04586717113852501,
-0.06030692532658577,
-0.033155884593725204,
0.009349681437015533,
-0.05513950064778328,
0.015551324002444744,
0.007906951010227203,
0.008140151388943195,
0.005326045211404562,
-0.033939428627491,
0.028109945356845856,
0.008137715980410576,
0.06146266311407089,
-0.015018344856798649,
0.03266321122646332,
-0.10845582187175751,
0.020663848146796227,
-0.007234031334519386,
0.01659530960023403,
0.010581725277006626,
-0.013059411197900772,
0.05354262515902519,
-0.0015136722940951586,
-0.009230912663042545,
0.04205361381173134,
0.01888144575059414,
-0.011720928363502026,
0.04189314693212509,
-0.031613875180482864,
-0.01509795431047678,
-0.023040758445858955,
0.06345320492982864,
-0.06685077399015427,
-0.0708051323890686,
-0.008968396112322807,
-0.026557818055152893,
-0.03624393790960312,
0.01828381046652794,
0.04527031630277634,
-0.013330777175724506,
0.022969191893935204,
0.00605984078720212,
0.03787550330162048,
0.05363531783223152,
-0.007625035475939512,
0.0457191988825798,
0.03147473931312561,
0.02164609730243683,
-0.015125343576073647,
-0.04034126549959183,
-0.021683404222130775,
0.03892428055405617,
0.016481665894389153,
-0.03504474088549614,
-0.0470861941576004,
0.029425298795104027,
0.017061442136764526,
-0.04438752681016922,
0.039492327719926834,
-0.02722226455807686,
-0.044849224388599396,
-0.0338360071182251,
0.03555607423186302,
-0.010134285315871239,
-0.018217483535408974,
0.01261760015040636,
-0.04844177886843681,
-0.0025998821947723627,
-0.06001800671219826,
-0.0295368991792202,
0.014536180533468723,
0.03926659747958183,
-0.006723327096551657,
0.08860937505960464,
0.013861197978258133,
-0.03172137960791588,
0.006928115151822567,
0.019653884693980217,
-0.07226954400539398,
0.06846223771572113,
0.04219125211238861,
0.11216840147972107,
-0.06427714973688126,
-0.04386509954929352,
0.023272152990102768,
-0.005363994278013706,
-0.021593380719423294,
0.02546915039420128,
-0.010869803838431835,
-0.08012547343969345,
-0.024364007636904716,
-0.009653839282691479,
0.07020217925310135,
-0.04261946305632591,
-0.02542322874069214,
0.024575337767601013,
0.0013101025251671672,
0.006455461028963327,
-0.04225412756204605,
-0.0013639513636007905,
-0.0018324853153899312,
-0.026002924889326096,
-0.06465104967355728,
0.033695053309202194,
-0.0017926968866959214,
-0.02982751838862896,
-0.02749464474618435,
-0.03995388373732567,
0.012060722336173058,
0.11100002378225327,
0.0006243775715120137,
-0.01532198116183281,
-0.05455561727285385,
0.017578480765223503,
0.025431279093027115,
0.04568777605891228,
-0.020198317244648933,
0.01626718044281006,
0.04015680402517319,
0.07033324241638184,
-0.025092922151088715,
0.07376671582460403,
-0.017766745761036873,
-0.04103069752454758,
-0.03264186903834343,
0.02010248601436615,
-0.00966225378215313,
-0.040595922619104385,
0.00699992012232542,
0.028657644987106323,
-0.01473736297339201,
-0.0065812296234071255,
-0.009992086328566074,
0.05939096957445145,
0.025377437472343445,
-0.012414134107530117,
-0.03298451006412506,
0.01894291117787361,
-0.018564946949481964,
0.06703401356935501,
-0.039672527462244034,
-0.009891110472381115,
-0.014684588648378849,
-0.03432280942797661,
-0.010290254838764668,
0.025166882202029228,
0.04793321341276169,
0.017804156988859177,
-0.012154502794146538,
0.10418666899204254,
-0.04528655856847763,
-0.0013316895347088575,
-0.05207188054919243,
-0.035948097705841064,
0.024747395887970924,
0.03428400680422783,
0.0321047343313694,
0.028997307643294334,
0.013249662704765797,
-0.025031212717294693,
0.021646497771143913,
0.07248631119728088,
0.02597111091017723,
0.04211099073290825,
-0.008141016587615013,
-0.02808709442615509,
0.03585292026400566,
0.06609595566987991,
-0.04641130939126015,
-0.04046357795596123,
0.045573994517326355,
0.03438270092010498,
-0.01072564348578453,
0.028793560341000557,
-0.007689556106925011,
0.012423373758792877,
-0.036451052874326706,
-0.06564698368310928,
0.040919963270425797,
0.01568392664194107,
0.005861343815922737,
0.03226318582892418,
-0.0021551598329097033,
-0.0024979717563837767,
0.03323321416974068,
0.0020447182469069958,
-0.00017469593149144202,
-0.05949409678578377,
0.00941718090325594,
-0.002076181583106518,
0.05909093841910362,
-0.0363008975982666,
0.03714930638670921,
0.021229734644293785,
0.0001730645599309355,
0.056292951107025146,
-0.0254350695759058,
0.02716406062245369,
0.042297229170799255,
0.024516794830560684,
-0.014794058166444302,
0.01562302466481924,
0.026643313467502594,
0.023085447028279305,
0.08428747206926346,
0.008519727736711502,
0.06206081807613373,
-0.004219730384647846,
0.057645898312330246,
0.0722314715385437,
0.01762104034423828,
0.008426656946539879,
0.02800225466489792,
0.06575696170330048,
-0.008401215076446533,
-0.01660996861755848,
0.06478017568588257,
-0.05051138997077942,
0.027812369167804718,
-0.03263968601822853,
0.028971144929528236,
-0.012315568514168262,
-0.01898277923464775,
0.04050835594534874,
0.0023083153646439314,
-0.048218194395303726,
0.0018145607318729162,
-0.027419745922088623,
-0.022727353498339653,
0.010955043137073517,
0.0025999746285378933,
-0.02579333446919918,
0.022365648299455643,
-0.01815279945731163,
0.02603207156062126,
-0.08265571296215057,
-0.0483267642557621,
-0.006681563798338175,
-0.043058283627033234,
0.01921612024307251,
-0.07562562823295593,
-0.06344997882843018,
-0.06345223635435104,
-0.018592260777950287,
0.033697325736284256,
0.0021053936798125505,
-0.009815039113163948,
-0.023840857669711113,
0.006349517032504082,
-0.03745420649647713,
-0.022207094356417656,
-0.05723196640610695,
-0.060440946370363235,
-0.00342815020121634,
-0.06924740970134735,
0.03765994682908058,
-0.027188662439584732,
0.024626804515719414,
0.008406689390540123,
-0.015148647129535675,
-0.028914952650666237,
-0.017761260271072388,
0.07489542663097382,
0.007805049419403076,
-0.010903576388955116,
-0.033519335091114044,
0.013590337708592415,
-0.02376548945903778,
0.03548046573996544,
-0.009514634497463703,
-0.04462519288063049,
0.09899095445871353,
0.06043313443660736,
0.04433077946305275,
-0.014055656269192696,
-0.04040950909256935,
-0.044849950820207596,
-0.0475296713411808,
-0.022263791412115097,
-0.02861805260181427,
-0.030137546360492706,
-0.0017883533146232367,
-0.053125251084566116,
-0.02508876658976078,
-0.022989073768258095,
-0.044829752296209335,
-0.023016080260276794,
0.022134367376565933,
0.024892808869481087,
0.04017746075987816,
0.054219428449869156,
0.017761899158358574,
-0.03698495775461197,
-0.03370678424835205,
0.043845124542713165,
-0.0009756708168424666,
0.0004488078411668539,
-0.07440564781427383,
-0.046897709369659424,
0.03927263617515564,
0.012686345726251602,
-0.003756819060072303,
-0.02145695686340332,
0.04636858031153679,
0.0199784804135561,
0.010942733846604824,
0.0006748457089997828,
-0.005445555783808231,
-0.020573267713189125,
-0.020719334483146667,
-0.004133002366870642,
-0.03478618338704109,
-0.038431473076343536,
-0.015380850061774254,
-0.008918913081288338,
0.043038416653871536,
-0.05962603911757469,
-0.06015216186642647,
-0.0038582724519073963,
0.03255784139037132,
0.04184131324291229,
0.0227676909416914,
-0.02181766740977764,
-0.010768480598926544,
-0.06510985642671585,
-0.043250806629657745,
0.035832442343235016,
0.01666458137333393,
-0.00892331451177597,
0.04987306520342827,
0.04659992456436157,
-0.05659864842891693,
0.023698359727859497,
0.03490758314728737,
0.04725087806582451,
0.017880761995911598,
-0.03156273439526558,
0.011719069443643093,
-0.05298134684562683,
0.020751945674419403,
0.00895486306399107,
-0.029957642778754234,
-0.04816744849085808,
-0.07283701747655869,
-0.03234003111720085,
0.008418959565460682,
-0.01034504920244217,
-0.0038230956997722387,
0.04249294102191925,
-0.02935555763542652,
-0.052152905613183975,
-0.00540334265679121,
0.0009254017495550215,
0.07026374340057373,
-0.03984597697854042,
0.029557904228568077,
0.012559347786009312,
0.06260104477405548,
-0.037201590836048126,
-0.0014407527633011341,
-0.031308870762586594,
-0.01997525244951248,
0.0013317558914422989,
0.0437253937125206,
0.030001332983374596,
0.0607001818716526,
0.07443955540657043,
0.0059467582032084465,
-0.033164121210575104,
0.05071470886468887,
0.053426675498485565,
0.00629853131249547,
-0.02104620262980461,
0.005975373089313507,
0.01447767112404108,
-0.026782045140862465,
0.018116706982254982,
-0.001536332885734737,
0.018880749121308327,
0.027986207976937294,
-0.002068153815343976,
0.005141063127666712,
0.0013642176054418087,
-0.01571018248796463,
-0.04379444941878319,
-0.050026122480630875,
-0.00464779045432806,
-0.032080139964818954,
-0.05201265215873718,
0.023229092359542847,
0.0379360169172287,
0.026402726769447327,
0.05083560571074486,
0.04394552856683731,
-0.03844287246465683,
-0.03260478749871254,
0.04856928437948227,
0.050300244241952896,
-0.04389268159866333,
-0.04378090798854828,
-0.05482248216867447,
0.03425775468349457,
0.049000661820173264,
-0.013873359188437462,
-0.10072028636932373,
-0.0025503509677946568,
0.029578043147921562,
-0.020451875403523445,
0.06007646396756172,
0.02633863314986229,
0.024780672043561935,
0.05625137314200401,
-0.0015870340866968036,
0.022878209128975868,
-0.010892481543123722,
0.018473992124199867,
0.0012286519631743431,
0.035647209733724594,
-0.02223307266831398,
-0.03468255698680878,
-0.04218823462724686,
0.023634804412722588,
0.008202586323022842,
0.036698538810014725,
0.02850732021033764,
-0.011430383659899235,
-0.0746104046702385,
-0.0005925795994699001,
0.027718715369701385,
-0.022660689428448677,
0.016707319766283035,
0.030207481235265732,
0.032362863421440125,
-0.05259130895137787,
-0.028067082166671753,
-0.019063815474510193,
-0.012547704391181469,
0.035872720181941986,
0.004035110119730234,
-0.015298509038984776,
-0.067168228328228,
0.01335090585052967,
-0.01884125918149948,
-0.02931278571486473,
-0.08098401129245758,
0.03995923697948456,
0.008950220420956612,
-0.008610080927610397,
0.051983244717121124,
0.03215866535902023,
0.023076260462403297,
0.03030312806367874,
-0.022015191614627838,
0.031148036941885948,
-0.02248132973909378,
0.023350004106760025,
-0.012160101905465126,
-0.02849319763481617,
-0.025771530345082283,
-0.06255932152271271,
-0.03518303483724594,
-0.03440634161233902,
-0.04520715773105621,
-0.046499066054821014,
-0.030894482508301735,
0.003342259209603071,
-0.009989284910261631,
-0.00996656995266676,
-0.011363692581653595,
0.0067877317778766155,
-0.025303805246949196,
-0.026005592197179794,
-0.03248332068324089,
-0.04393303766846657,
-0.09972894936800003,
-0.028047315776348114,
0.0076590729877352715,
0.04304136708378792,
0.0367710217833519,
-0.004399747587740421,
0.0015859901905059814,
0.025215597823262215,
0.005790469702333212,
-0.010514343157410622,
0.017397571355104446,
0.0068261707201600075,
-0.045272357761859894,
-0.03561607375741005,
0.003329653525725007,
0.014271676540374756,
0.004125039093196392,
-0.027455469593405724,
0.004269054625183344,
0.047415513545274734,
-0.034389566630125046,
-0.0018196140881627798,
0.042519766837358475,
0.00012807965686079115,
-0.0816822424530983,
-0.04150748252868652,
0.0031647717114537954,
-0.04609285295009613,
0.03430680185556412,
0.0006903265020810068,
-0.02634996548295021,
-0.01285588275641203,
0.02020002342760563,
0.028085509315133095,
-0.014766900800168514,
-0.03238538280129433,
-0.007736301049590111,
-0.03404306620359421,
0.04054589569568634,
-0.06127065420150757,
0.04279175028204918,
-0.03231373801827431,
-0.005157573614269495,
-0.011060127057135105,
-0.0012850078055635095,
-0.03508879244327545,
0.06913455575704575,
-0.010063978843390942,
-0.009116698056459427,
-0.011332477442920208,
0.013685665093362331,
-0.022501813247799873,
0.04279707744717598,
-0.011977211572229862,
0.006637979298830032,
-0.033905886113643646,
0.020379969850182533,
-0.042239002883434296,
0.006971033290028572,
-0.02920255810022354,
-0.019250597804784775,
-0.02284930646419525,
-0.0253052469342947,
-0.004014261998236179,
-0.05245959386229515,
0.04854506626725197,
0.022171078249812126,
0.03437980264425278,
0.015732306987047195,
-0.02372737042605877,
-0.01354309730231762,
0.02008763700723648,
-0.08838122338056564,
-0.05160476639866829,
-0.02683093398809433,
0.019191080704331398,
-0.02356860600411892,
0.06346742808818817,
0.05076206102967262,
-0.0607302300632,
-0.0086827976629138,
0.010705667547881603,
0.015550305135548115,
0.0001934193860506639,
0.024975040927529335,
0.0223261546343565,
0.041703566908836365,
0.04487307369709015,
-0.03731686249375343,
-0.010640214197337627,
-0.012272218242287636,
-0.014544079080224037,
-0.01571149379014969,
-0.01609042100608349,
0.024067094549536705,
-0.009666219353675842,
-0.03765757381916046,
-0.030337855219841003,
0.06211540848016739,
0.06343335658311844,
0.02086781896650791,
-0.001963329501450062,
-0.035111963748931885,
0.03172837197780609,
0.01123602781444788,
-0.05163925141096115,
-0.030792217701673508,
0.0113915354013443,
-0.04725900664925575,
0.08389552682638168,
-0.001004408928565681,
0.01541921403259039,
0.024468302726745605,
0.02500760741531849,
0.0005046309670433402,
0.040582988411188126,
-0.03645896911621094,
-0.009327738545835018,
0.0339604914188385,
-0.04827282577753067,
-0.005123020149767399,
-0.00864998809993267,
0.048488132655620575,
-0.05073217302560806,
0.0496111623942852,
0.026186171919107437,
0.012422685511410236,
-0.011731625534594059,
-0.021932251751422882,
-0.05076603963971138,
0.03954260051250458,
-0.06236019358038902,
0.06507763266563416,
-0.019102411344647408,
-0.07967925816774368,
0.09028639644384384,
0.019922854378819466,
-0.0951223373413086,
-0.0005927245365455747,
0.025090306997299194,
0.01482968870550394,
0.029785629361867905,
0.04391508921980858,
-0.08673013001680374,
-0.0005991404177621007,
-0.040304169058799744,
0.01646723411977291,
-0.06657090783119202,
-0.008140224032104015,
0.03579332306981087,
-0.05044516175985336,
0.006836933549493551,
0.03948133438825607,
-0.014497905038297176,
0.011075928807258606,
0.02079155296087265,
-0.04815284535288811,
-0.03522108867764473,
-0.02362137846648693,
0.012552200816571712,
-0.029610540717840195,
0.027547357603907585,
-0.012916859239339828,
0.03623897209763527,
0.013227195478975773,
-0.00022171068121679127,
-0.04128025099635124,
0.013241077773272991,
0.030379116535186768,
-0.036380570381879807,
-0.03547174483537674,
0.018868165090680122,
0.005419842433184385,
-0.011884495615959167,
0.0323537215590477,
-0.014505406841635704,
0.017544690519571304,
0.029231254011392593,
-0.019095169380307198,
0.016953157261013985,
-0.030064014717936516,
-0.0055177826434373856,
0.01738998293876648,
0.010607954114675522,
0.03384288027882576,
-0.008317976258695126,
0.034264739602804184,
0.028560250997543335,
0.03578217327594757,
-0.01855456829071045,
-0.01972881704568863,
-0.011247354559600353,
0.017535187304019928,
-0.037999991327524185,
0.022803984582424164,
0.02211969904601574,
-0.03661118820309639,
-0.04277168586850166,
-0.037067998200654984,
-0.023650379851460457,
0.053879085928201675,
-0.03209341689944267,
0.017788933590054512,
0.05446632578969002,
-0.017841041088104248,
-0.0522124208509922,
-0.06030900031328201,
-0.009750056080520153,
-0.02332482300698757,
0.027218738570809364,
0.019303537905216217,
-0.019943689927458763,
-0.009998300112783909,
-0.049425024539232254,
-0.07189000397920609,
0.04463048651814461,
0.02262546494603157,
-0.020094886422157288,
0.043336253613233566,
0.03257014602422714,
-0.02075137570500374,
0.008212774060666561,
0.020465144887566566,
-0.040465645492076874,
0.016570525243878365,
0.004142476711422205,
0.014418691396713257,
0.03903909772634506,
0.036126479506492615,
-0.016790108755230904,
-0.03984178230166435,
-0.06646908819675446,
-0.022536464035511017,
-0.03348691388964653,
-0.009352870285511017,
0.08110813051462173
] |
Cameron/BERT-eec-emotion | [
"pytorch",
"jax",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 36 | null | ---
tags:
- summarization
widget:
- text: "select time ( col0 ) from tab0"
---
# CodeTrans model for source code summarization sql
Pretrained model on programming language sql using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized sql code functions: it works best with tokenized sql functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the sql function or be fine-tuned on other sql code tasks. It can be used on unparsed and untokenized sql code. However, if the sql code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate sql function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_sql_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_sql_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "select time ( col0 ) from tab0"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/source%20code%20summarization/sql/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 120,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.008165275678038597,
-0.03274340555071831,
-0.008727630600333214,
0.037481822073459625,
0.031158339232206345,
0.028795046731829643,
-0.02889181300997734,
-0.008156782016158104,
-0.02480294741690159,
0.056049443781375885,
0.053467847406864166,
0.013502984307706356,
-0.011223550885915756,
0.05131886154413223,
-0.039731379598379135,
-0.05998089537024498,
-0.015502619557082653,
-0.03597501292824745,
-0.02498483844101429,
-0.013961640186607838,
0.021285923197865486,
0.0027371866162866354,
0.012784182094037533,
0.00862147007137537,
-0.001252584159374237,
0.014708022587001324,
-0.0015618482138961554,
0.03175319731235504,
0.026370463892817497,
-0.07419813424348831,
-0.015482987277209759,
-0.0050797960720956326,
-0.04251851141452789,
-0.019105149433016777,
-0.020230796188116074,
0.02481853775680065,
0.01093231700360775,
0.03437649458646774,
0.02837287448346615,
0.05240648612380028,
0.007639523129910231,
0.021441297605633736,
0.020259998738765717,
-0.04652194306254387,
0.06411758065223694,
0.007039855699986219,
-0.025141194462776184,
-0.03225305303931236,
0.02259819768369198,
-0.0024168919771909714,
-0.05595702305436134,
-0.06033163145184517,
-0.023966478183865547,
0.04466920346021652,
-0.01466822437942028,
-0.0018236137693747878,
-0.0628584697842598,
-0.01727779023349285,
0.05205158889293671,
-0.051435474306344986,
-0.02652342990040779,
0.015813646838068962,
-0.054371949285268784,
0.0145987244322896,
0.01212227251380682,
0.005783590488135815,
0.001172926276922226,
-0.05072421953082085,
0.019884660840034485,
0.001955165062099695,
0.0507609061896801,
-0.025867365300655365,
0.027237575501203537,
-0.10203901678323746,
0.022687070071697235,
0.003261393401771784,
0.01809953711926937,
0.01721232198178768,
-0.007004319690167904,
0.048145003616809845,
0.008560402318835258,
-0.008514925837516785,
0.04398534074425697,
0.014259985648095608,
-0.02205011621117592,
0.03621877357363701,
-0.04064081981778145,
-0.013502707704901695,
-0.010474317707121372,
0.0677594393491745,
-0.05486774444580078,
-0.07276628166437149,
-0.01683298498392105,
-0.02430754527449608,
-0.03291454538702965,
0.023761648684740067,
0.03870951756834984,
-0.002041160361841321,
0.015215002000331879,
0.00900985673069954,
0.043386880308389664,
0.052224453538656235,
-0.012851066887378693,
0.05971745029091835,
0.023909499868750572,
0.011668451130390167,
-0.00916096568107605,
-0.04255514219403267,
-0.00869505014270544,
0.03157151862978935,
0.022095931693911552,
-0.03915907070040703,
-0.04274057224392891,
0.03449580818414688,
0.026375198736786842,
-0.03695843741297722,
0.04836346209049225,
-0.0169378574937582,
-0.052496351301670074,
-0.03482581675052643,
0.03785678744316101,
-0.006422876846045256,
-0.015619020909070969,
0.013643994927406311,
-0.043396662920713425,
0.0008471842156723142,
-0.060621555894613266,
-0.024581003934144974,
0.02048693224787712,
0.03775167837738991,
-0.011257774196565151,
0.08475348353385925,
0.014892220497131348,
-0.0606221929192543,
0.02244599163532257,
0.023132028058171272,
-0.06546150147914886,
0.06486261636018753,
0.048648640513420105,
0.12414366006851196,
-0.06371106952428818,
-0.048261042684316635,
0.02741018682718277,
-0.009247532114386559,
-0.031317971646785736,
0.02213890850543976,
-0.0034295280929654837,
-0.06302119791507721,
-0.024318480864167213,
-0.017813874408602715,
0.05699758231639862,
-0.0428491048514843,
-0.018186679109930992,
0.02399141900241375,
0.005197959020733833,
0.012477623298764229,
-0.02946416288614273,
-0.010604710318148136,
0.0035144395660609007,
-0.024815963581204414,
-0.06074731424450874,
0.03649212419986725,
0.0021471395157277584,
-0.02784324437379837,
-0.029845399782061577,
-0.021979887038469315,
0.003927696496248245,
0.10185028612613678,
0.01608196832239628,
-0.022513817995786667,
-0.0459379181265831,
0.011233268305659294,
0.021892348304390907,
0.044065210968256,
-0.02639079838991165,
0.02691958099603653,
0.05333679914474487,
0.07434659451246262,
-0.026335246860980988,
0.06998775899410248,
-0.008918540552258492,
-0.030563626438379288,
-0.03194299712777138,
0.019795650616288185,
-0.022188927978277206,
-0.047416385263204575,
0.014612626284360886,
0.013828509487211704,
-0.021168936043977737,
-0.007179287727922201,
-0.01901497133076191,
0.04328717663884163,
0.018739799037575722,
-0.00417697336524725,
-0.04074958339333534,
0.011714829131960869,
-0.022940393537282944,
0.06013109162449837,
-0.034181851893663406,
-0.01114039309322834,
-0.004175900015980005,
-0.04511694237589836,
-0.016975803300738335,
0.03438279777765274,
0.04140017554163933,
0.029133593663573265,
-0.006759789772331715,
0.11777591705322266,
-0.04786672443151474,
0.00839638989418745,
-0.04197476804256439,
-0.03321611508727074,
0.025973772630095482,
0.034699324518442154,
0.026175718754529953,
0.03877674788236618,
0.007914185523986816,
-0.021686678752303123,
0.018042171373963356,
0.07933278381824493,
0.026664823293685913,
0.041710760444402695,
-0.010196233168244362,
-0.02680843323469162,
0.03845825418829918,
0.06564714014530182,
-0.04489022120833397,
-0.03995935246348381,
0.04493936896324158,
0.02508273907005787,
-0.014299874193966389,
0.03419005125761032,
-0.014832700602710247,
0.02028525620698929,
-0.05503515899181366,
-0.05852325260639191,
0.04683058708906174,
0.010604243725538254,
-0.003482595318928361,
0.037469200789928436,
0.0068792179226875305,
-0.007798109203577042,
0.03262392431497574,
0.00323494547046721,
0.0021874599624425173,
-0.058549296110868454,
0.0049883099272847176,
-0.0032027913257479668,
0.06367184221744537,
-0.05080006271600723,
0.03967247158288956,
0.007033300586044788,
0.0013959641801193357,
0.06652817130088806,
-0.023337988182902336,
0.02144492417573929,
0.03900106996297836,
0.02970351092517376,
-0.016522711142897606,
0.005466565489768982,
0.014227012172341347,
0.017199473455548286,
0.0759030431509018,
0.010900168679654598,
0.06743209064006805,
-0.004178482107818127,
0.05179021507501602,
0.06992065161466599,
0.01636241003870964,
0.015015685930848122,
0.02179325371980667,
0.062263548374176025,
-0.0008278609602712095,
-0.0018581263720989227,
0.057749323546886444,
-0.05850132927298546,
0.03709346055984497,
-0.035781074315309525,
0.01924576424062252,
-0.011732256039977074,
-0.011595698073506355,
0.04431569203734398,
0.01315039861947298,
-0.048361871391534805,
0.002591334981843829,
-0.02957698330283165,
-0.03133067861199379,
0.011242697015404701,
-0.009108445607125759,
-0.017832910642027855,
0.009126435965299606,
-0.025374792516231537,
0.015516187064349651,
-0.07587685436010361,
-0.04592583328485489,
-0.018809769302606583,
-0.03737833350896835,
0.007052620407193899,
-0.06718989461660385,
-0.040389131754636765,
-0.06685910373926163,
-0.02515578828752041,
0.02850824035704136,
0.008726950734853745,
-0.009995562955737114,
-0.030108079314231873,
0.015055886469781399,
-0.03408161923289299,
-0.02698163129389286,
-0.046825334429740906,
-0.061227310448884964,
-0.017339490354061127,
-0.06322396546602249,
0.0333290621638298,
-0.013404970988631248,
0.016703223809599876,
0.0019848686642944813,
-0.012612001039087772,
-0.02701512910425663,
-0.020382510498166084,
0.07841192185878754,
0.006763449404388666,
-0.013449287042021751,
-0.03327878564596176,
0.010992581956088543,
-0.031256917864084244,
0.03315936401486397,
-0.013383072800934315,
-0.0473160520195961,
0.1016850695014,
0.06445033848285675,
0.04534213989973068,
-0.013274755328893661,
-0.041164860129356384,
-0.04543514549732208,
-0.04323141649365425,
-0.028804924339056015,
-0.024844463914632797,
-0.022616015747189522,
-0.005098381545394659,
-0.05328914150595665,
-0.009853770956397057,
-0.030307626351714134,
-0.0476810485124588,
-0.013191966339945793,
0.01950102113187313,
0.027359483763575554,
0.02763461135327816,
0.056473616510629654,
0.013223799876868725,
-0.03484644740819931,
-0.028178028762340546,
0.03826532140374184,
0.005706967320293188,
0.013575687073171139,
-0.07034820318222046,
-0.028270866721868515,
0.04057585820555687,
0.01557458657771349,
0.007489245850592852,
-0.028146060183644295,
0.055919818580150604,
0.020085716620087624,
0.01257783081382513,
0.014914039522409439,
-0.0035620168782770634,
-0.015076668933033943,
-0.03163044527173042,
-0.006062975153326988,
-0.027883578091859818,
-0.03481888771057129,
-0.013998697511851788,
-0.008182217366993427,
0.04075666889548302,
-0.06693784147500992,
-0.05406411364674568,
-0.00850654672831297,
0.033750295639038086,
0.0412665419280529,
0.01816849783062935,
-0.023483017459511757,
-0.00006813563231844455,
-0.05594104155898094,
-0.038676876574754715,
0.030353616923093796,
0.02664553001523018,
-0.017316477373242378,
0.039394866675138474,
0.04581766203045845,
-0.05798427760601044,
0.0324430875480175,
0.03702384978532791,
0.04437411203980446,
0.031306035816669464,
-0.038066308945417404,
0.012178309261798859,
-0.04691343009471893,
0.030965380370616913,
-0.0004599513194989413,
-0.035181328654289246,
-0.05358247458934784,
-0.07248776406049728,
-0.02786749042570591,
0.012326941825449467,
-0.024061547592282295,
0.0008174845133908093,
0.04749682918190956,
-0.02765405923128128,
-0.03975832462310791,
-0.016621116548776627,
0.010731726884841919,
0.06466896086931229,
-0.03938120976090431,
0.030386079102754593,
0.005016917362809181,
0.05196703225374222,
-0.041958607733249664,
0.011895090341567993,
-0.02622552029788494,
-0.0108031602576375,
-0.00038850659620948136,
0.0402611568570137,
0.021910471841692924,
0.056392379105091095,
0.07825259864330292,
0.012173265218734741,
-0.037876639515161514,
0.037833020091056824,
0.04902266338467598,
0.0029065071139484644,
-0.018137846142053604,
0.003469821996986866,
0.004418773110955954,
-0.020680958405137062,
0.008486350998282433,
-0.0026614442467689514,
0.021098675206303596,
0.029981570318341255,
0.0008487740997225046,
-0.005103974603116512,
0.005272014532238245,
-0.019118374213576317,
-0.04098554328083992,
-0.04314303770661354,
-0.006047992967069149,
-0.02729601413011551,
-0.05730048194527626,
0.027330465614795685,
0.04575054347515106,
0.02794742025434971,
0.051842112094163895,
0.04655773937702179,
-0.0380377322435379,
-0.020268918946385384,
0.04389697313308716,
0.04611017554998398,
-0.046755269169807434,
-0.03644087165594101,
-0.05020500719547272,
0.0378238782286644,
0.034946270287036896,
-0.02436698228120804,
-0.08420893549919128,
-0.0013311069924384356,
0.024907173588871956,
-0.03488174453377724,
0.06644951552152634,
0.012203441001474857,
0.01884707808494568,
0.04911888763308525,
-0.009218253195285797,
0.020116673782467842,
-0.021358462050557137,
0.016018353402614594,
-0.0035753906704485416,
0.05844346806406975,
-0.03111729584634304,
-0.03266773372888565,
-0.036429982632398605,
0.02783246710896492,
0.008633755147457123,
0.039997752755880356,
0.03489172086119652,
-0.0047103106044232845,
-0.07420893013477325,
0.0003312070039100945,
0.027519820258021355,
-0.03746563941240311,
0.011140496470034122,
0.02089739590883255,
0.039463110268116,
-0.054664239287376404,
-0.014262151904404163,
-0.016330944374203682,
-0.021002504974603653,
0.03102637268602848,
0.0029534052591770887,
-0.02470475062727928,
-0.07128468155860901,
0.012655766680836678,
-0.022835202515125275,
-0.031367626041173935,
-0.08510719984769821,
0.04362482205033302,
0.010671761818230152,
0.002425792859867215,
0.05083753913640976,
0.037880007177591324,
0.022417638450860977,
0.0385252945125103,
-0.01444809790700674,
0.024691322818398476,
-0.02318703383207321,
0.027267936617136,
-0.017509812489151955,
-0.015702957287430763,
-0.014992316253483295,
-0.06174783781170845,
-0.028492212295532227,
-0.043978817760944366,
-0.0521390363574028,
-0.04526197910308838,
-0.029760850593447685,
-0.0007378050358965993,
-0.00885837897658348,
-0.007767080795019865,
-0.01561850868165493,
0.019791314378380775,
-0.020982667803764343,
-0.019930828362703323,
-0.02463982254266739,
-0.04653827100992203,
-0.10978002101182938,
-0.024315403774380684,
0.012964367866516113,
0.03836561739444733,
0.035109952092170715,
0.0017522586276754737,
0.012698640115559101,
0.031784363090991974,
-0.004370903130620718,
-0.01853790134191513,
0.02322504296898842,
0.011193918064236641,
-0.039920564740896225,
-0.03511780872941017,
-0.0018501505255699158,
0.016365310177206993,
0.018225496634840965,
-0.028950976207852364,
0.005239566788077354,
0.04796168953180313,
-0.04231593385338783,
-0.002939705504104495,
0.035687804222106934,
0.004263840615749359,
-0.09421892464160919,
-0.0347735658288002,
0.003670882899314165,
-0.04457128420472145,
0.03249642625451088,
-0.0018119695596396923,
-0.01669476553797722,
-0.01795809343457222,
0.014745279215276241,
0.032236333936452866,
0.010664519853889942,
-0.029779348522424698,
-0.0019272440113127232,
-0.031484439969062805,
0.04498206451535225,
-0.06178288161754608,
0.06187475100159645,
-0.03889327868819237,
-0.008505521342158318,
-0.007867494598031044,
-0.010425599291920662,
-0.032885558903217316,
0.05618957802653313,
-0.009762600995600224,
-0.001136463601142168,
-0.01269276812672615,
0.01726950705051422,
-0.016038641333580017,
0.03726257383823395,
-0.004424114711582661,
0.016488952562212944,
-0.02197340317070484,
0.004339250270277262,
-0.041926246136426926,
0.0044619301334023476,
-0.021518729627132416,
-0.027236828580498695,
-0.021614646539092064,
-0.025660589337348938,
-0.016025101765990257,
-0.047844354063272476,
0.05081193521618843,
0.022052345797419548,
0.03799822926521301,
0.023141970857977867,
-0.015642130747437477,
-0.02130456268787384,
0.030514994636178017,
-0.0778345987200737,
-0.039963189512491226,
-0.03910009562969208,
0.008478567004203796,
-0.020787598565220833,
0.06896934658288956,
0.05423645302653313,
-0.05885212495923042,
-0.012533390894532204,
0.012451974675059319,
-0.0018097120337188244,
0.012448765337467194,
0.023555004969239235,
0.007710202131420374,
0.04239322990179062,
0.049770113080739975,
-0.04123832657933235,
0.0005247966037131846,
-0.00814470462501049,
-0.014672936871647835,
-0.012812077067792416,
-0.015510284341871738,
0.029037538915872574,
-0.01586679369211197,
-0.044014353305101395,
-0.019822433590888977,
0.049632150679826736,
0.05659720301628113,
0.032655831426382065,
-0.003531411988660693,
-0.028664102777838707,
0.028044771403074265,
0.023303063586354256,
-0.049550190567970276,
-0.03216372802853584,
0.012058958411216736,
-0.0507805310189724,
0.09076051414012909,
-0.009369827806949615,
0.017823215574026108,
0.034693602472543716,
0.02086181938648224,
0.008415787480771542,
0.03077637031674385,
-0.03163247928023338,
-0.004540069028735161,
0.04744372144341469,
-0.055230602622032166,
0.0021772722247987986,
-0.012299962341785431,
0.06148148328065872,
-0.05222504585981369,
0.04478214681148529,
0.02935735136270523,
0.03084610402584076,
-0.015765752643346786,
-0.015918733552098274,
-0.06096286699175835,
0.04505080729722977,
-0.059956930577754974,
0.0703091099858284,
-0.017965156584978104,
-0.0719878077507019,
0.0865321233868599,
0.038162678480148315,
-0.09707511216402054,
0.0018135257996618748,
0.03212901949882507,
0.026820173487067223,
0.03948616236448288,
0.042205456644296646,
-0.07883608341217041,
-0.002966294065117836,
-0.0412183552980423,
0.006154017988592386,
-0.05161192640662193,
-0.004094285890460014,
0.036928750574588776,
-0.05177624896168709,
-0.0006652823649346828,
0.03334307670593262,
-0.019324008375406265,
0.006290323566645384,
0.017745034769177437,
-0.0466298870742321,
-0.04227723553776741,
-0.028432460501790047,
0.018837636336684227,
-0.028008006513118744,
0.03200702369213104,
-0.02209707349538803,
0.025111909955739975,
0.02541177347302437,
-0.005965087562799454,
-0.05097053945064545,
0.009789304807782173,
0.023382926359772682,
-0.046912986785173416,
-0.029450673609972,
0.0160825178027153,
0.022967547178268433,
-0.013270888477563858,
0.03414307162165642,
-0.018493909388780594,
0.01563408225774765,
0.031223338097333908,
-0.023075830191373825,
0.023176079615950584,
-0.04220118373632431,
0.0001168478192994371,
0.01587791182100773,
0.0033773549366742373,
0.027469513937830925,
-0.013899380341172218,
0.039945606142282486,
0.03134363889694214,
0.03887226805090904,
-0.02383582852780819,
-0.014887153171002865,
-0.017630593851208687,
0.019879762083292007,
-0.04737827926874161,
0.02136954665184021,
0.02346489205956459,
-0.02998068928718567,
-0.03660658374428749,
-0.04151202365756035,
-0.023388974368572235,
0.05035274475812912,
-0.034931380301713943,
0.014179270714521408,
0.04722844809293747,
-0.016013450920581818,
-0.04809712991118431,
-0.07764435559511185,
-0.0045914724469184875,
-0.02215011976659298,
0.03394022583961487,
0.019432924687862396,
-0.032697148621082306,
-0.012129820883274078,
-0.0483202263712883,
-0.06940881907939911,
0.04955185577273369,
0.02447615936398506,
-0.01695794239640236,
0.0480181947350502,
0.029469337314367294,
-0.015749823302030563,
0.00469152070581913,
0.02714269608259201,
-0.05614541098475456,
0.028122974559664726,
0.011811413802206516,
0.022266896441578865,
0.04374878108501434,
0.042062804102897644,
-0.015805749222636223,
-0.03694178909063339,
-0.058381009846925735,
-0.03978253901004791,
-0.03605276718735695,
-0.006544762756675482,
0.07386255264282227
] |
Cameron/BERT-jigsaw-severetoxic | [
"pytorch",
"jax",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 30 | 2021-02-17T19:35:44Z | ---
tags:
- summarization
widget:
- text: "select time ( col0 ) from tab0"
---
# CodeTrans model for source code summarization sql
Pretrained model on programming language sql using the t5 large model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized sql code functions: it works best with tokenized sql functions.
## Model description
This CodeTrans model is based on the `t5-large` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the source code summarization task for the sql code snippets.
## Intended uses & limitations
The model could be used to generate the description for the sql function or be fine-tuned on other sql code tasks. It can be used on unparsed and untokenized sql code. However, if the sql code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate sql function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_sql_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_source_code_summarization_sql_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "select time ( col0 ) from tab0"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/source%20code%20summarization/sql/large_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for 240,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 200 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing sql code.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.004002522211521864,
-0.02929111383855343,
-0.006772052962332964,
0.02782655879855156,
0.03193838149309158,
0.028933411464095116,
-0.02843420021235943,
-0.0014124097069725394,
-0.022186022251844406,
0.05664476379752159,
0.04971109330654144,
0.01099034771323204,
-0.005093356128782034,
0.048645440489053726,
-0.03654113784432411,
-0.0585949644446373,
-0.03026529774069786,
-0.03863470256328583,
-0.03498553857207298,
-0.012246835045516491,
0.023158669471740723,
-0.00034750555641949177,
0.011283371597528458,
0.0077103497460484505,
-0.0076109557412564754,
0.01447372417896986,
-0.001356545020826161,
0.023943502455949783,
0.03621993958950043,
-0.06925130635499954,
-0.008937723934650421,
-0.003772561904042959,
-0.04528326541185379,
-0.025270842015743256,
-0.02376285009086132,
0.025970714166760445,
0.013114064931869507,
0.03610891103744507,
0.02516692690551281,
0.05441364273428917,
0.006823888048529625,
0.02594516985118389,
0.0233209989964962,
-0.04115677624940872,
0.06254591792821884,
0.0042683095671236515,
-0.02358110621571541,
-0.03597944974899292,
0.02459929697215557,
-0.004983504768460989,
-0.0557011142373085,
-0.06229529529809952,
-0.028200548142194748,
0.04809635132551193,
-0.014664963819086552,
0.003014461835846305,
-0.06724830716848373,
-0.020013926550745964,
0.06006326526403427,
-0.05672403797507286,
-0.022519294172525406,
0.012660184875130653,
-0.053484514355659485,
0.018319647759199142,
0.007200070656836033,
0.007650356274098158,
0.003471472067758441,
-0.04563603550195694,
0.016288241371512413,
0.009468191303312778,
0.047178950160741806,
-0.02282542735338211,
0.03619696944952011,
-0.1003706082701683,
0.023374345153570175,
0.0009452792000956833,
0.020042724907398224,
0.016211729496717453,
-0.012189497239887714,
0.05317432060837746,
0.004203733988106251,
-0.010297875851392746,
0.045708123594522476,
0.014068166725337505,
-0.02355354279279709,
0.03771091625094414,
-0.03640363737940788,
-0.012537729926407337,
-0.01753193698823452,
0.061414655297994614,
-0.055956337600946426,
-0.07490299642086029,
-0.01870119571685791,
-0.02722577378153801,
-0.03208712115883827,
0.023656638339161873,
0.04153710976243019,
0.0007118737557902932,
0.013124399818480015,
0.009760215878486633,
0.033789750188589096,
0.05334934964776039,
-0.013542629778385162,
0.05529562011361122,
0.030184859409928322,
0.01907125674188137,
-0.00893609132617712,
-0.03661118075251579,
-0.009315034374594688,
0.03079698048532009,
0.022742507979273796,
-0.037527188658714294,
-0.04118618369102478,
0.03198874369263649,
0.022752923890948296,
-0.04012105613946915,
0.05247258022427559,
-0.01713121496140957,
-0.05260155722498894,
-0.03525680676102638,
0.04588804021477699,
-0.0057134306989610195,
-0.021826617419719696,
0.006962155923247337,
-0.04314040765166283,
-0.002957650925964117,
-0.06488578766584396,
-0.025112906470894814,
0.019612858071923256,
0.03643517196178436,
-0.0058516948483884335,
0.08788665384054184,
0.015783041715621948,
-0.05212089419364929,
0.019365651533007622,
0.0246779415756464,
-0.05962486192584038,
0.06476998329162598,
0.04998069629073143,
0.12292958796024323,
-0.06062976270914078,
-0.049915481358766556,
0.019230058416724205,
-0.011220594868063927,
-0.03174170106649399,
0.01858501322567463,
-0.011491520330309868,
-0.06837499141693115,
-0.024440491572022438,
-0.015691235661506653,
0.05695924535393715,
-0.04080594703555107,
-0.020122811198234558,
0.021108224987983704,
0.0008697519660927355,
0.00816355086863041,
-0.03378300368785858,
-0.010253692977130413,
0.0006302500260062516,
-0.02384774573147297,
-0.0612383708357811,
0.03860742971301079,
0.0019020969048142433,
-0.025821583345532417,
-0.02821839414536953,
-0.025177130475640297,
0.003650158178061247,
0.10091181844472885,
0.01324823871254921,
-0.024724019691348076,
-0.05681358277797699,
0.01541195623576641,
0.01996835134923458,
0.047296732664108276,
-0.020897090435028076,
0.020392389968037605,
0.049475252628326416,
0.07534310966730118,
-0.021651100367307663,
0.06969644874334335,
-0.016180438920855522,
-0.031067777425050735,
-0.037158675491809845,
0.024729833006858826,
-0.014191174879670143,
-0.047261279076337814,
0.016685424372553825,
0.013183964416384697,
-0.021671878173947334,
-0.007599964737892151,
-0.01566779799759388,
0.04136904701590538,
0.01913953199982643,
-0.002860005246475339,
-0.031190332025289536,
0.019483864307403564,
-0.027523478493094444,
0.06818139553070068,
-0.03693351894617081,
-0.004647352267056704,
-0.010372455231845379,
-0.043254416435956955,
-0.01424675714224577,
0.030666900798678398,
0.040385901927948,
0.026903005316853523,
-0.006764280144125223,
0.12015516310930252,
-0.049735717475414276,
-0.0000582541324547492,
-0.04418953135609627,
-0.0340239442884922,
0.027771444991230965,
0.03202063962817192,
0.02838328666985035,
0.035145074129104614,
0.009257425554096699,
-0.026406900957226753,
0.021389465779066086,
0.08028075098991394,
0.02578732930123806,
0.04721391201019287,
-0.003596427384763956,
-0.030686870217323303,
0.04135476052761078,
0.060927167534828186,
-0.054581306874752045,
-0.0429229773581028,
0.03999384865164757,
0.020282354205846786,
-0.014576192013919353,
0.03801640495657921,
-0.011191380210220814,
0.01582997664809227,
-0.04560622200369835,
-0.0571763776242733,
0.04706845059990883,
0.013104562647640705,
-0.000028300784833845682,
0.037390537559986115,
0.0052308267913758755,
-0.004510201048105955,
0.031516022980213165,
0.006851884536445141,
-0.00036674371222034097,
-0.06176132336258888,
0.0030421775300055742,
-0.012697015888988972,
0.060043055564165115,
-0.047777220606803894,
0.04118563234806061,
0.013879846781492233,
0.003796760691329837,
0.06185578554868698,
-0.02184453420341015,
0.01664227806031704,
0.04087918996810913,
0.02645002491772175,
-0.019898060709238052,
0.006716711446642876,
0.0191769041121006,
0.016499463468790054,
0.07819201797246933,
0.007140201050788164,
0.06650086492300034,
0.001501885592006147,
0.05045950785279274,
0.07304833829402924,
0.018596921116113663,
0.012577223591506481,
0.021431107074022293,
0.06399931013584137,
-0.0056305271573364735,
-0.004249534569680691,
0.061825066804885864,
-0.05166610702872276,
0.040868885815143585,
-0.03443029895424843,
0.017773523926734924,
-0.014617347158491611,
-0.011320041492581367,
0.03926786780357361,
0.01200468186289072,
-0.05761600658297539,
-0.0017294829012826085,
-0.03071712516248226,
-0.022668855264782906,
0.005274180322885513,
-0.007515912875533104,
-0.01114561501890421,
0.008072489872574806,
-0.020203495398163795,
0.018405498936772346,
-0.07467551529407501,
-0.04801677539944649,
-0.014699657447636127,
-0.035998955368995667,
0.010441319085657597,
-0.0695379227399826,
-0.047006599605083466,
-0.06865856796503067,
-0.02416769228875637,
0.02697044052183628,
0.005751494783908129,
-0.009134357795119286,
-0.02571837045252323,
0.009000198915600777,
-0.0341373048722744,
-0.030865225940942764,
-0.05641166865825653,
-0.06023458391427994,
-0.010748849250376225,
-0.06305567920207977,
0.03065175749361515,
-0.012706242501735687,
0.020266450941562653,
0.0031970597337931395,
-0.013059678487479687,
-0.029756853356957436,
-0.014966851100325584,
0.07585658878087997,
0.005094587337225676,
-0.01710541918873787,
-0.03523150831460953,
0.010724625550210476,
-0.025476178154349327,
0.038213636726140976,
-0.011989515274763107,
-0.051115479320287704,
0.10201268643140793,
0.0610446035861969,
0.04878566414117813,
-0.006490312051028013,
-0.03482964634895325,
-0.04205164685845375,
-0.032446037977933884,
-0.030063685029745102,
-0.02366291917860508,
-0.025649501010775566,
-0.0029187959153205156,
-0.05225585028529167,
-0.013884512707591057,
-0.02537744678556919,
-0.0526551678776741,
-0.016285859048366547,
0.020970117300748825,
0.024129223078489304,
0.032640330493450165,
0.05634435638785362,
0.011745510622859001,
-0.02931244671344757,
-0.03524647653102875,
0.03881816193461418,
0.0007036083261482418,
0.008266782388091087,
-0.07092307507991791,
-0.034739598631858826,
0.038976188749074936,
0.012344523333013058,
0.006122249644249678,
-0.02203879877924919,
0.04750777408480644,
0.018473343923687935,
0.015097511932253838,
0.012059013359248638,
-0.0020864049438387156,
-0.0222062636166811,
-0.022809067741036415,
-0.009861323051154613,
-0.03222183510661125,
-0.03370293229818344,
-0.010027118027210236,
-0.004024847410619259,
0.04496721550822258,
-0.06320054084062576,
-0.05717632547020912,
-0.006027979776263237,
0.028583455830812454,
0.048514191061258316,
0.02162088081240654,
-0.027941716834902763,
-0.0034721039701253176,
-0.05877183377742767,
-0.03887800872325897,
0.0357147715985775,
0.03201722353696823,
-0.01860838010907173,
0.04434692859649658,
0.053768690675497055,
-0.055928535759449005,
0.028777683153748512,
0.039602264761924744,
0.03971695154905319,
0.02974015846848488,
-0.03532886132597923,
0.009621357545256615,
-0.05504116415977478,
0.03173002973198891,
0.002332507399842143,
-0.03636660426855087,
-0.054578233510255814,
-0.06660065799951553,
-0.033890385180711746,
0.004352236166596413,
-0.02134566940367222,
0.002370869042351842,
0.04383402690291405,
-0.02558247558772564,
-0.04927525296807289,
-0.021460754796862602,
0.00026227915077470243,
0.06759821623563766,
-0.03869456425309181,
0.02712860144674778,
0.008976914919912815,
0.05497143417596817,
-0.04718610271811485,
0.005264849867671728,
-0.02487589232623577,
-0.013886844739317894,
-0.003609709907323122,
0.038525450974702835,
0.019386587664484978,
0.059162408113479614,
0.06950115412473679,
0.005432384088635445,
-0.03785661980509758,
0.04565044865012169,
0.04950609430670738,
0.0048828418366611,
-0.019719088450074196,
0.006685822736471891,
0.008729989640414715,
-0.020322619006037712,
0.019203081727027893,
0.0011143303709104657,
0.015338150784373283,
0.03309788554906845,
0.0035162759013473988,
-0.005894874222576618,
0.004351003561168909,
-0.01086901593953371,
-0.0399799607694149,
-0.04748769477009773,
-0.005552276037633419,
-0.029615627601742744,
-0.0584830604493618,
0.025360137224197388,
0.042523350566625595,
0.032137852162122726,
0.06125267222523689,
0.04510674625635147,
-0.039674680680036545,
-0.022789275273680687,
0.05120953917503357,
0.048851605504751205,
-0.04551471024751663,
-0.038084909319877625,
-0.05064794793725014,
0.038723722100257874,
0.038846589624881744,
-0.010900795459747314,
-0.0919354110956192,
-0.004209725186228752,
0.022458767518401146,
-0.03434479236602783,
0.06367156654596329,
0.01636418327689171,
0.026110446080565453,
0.047002390027046204,
-0.005912575405091047,
0.018304798752069473,
-0.021195361390709877,
0.014219318516552448,
-0.007000039331614971,
0.05426007881760597,
-0.029910380020737648,
-0.02800358086824417,
-0.0359097421169281,
0.023278912529349327,
0.004372527822852135,
0.03599781170487404,
0.0313086099922657,
-0.0038162744604051113,
-0.07646751403808594,
-0.0009424166055396199,
0.026762697845697403,
-0.030460776761174202,
0.015243656001985073,
0.02162809669971466,
0.034421589225530624,
-0.0520109161734581,
-0.018689731135964394,
-0.016230303794145584,
-0.02385789528489113,
0.039238281548023224,
0.005470847245305777,
-0.02587103471159935,
-0.07323309034109116,
0.017253678292036057,
-0.019356653094291687,
-0.029696399345993996,
-0.08089203387498856,
0.04206753149628639,
0.008961543440818787,
-0.003039554925635457,
0.05443928390741348,
0.032073162496089935,
0.020141063258051872,
0.033141471445560455,
-0.011896857991814613,
0.028165515512228012,
-0.019678233191370964,
0.02396686188876629,
-0.0102517856284976,
-0.02184254862368107,
-0.016148969531059265,
-0.06238783895969391,
-0.03689439222216606,
-0.03538304567337036,
-0.05816233903169632,
-0.04305422678589821,
-0.027711423113942146,
0.003271383000537753,
-0.009271173737943172,
-0.010913082398474216,
-0.016315357759594917,
0.01721111498773098,
-0.02159193344414234,
-0.02103668637573719,
-0.021313589066267014,
-0.042891379445791245,
-0.11339057981967926,
-0.02416042797267437,
0.010691224597394466,
0.040118347853422165,
0.04034486040472984,
-0.006760585121810436,
0.011110000312328339,
0.03112327866256237,
-0.002675839699804783,
-0.019151892513036728,
0.018812214955687523,
0.010469569824635983,
-0.038715049624443054,
-0.04427485913038254,
-0.003418195992708206,
0.019320961087942123,
0.013960475102066994,
-0.029077403247356415,
0.005725576542317867,
0.04921909421682358,
-0.0465514212846756,
-0.007094087079167366,
0.04162435978651047,
0.0011741622583940625,
-0.09766074270009995,
-0.03522084280848503,
0.0006522320327349007,
-0.04326196387410164,
0.03500688448548317,
-0.005186253692954779,
-0.015036586672067642,
-0.021898213773965836,
0.01872965134680271,
0.02843213453888893,
0.005770315881818533,
-0.03156500309705734,
-0.00790309440344572,
-0.02700483240187168,
0.04549840837717056,
-0.06085195019841194,
0.05801292136311531,
-0.0368884839117527,
-0.010404497385025024,
-0.01194104366004467,
-0.0022412489634007215,
-0.032401856034994125,
0.05756795033812523,
-0.005172386299818754,
-0.005239209160208702,
-0.00576002337038517,
0.028967276215553284,
-0.010172403417527676,
0.03544825688004494,
-0.0061732190661132336,
0.017676301300525665,
-0.022308479994535446,
0.007379868067800999,
-0.04226861149072647,
0.004137491807341576,
-0.024830402806401253,
-0.026175547391176224,
-0.027939289808273315,
-0.02314128167927265,
-0.012785861268639565,
-0.044279079884290695,
0.05236782878637314,
0.017266012728214264,
0.03977873921394348,
0.0235317163169384,
-0.015798715874552727,
-0.017197702080011368,
0.02354634553194046,
-0.07767043262720108,
-0.04108360409736633,
-0.029858242720365524,
0.017415445297956467,
-0.023224184289574623,
0.06826422363519669,
0.046511005610227585,
-0.05444005876779556,
-0.008301036432385445,
0.009660112671554089,
-0.0007309492211788893,
0.0016641321126371622,
0.022463630884885788,
0.0015395679511129856,
0.0481613427400589,
0.03986261412501335,
-0.04270962253212929,
-0.001626672688871622,
-0.008626318536698818,
-0.014057018794119358,
-0.015128077007830143,
-0.01362666580826044,
0.028339065611362457,
-0.007468854542821646,
-0.0369006022810936,
-0.020856954157352448,
0.05259101465344429,
0.05776911601424217,
0.02825535461306572,
-0.004687749780714512,
-0.029732517898082733,
0.028938021510839462,
0.019552526995539665,
-0.04578540101647377,
-0.03710133954882622,
0.010415326803922653,
-0.05566678196191788,
0.08516640961170197,
0.0014252826804295182,
0.014052582904696465,
0.0279181320220232,
0.017428413033485413,
0.007244379725307226,
0.031237799674272537,
-0.02906038425862789,
-0.008500158786773682,
0.04323415458202362,
-0.05228186398744583,
0.0017086060252040625,
-0.01585029810667038,
0.061264827847480774,
-0.048373717814683914,
0.04618273302912712,
0.03687724843621254,
0.020849458873271942,
-0.0164794959127903,
-0.018820203840732574,
-0.05654482915997505,
0.04823145642876625,
-0.06626195460557938,
0.06371418386697769,
-0.017656270414590836,
-0.0801004096865654,
0.08513558655977249,
0.03733297437429428,
-0.09520747512578964,
-0.0005625214544124901,
0.03500404953956604,
0.02603929303586483,
0.03864218667149544,
0.04289573058485985,
-0.08579780906438828,
-0.00132924469653517,
-0.03555034101009369,
0.010197598487138748,
-0.05945355072617531,
-0.010046042501926422,
0.03652919456362724,
-0.05302197486162186,
0.0018677072366699576,
0.03469601646065712,
-0.02504821866750717,
0.011635897681117058,
0.020267903804779053,
-0.03713071346282959,
-0.030917441472411156,
-0.03257448598742485,
0.01185589749366045,
-0.028147507458925247,
0.021518629044294357,
-0.01798623986542225,
0.02549069933593273,
0.021897602826356888,
-0.002220690017566085,
-0.05119408294558525,
0.014667265117168427,
0.020794766023755074,
-0.04357144609093666,
-0.028988458216190338,
0.00950374361127615,
0.013373972848057747,
-0.01142945047467947,
0.037254199385643005,
-0.01382356695830822,
0.019714342430233955,
0.031171340495347977,
-0.0297775249928236,
0.022545285522937775,
-0.036238059401512146,
0.0014288235688582063,
0.012368258088827133,
-0.0036208697129040956,
0.028966398909687996,
-0.008834891021251678,
0.04054393246769905,
0.02819058485329151,
0.04123562574386597,
-0.027772143483161926,
-0.019228793680667877,
-0.01679248735308647,
0.017740819603204727,
-0.043949831277132034,
0.024595243856310844,
0.025452125817537308,
-0.03071419522166252,
-0.035137634724378586,
-0.0399550199508667,
-0.01947055198252201,
0.04777500405907631,
-0.03520486503839493,
0.016803069040179253,
0.048943184316158295,
-0.016157841309905052,
-0.045630570501089096,
-0.07758647948503494,
-0.005451152101159096,
-0.026290779933333397,
0.024120265617966652,
0.01906062848865986,
-0.03165903687477112,
-0.01230598334223032,
-0.04768834635615349,
-0.06928086280822754,
0.054268233478069305,
0.02829093299806118,
-0.019043976441025734,
0.04666865989565849,
0.02548755705356598,
-0.016401777043938637,
0.0015449320198968053,
0.022529013454914093,
-0.05162239819765091,
0.017675140872597694,
0.006493553519248962,
0.023169931024312973,
0.04497820511460304,
0.042910121381282806,
-0.013582581654191017,
-0.03736355900764465,
-0.05612906441092491,
-0.03776208311319351,
-0.02977800741791725,
-0.0014390506548807025,
0.07583646476268768
] |
Cameron/BERT-mdgender-convai-ternary | [
"pytorch",
"jax",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 38 | 2020-11-26T14:37:12Z | ---
tags:
- summarization
widget:
- text: "parse the uses licence node of this package , if any , and returns the license definition if theres"
---
# CodeTrans model for api recommendation generation
Pretrained model for api recommendation generation using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on Api Recommendation Generation dataset.
## Intended uses & limitations
The model could be used to generate api usage for the java programming tasks.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_api_generation"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_api_generation", skip_special_tokens=True),
device=0
)
tokenized_code = "parse the uses licence node of this package , if any , and returns the license definition if theres"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/api%20generation/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 68.71 |
| CodeTrans-ST-Base | 70.45 |
| CodeTrans-TF-Small | 68.90 |
| CodeTrans-TF-Base | 72.11 |
| CodeTrans-TF-Large | 73.26 |
| CodeTrans-MT-Small | 58.43 |
| CodeTrans-MT-Base | 67.97 |
| CodeTrans-MT-Large | 72.29 |
| CodeTrans-MT-TF-Small | 69.29 |
| CodeTrans-MT-TF-Base | 72.89 |
| CodeTrans-MT-TF-Large | **73.39** |
| State of the art | 54.42 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0250205360352993,
-0.016905661672353745,
0.004353303462266922,
0.03790013864636421,
0.03193359822034836,
0.016187535598874092,
-0.025765078142285347,
0.0029827160760760307,
-0.018995048478245735,
0.06339115649461746,
0.05456604063510895,
0.003980372566729784,
-0.01590278372168541,
0.03167405724525452,
-0.04129204899072647,
-0.051649656146764755,
-0.004283237271010876,
-0.02959606423974037,
-0.03362599387764931,
-0.007579432334750891,
0.006040831562131643,
-0.018756048753857613,
-0.0076380325481295586,
0.010590570978820324,
-0.030636584386229515,
0.0035656618420034647,
0.008876805193722248,
0.026413071900606155,
0.023838544264435768,
-0.07157161831855774,
-0.03445659577846527,
-0.011842726729810238,
-0.026265623047947884,
-0.021488487720489502,
-0.02356668934226036,
0.032685328274965286,
0.02041463553905487,
0.023355644196271896,
0.037966933101415634,
0.05893043801188469,
0.013145212084054947,
0.024483896791934967,
0.016236472874879837,
-0.0312570221722126,
0.053193192929029465,
-0.0003398381231818348,
-0.033815283328294754,
-0.022866658866405487,
0.024698639288544655,
-0.0253516286611557,
-0.07411717623472214,
-0.06508796662092209,
-0.028169384226202965,
0.03558111935853958,
-0.008897367864847183,
-0.01525366771966219,
-0.053006015717983246,
-0.034612759947776794,
0.0429777167737484,
-0.06760238856077194,
-0.0296399537473917,
0.022033005952835083,
-0.0757160410284996,
0.013663914054632187,
0.024784447625279427,
-0.026908647269010544,
0.0000025636643385951174,
-0.04748249426484108,
0.03182098641991615,
-0.0228281207382679,
0.06122514605522156,
-0.04022318869829178,
0.02501499280333519,
-0.09129030257463455,
0.006741538643836975,
-0.017328767105937004,
0.006747381761670113,
0.02085142396390438,
-0.004989112261682749,
0.03333623707294464,
-0.0035286080092191696,
0.0037198697682470083,
0.04501931369304657,
0.02090548165142536,
0.0019736054819077253,
0.041426192969083786,
-0.024849485605955124,
-0.0068442863412201405,
-0.02621385082602501,
0.053300485014915466,
-0.05622927471995354,
-0.07704472541809082,
-0.0031603164970874786,
-0.027247149497270584,
-0.04110189899802208,
0.01599833369255066,
0.03865297511219978,
-0.01511723455041647,
0.021488064900040627,
0.004170501139014959,
0.048892512917518616,
0.055724795907735825,
-0.029417432844638824,
0.056362565606832504,
0.01917048916220665,
0.00004096649354323745,
0.0000287714628939284,
-0.04644351080060005,
-0.044573862105607986,
0.058365482836961746,
0.009183312766253948,
-0.0263015478849411,
-0.0472416877746582,
0.03860277310013771,
0.020820099860429764,
-0.035153578966856,
0.04782509058713913,
-0.019390802830457687,
-0.045084428042173386,
-0.04007435590028763,
0.05063476413488388,
0.003136442741379142,
-0.00626664562150836,
0.0028689512982964516,
-0.03522718325257301,
0.01820342242717743,
-0.06016085669398308,
-0.04155493155121803,
0.008914858102798462,
0.022331219166517258,
-0.02117970585823059,
0.09041433036327362,
0.01001335121691227,
-0.04462911933660507,
0.0010859101312234998,
0.033594515174627304,
-0.05898776277899742,
0.07538321614265442,
0.03966628387570381,
0.11021272093057632,
-0.07880830764770508,
-0.03844413161277771,
0.027860218659043312,
0.012334593571722507,
-0.012437515892088413,
0.01448614988476038,
-0.012333912774920464,
-0.05591130256652832,
-0.03143575042486191,
-0.006234684959053993,
0.05366361141204834,
-0.043141938745975494,
-0.01987488754093647,
0.033716678619384766,
0.007097445894032717,
0.023430341854691505,
-0.031570419669151306,
-0.0013804440386593342,
-0.005089011043310165,
-0.018203003332018852,
-0.051530417054891586,
0.021989548578858376,
-0.004867918789386749,
-0.023430287837982178,
-0.033150140196084976,
-0.02549806796014309,
-0.002193920314311981,
0.09031223505735397,
0.009594026021659374,
-0.023531505838036537,
-0.041473422199487686,
0.0020097466185688972,
0.03296085447072983,
0.029162732884287834,
-0.030072513967752457,
0.026415349915623665,
0.04190349578857422,
0.05730976536870003,
-0.02698097750544548,
0.06725195050239563,
-0.018118349835276604,
-0.032459232956171036,
-0.03062516637146473,
-0.0002609396178741008,
-0.0029263566248118877,
-0.037464793771505356,
0.012165842577815056,
0.02508975751698017,
-0.012229613959789276,
-0.019206322729587555,
-0.016141362488269806,
0.06332342326641083,
0.01146472804248333,
-0.014948409050703049,
-0.03516705706715584,
0.029588177800178528,
-0.007495353929698467,
0.060949716717004776,
-0.02357771433889866,
-0.013349284417927265,
-0.014513012021780014,
-0.031174158677458763,
0.003678469453006983,
0.0451052263379097,
0.047351546585559845,
0.01905258372426033,
-0.0034304186701774597,
0.09319473803043365,
-0.03195545822381973,
0.004709851928055286,
-0.03974929824471474,
-0.043989475816488266,
0.003442776156589389,
0.04685249552130699,
0.02088775672018528,
0.042070019990205765,
0.0020071957260370255,
-0.025140905752778053,
0.008856651373207569,
0.0762963518500328,
0.05134005844593048,
0.022390881553292274,
-0.020118165761232376,
-0.026219073683023453,
0.06044301763176918,
0.06414401531219482,
-0.04703674092888832,
-0.05023921653628349,
0.04168811812996864,
0.057034797966480255,
-0.014336380176246166,
0.016838697716593742,
-0.0028217462822794914,
0.013162806630134583,
-0.0726817324757576,
-0.059558965265750885,
0.030797766521573067,
0.009327752515673637,
0.009360536932945251,
0.02928289584815502,
0.002947039669379592,
-0.014747366309165955,
0.03533681482076645,
0.010176075622439384,
0.008755180984735489,
-0.060643114149570465,
0.02146114595234394,
0.014138774015009403,
0.055514752864837646,
-0.03867068514227867,
0.045818131417036057,
-0.0005609482177533209,
0.0028549334965646267,
0.03321969881653786,
-0.00998868141323328,
0.02651280164718628,
0.03097887896001339,
0.03203626349568367,
-0.0073990304954349995,
0.029621895402669907,
0.018693283200263977,
0.02637072093784809,
0.08232464641332626,
0.012208361178636551,
0.06961547583341599,
0.008110527880489826,
0.045278068631887436,
0.06296571344137192,
0.014834685251116753,
0.005817486438900232,
0.021001286804676056,
0.0662725567817688,
0.002550473902374506,
-0.003971281927078962,
0.07620107382535934,
-0.07342827320098877,
0.03555317968130112,
-0.040221065282821655,
0.022698672488331795,
-0.007089452352374792,
-0.009078054688870907,
0.06333977729082108,
0.01748638227581978,
-0.03320189565420151,
0.01159847155213356,
-0.03897280991077423,
-0.008895184844732285,
-0.0016959782224148512,
-0.0066097271628677845,
-0.004573236219584942,
0.001071962877176702,
-0.018630672246217728,
0.01607638970017433,
-0.07779035717248917,
-0.05213714390993118,
-0.018654227256774902,
-0.03343399986624718,
-0.009141715243458748,
-0.07523123919963837,
-0.05220579728484154,
-0.06731785833835602,
-0.022975044324994087,
0.057282980531454086,
0.02075093425810337,
0.0006696002674289048,
-0.04690263420343399,
0.014127309434115887,
-0.011504958383738995,
-0.019471148028969765,
-0.04980699345469475,
-0.06509651988744736,
-0.024021456018090248,
-0.06932460516691208,
0.043032970279455185,
-0.01171372551470995,
0.01384385023266077,
0.005267716944217682,
-0.018955478444695473,
-0.022244488820433617,
-0.03519003093242645,
0.06964857131242752,
0.02355329692363739,
-0.0014826682163402438,
-0.00948677770793438,
0.01833578757941723,
-0.02030916139483452,
0.032599903643131256,
-0.00707216514274478,
-0.03481242060661316,
0.10573167353868484,
0.04086723551154137,
0.02056584693491459,
-0.008759420365095139,
-0.035952068865299225,
-0.04421117156744003,
-0.034736886620521545,
-0.01236294861882925,
-0.030426479876041412,
-0.02279437519609928,
-0.02854810655117035,
-0.056650806218385696,
-0.016921138390898705,
-0.04705803096294403,
-0.037047576159238815,
-0.023284507915377617,
0.016646483913064003,
0.024130942299962044,
0.05827784538269043,
0.06992056965827942,
0.025936568155884743,
-0.0016495648305863142,
-0.03855564817786217,
0.04085100442171097,
0.018094057217240334,
-0.012194951064884663,
-0.07544154673814774,
-0.03683490678668022,
0.0300498828291893,
0.025370821356773376,
0.003991581033915281,
-0.02306828461587429,
0.06137828156352043,
0.019325437024235725,
-0.0037898398004472256,
0.020790422335267067,
-0.005864807870239019,
-0.018375800922513008,
-0.023857662454247475,
-0.008984648622572422,
-0.03235851973295212,
-0.027131441980600357,
-0.044011835008859634,
-0.03259574621915817,
0.028809519484639168,
-0.05662916228175163,
-0.05567274987697601,
0.014169218949973583,
0.03611890971660614,
0.019947288557887077,
0.010561894625425339,
-0.03094778209924698,
-0.01266804151237011,
-0.06456305086612701,
-0.04594668000936508,
0.046137209981679916,
0.012408345937728882,
0.005105726886540651,
0.01832314021885395,
0.030086318030953407,
-0.03892813250422478,
0.03334996476769447,
0.014893177896738052,
0.04262232407927513,
0.024009278044104576,
-0.05657915025949478,
0.014456091448664665,
-0.030475175008177757,
0.019289597868919373,
0.0017332442803308368,
-0.021986061707139015,
-0.050032492727041245,
-0.07870062440633774,
-0.01780431717634201,
0.009816369041800499,
-0.010637260042130947,
-0.008773733861744404,
0.0528385266661644,
-0.013421345502138138,
-0.01975959539413452,
0.002110864035785198,
0.020094573497772217,
0.052538130432367325,
-0.037208009511232376,
0.04332946613430977,
-0.009735633619129658,
0.06503185629844666,
-0.037902530282735825,
-0.006238104309886694,
-0.037748679518699646,
-0.03573331609368324,
0.021820805966854095,
0.02481989935040474,
0.017299313098192215,
0.05088066682219505,
0.0812176838517189,
0.024612899869680405,
-0.04454736411571503,
0.04440142214298248,
0.06270774453878403,
-0.0008643046021461487,
-0.0341981016099453,
-0.007613644003868103,
-0.014050890691578388,
-0.02354331687092781,
0.014880728907883167,
-0.024000151082873344,
0.04299082234501839,
0.023370837792754173,
-0.02671770565211773,
-0.0009602107456885278,
-0.013712172396481037,
-0.031802594661712646,
-0.05033671855926514,
-0.057444844394922256,
-0.018487606197595596,
-0.026454126462340355,
-0.06135265529155731,
0.012674132362008095,
0.05221155658364296,
0.044219475239515305,
0.04940517246723175,
0.03299911692738533,
-0.05199986696243286,
-0.052129317075014114,
0.02805374562740326,
0.05543677508831024,
-0.052219826728105545,
-0.03962055966258049,
-0.049694374203681946,
0.021502064540982246,
0.028438851237297058,
-0.037088543176651,
-0.08819945901632309,
0.03351138159632683,
0.021962476894259453,
-0.02789718471467495,
0.08056790381669998,
0.02854328416287899,
0.010757063515484333,
0.06286247074604034,
-0.008464603684842587,
0.022697756066918373,
-0.012944727204740047,
0.0014704099157825112,
0.005899996962398291,
0.06053141504526138,
-0.042052969336509705,
-0.0366474874317646,
-0.05103735998272896,
0.028307124972343445,
0.017092812806367874,
0.05290521681308746,
0.016925547271966934,
-0.011731189675629139,
-0.06933155655860901,
-0.015121015720069408,
0.0247659794986248,
0.0032921202946454287,
0.0025278630200773478,
0.03970064967870712,
0.050445057451725006,
-0.04868774488568306,
-0.02520870231091976,
0.0011978630209341645,
-0.02901994250714779,
0.03810035437345505,
-0.012196329422295094,
-0.013979335315525532,
-0.05581602081656456,
0.01506040245294571,
0.000497500819619745,
-0.015407782047986984,
-0.09742960333824158,
0.0473957359790802,
0.018779240548610687,
-0.00476839067414403,
0.05142182856798172,
0.033910755068063736,
0.001937604509294033,
0.049340326339006424,
-0.010191120207309723,
0.021017588675022125,
-0.03173721954226494,
0.03062121942639351,
-0.02983820252120495,
-0.023725464940071106,
-0.01750895194709301,
-0.06966700404882431,
-0.02236899919807911,
-0.033560726791620255,
-0.027058260515332222,
-0.035930898040533066,
-0.02667824923992157,
-0.0021533011458814144,
-0.01576068624854088,
-0.010575644671916962,
0.007785259746015072,
0.018717274069786072,
-0.042179305106401443,
-0.02575627528131008,
-0.025251882150769234,
-0.04499160498380661,
-0.10600977391004562,
-0.01616475358605385,
0.02101491391658783,
0.02463947981595993,
0.043816860765218735,
-0.0010311419609934092,
0.009398034773766994,
0.029592113569378853,
0.010839797556400299,
-0.03281593322753906,
0.024124201387166977,
0.016176408156752586,
-0.035871732980012894,
-0.022071443498134613,
0.001860668184235692,
-0.00005553290247917175,
-0.0017513734055683017,
-0.01673860102891922,
-0.010627376846969128,
0.022904984652996063,
-0.008403145708143711,
0.004086241591721773,
0.01687537506222725,
0.0029351471457630396,
-0.06979867815971375,
-0.015271998941898346,
0.0003699536027852446,
-0.04759160801768303,
0.02209334634244442,
0.010880979709327221,
-0.03285042569041252,
0.005609358195215464,
-0.009380735456943512,
0.029053889214992523,
-0.0030209629330784082,
-0.03845009580254555,
-0.005020901560783386,
-0.039833880960941315,
0.03356587886810303,
-0.06757684051990509,
0.05064624175429344,
-0.027200618758797646,
-0.000495159940328449,
-0.02051880769431591,
-0.010242066346108913,
-0.043042927980422974,
0.07419636845588684,
0.001942210248671472,
0.005183265078812838,
-0.007391573395580053,
0.03687593713402748,
-0.026009155437350273,
0.03708551079034805,
-0.011043136939406395,
0.012508226558566093,
-0.02563413977622986,
0.019040782004594803,
-0.031229417771100998,
0.01604258082807064,
-0.026779936626553535,
-0.008509784005582333,
-0.019068071618676186,
-0.03815380483865738,
-0.02402314729988575,
-0.04126923903822899,
0.03459279239177704,
0.05207644775509834,
0.02819000370800495,
0.021339092403650284,
-0.0018779595848172903,
-0.022728128358721733,
0.013645917177200317,
-0.07570316642522812,
-0.03019658289849758,
-0.02514391951262951,
0.01045204047113657,
-0.014037041924893856,
0.0562211349606514,
0.04224853962659836,
-0.04290183261036873,
-0.0274809580296278,
0.026813672855496407,
0.0026464785914868116,
0.002164715901017189,
0.008763520047068596,
0.027789173647761345,
0.03713877871632576,
0.04066989943385124,
-0.06614896655082703,
0.013941500335931778,
0.008901943452656269,
-0.004570792894810438,
-0.011237166821956635,
-0.015408744104206562,
0.017932943999767303,
-0.02113247476518154,
-0.05505618825554848,
-0.016265057027339935,
0.04914086312055588,
0.03961828351020813,
0.03125973790884018,
0.016792835667729378,
-0.05140886828303337,
0.018323777243494987,
-0.0037165877874940634,
-0.0410272553563118,
-0.036932967603206635,
0.018321502953767776,
-0.05062735453248024,
0.07270687818527222,
-0.021628834307193756,
0.010091102682054043,
0.029543830081820488,
0.021803684532642365,
-0.0004757666611112654,
0.04593024402856827,
-0.04127626493573189,
-0.012545060366392136,
0.048858098685741425,
-0.027953803539276123,
-0.013667411170899868,
-0.005219463258981705,
0.05959885194897652,
-0.041824400424957275,
0.05558817461133003,
0.012980081140995026,
0.009087438695132732,
-0.006601833738386631,
-0.02231772243976593,
-0.06123162806034088,
0.025634657591581345,
-0.054187145084142685,
0.06447841972112656,
0.002865942195057869,
-0.08550237119197845,
0.06722535938024521,
0.03790489211678505,
-0.10057464241981506,
-0.0032015934120863676,
0.03500274941325188,
0.02124878577888012,
0.03538672998547554,
0.03860172629356384,
-0.06135532259941101,
0.0018759005470201373,
-0.055076152086257935,
0.025595523416996002,
-0.05089357867836952,
-0.017933795228600502,
0.015514529310166836,
-0.05181775614619255,
-0.020640121772885323,
0.032450854778289795,
-0.011917575262486935,
0.004975451622158289,
0.010421114973723888,
-0.04343963786959648,
-0.04036615416407585,
-0.027426011860370636,
0.030879979953169823,
-0.026484066620469093,
0.022535575553774834,
-0.02628389559686184,
0.04783658683300018,
0.009674002416431904,
0.00765541335567832,
-0.029440708458423615,
0.007579523604363203,
0.01401166059076786,
-0.04120181128382683,
-0.04396451264619827,
0.03147433325648308,
0.0134367560967803,
-0.020141327753663063,
0.02957417629659176,
-0.013900977559387684,
0.02534095197916031,
0.04131581634283066,
-0.025608807802200317,
0.01202403474599123,
-0.04273953288793564,
0.00042276890599168837,
0.010152003727853298,
0.0038477471098303795,
0.025678914040327072,
-0.01320727914571762,
0.02682880312204361,
0.03501293808221817,
0.03568379580974579,
-0.016948167234659195,
-0.00013190893514547497,
-0.001212840317748487,
0.03045063279569149,
-0.03642111271619797,
0.019490951672196388,
0.012756166979670525,
-0.043446432799100876,
-0.05540880188345909,
-0.048983946442604065,
-0.05405297875404358,
0.052610985934734344,
-0.047011155635118484,
0.030624641105532646,
0.05220746994018555,
-0.011047734878957272,
-0.05194973945617676,
-0.08326686918735504,
0.0012355567887425423,
-0.014650367200374603,
0.022479988634586334,
0.03393144533038139,
-0.022462867200374603,
-0.004984680097550154,
-0.046522945165634155,
-0.062482330948114395,
0.02969108149409294,
0.025293780490756035,
-0.021022791042923927,
0.05082160234451294,
0.033546168357133865,
-0.011007656343281269,
0.01011219434440136,
0.012252469547092915,
-0.050462957471609116,
0.009666131809353828,
0.01688556931912899,
0.03357093781232834,
0.0382910780608654,
0.03829415515065193,
-0.03252008557319641,
-0.022883931174874306,
-0.050111282616853714,
-0.02938518114387989,
-0.04127609729766846,
-0.009265207685530186,
0.0779920443892479
] |
Cameron/BERT-rtgender-opgender-annotations | [
"pytorch",
"jax",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 33 | 2020-12-10T14:28:22Z | ---
tags:
- summarization
widget:
- text: "parse the uses licence node of this package , if any , and returns the license definition if theres"
---
# CodeTrans model for api recommendation generation
Pretrained model for api recommendation generation using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the api recommendation generation task for the java apis.
## Intended uses & limitations
The model could be used to generate api usage for the java programming tasks.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_api_generation_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_api_generation_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "parse the uses licence node of this package , if any , and returns the license definition if theres"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/api%20generation/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 1,150,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing api recommendation generation data.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 68.71 |
| CodeTrans-ST-Base | 70.45 |
| CodeTrans-TF-Small | 68.90 |
| CodeTrans-TF-Base | 72.11 |
| CodeTrans-TF-Large | 73.26 |
| CodeTrans-MT-Small | 58.43 |
| CodeTrans-MT-Base | 67.97 |
| CodeTrans-MT-Large | 72.29 |
| CodeTrans-MT-TF-Small | 69.29 |
| CodeTrans-MT-TF-Base | 72.89 |
| CodeTrans-MT-TF-Large | **73.39** |
| State of the art | 54.42 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.023019343614578247,
-0.01904306188225746,
0.0032079839147627354,
0.03453023359179497,
0.033452052623033524,
0.020190665498375893,
-0.02599855698645115,
0.0008670628885738552,
-0.015468508936464787,
0.06388705223798752,
0.056149136275053024,
0.006632345728576183,
-0.014213847927749157,
0.032249677926301956,
-0.04037521779537201,
-0.05255937576293945,
-0.002432763809338212,
-0.031732089817523956,
-0.033153727650642395,
-0.006663710344582796,
0.011640018783509731,
-0.01791074313223362,
-0.003292000386863947,
0.010263299569487572,
-0.026520483195781708,
0.002841147594153881,
0.008906778879463673,
0.028961027041077614,
0.022131694480776787,
-0.07522120326757431,
-0.03698829561471939,
-0.012255108915269375,
-0.026206186041235924,
-0.02208380587399006,
-0.021200528368353844,
0.0378703735768795,
0.02209584228694439,
0.02762497216463089,
0.03754240274429321,
0.057578302919864655,
0.014686173759400845,
0.02158806473016739,
0.012679541483521461,
-0.030885668471455574,
0.053947530686855316,
0.001008442952297628,
-0.03242941200733185,
-0.024450931698083878,
0.024104243144392967,
-0.024735040962696075,
-0.07258724421262741,
-0.06483930349349976,
-0.02990126796066761,
0.036165475845336914,
-0.01110333576798439,
-0.010965676978230476,
-0.053371064364910126,
-0.039545927196741104,
0.04183219000697136,
-0.06766575574874878,
-0.032325513660907745,
0.023385394364595413,
-0.07392489910125732,
0.012237479910254478,
0.02156745456159115,
-0.028678879141807556,
-0.00008037849329411983,
-0.048018187284469604,
0.032259661704301834,
-0.020991502329707146,
0.0634608268737793,
-0.039391785860061646,
0.023931067436933517,
-0.09190898388624191,
0.006813035346567631,
-0.01723792962729931,
0.00897704716771841,
0.01730065606534481,
-0.005333535373210907,
0.02677103690803051,
-0.006314157973974943,
0.006234940607100725,
0.04609664902091026,
0.01845373772084713,
-0.0006053709075786173,
0.04044007137417793,
-0.025562863796949387,
-0.006954601965844631,
-0.02497483231127262,
0.05408371612429619,
-0.05597495660185814,
-0.0766913965344429,
-0.0032816887833178043,
-0.023748885840177536,
-0.04538123682141304,
0.018487589433789253,
0.039964452385902405,
-0.016510803252458572,
0.01980207860469818,
0.004536129999905825,
0.04853341728448868,
0.05497030168771744,
-0.028918692842125893,
0.05467731133103371,
0.019730664789676666,
0.0003466318885330111,
-0.000654771167319268,
-0.0469837412238121,
-0.04380180314183235,
0.05905302241444588,
0.009724387899041176,
-0.027801070362329483,
-0.047653138637542725,
0.03732364624738693,
0.020228752866387367,
-0.03397973254323006,
0.04839049279689789,
-0.01965193636715412,
-0.03893536701798439,
-0.04401734471321106,
0.04749587923288345,
0.003702012822031975,
-0.007985993288457394,
0.007904174737632275,
-0.0324736051261425,
0.016737019643187523,
-0.060283806174993515,
-0.041980963200330734,
0.009065402671694756,
0.01915811002254486,
-0.025766706094145775,
0.09401687234640121,
0.01443125493824482,
-0.04605255275964737,
0.005937248934060335,
0.03325347974896431,
-0.058094728738069534,
0.07560992240905762,
0.041651807725429535,
0.1085280030965805,
-0.07903707027435303,
-0.03752804920077324,
0.026440536603331566,
0.01716781035065651,
-0.01208456326276064,
0.0177127867937088,
-0.013051431626081467,
-0.05824756249785423,
-0.025742877274751663,
-0.004475723020732403,
0.0528855063021183,
-0.04367261752486229,
-0.019445234909653664,
0.0325445756316185,
0.008920720778405666,
0.020337121561169624,
-0.029534436762332916,
-0.003830466652289033,
-0.005173812620341778,
-0.020575745031237602,
-0.05379098281264305,
0.022812997922301292,
-0.0027407968882471323,
-0.02978549152612686,
-0.033245909959077835,
-0.02477252669632435,
-0.0017285743961110711,
0.09035284072160721,
0.010142643935978413,
-0.024697765707969666,
-0.0385235995054245,
0.00353026925586164,
0.03444846719503403,
0.027252081781625748,
-0.02965707518160343,
0.03024681843817234,
0.041817303746938705,
0.05995476245880127,
-0.027649084106087685,
0.06841452419757843,
-0.017119064927101135,
-0.02917776256799698,
-0.03200593590736389,
0.0006884817848913372,
-0.004498777911067009,
-0.040225137025117874,
0.00950329564511776,
0.022036615759134293,
-0.0166213009506464,
-0.018093029037117958,
-0.018795378506183624,
0.059008724987506866,
0.010121560655534267,
-0.018874842673540115,
-0.03440983593463898,
0.029795290902256966,
-0.006063634529709816,
0.059399623423814774,
-0.0238792821764946,
-0.011166861280798912,
-0.011642619036138058,
-0.03066851571202278,
0.002108158078044653,
0.04281467944383621,
0.048207104206085205,
0.02193225733935833,
-0.0011024272534996271,
0.08998072147369385,
-0.029939396306872368,
0.0038827601820230484,
-0.039222899824380875,
-0.043144870549440384,
0.007278540637344122,
0.048935774713754654,
0.02104414813220501,
0.03856906667351723,
-0.00009008344204630703,
-0.021471219137310982,
0.007361788768321276,
0.07347150892019272,
0.049931760877370834,
0.02225508913397789,
-0.024744290858507156,
-0.026583746075630188,
0.062194470316171646,
0.06295681744813919,
-0.045388661324977875,
-0.051780495792627335,
0.04264146834611893,
0.058973029255867004,
-0.01634988933801651,
0.019734159111976624,
-0.004757375922054052,
0.011047464795410633,
-0.06841466575860977,
-0.05869234353303909,
0.0294636320322752,
0.009674664586782455,
0.005981228314340115,
0.025364339351654053,
0.005319146439433098,
-0.01280286256223917,
0.03698364272713661,
0.007409344427287579,
0.008867050521075726,
-0.06222125515341759,
0.017290668562054634,
0.01218187902122736,
0.05927019938826561,
-0.03954664617776871,
0.047857459634542465,
0.002310921438038349,
0.005377371329814196,
0.038837969303131104,
-0.013158412650227547,
0.025511829182505608,
0.029537923634052277,
0.030275855213403702,
-0.005946691147983074,
0.029090499505400658,
0.02203015424311161,
0.031378187239170074,
0.08475429564714432,
0.011520951986312866,
0.0712956041097641,
0.005411130376160145,
0.04332295432686806,
0.0593615397810936,
0.015492254868149757,
0.006789529696106911,
0.0205529872328043,
0.061527010053396225,
0.007245417684316635,
-0.0050721680745482445,
0.07492592185735703,
-0.0774308443069458,
0.03363621234893799,
-0.03650728613138199,
0.022893918678164482,
-0.0055450149811804295,
-0.008596549741923809,
0.06315029412508011,
0.014924258925020695,
-0.03199608996510506,
0.013081497512757778,
-0.03898558393120766,
-0.014994315803050995,
-0.00043064120109193027,
-0.007531605660915375,
-0.00572331715375185,
0.001275650574825704,
-0.01657831110060215,
0.014154690317809582,
-0.07950843870639801,
-0.04995882138609886,
-0.016881108283996582,
-0.0352434441447258,
-0.008363405242562294,
-0.0733349397778511,
-0.05551011487841606,
-0.06438544392585754,
-0.02303939126431942,
0.05849509686231613,
0.020053358748555183,
-0.002571259858086705,
-0.04487135633826256,
0.015487629920244217,
-0.014799974858760834,
-0.017456024885177612,
-0.05133804306387901,
-0.06924968957901001,
-0.025256773456931114,
-0.07123574614524841,
0.0383346788585186,
-0.015010896138846874,
0.0106699513271451,
0.0055888136848807335,
-0.01866946741938591,
-0.02324867434799671,
-0.03552207350730896,
0.0723406970500946,
0.019148485735058784,
0.0018918405985459685,
-0.007036399561911821,
0.016536839306354523,
-0.022714322432875633,
0.033724941313266754,
-0.007523252163082361,
-0.038654860109090805,
0.10776399075984955,
0.03856160119175911,
0.02224143221974373,
-0.01085994765162468,
-0.03609587997198105,
-0.04714544117450714,
-0.03949282318353653,
-0.01329829916357994,
-0.035859715193510056,
-0.023589616641402245,
-0.028277384117245674,
-0.05523081496357918,
-0.01931077055633068,
-0.04609552398324013,
-0.035595640540122986,
-0.02159946784377098,
0.014741441234946251,
0.023716727271676064,
0.05598805472254753,
0.0689517930150032,
0.023086316883563995,
-0.008337481878697872,
-0.03645344078540802,
0.03939450532197952,
0.016714639961719513,
-0.011985436081886292,
-0.07928017526865005,
-0.03464982286095619,
0.02933315746486187,
0.02643999643623829,
0.0016583906253799796,
-0.02243708446621895,
0.05998653173446655,
0.0206746906042099,
-0.004530363716185093,
0.023036904633045197,
-0.008660419844090939,
-0.011738180182874203,
-0.026566501706838608,
-0.005163811147212982,
-0.03289454057812691,
-0.02624640055000782,
-0.042545124888420105,
-0.028283873572945595,
0.028603961691260338,
-0.05423961579799652,
-0.05593603104352951,
0.01283975224941969,
0.03645177558064461,
0.020332954823970795,
0.013269863091409206,
-0.03100551851093769,
-0.013586792163550854,
-0.06528905034065247,
-0.047841355204582214,
0.046983469277620316,
0.015300619415938854,
0.0021030560601502657,
0.02082095667719841,
0.026828818023204803,
-0.04234478622674942,
0.03197136148810387,
0.015200059860944748,
0.03988051414489746,
0.027678832411766052,
-0.05363093689084053,
0.016173597425222397,
-0.032285530120134354,
0.015705741941928864,
0.005639113485813141,
-0.022983988747000694,
-0.052375152707099915,
-0.0773860290646553,
-0.017969803884625435,
0.011405030265450478,
-0.008080419152975082,
-0.007033186033368111,
0.05560752749443054,
-0.014686142094433308,
-0.017470156773924828,
0.004217098001390696,
0.021734153851866722,
0.05294845625758171,
-0.033232368528842926,
0.04268801957368851,
-0.010861529968678951,
0.06260368227958679,
-0.0365695022046566,
-0.005010861903429031,
-0.032593902200460434,
-0.03433460742235184,
0.021889451891183853,
0.023481568321585655,
0.02162722498178482,
0.05395251512527466,
0.08172919601202011,
0.02922256477177143,
-0.04299191012978554,
0.03947925195097923,
0.06424218416213989,
-0.0025042686611413956,
-0.032911211252212524,
-0.010409248992800713,
-0.017165282741189003,
-0.022015051916241646,
0.01466444879770279,
-0.023442590609192848,
0.04532550275325775,
0.02144053392112255,
-0.024099553003907204,
0.0008767097606323659,
-0.015030252747237682,
-0.03308596834540367,
-0.05252280831336975,
-0.06032981351017952,
-0.019574852660298347,
-0.02698075957596302,
-0.06114435940980911,
0.013892676681280136,
0.054404351860284805,
0.04270925000309944,
0.0479109100997448,
0.03423329442739487,
-0.0541505366563797,
-0.05153956636786461,
0.029451755806803703,
0.0582088865339756,
-0.05166560038924217,
-0.038994692265987396,
-0.04949331656098366,
0.023686818778514862,
0.030234046280384064,
-0.04266690835356712,
-0.08426070958375931,
0.03302162513136864,
0.02686198428273201,
-0.03214805945754051,
0.08017513900995255,
0.02904544025659561,
0.010486733168363571,
0.06236982345581055,
-0.007469071540981531,
0.024142000824213028,
-0.012194657698273659,
0.006073484662920237,
0.010406809858977795,
0.05598035827279091,
-0.03803526982665062,
-0.03479043394327164,
-0.050099149346351624,
0.02569674886763096,
0.014707494527101517,
0.052985191345214844,
0.01816197857260704,
-0.008850110694766045,
-0.06795800477266312,
-0.016352182254195213,
0.028327839449048042,
0.002083023777231574,
0.0027870384510606527,
0.039402540773153305,
0.054204829037189484,
-0.049752894788980484,
-0.021958187222480774,
-0.0039809700101614,
-0.027654685080051422,
0.0386614128947258,
-0.011467281728982925,
-0.014092069119215012,
-0.054317716509103775,
0.014998408034443855,
0.00017629253852646798,
-0.015352517366409302,
-0.09756582975387573,
0.04968029633164406,
0.018293874338269234,
-0.0013754976680502295,
0.051881492137908936,
0.03115624189376831,
0.00478548277169466,
0.04815932735800743,
-0.01054962445050478,
0.02011803165078163,
-0.035874783992767334,
0.03358684852719307,
-0.02637578919529915,
-0.025380020961165428,
-0.01509359385818243,
-0.07315970957279205,
-0.021270468831062317,
-0.03335501253604889,
-0.0280314814299345,
-0.04020145907998085,
-0.029577840119600296,
-0.003712364472448826,
-0.015873277559876442,
-0.010166708379983902,
0.006775971036404371,
0.017401326447725296,
-0.040909793227910995,
-0.022807346656918526,
-0.027052847668528557,
-0.04730485752224922,
-0.10338001698255539,
-0.016098851338028908,
0.02232886292040348,
0.027472099289298058,
0.042678482830524445,
-0.0039944518357515335,
0.008057267405092716,
0.028784899041056633,
0.012717795558273792,
-0.029149498790502548,
0.024445567280054092,
0.013139883987605572,
-0.03418128937482834,
-0.017804041504859924,
-0.0026316645089536905,
0.001355507643893361,
-0.001886181184090674,
-0.02149231731891632,
-0.008672880008816719,
0.02276555262506008,
-0.010110997594892979,
0.004005409311503172,
0.019276905804872513,
0.004943763837218285,
-0.07273276895284653,
-0.01486448384821415,
-0.0025922569911926985,
-0.04436826705932617,
0.02082294225692749,
0.01068934053182602,
-0.033898212015628815,
0.005226963199675083,
-0.010226410813629627,
0.027471832931041718,
-0.0038678301498293877,
-0.03462617099285126,
-0.0032139753457158804,
-0.039175502955913544,
0.02996697463095188,
-0.06587781012058258,
0.05685205012559891,
-0.02806827798485756,
-0.0021795863285660744,
-0.01878390833735466,
-0.009022808633744717,
-0.04216952994465828,
0.07569524645805359,
0.0038605849258601665,
0.004253331571817398,
-0.008441454730927944,
0.03403808921575546,
-0.026829224079847336,
0.03533802554011345,
-0.010122265666723251,
0.0117841437458992,
-0.024594470858573914,
0.01358947716653347,
-0.027128668501973152,
0.016042646020650864,
-0.025677287951111794,
-0.009565341286361217,
-0.013245654292404652,
-0.03531920909881592,
-0.02641981653869152,
-0.03931822627782822,
0.03516005352139473,
0.051398616284132004,
0.028094852343201637,
0.017680855467915535,
-0.005154856480658054,
-0.024808788672089577,
0.01386706531047821,
-0.07742636650800705,
-0.026715869084000587,
-0.0286480113863945,
0.008847102522850037,
-0.012348598800599575,
0.056359317153692245,
0.041600532829761505,
-0.04197077453136444,
-0.027652950957417488,
0.024518486112356186,
0.0052336533553898335,
0.005050051026046276,
0.008492856286466122,
0.025135310366749763,
0.03684317320585251,
0.03868205472826958,
-0.06583821028470993,
0.016591427847743034,
0.00909236166626215,
-0.004388502333313227,
-0.01050544437021017,
-0.01682177744805813,
0.020352192223072052,
-0.025321731343865395,
-0.05358413979411125,
-0.016154075041413307,
0.0506664477288723,
0.03677910938858986,
0.03410559892654419,
0.01855749823153019,
-0.05155192315578461,
0.01909356191754341,
-0.0007352108950726688,
-0.0434846393764019,
-0.038947101682424545,
0.019308147951960564,
-0.04949074983596802,
0.07340162247419357,
-0.020672712475061417,
0.010028100572526455,
0.02716643363237381,
0.019042419269680977,
0.0039747836999595165,
0.04332515969872475,
-0.04384830966591835,
-0.011456755921244621,
0.050155527889728546,
-0.026907380670309067,
-0.010328750126063824,
-0.005142528098076582,
0.058812420815229416,
-0.04529578238725662,
0.05636899173259735,
0.010076940059661865,
0.012623286806046963,
-0.0081803472712636,
-0.016639510169625282,
-0.06527530401945114,
0.03043399192392826,
-0.049551673233509064,
0.06283647567033768,
-0.00019500900816638023,
-0.08150237798690796,
0.06975133717060089,
0.038969360291957855,
-0.10196450352668762,
-0.0013148289872333407,
0.034344736486673355,
0.018979910761117935,
0.03759690374135971,
0.03693202883005142,
-0.06354435533285141,
-0.0028896338772028685,
-0.05720241740345955,
0.02710009180009365,
-0.05121096223592758,
-0.017106927931308746,
0.016263995319604874,
-0.053996384143829346,
-0.018306789919734,
0.03151886537671089,
-0.012996472418308258,
0.004632130265235901,
0.006627100985497236,
-0.04535466060042381,
-0.04117576405405998,
-0.0237860269844532,
0.029164938256144524,
-0.02449052594602108,
0.024274321272969246,
-0.025782058015465736,
0.0468750074505806,
0.010026275180280209,
0.007250644266605377,
-0.029389793053269386,
0.0060898675583302975,
0.016295358538627625,
-0.03779178857803345,
-0.041062965989112854,
0.029260294511914253,
0.015148540958762169,
-0.022625122219324112,
0.030807634815573692,
-0.013856377452611923,
0.02434633858501911,
0.0383811891078949,
-0.027531204745173454,
0.012302588671445847,
-0.042312733829021454,
-0.0014125901507213712,
0.010153155773878098,
0.0073004188016057014,
0.023213090375065804,
-0.010869275778532028,
0.026968620717525482,
0.03553035110235214,
0.03724021837115288,
-0.019500931724905968,
-0.0015512113459408283,
-0.0016950826393440366,
0.028097501024603844,
-0.03428804874420166,
0.016451086848974228,
0.014215530827641487,
-0.04131443426012993,
-0.053632378578186035,
-0.04973267763853073,
-0.05200883001089096,
0.0520600825548172,
-0.048909224569797516,
0.02825920283794403,
0.05166585370898247,
-0.010918944142758846,
-0.056504856795072556,
-0.08452311903238297,
0.0014220909215509892,
-0.011720501817762852,
0.02709893137216568,
0.03074980154633522,
-0.02087649516761303,
-0.007639531511813402,
-0.04489082843065262,
-0.06362609565258026,
0.029844151809811592,
0.023096797987818718,
-0.020085683092474937,
0.05309237912297249,
0.031791336834430695,
-0.010481479577720165,
0.00910878088325262,
0.01662002131342888,
-0.053999580442905426,
0.01871480792760849,
0.016615334898233414,
0.026577413082122803,
0.03855803981423378,
0.036128610372543335,
-0.03175864741206169,
-0.022919269278645515,
-0.048552222549915314,
-0.028735781088471413,
-0.037679336965084076,
-0.009713982231914997,
0.07922908663749695
] |
Camzure/MaamiBot | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | 2020-11-26T12:21:09Z | ---
tags:
- summarization
widget:
- text: "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
---
# CodeTrans model for code comment generation java
Pretrained model on programming language java using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on Code Comment Generation dataset.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_comment_generation_java"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_comment_generation_java", skip_special_tokens=True),
device=0
)
tokenized_code = "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/code%20comment%20generation/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 37.98 |
| CodeTrans-ST-Base | 38.07 |
| CodeTrans-TF-Small | 38.56 |
| CodeTrans-TF-Base | 39.06 |
| CodeTrans-TF-Large | **39.50** |
| CodeTrans-MT-Small | 20.15 |
| CodeTrans-MT-Base | 27.44 |
| CodeTrans-MT-Large | 34.69 |
| CodeTrans-MT-TF-Small | 38.37 |
| CodeTrans-MT-TF-Base | 38.90 |
| CodeTrans-MT-TF-Large | 39.25 |
| State of the art | 38.17 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.01105635054409504,
-0.0184923205524683,
-0.012115486897528172,
0.036128852516412735,
0.026937393471598625,
0.03550611436367035,
-0.03166141360998154,
-0.0027054480742663145,
-0.009604445658624172,
0.05126136913895607,
0.040284037590026855,
-0.01095241867005825,
-0.018345318734645844,
0.043584540486335754,
-0.03726402297616005,
-0.06401243060827255,
-0.02098703198134899,
-0.03337595611810684,
-0.02510051056742668,
-0.02142845094203949,
0.015238640829920769,
0.007962028495967388,
0.003544602310284972,
0.0018751444295048714,
-0.009989378973841667,
0.0052364361472427845,
0.005436695646494627,
0.016604747623205185,
0.02772742137312889,
-0.07433892786502838,
-0.02949744462966919,
-0.006326995324343443,
-0.03536619618535042,
-0.011137130670249462,
-0.03495236486196518,
0.019283341243863106,
0.01424076035618782,
0.04287484660744667,
0.02967211976647377,
0.05972379446029663,
0.007637426257133484,
0.025675104930996895,
0.020515689626336098,
-0.033234111964702606,
0.06255771219730377,
0.006456389557570219,
-0.02671646699309349,
-0.03178608790040016,
0.02318200282752514,
-0.0034089011605829,
-0.050087541341781616,
-0.07062294334173203,
-0.032227691262960434,
0.03982602059841156,
-0.015504618175327778,
-0.014111818745732307,
-0.06264123320579529,
-0.030857406556606293,
0.04626477137207985,
-0.047763943672180176,
-0.02603226527571678,
0.006684051360934973,
-0.061767689883708954,
0.01714003086090088,
0.018589943647384644,
-0.018675170838832855,
0.01181360986083746,
-0.046995434910058975,
0.030643723905086517,
-0.0013236211379989982,
0.0447833351790905,
-0.035004694014787674,
0.03220229223370552,
-0.11193346977233887,
0.01336868666112423,
-0.008964174427092075,
0.029879724606871605,
0.02402849867939949,
-0.015612264163792133,
0.05651194602251053,
-0.004346048459410667,
0.008126627653837204,
0.053217366337776184,
-0.0007074823952279985,
-0.011005261912941933,
0.029212087392807007,
-0.02419854886829853,
-0.016468171030282974,
-0.011897683143615723,
0.06654739379882812,
-0.05330444499850273,
-0.06474043428897858,
-0.02326960675418377,
-0.01890765130519867,
-0.03998580202460289,
0.017920784652233124,
0.03680099546909332,
-0.012394948862493038,
0.026518922299146652,
0.010955249890685081,
0.04333728551864624,
0.06294696033000946,
-0.007245819084346294,
0.054591380059719086,
0.035406313836574554,
0.0057681286707520485,
-0.006411202251911163,
-0.04222969710826874,
-0.020351847633719444,
0.03672140836715698,
0.002334404271095991,
-0.0373699851334095,
-0.04936140030622482,
0.04058245196938515,
0.02025962993502617,
-0.039372704923152924,
0.05205998942255974,
-0.020788123831152916,
-0.05087688937783241,
-0.03864720091223717,
0.03419484570622444,
-0.01154511421918869,
-0.010237015783786774,
-0.005046761594712734,
-0.05104036256670952,
0.0174770075827837,
-0.05585508048534393,
-0.030963897705078125,
0.016616685315966606,
0.03355107083916664,
-0.028404954820871353,
0.08602623641490936,
-0.008308236487209797,
-0.03711932897567749,
-0.0048346733674407005,
0.02567160502076149,
-0.05755878984928131,
0.053359970450401306,
0.03151116520166397,
0.11099190264940262,
-0.0520370788872242,
-0.043195780366659164,
0.023412030190229416,
-0.0025276525411754847,
-0.02309480868279934,
0.016208384186029434,
-0.011814779601991177,
-0.05520719662308693,
-0.028294647112488747,
-0.010548756457865238,
0.05045314505696297,
-0.04801129922270775,
-0.01814022660255432,
0.029227090999484062,
0.004692667163908482,
0.014132282696664333,
-0.03836927190423012,
0.006857261527329683,
0.008407685905694962,
-0.02395114116370678,
-0.061241693794727325,
0.02714124321937561,
0.0018471598159521818,
-0.02054717391729355,
-0.02947213500738144,
-0.030266879126429558,
-0.009583848528563976,
0.09207227826118469,
0.01850118301808834,
-0.009778826497495174,
-0.04048076644539833,
0.017009614035487175,
0.030683398246765137,
0.040613312274217606,
-0.01955612562596798,
0.033469460904598236,
0.053779568523168564,
0.0731552392244339,
-0.03024168312549591,
0.06758367270231247,
-0.01493136491626501,
-0.03084535151720047,
-0.03536513075232506,
0.018203064799308777,
-0.0051626102067530155,
-0.04318375140428543,
0.015502979047596455,
0.015752114355564117,
-0.01989533193409443,
-0.002189132384955883,
-0.0069310786202549934,
0.05397661030292511,
0.01223020814359188,
-0.014097625389695168,
-0.025808485224843025,
0.015422775410115719,
-0.02109580487012863,
0.056966379284858704,
-0.0414351150393486,
-0.011655785143375397,
-0.008973531424999237,
-0.033580854535102844,
-0.01052920613437891,
0.02079838141798973,
0.045956846326589584,
0.015193354338407516,
-0.015541070140898228,
0.10000212490558624,
-0.052762992680072784,
0.02014077454805374,
-0.03865940868854523,
-0.03580322116613388,
0.01121872290968895,
0.04332120716571808,
0.022742632776498795,
0.043731432408094406,
-0.0010699869599193335,
-0.026978442445397377,
0.0077286665327847,
0.08448947966098785,
0.03909722715616226,
0.04638637974858284,
-0.018506186082959175,
-0.03052404522895813,
0.04875902831554413,
0.07244312763214111,
-0.05971994623541832,
-0.044846490025520325,
0.05432828515768051,
0.03876934200525284,
-0.008781296201050282,
0.027551742270588875,
-0.011149722151458263,
0.01646658405661583,
-0.053949445486068726,
-0.05615299567580223,
0.03702729195356369,
0.019260702654719353,
0.011270947754383087,
0.02993198297917843,
0.009806126356124878,
-0.01894603669643402,
0.04343429580330849,
0.0076526920311152935,
0.012649890035390854,
-0.056184299290180206,
0.00946707371622324,
0.0040100011974573135,
0.07873312383890152,
-0.039361972361803055,
0.03717979043722153,
0.011823004111647606,
-0.008068537339568138,
0.044714055955410004,
-0.022553561255335808,
0.02160586044192314,
0.029136011376976967,
0.02166939154267311,
-0.009680498391389847,
0.018958477303385735,
0.02496212348341942,
0.026938170194625854,
0.07930193096399307,
0.00958745926618576,
0.07448317855596542,
-0.005097758956253529,
0.062420882284641266,
0.06943688541650772,
0.02198788709938526,
0.003786982735618949,
0.018922381103038788,
0.05783427134156227,
0.005160300526767969,
-0.023425066843628883,
0.06530222296714783,
-0.04421161115169525,
0.024846093729138374,
-0.03859405219554901,
0.031047116965055466,
-0.012001900933682919,
-0.02789495699107647,
0.03964491933584213,
0.014981826767325401,
-0.04041187837719917,
-0.015348638407886028,
-0.03814634308218956,
-0.028256451711058617,
0.02437329851090908,
-0.014446689747273922,
-0.01286819763481617,
0.009874442592263222,
-0.024131935089826584,
0.026320530101656914,
-0.07701795548200607,
-0.04126821830868721,
-0.017601797357201576,
-0.033587392419576645,
0.00007562065729871392,
-0.0797782838344574,
-0.04891480877995491,
-0.06102403625845909,
-0.013506033457815647,
0.04280475899577141,
0.003978106193244457,
-0.01354130357503891,
-0.04136069864034653,
0.015791654586791992,
-0.034856945276260376,
-0.027601191774010658,
-0.04495548829436302,
-0.06681961566209793,
-0.0023351251147687435,
-0.07716158777475357,
0.026495568454265594,
-0.023973431438207626,
0.03456064686179161,
-0.008759165182709694,
-0.014250259846448898,
-0.02254306711256504,
-0.021078594028949738,
0.04999338835477829,
0.023326069116592407,
-0.01926686428487301,
-0.03265273571014404,
0.015131318010389805,
-0.013830953277647495,
0.031195705756545067,
-0.008327994495630264,
-0.049044620245695114,
0.10081426054239273,
0.05797204375267029,
0.03646114468574524,
-0.015010942704975605,
-0.03944363072514534,
-0.04198509082198143,
-0.030743209645152092,
-0.01663343980908394,
-0.01023648027330637,
-0.03163037449121475,
-0.006080246064811945,
-0.04853968322277069,
-0.02843654341995716,
-0.03549124300479889,
-0.04527251049876213,
-0.017757609486579895,
0.025866812095046043,
0.0252047311514616,
0.049214672297239304,
0.060144517570734024,
0.02915811911225319,
-0.01592233218252659,
-0.03382528945803642,
0.04354829341173172,
-0.012737114913761616,
0.002462256932631135,
-0.06466572731733322,
-0.027323924005031586,
0.030167648568749428,
0.022630633786320686,
-0.006456313654780388,
-0.02167569473385811,
0.05287636071443558,
0.01291742268949747,
0.003837018506601453,
0.016844836995005608,
-0.016709323972463608,
-0.014485596679151058,
-0.040968671441078186,
-0.010387039743363857,
-0.02457248419523239,
-0.04124017432332039,
-0.024054357782006264,
-0.02421911060810089,
0.048969581723213196,
-0.06490558385848999,
-0.05039067193865776,
0.0015146273653954268,
0.023770853877067566,
0.03521149232983589,
0.014864536933600903,
-0.03923146799206734,
0.007720682304352522,
-0.06882491707801819,
-0.03372257947921753,
0.03085777908563614,
0.005345118697732687,
-0.0033766073174774647,
0.030304942280054092,
0.04485632851719856,
-0.028403203934431076,
0.048360589891672134,
0.023624824360013008,
0.04348954185843468,
0.033462438732385635,
-0.03433968871831894,
0.015470677986741066,
-0.04658247157931328,
0.02868570014834404,
0.007307484280318022,
-0.02831733599305153,
-0.042828936129808426,
-0.08001039177179337,
-0.028082028031349182,
0.02608029730618,
-0.023331964388489723,
0.0033097113482654095,
0.042601726949214935,
-0.018477221950888634,
-0.043702926486730576,
-0.00871228240430355,
0.023501062765717506,
0.05277469381690025,
-0.03339195251464844,
0.027956616133451462,
0.010310943238437176,
0.07380031794309616,
-0.05224227160215378,
0.0039460305124521255,
-0.03713194653391838,
-0.03498537093400955,
0.01636996679008007,
0.04492766410112381,
0.010282434523105621,
0.045979663729667664,
0.08177667111158371,
0.022624701261520386,
-0.03282645717263222,
0.03764178231358528,
0.05455097556114197,
0.005731509532779455,
-0.03782011568546295,
0.0026540220715105534,
-0.0004936423501931131,
-0.027384521439671516,
0.007285216357558966,
-0.013628251850605011,
0.022499147802591324,
0.014872336760163307,
-0.009684090502560139,
0.0004972738097421825,
0.00434371130540967,
-0.022457417100667953,
-0.035943251103162766,
-0.05302179977297783,
0.0002802371745929122,
-0.03874402493238449,
-0.07209257781505585,
0.020745228976011276,
0.02910606935620308,
0.03569928929209709,
0.05492791160941124,
0.05296545848250389,
-0.04213093966245651,
-0.009911127388477325,
0.035813525319099426,
0.044079095125198364,
-0.041478268802165985,
-0.03173121064901352,
-0.04234806075692177,
0.02625684253871441,
0.03693538159132004,
-0.03668619319796562,
-0.09531056135892868,
0.008411808870732784,
0.014311686158180237,
-0.019354354590177536,
0.06417548656463623,
0.01951984502375126,
0.019621947780251503,
0.06059825047850609,
0.0008513699867762625,
0.019192783161997795,
-0.03075394034385681,
0.0005961140268482268,
-0.00958439614623785,
0.04673244431614876,
-0.03986671194434166,
-0.03452596068382263,
-0.050214096903800964,
0.014881260693073273,
0.00986402202397585,
0.03833296522498131,
0.03789815306663513,
-0.006319479551166296,
-0.06860219687223434,
-0.01119308639317751,
0.0233102198690176,
-0.01912814751267433,
0.0077991182915866375,
0.025439178571105003,
0.038078274577856064,
-0.030166512355208397,
-0.027021724730730057,
-0.0100674694404006,
-0.014011023566126823,
0.03522930294275284,
-0.00483318604528904,
-0.018021756783127785,
-0.05595868080854416,
0.015007960610091686,
-0.013634767383337021,
-0.030037114396691322,
-0.09543322026729584,
0.0442911833524704,
-0.0016730019124224782,
-0.00801155623048544,
0.050258759409189224,
0.03414130583405495,
0.010653071105480194,
0.043599218130111694,
-0.019411146640777588,
0.02410283498466015,
-0.030842022970318794,
0.01164594292640686,
-0.031183190643787384,
-0.023620659485459328,
-0.01940794102847576,
-0.06822311878204346,
-0.02657461166381836,
-0.03250858932733536,
-0.03207933530211449,
-0.038248807191848755,
-0.0254787839949131,
-0.00729583902284503,
-0.023638587445020676,
0.0006835965905338526,
-0.0006760564283467829,
0.004727584309875965,
-0.03399628400802612,
-0.03483922407031059,
-0.02746709994971752,
-0.03657358139753342,
-0.11372273415327072,
-0.031060168519616127,
0.016385946422815323,
0.027419108897447586,
0.03962811827659607,
-0.006238025147467852,
0.005090745631605387,
0.03620380535721779,
-0.006864815019071102,
-0.0103895990177989,
0.016639752313494682,
0.0039445944130420685,
-0.0477905236184597,
-0.04832145944237709,
0.0019539082422852516,
0.005090187769383192,
0.021166248247027397,
-0.015540041029453278,
0.00525661138817668,
0.04684893786907196,
-0.03843483328819275,
-0.002587695838883519,
0.03265710175037384,
0.0017457616049796343,
-0.07705183327198029,
-0.030750123783946037,
0.007854641415178776,
-0.04710462689399719,
0.026639966294169426,
0.0027579250745475292,
-0.03700351342558861,
-0.007941949181258678,
0.00006145286897663027,
0.03413796424865723,
-0.004768856335431337,
-0.01728917472064495,
0.004959750920534134,
-0.02658369019627571,
0.043568845838308334,
-0.0680202916264534,
0.05802365392446518,
-0.04271560534834862,
0.0011009415611624718,
-0.012649758718907833,
-0.009152282029390335,
-0.03924262523651123,
0.06227054446935654,
-0.015124214813113213,
-0.0009483455214649439,
-0.01198702584952116,
0.011061999946832657,
-0.027549423277378082,
0.03346450254321098,
-0.01796008087694645,
0.0127927977591753,
-0.034086260944604874,
0.019368251785635948,
-0.05991140380501747,
0.00819358415901661,
-0.02495964802801609,
-0.01119508408010006,
-0.016652287915349007,
-0.02983686327934265,
-0.018263744190335274,
-0.0509188175201416,
0.05400864779949188,
0.029391421005129814,
0.036348678171634674,
0.012427338398993015,
-0.013457564637064934,
-0.02526397630572319,
0.03330013155937195,
-0.08566112816333771,
-0.04698138311505318,
-0.026425877586007118,
0.026665909215807915,
-0.011113322339951992,
0.05982056260108948,
0.05182449147105217,
-0.044508472084999084,
-0.011895320378243923,
0.028272945433855057,
0.013558147475123405,
0.0032359613105654716,
0.019353779032826424,
0.012857493944466114,
0.04930105060338974,
0.04696810245513916,
-0.04491090402007103,
-0.013730556704103947,
0.007649424485862255,
-0.006047060713171959,
-0.005908223334699869,
-0.021050477400422096,
0.013014259748160839,
-0.006218148861080408,
-0.05356419458985329,
-0.023571882396936417,
0.05101217329502106,
0.04927511885762215,
0.039574217051267624,
-0.0042898268438875675,
-0.043051864951848984,
0.02606385387480259,
0.011924436315894127,
-0.04971208795905113,
-0.03082280606031418,
0.010499229654669762,
-0.057578008621931076,
0.0737924873828888,
-0.019260603934526443,
0.021494301036000252,
0.03293585777282715,
0.027180777862668037,
0.015630189329385757,
0.02992367371916771,
-0.03766363859176636,
-0.011942531913518906,
0.04261557757854462,
-0.04429334029555321,
-0.016209343448281288,
-0.0023657376877963543,
0.05374869331717491,
-0.05133925378322601,
0.0523708313703537,
0.020462004467844963,
0.025438819080591202,
-0.011529345065355301,
-0.028040137141942978,
-0.04918407276272774,
0.04048936069011688,
-0.06058470904827118,
0.0721818134188652,
-0.017944272607564926,
-0.0762273296713829,
0.07457838952541351,
0.03659096360206604,
-0.1102362647652626,
0.0012762871338054538,
0.038438163697719574,
0.011549851857125759,
0.02731614001095295,
0.05309136211872101,
-0.08190040290355682,
0.006692736875265837,
-0.03802095353603363,
0.005727190524339676,
-0.048388801515102386,
-0.005699709989130497,
0.02316376566886902,
-0.049613334238529205,
-0.012266320176422596,
0.03598923236131668,
-0.018839923664927483,
-0.0002895972575061023,
0.017592918127775192,
-0.041579388082027435,
-0.052058279514312744,
-0.023276902735233307,
0.009752755984663963,
-0.018834397196769714,
0.03011247143149376,
-0.018946044147014618,
0.03573830425739288,
0.010067048482596874,
0.00043074850691482425,
-0.044681649655103683,
0.0015778131783008575,
0.035387493669986725,
-0.04905243590474129,
-0.03303378075361252,
0.040261320769786835,
0.021118946373462677,
-0.008780750446021557,
0.02916037105023861,
-0.028868472203612328,
0.01712649315595627,
0.03500627353787422,
-0.017077721655368805,
0.014199714176356792,
-0.03834959864616394,
-0.016637707129120827,
0.025686731562018394,
0.01179887168109417,
0.024522343650460243,
-0.014514116570353508,
0.029110010713338852,
0.026571540161967278,
0.03155484050512314,
-0.017884012311697006,
-0.01936197839677334,
-0.020963024348020554,
0.019390132278203964,
-0.054949041455984116,
0.0287101361900568,
0.01911921240389347,
-0.032620515674352646,
-0.05614231899380684,
-0.04422791302204132,
-0.029545139521360397,
0.06256479769945145,
-0.04118401184678078,
0.017929693683981895,
0.056927260011434555,
-0.01783459447324276,
-0.03925719112157822,
-0.08104971051216125,
-0.018932314589619637,
-0.03634171187877655,
0.02183786779642105,
0.03604370728135109,
-0.025210263207554817,
-0.0026994808577001095,
-0.044788748025894165,
-0.06870356947183609,
0.042169153690338135,
0.016502022743225098,
-0.019443083554506302,
0.03184914216399193,
0.04793457314372063,
-0.01013781689107418,
0.006081999745219946,
0.014436718076467514,
-0.059019364416599274,
0.021586202085018158,
0.011953266337513924,
0.02142777293920517,
0.03545694425702095,
0.04896598309278488,
-0.020002877339720726,
-0.026697644963860512,
-0.07812986522912979,
-0.028310569003224373,
-0.03692697361111641,
-0.020407605916261673,
0.06010006368160248
] |
Canadiancaleb/DialoGPT-small-walter | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 13 | 2020-12-10T11:25:14Z | ---
tags:
- summarization
widget:
- text: "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
---
# CodeTrans model for code comment generation java
Pretrained model on programming language java using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code comment generation task for the java function/method.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_comment_generation_java_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_comment_generation_java_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "protected String renderUri ( URI uri ) { return uri . toASCIIString ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/code%20comment%20generation/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 260,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 750,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing java code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 37.98 |
| CodeTrans-ST-Base | 38.07 |
| CodeTrans-TF-Small | 38.56 |
| CodeTrans-TF-Base | 39.06 |
| CodeTrans-TF-Large | **39.50** |
| CodeTrans-MT-Small | 20.15 |
| CodeTrans-MT-Base | 27.44 |
| CodeTrans-MT-Large | 34.69 |
| CodeTrans-MT-TF-Small | 38.37 |
| CodeTrans-MT-TF-Base | 38.90 |
| CodeTrans-MT-TF-Large | 39.25 |
| State of the art | 38.17 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.006065720692276955,
-0.01655215211212635,
-0.012569610029459,
0.02459271438419819,
0.027616895735263824,
0.038320962339639664,
-0.033158767968416214,
-0.002852880861610174,
-0.010890157893300056,
0.056648798286914825,
0.033826492726802826,
-0.012879609130322933,
-0.011600549332797527,
0.0440448559820652,
-0.03771726042032242,
-0.06726430356502533,
-0.02396247163414955,
-0.03342881426215172,
-0.03244185075163841,
-0.019191615283489227,
0.022154709324240685,
0.005552080925554037,
0.008523992262780666,
-0.0032800210174173117,
-0.010399965569376945,
-0.0006838584085926414,
0.006893426179885864,
0.01264368835836649,
0.027648478746414185,
-0.0796751007437706,
-0.02833634801208973,
-0.004471814725548029,
-0.03301778808236122,
-0.01657785288989544,
-0.0356774665415287,
0.018721358850598335,
0.013095308095216751,
0.04255766421556473,
0.029249904677271843,
0.05734884366393089,
0.004086548462510109,
0.023235155269503593,
0.017486149445176125,
-0.03514168784022331,
0.05784323811531067,
0.008112854324281216,
-0.02674737013876438,
-0.02971256710588932,
0.026063675060868263,
-0.00787331908941269,
-0.04866843670606613,
-0.07399627566337585,
-0.033741291612386703,
0.045039720833301544,
-0.018932033330202103,
-0.01273211371153593,
-0.06608305126428604,
-0.03806706517934799,
0.04766704514622688,
-0.05222344025969505,
-0.027955228462815285,
0.0041146231815218925,
-0.06187218427658081,
0.024442778900265694,
0.005387724842876196,
-0.009996611624956131,
0.010270527563989162,
-0.04636034369468689,
0.027959277853369713,
0.003915616311132908,
0.04966052249073982,
-0.03345593810081482,
0.03488045185804367,
-0.11652856320142746,
0.015077821910381317,
-0.011361160315573215,
0.02783067710697651,
0.02260422706604004,
-0.019015420228242874,
0.05774088576436043,
-0.007969673722982407,
0.005541273858398199,
0.053799401968717575,
0.0012791302287951112,
-0.014801472425460815,
0.028172919526696205,
-0.03190663084387779,
-0.012479035183787346,
-0.016652550548315048,
0.0636732280254364,
-0.05189432576298714,
-0.06517350673675537,
-0.019837280735373497,
-0.020854579284787178,
-0.0413656085729599,
0.020299963653087616,
0.04334327206015587,
-0.013713699765503407,
0.03011978603899479,
0.0038185573648661375,
0.037982113659381866,
0.05856682360172272,
0.0008144280291162431,
0.04919160157442093,
0.03582252934575081,
0.014499525539577007,
-0.012505549937486649,
-0.038140881806612015,
-0.021991515532135963,
0.04863634333014488,
0.003266421379521489,
-0.040440935641527176,
-0.0469839945435524,
0.034440696239471436,
0.01983497478067875,
-0.04096159711480141,
0.0462823286652565,
-0.019569335505366325,
-0.045680154114961624,
-0.03971671313047409,
0.0395156629383564,
-0.00840433593839407,
-0.01760266162455082,
-0.0017735157161951065,
-0.04505373165011406,
0.014112084172666073,
-0.05880602449178696,
-0.03207669034600258,
0.016091009601950645,
0.03213713690638542,
-0.02944808080792427,
0.08584483712911606,
0.0037346992176026106,
-0.03296668082475662,
-0.0000994586807792075,
0.0245802141726017,
-0.05801892280578613,
0.0605921745300293,
0.032514750957489014,
0.10245689749717712,
-0.05592001602053642,
-0.04433749243617058,
0.02026560716331005,
0.0037914288695901632,
-0.012386137619614601,
0.018921149894595146,
-0.016232158988714218,
-0.0697198286652565,
-0.02700834348797798,
-0.006015164311975241,
0.05530055612325668,
-0.044371142983436584,
-0.018770184367895126,
0.026132091879844666,
0.003995546605437994,
0.006379830185323954,
-0.03832247480750084,
0.005284594837576151,
0.00932907871901989,
-0.027367493137717247,
-0.06369675695896149,
0.02899838797748089,
0.0020854873582720757,
-0.026231881231069565,
-0.028892945498228073,
-0.038613997399806976,
-0.0041443402878940105,
0.09570879489183426,
0.016390347853302956,
-0.004770094994455576,
-0.03992360085248947,
0.017866037786006927,
0.02985556796193123,
0.039741598069667816,
-0.015907324850559235,
0.03363007307052612,
0.0493958406150341,
0.07333903014659882,
-0.03082706592977047,
0.06932380795478821,
-0.011291638016700745,
-0.0299880001693964,
-0.033345699310302734,
0.021859822794795036,
-0.006099278572946787,
-0.0414004884660244,
0.011213450692594051,
0.01058853417634964,
-0.024764366447925568,
-0.005780338775366545,
-0.008986681699752808,
0.05442230403423309,
0.0167190320789814,
-0.014524329453706741,
-0.025417691096663475,
0.017887789756059647,
-0.01766374334692955,
0.054893262684345245,
-0.03877806290984154,
-0.003732199314981699,
-0.017170375213027,
-0.03156524524092674,
-0.005158012267202139,
0.021172907203435898,
0.0469154417514801,
0.016473086550831795,
-0.019088473170995712,
0.09847763925790787,
-0.04770886152982712,
0.01684659905731678,
-0.042841970920562744,
-0.04024440795183182,
0.01117902621626854,
0.04393651708960533,
0.025279803201556206,
0.02806534431874752,
0.001322727999649942,
-0.019090626388788223,
0.007741009816527367,
0.08138321340084076,
0.04035630449652672,
0.047035545110702515,
-0.014440331608057022,
-0.026585828512907028,
0.051466669887304306,
0.07499083131551743,
-0.05530567467212677,
-0.04903864488005638,
0.051476992666721344,
0.03594531491398811,
-0.01090298779308796,
0.028672363609075546,
-0.008100658655166626,
0.011755507439374924,
-0.04840734228491783,
-0.056661222130060196,
0.03959985449910164,
0.019165361300110817,
0.012078907340765,
0.028590325266122818,
0.009509247727692127,
-0.012575697153806686,
0.04231908917427063,
0.005770428106188774,
0.011750512756407261,
-0.060568228363990784,
0.006428022403270006,
-0.002649536356329918,
0.07579633593559265,
-0.03902231529355049,
0.035903200507164,
0.017452601343393326,
-0.003398004686459899,
0.05453818663954735,
-0.02346363291144371,
0.01831551268696785,
0.028479263186454773,
0.015965156257152557,
-0.007165978197008371,
0.01796911098062992,
0.025029420852661133,
0.03207568824291229,
0.0856783464550972,
0.00917382538318634,
0.0725734755396843,
-0.0020754148717969656,
0.057455603033304214,
0.07182846963405609,
0.027468927204608917,
0.005048977676779032,
0.023255852982401848,
0.05765144154429436,
0.005836832337081432,
-0.02091013826429844,
0.06288456171751022,
-0.043208085000514984,
0.024711130186915398,
-0.039913635700941086,
0.03033379837870598,
-0.006277466658502817,
-0.025327427312731743,
0.04076240956783295,
0.011004295200109482,
-0.04078790172934532,
-0.010518504306674004,
-0.03766965866088867,
-0.027681956067681313,
0.025746965780854225,
-0.013716298155486584,
-0.016577821224927902,
0.010699892416596413,
-0.018321502953767776,
0.021440759301185608,
-0.0782841369509697,
-0.03835505247116089,
-0.006828468292951584,
-0.03504703566431999,
0.006780951749533415,
-0.07940319925546646,
-0.052616238594055176,
-0.06378215551376343,
-0.01300449576228857,
0.048749830573797226,
0.006785305216908455,
-0.017877940088510513,
-0.03437896817922592,
0.014226953499019146,
-0.0453050471842289,
-0.02547089196741581,
-0.05447335168719292,
-0.07293426990509033,
-0.005046542268246412,
-0.07737233489751816,
0.02125583216547966,
-0.026915887370705605,
0.03057856671512127,
-0.0027849790640175343,
-0.011771083809435368,
-0.02578854188323021,
-0.01963678002357483,
0.04829905927181244,
0.017731649801135063,
-0.012344148941338062,
-0.03397359326481819,
0.012186173349618912,
-0.01627497747540474,
0.03282541036605835,
-0.004923386033624411,
-0.05044309049844742,
0.10304465889930725,
0.05197085812687874,
0.0374264232814312,
-0.009272816590964794,
-0.04290620982646942,
-0.045102208852767944,
-0.03570690378546715,
-0.02090948447585106,
-0.014633845537900925,
-0.029126139357686043,
-0.005041022319346666,
-0.04627632349729538,
-0.03332053869962692,
-0.03043454885482788,
-0.041270434856414795,
-0.021400365978479385,
0.02773316204547882,
0.032188400626182556,
0.05085818096995354,
0.05628097057342529,
0.0287764985114336,
-0.029847800731658936,
-0.03611006587743759,
0.0432296060025692,
-0.013044217601418495,
0.000468892278149724,
-0.06759734451770782,
-0.029440678656101227,
0.033053841441869736,
0.016717959195375443,
-0.010057438164949417,
-0.01114095002412796,
0.04939328879117966,
0.015485969372093678,
0.0018163215136155486,
0.012087101116776466,
-0.016724910587072372,
-0.006324121728539467,
-0.032618388533592224,
-0.005582437850534916,
-0.030274465680122375,
-0.03671009838581085,
-0.024768352508544922,
-0.017919890582561493,
0.05197570100426674,
-0.06546927243471146,
-0.05658673122525215,
0.010516675189137459,
0.028683247044682503,
0.035327307879924774,
0.02135237120091915,
-0.03608063608407974,
0.002667528111487627,
-0.0703170895576477,
-0.036849476397037506,
0.03588024526834488,
0.011224627494812012,
-0.002638395642861724,
0.03850932419300079,
0.04098285362124443,
-0.03230636939406395,
0.041188038885593414,
0.021658936515450478,
0.04056815803050995,
0.035151831805706024,
-0.02827717922627926,
0.015282598324120045,
-0.04862109571695328,
0.02111039310693741,
0.010904287919402122,
-0.029638534411787987,
-0.0408661775290966,
-0.07787487655878067,
-0.032439589500427246,
0.02363489754498005,
-0.024702174589037895,
-0.0002344411623198539,
0.047009486705064774,
-0.016080500558018684,
-0.04683107137680054,
-0.009178169071674347,
0.013029670342803001,
0.05742639675736427,
-0.033348448574543,
0.030475685372948647,
0.011996377259492874,
0.07696527242660522,
-0.050441235303878784,
0.0023438441567122936,
-0.028829487040638924,
-0.03108133375644684,
0.015953583642840385,
0.051932308822870255,
0.013665321283042431,
0.056653983891010284,
0.08174444735050201,
0.020659396424889565,
-0.027409693226218224,
0.038536664098501205,
0.058007292449474335,
0.00521100265905261,
-0.03330717235803604,
0.00030149577651172876,
-0.0032709049992263317,
-0.03538766875863075,
0.012982732616364956,
-0.01390487514436245,
0.022899335250258446,
0.01671420969069004,
-0.00885428860783577,
0.002648154506459832,
0.0017157775582745671,
-0.018334737047553062,
-0.03932633996009827,
-0.05588050186634064,
-0.0044067841954529285,
-0.0360037162899971,
-0.06622077524662018,
0.021173059940338135,
0.03223356977105141,
0.03557487577199936,
0.0554530993103981,
0.05663934722542763,
-0.04579169675707817,
-0.02125776931643486,
0.0333242192864418,
0.04935282841324806,
-0.03826392441987991,
-0.03428136557340622,
-0.04677988216280937,
0.030372653156518936,
0.03786600008606911,
-0.03622562810778618,
-0.098059743642807,
0.010131491348147392,
0.02508922666311264,
-0.01749500259757042,
0.060414109379053116,
0.0225058700889349,
0.0213093850761652,
0.062047336250543594,
-0.0009371034102514386,
0.01823064684867859,
-0.029458187520503998,
0.0096102524548769,
-0.003648050595074892,
0.04045272618532181,
-0.03093390166759491,
-0.03280755877494812,
-0.04899926856160164,
0.010363644920289516,
0.01044377963989973,
0.03757033497095108,
0.037055082619190216,
0.0008946039597503841,
-0.07194329053163528,
-0.00909562036395073,
0.031067855656147003,
-0.01748594082891941,
0.015213052742183208,
0.02048039622604847,
0.03926888480782509,
-0.02692379616200924,
-0.029642950743436813,
-0.015000813640654087,
-0.016140663996338844,
0.03779485076665878,
-0.005212842486798763,
-0.0167312603443861,
-0.059822916984558105,
0.016761992126703262,
-0.016661392524838448,
-0.029098056256771088,
-0.09335306286811829,
0.04555454105138779,
0.0037958109751343727,
-0.006708246655762196,
0.05338641256093979,
0.023392153903841972,
0.0123077891767025,
0.04140469431877136,
-0.015841254964470863,
0.025674883276224136,
-0.03798813372850418,
0.01129936520010233,
-0.026000352576375008,
-0.026215916499495506,
-0.016068747267127037,
-0.07127624750137329,
-0.02637363411486149,
-0.032710667699575424,
-0.036937862634658813,
-0.039399731904268265,
-0.029531845822930336,
-0.005300326272845268,
-0.022906240075826645,
0.0009075120906345546,
-0.0029162997379899025,
0.002189771970734,
-0.02922201156616211,
-0.027130382135510445,
-0.03238566592335701,
-0.03971830755472183,
-0.10562895238399506,
-0.02911602146923542,
0.010218645446002483,
0.03391414135694504,
0.036996353417634964,
-0.007950135506689548,
0.007861897349357605,
0.03459285944700241,
-0.005277025047689676,
-0.001906521269120276,
0.016664952039718628,
0.0030456529930233955,
-0.039342060685157776,
-0.042570121586322784,
-0.0002944723528344184,
0.008769557811319828,
0.01306421309709549,
-0.0096735879778862,
0.004754845984280109,
0.049065135419368744,
-0.036377765238285065,
0.001522425445728004,
0.03717861697077751,
-0.0017961341654881835,
-0.07734572887420654,
-0.030543949455022812,
0.006312231998890638,
-0.044173527508974075,
0.027859343215823174,
-0.0004701658326666802,
-0.03960519656538963,
-0.0060494327917695045,
-0.003157569793984294,
0.0347573384642601,
-0.00659412844106555,
-0.014348961412906647,
0.0067925103940069675,
-0.027804091572761536,
0.04139905422925949,
-0.06458079069852829,
0.05662120133638382,
-0.03460051864385605,
-0.0009025203180499375,
-0.011633154936134815,
-0.010774750262498856,
-0.03692621365189552,
0.06481747329235077,
-0.009550451301038265,
-0.0003157369792461395,
-0.00883013941347599,
0.011710847727954388,
-0.026133500039577484,
0.033983293920755386,
-0.015755942091345787,
0.009458021260797977,
-0.032764989882707596,
0.014421891421079636,
-0.05381283536553383,
0.010914942249655724,
-0.0248777586966753,
-0.010219885036349297,
-0.01673237979412079,
-0.02966429479420185,
-0.012005430646240711,
-0.05691755190491676,
0.05409888178110123,
0.028912588953971863,
0.029817568138241768,
0.012104940600693226,
-0.0221171285957098,
-0.023359807208180428,
0.02722857892513275,
-0.08651295304298401,
-0.04589792340993881,
-0.026536742225289345,
0.032970819622278214,
-0.018902355805039406,
0.06258080154657364,
0.04737360402941704,
-0.041983868926763535,
-0.008155115880072117,
0.023151295259594917,
0.01849847100675106,
0.00617204001173377,
0.02232206054031849,
0.00809423252940178,
0.052075039595365524,
0.04124731197953224,
-0.05198679119348526,
-0.008691779337823391,
0.003848220221698284,
-0.006800228729844093,
-0.009665635414421558,
-0.020409224554896355,
0.013997955247759819,
-0.011624461971223354,
-0.05500045046210289,
-0.019555382430553436,
0.0579884797334671,
0.053409453481435776,
0.03563275560736656,
-0.001564719364978373,
-0.04247463122010231,
0.027335114777088165,
0.006137745454907417,
-0.04630640521645546,
-0.03268352150917053,
0.01660136505961418,
-0.05568335950374603,
0.07458356022834778,
-0.010260000824928284,
0.015299574472010136,
0.021034887060523033,
0.025515791028738022,
0.017172809690237045,
0.033987876027822495,
-0.04049653932452202,
-0.010607418604195118,
0.03887193277478218,
-0.04428645595908165,
-0.007582472171634436,
-0.002003822475671768,
0.05602451413869858,
-0.055101461708545685,
0.04923064261674881,
0.024495813995599747,
0.02441965416073799,
-0.010745435021817684,
-0.029155351221561432,
-0.04923682659864426,
0.04322686418890953,
-0.0505109503865242,
0.06673958152532578,
-0.02079191990196705,
-0.07916564494371414,
0.0717877745628357,
0.03710933029651642,
-0.11007516086101532,
0.0047261375002563,
0.04072849452495575,
0.01454586535692215,
0.0338037870824337,
0.05386647209525108,
-0.08793080598115921,
0.0038441845681518316,
-0.03901723027229309,
0.008205239661037922,
-0.05387590453028679,
-0.002945650601759553,
0.027902521193027496,
-0.051066089421510696,
-0.007413073908537626,
0.03385625407099724,
-0.023673556745052338,
0.0014205599436536431,
0.01210213266313076,
-0.040209583938121796,
-0.04620523750782013,
-0.021483661606907845,
0.008041571825742722,
-0.022789718583226204,
0.030873391777276993,
-0.018072664737701416,
0.035912465304136276,
0.007793164812028408,
0.006449149455875158,
-0.04431112855672836,
0.004960199352353811,
0.03240908309817314,
-0.04502555727958679,
-0.03201521560549736,
0.03162992000579834,
0.011915002018213272,
-0.009119708091020584,
0.030706634745001793,
-0.024766646325588226,
0.020379921421408653,
0.025520924478769302,
-0.016399355605244637,
0.014874734915792942,
-0.0410744845867157,
-0.015957774594426155,
0.022746456786990166,
0.015609698370099068,
0.027406703680753708,
-0.0114448182284832,
0.029209844768047333,
0.026784688234329224,
0.031088490039110184,
-0.015024710446596146,
-0.02263924852013588,
-0.01952894777059555,
0.019737830385565758,
-0.051089558750391006,
0.025295786559581757,
0.02272588014602661,
-0.035567499697208405,
-0.05315350368618965,
-0.039509572088718414,
-0.023807449266314507,
0.057754967361688614,
-0.03922785818576813,
0.01571420207619667,
0.059093326330184937,
-0.022081442177295685,
-0.0475730262696743,
-0.07938817143440247,
-0.016588997095823288,
-0.034575480967760086,
0.020127790048718452,
0.034787196666002274,
-0.02019328624010086,
-0.004793250467628241,
-0.046905454248189926,
-0.07196447998285294,
0.03576231747865677,
0.014703739434480667,
-0.019310040399432182,
0.03534485027194023,
0.04712836071848869,
-0.013272110372781754,
0.0036191195249557495,
0.01843699812889099,
-0.054692476987838745,
0.02377203479409218,
0.008543865755200386,
0.01226575393229723,
0.03438916429877281,
0.04763944819569588,
-0.015781473368406296,
-0.031223978847265244,
-0.06912066787481308,
-0.02282247133553028,
-0.02991664968430996,
-0.015987759456038475,
0.06298229843378067
] |
Canyonevo/DialoGPT-medium-KingHenry | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | 2020-11-25T12:44:43Z | ---
tags:
- summarization
widget:
- text: "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
---
# CodeTrans model for code documentation generation go
Pretrained model on programming language go using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized go code functions: it works best with tokenized go functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on CodeSearchNet Corpus go dataset.
## Intended uses & limitations
The model could be used to generate the description for the go function or be fine-tuned on other go code tasks. It can be used on unparsed and untokenized go code. However, if the go code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate go function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_go"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_go", skip_special_tokens=True),
device=0
)
tokenized_code = "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/function%20documentation%20generation/go/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.004154091235250235,
-0.025386648252606392,
-0.0010927267139777541,
0.03809621185064316,
0.031244099140167236,
0.026675956323742867,
-0.020297212526202202,
-0.0008602115558460355,
-0.027112962678074837,
0.05777952820062637,
0.0421612523496151,
0.006742994766682386,
-0.005921332631260157,
0.0470266230404377,
-0.039402686059474945,
-0.06291517615318298,
-0.01756414771080017,
-0.0247033778578043,
-0.0437895767390728,
-0.016872450709342957,
0.023902203887701035,
-0.0013988447608426213,
0.004902982618659735,
0.013866132125258446,
-0.0041349767707288265,
0.019754530861973763,
0.006178921554237604,
0.022538593038916588,
0.0327751450240612,
-0.07397407293319702,
-0.025826456025242805,
-0.003838925389572978,
-0.04016852378845215,
-0.0002859325031749904,
-0.0315580815076828,
0.012513299472630024,
0.00709698349237442,
0.03773587569594383,
0.018449904397130013,
0.06279440969228745,
0.007136708125472069,
0.020935194566845894,
0.02660791389644146,
-0.03989880159497261,
0.06340662389993668,
-0.0008720725891180336,
-0.03591686859726906,
-0.029590046033263206,
0.017763106152415276,
0.004449235275387764,
-0.05871812626719475,
-0.07055594772100449,
-0.024308737367391586,
0.04893898218870163,
-0.011388030834496021,
-0.017053991556167603,
-0.0794052928686142,
-0.020053783431649208,
0.052274227142333984,
-0.050086162984371185,
-0.030736206099390984,
0.010213147848844528,
-0.06251389533281326,
0.029140299186110497,
0.007051898166537285,
0.012317776679992676,
0.009943907149136066,
-0.04677792266011238,
0.025500038638710976,
0.007358693052083254,
0.05309714749455452,
-0.03478777036070824,
0.029465166851878166,
-0.1128203421831131,
0.01670868694782257,
-0.0010119316866621375,
0.017110580578446388,
0.007228494621813297,
-0.0200459323823452,
0.05361226946115494,
-0.0024229269474744797,
0.002668889006599784,
0.03466397896409035,
0.0083146458491683,
-0.010012987069785595,
0.05306214094161987,
-0.03455224633216858,
-0.022993868216872215,
-0.014842218719422817,
0.06350135058164597,
-0.06224628910422325,
-0.06520401686429977,
-0.020960217341780663,
-0.028248675167560577,
-0.037658438086509705,
0.03833362087607384,
0.05426616594195366,
-0.018171517178416252,
0.025772947818040848,
0.0011189819779247046,
0.04518011584877968,
0.05084696412086487,
-0.004853019956499338,
0.04444180801510811,
0.02118665911257267,
0.009062528610229492,
-0.02109210193157196,
-0.05029696598649025,
-0.03483693301677704,
0.0383455753326416,
0.014813045971095562,
-0.0244450643658638,
-0.04911983013153076,
0.030116120353341103,
0.009890114888548851,
-0.0489787794649601,
0.051824457943439484,
-0.021757174283266068,
-0.05013931542634964,
-0.036701250821352005,
0.06615620851516724,
-0.007928096689283848,
-0.03278733789920807,
0.015968048945069313,
-0.03120371140539646,
0.01402526255697012,
-0.04992451146245003,
-0.024342060089111328,
0.003120619570836425,
0.026311149820685387,
0.001935749314725399,
0.07853075116872787,
0.010190597735345364,
-0.03864556550979614,
0.010063289664685726,
0.018823837861418724,
-0.07820404320955276,
0.05019121617078781,
0.03399151191115379,
0.11341410875320435,
-0.08184691518545151,
-0.030679522082209587,
0.028313999995589256,
0.003038462484255433,
-0.002713105408474803,
0.018264219164848328,
-0.010451171547174454,
-0.06862425804138184,
-0.027273796498775482,
0.002238850574940443,
0.06464246660470963,
-0.053470153361558914,
-0.024173535406589508,
0.0366816371679306,
0.005085604730993509,
0.012371668592095375,
-0.029246492311358452,
0.003670677077025175,
-0.006487700156867504,
-0.019177334383130074,
-0.06727640330791473,
0.022700505331158638,
-0.015896201133728027,
-0.031979549676179886,
-0.021987276151776314,
-0.03349662572145462,
0.013402829878032207,
0.11495672166347504,
0.012703719548881054,
-0.005039797630161047,
-0.03793900087475777,
0.015551631338894367,
0.030352359637618065,
0.058234699070453644,
-0.029983768239617348,
0.02706976793706417,
0.036676280200481415,
0.060018379241228104,
-0.0306791290640831,
0.0660737156867981,
-0.0014876349596306682,
-0.04177580028772354,
-0.03119483031332493,
0.025890693068504333,
-0.022934140637516975,
-0.03746641427278519,
0.0017288023373112082,
0.02010364644229412,
-0.020502788946032524,
-0.012213016860187054,
-0.01830280013382435,
0.056829784065485,
0.01582428067922592,
-0.010077198967337608,
-0.029078368097543716,
0.014290669932961464,
-0.009592543356120586,
0.07130665332078934,
-0.03485238179564476,
-0.010536964982748032,
-0.019738109782338142,
-0.032410383224487305,
0.003375884611159563,
0.026605352759361267,
0.05109046399593353,
0.024461345747113228,
-0.012995399534702301,
0.09575530886650085,
-0.045899469405412674,
0.008063437417149544,
-0.037301186472177505,
-0.052119217813014984,
0.009008419699966908,
0.023847702890634537,
0.026614831760525703,
0.026176221668720245,
0.015351517125964165,
-0.03062860295176506,
0.010650096461176872,
0.08450746536254883,
0.03881028667092323,
0.03811148554086685,
-0.015933461487293243,
-0.016257883980870247,
0.03522929176688194,
0.06033628433942795,
-0.03191135823726654,
-0.03946083411574364,
0.03908880054950714,
0.03325701132416725,
-0.02356904372572899,
0.017670702189207077,
-0.006456440780311823,
0.010125286877155304,
-0.05289773643016815,
-0.05624786391854286,
0.03985431417822838,
0.015048295259475708,
-0.0008061986300162971,
0.02896456979215145,
-0.004875361919403076,
-0.010209274478256702,
0.030093874782323837,
0.0005742434877902269,
0.00037013867404311895,
-0.07029519230127335,
0.02043747529387474,
0.003998704720288515,
0.06245985999703407,
-0.04352297633886337,
0.034542493522167206,
0.010366154834628105,
-0.00490177609026432,
0.04786897823214531,
-0.021447325125336647,
0.040437981486320496,
0.027252472937107086,
0.04338541626930237,
-0.012452477589249611,
0.018508953973650932,
0.010278691537678242,
0.02559047006070614,
0.0774691104888916,
0.008361520245671272,
0.06648921221494675,
-0.006724880542606115,
0.05712900683283806,
0.06456650793552399,
0.008274148218333721,
0.0013467282988131046,
0.03622259572148323,
0.06936834752559662,
-0.0005917708622291684,
-0.01016414538025856,
0.05430072918534279,
-0.04893486574292183,
0.025676576420664787,
-0.04336756095290184,
0.02380313165485859,
-0.019665991887450218,
-0.02354397065937519,
0.039691489189863205,
0.01655573584139347,
-0.04305064678192139,
0.002785671502351761,
-0.01253530289977789,
-0.01874985545873642,
0.010481515899300575,
0.004556434694677591,
-0.030988607555627823,
0.010071728378534317,
-0.014905767515301704,
0.02312164008617401,
-0.08358222246170044,
-0.04056459292769432,
-0.011847571469843388,
-0.04154183715581894,
0.011461794376373291,
-0.07461216300725937,
-0.048257965594530106,
-0.07703011482954025,
-0.019721554592251778,
0.04067520797252655,
0.010830921120941639,
-0.006964702159166336,
-0.03806060925126076,
0.0023357186000794172,
-0.0406242273747921,
-0.02807927504181862,
-0.060639139264822006,
-0.0629691332578659,
-0.011087418533861637,
-0.06235438212752342,
0.03578519448637962,
-0.010265352204442024,
0.022757133468985558,
0.011095045134425163,
-0.01848805509507656,
-0.024680636823177338,
-0.014956596307456493,
0.04944766312837601,
0.005444420967251062,
-0.015022159554064274,
-0.016554730013012886,
0.02575315162539482,
-0.034670405089855194,
0.04245086386799812,
-0.007976660504937172,
-0.038768220692873,
0.10099200904369354,
0.05933736637234688,
0.03577098995447159,
-0.010263540782034397,
-0.03177850320935249,
-0.050258737057447433,
-0.0455876886844635,
-0.022538211196660995,
-0.02634473145008087,
-0.030100516974925995,
-0.01298522762954235,
-0.056466974318027496,
-0.008015812374651432,
-0.03660701960325241,
-0.044506724923849106,
-0.029910754412412643,
0.02048342488706112,
0.02959306724369526,
0.04300643131136894,
0.04893547296524048,
0.02999747544527054,
-0.021817075088620186,
-0.02875460498034954,
0.04477423056960106,
0.013805720023810863,
-0.00617456017062068,
-0.06804055720567703,
-0.02969576045870781,
0.0426458939909935,
0.016232235357165337,
0.001043112250044942,
-0.02866964600980282,
0.04174939915537834,
0.017955109477043152,
0.011855552904307842,
0.001954055158421397,
-0.01257340144366026,
-0.01107444055378437,
-0.01905856654047966,
-0.009461863897740841,
-0.040338464081287384,
-0.025295907631516457,
-0.01940038800239563,
-0.021214686334133148,
0.04396861046552658,
-0.07055386155843735,
-0.04972609132528305,
0.006703750696033239,
0.037666529417037964,
0.031808413565158844,
0.026137499138712883,
-0.02409542165696621,
0.0010577905923128128,
-0.05242912843823433,
-0.03328399360179901,
0.02679075486958027,
0.023594114929437637,
0.0028017868753522635,
0.038900550454854965,
0.03197691589593887,
-0.037637241184711456,
0.01984260417521,
0.02577332966029644,
0.03871789202094078,
0.037763554602861404,
-0.03250639885663986,
0.026003720238804817,
-0.040998052805662155,
0.027576928958296776,
0.0023113577626645565,
-0.03594006597995758,
-0.04666673392057419,
-0.07838315516710281,
-0.01634383574128151,
0.009275024756789207,
-0.027147982269525528,
0.004662949591875076,
0.05177038162946701,
-0.02298012189567089,
-0.03710564225912094,
-0.0034540414344519377,
0.01627873256802559,
0.061479128897190094,
-0.032510899007320404,
0.041735947132110596,
0.012115874327719212,
0.06630599498748779,
-0.04646243155002594,
0.007882704958319664,
-0.049408286809921265,
-0.02881508320569992,
0.02224831096827984,
0.03660319373011589,
0.01894766464829445,
0.07039345800876617,
0.06632866710424423,
-0.008709082379937172,
-0.03017428331077099,
0.0475832037627697,
0.05312437191605568,
-0.000702663033735007,
-0.0351736806333065,
0.005038703326135874,
0.0075787450186908245,
-0.03405654430389404,
0.010634816251695156,
-0.006283828988671303,
0.02385597676038742,
0.03372649475932121,
-0.012467344291508198,
-0.004508913028985262,
-0.015425574965775013,
-0.0212415624409914,
-0.05351897329092026,
-0.040660735219717026,
-0.013640991412103176,
-0.046448782086372375,
-0.05518234893679619,
0.031697582453489304,
0.04773261770606041,
0.033142030239105225,
0.05727474391460419,
0.045315567404031754,
-0.04273334518074989,
-0.027953963726758957,
0.050486188381910324,
0.04600541666150093,
-0.03228508681058884,
-0.0345565602183342,
-0.05903920903801918,
0.039160046726465225,
0.043126676231622696,
-0.02984713762998581,
-0.09617052972316742,
0.0007653618813492358,
0.025343777611851692,
-0.02875649742782116,
0.08072912693023682,
0.01488108467310667,
0.01215821597725153,
0.05163729190826416,
-0.008369330316781998,
0.02608584798872471,
-0.02983417548239231,
0.016641635447740555,
-0.0010632614139467478,
0.05202523618936539,
-0.023733681067824364,
-0.0378454253077507,
-0.03150991350412369,
0.02227615751326084,
0.008098693564534187,
0.030935294926166534,
0.020945169031620026,
-0.01518968865275383,
-0.06795472651720047,
-0.003395523875951767,
0.03614543378353119,
-0.03591484948992729,
0.011666606180369854,
0.02225612848997116,
0.0492260716855526,
-0.05137219652533531,
-0.02957966923713684,
-0.01439796295017004,
-0.0020734246354550123,
0.02503785490989685,
0.002849703887477517,
-0.022319747135043144,
-0.06870267540216446,
0.014802096411585808,
-0.01901107095181942,
-0.02308216318488121,
-0.0938771665096283,
0.03211536258459091,
-0.0021887067705392838,
-0.010554436594247818,
0.045814964920282364,
0.04790310561656952,
0.01802736334502697,
0.048414669930934906,
-0.018790364265441895,
0.027025384828448296,
-0.03772912174463272,
0.010172913782298565,
-0.020749805495142937,
-0.013580444268882275,
-0.014466168358922005,
-0.06614121794700623,
-0.020998084917664528,
-0.03770289570093155,
-0.030249377712607384,
-0.051059357821941376,
-0.028213784098625183,
0.01107528805732727,
-0.02332313358783722,
-0.001048451871611178,
-0.005472700577229261,
0.009838537313044071,
-0.025656908750534058,
-0.01603791117668152,
-0.0284401997923851,
-0.037071067839860916,
-0.10111410915851593,
-0.028318315744400024,
0.009271851740777493,
0.03551701083779335,
0.04752623662352562,
-0.0030959199648350477,
0.009134110063314438,
0.021678084507584572,
0.0014118499821051955,
-0.01101523358374834,
0.029936499893665314,
0.004777634050697088,
-0.04871637374162674,
-0.030635496601462364,
0.014569681137800217,
0.017137419432401657,
0.01561659760773182,
-0.02320803888142109,
0.00833769328892231,
0.038805898278951645,
-0.04742436110973358,
-0.0027743002865463495,
0.03578256815671921,
-0.014006396755576134,
-0.08135966211557388,
-0.036671292036771774,
-0.003323041833937168,
-0.04806208983063698,
0.037356164306402206,
-0.004651515744626522,
-0.017796721309423447,
-0.027135692536830902,
0.0021729329600930214,
0.03643540292978287,
-0.021015634760260582,
-0.03288068622350693,
-0.0038868363481014967,
-0.0333159901201725,
0.03498448431491852,
-0.06248607859015465,
0.05200428143143654,
-0.042742591351270676,
0.0029632430523633957,
-0.016180813312530518,
-0.0029264602344483137,
-0.05088158696889877,
0.062602199614048,
-0.01120575051754713,
-0.008548353798687458,
-0.014361871406435966,
0.002526543103158474,
-0.03671950101852417,
0.03720491752028465,
0.00258756335824728,
-0.0002486383600626141,
-0.038550667464733124,
0.019893620163202286,
-0.04741924628615379,
0.006842457223683596,
-0.02680201828479767,
-0.00907016173005104,
-0.021567607298493385,
-0.026323562487959862,
-0.015203781425952911,
-0.05581188201904297,
0.04635601490736008,
0.03147374466061592,
0.02650647982954979,
0.01481158658862114,
-0.019518813118338585,
-0.00786561705172062,
0.04071441665291786,
-0.07584037631750107,
-0.043668217957019806,
-0.025634316727519035,
0.006164908409118652,
-0.01781575195491314,
0.061468251049518585,
0.05796604976058006,
-0.04718470573425293,
-0.019780881702899933,
0.02678733877837658,
0.0128663070499897,
0.006195185240358114,
0.023281332105398178,
0.028011111542582512,
0.04639286920428276,
0.047238465398550034,
-0.04714953154325485,
-0.021824738010764122,
-0.0134228290989995,
-0.0058354660868644714,
-0.016329163685441017,
-0.013666234910488129,
0.026123540475964546,
-0.025587597861886024,
-0.03986898437142372,
-0.01694173738360405,
0.05560003221035004,
0.04969497397542,
0.01793844997882843,
0.001036970759741962,
-0.040517158806324005,
0.013713710010051727,
0.012620638124644756,
-0.0451667420566082,
-0.033209335058927536,
0.021287810057401657,
-0.04871467500925064,
0.0765770971775055,
-0.018193140625953674,
0.012649967335164547,
0.03620060160756111,
0.03304438292980194,
0.003182407468557358,
0.049841828644275665,
-0.034933678805828094,
-0.01882457174360752,
0.03825009614229202,
-0.03908947482705116,
-0.01396844070404768,
-0.005057677160948515,
0.055211737751960754,
-0.04603692516684532,
0.04397435486316681,
0.02094435878098011,
0.018570594489574432,
-0.004571816418319941,
-0.02415332943201065,
-0.048970840871334076,
0.0359136238694191,
-0.06395269930362701,
0.07023488730192184,
-0.014149737544357777,
-0.08540324866771698,
0.08070509880781174,
0.027669940143823624,
-0.0904553085565567,
0.0006226027035154402,
0.030935004353523254,
0.020840810611844063,
0.0336960144340992,
0.03563021495938301,
-0.06851844489574432,
0.011198791675269604,
-0.04746514931321144,
-0.0004594597849063575,
-0.056571416556835175,
-0.007165928836911917,
0.017912879586219788,
-0.05357164517045021,
0.002881012624129653,
0.02413131855428219,
-0.018049422651529312,
0.00940453726798296,
0.018063101917505264,
-0.04868536442518234,
-0.04819723218679428,
-0.010870061814785004,
0.015773460268974304,
-0.027842795476317406,
0.022519035264849663,
-0.011696113273501396,
0.03733512759208679,
0.014199609868228436,
0.008040372282266617,
-0.056375209242105484,
0.01220862939953804,
0.033749427646398544,
-0.038770195096731186,
-0.02773199789226055,
0.019236112013459206,
0.007416615728288889,
-0.014977828599512577,
0.0344993881881237,
0.0013525288086384535,
0.02774116024374962,
0.02344975620508194,
-0.02116299606859684,
0.018413690850138664,
-0.03816871717572212,
-0.004542408976703882,
0.01640333980321884,
0.01636064052581787,
0.05103352293372154,
-0.011095126159489155,
0.025963975116610527,
0.03217530995607376,
0.026452751830220222,
-0.005263143684715033,
-0.020361660048365593,
-0.0060016498900949955,
0.025798650458455086,
-0.037467047572135925,
0.03277767449617386,
0.006653795950114727,
-0.041189152747392654,
-0.025742536410689354,
-0.041942622512578964,
-0.02182617038488388,
0.04862803965806961,
-0.042532727122306824,
0.009766023606061935,
0.06027466431260109,
-0.010742527432739735,
-0.042687393724918365,
-0.07774227112531662,
-0.005961934570223093,
-0.011705937795341015,
0.02066207118332386,
0.022661812603473663,
-0.018773972988128662,
-0.0008704434148967266,
-0.04228467121720314,
-0.057569943368434906,
0.04653649404644966,
0.023206038400530815,
-0.02492588758468628,
0.05200020223855972,
0.04327567294239998,
-0.02373633347451687,
0.012696591205894947,
0.017736589536070824,
-0.04697588458657265,
0.029251938685774803,
0.0054490468464791775,
0.010960827581584454,
0.03566648066043854,
0.038761038333177567,
-0.023704655468463898,
-0.04080856591463089,
-0.06908799707889557,
-0.03156915307044983,
-0.02464623749256134,
-0.0180056132376194,
0.07401641458272934
] |
Capreolus/bert-base-msmarco | [
"pytorch",
"tf",
"jax",
"bert",
"text-classification",
"arxiv:2008.09093",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 238 | 2020-12-09T14:22:43Z | ---
tags:
- summarization
widget:
- text: "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
---
# CodeTrans model for code documentation generation go
Pretrained model on programming language go using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized go code functions: it works best with tokenized go functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the go function/method.
## Intended uses & limitations
The model could be used to generate the description for the go function or be fine-tuned on other go code tasks. It can be used on unparsed and untokenized go code. However, if the go code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate go function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_go_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_go_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "func ( pr * Progress ) needSnapshotAbort ( ) bool { return pr . State == ProgressStateSnapshot && pr . Match >= pr . PendingSnapshot }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/go/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 2000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing go code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.001046790275722742,
-0.02739536017179489,
0.0014296079752966762,
0.037254128605127335,
0.032692354172468185,
0.027515042573213577,
-0.01827860251069069,
-0.0018161378102377057,
-0.022777222096920013,
0.062007974833250046,
0.045081380754709244,
0.004046426620334387,
-0.006270182318985462,
0.04822768270969391,
-0.030152421444654465,
-0.06817915290594101,
-0.01589834876358509,
-0.02798154205083847,
-0.03926756605505943,
-0.014620766043663025,
0.02781798504292965,
0.0009476066334173083,
0.010641633532941341,
0.006341945379972458,
0.0011639742879197001,
0.014705637469887733,
-0.00008766038081375882,
0.020172271877527237,
0.03474411368370056,
-0.07636242359876633,
-0.023434942588210106,
-0.00048567092744633555,
-0.03624458983540535,
-0.006968474015593529,
-0.031205598264932632,
0.020607640966773033,
0.006794257089495659,
0.040479015558958054,
0.018958717584609985,
0.06255605071783066,
0.012643363326787949,
0.02013426460325718,
0.02979070506989956,
-0.041943397372961044,
0.0593789778649807,
0.0010643124114722013,
-0.0340769924223423,
-0.025065846741199493,
0.01870310679078102,
0.0008114694501273334,
-0.05613410845398903,
-0.07177843898534775,
-0.026899639517068863,
0.047912951558828354,
-0.007456651888787746,
-0.012091677635908127,
-0.08141089230775833,
-0.03235382214188576,
0.05048730969429016,
-0.049813494086265564,
-0.029103275388479233,
0.010291694663465023,
-0.05632780119776726,
0.021733205765485764,
-0.0010041798232123256,
0.008904964663088322,
0.008700594305992126,
-0.049362871795892715,
0.02755087800323963,
0.003142185742035508,
0.05994212254881859,
-0.03298359364271164,
0.029010487720370293,
-0.11738437414169312,
0.01393942441791296,
-0.002343091182410717,
0.019609851762652397,
0.00952836126089096,
-0.020303873345255852,
0.05030177906155586,
-0.005442505236715078,
0.003156715538352728,
0.04308144748210907,
0.011152095161378384,
-0.013344589620828629,
0.050979577004909515,
-0.03472478315234184,
-0.015267258509993553,
-0.018187128007411957,
0.06823413074016571,
-0.05875732749700546,
-0.06528887897729874,
-0.021807542070746422,
-0.02767482027411461,
-0.04246086999773979,
0.03230300173163414,
0.05442926660180092,
-0.017476147040724754,
0.019478123635053635,
-0.0015473582316190004,
0.045062754303216934,
0.05244886502623558,
-0.003993970807641745,
0.0417536124587059,
0.023091569542884827,
0.011928225867450237,
-0.020379746332764626,
-0.05057168006896973,
-0.03767151013016701,
0.03979780524969101,
0.00950675830245018,
-0.024577580392360687,
-0.044495824724435806,
0.027651024982333183,
0.008637933991849422,
-0.054648179560899734,
0.04812951385974884,
-0.019984707236289978,
-0.05070136860013008,
-0.03614189848303795,
0.05773703008890152,
-0.011316347867250443,
-0.029722243547439575,
0.019995857030153275,
-0.030505549162626266,
0.00776385935023427,
-0.05004696175456047,
-0.03215866535902023,
0.0021890795323997736,
0.01729687862098217,
-0.006704915780574083,
0.08856996893882751,
0.011582504026591778,
-0.03980811685323715,
0.011901576071977615,
0.022609522566199303,
-0.07739473134279251,
0.05372688174247742,
0.03212614357471466,
0.10449527204036713,
-0.08107338845729828,
-0.03656588867306709,
0.02917262353003025,
0.008109997026622295,
-0.004476387985050678,
0.023821696639060974,
-0.009682704694569111,
-0.07495809346437454,
-0.02631274238228798,
0.003335646353662014,
0.06545812636613846,
-0.046290766447782516,
-0.02456994354724884,
0.03354690223932266,
0.012076501734554768,
0.010735445655882359,
-0.032875873148441315,
-0.0034446853678673506,
-0.004477693699300289,
-0.021637311205267906,
-0.07046356797218323,
0.02702444978058338,
-0.019245103001594543,
-0.033254627138376236,
-0.020099591463804245,
-0.03317668288946152,
0.012995075434446335,
0.11166326701641083,
0.010425725020468235,
-0.008351756259799004,
-0.0382363423705101,
0.017456689849495888,
0.0319395437836647,
0.055823881179094315,
-0.02792302705347538,
0.02868787944316864,
0.03333389386534691,
0.06282341480255127,
-0.0366441048681736,
0.0702982172369957,
-0.0006606756942346692,
-0.047734715044498444,
-0.026445236057043076,
0.01939319260418415,
-0.019143646582961082,
-0.04295077919960022,
0.0012093819677829742,
0.01610158383846283,
-0.02129562385380268,
-0.012090125121176243,
-0.01710355468094349,
0.05177195742726326,
0.017815135419368744,
-0.01316357683390379,
-0.03007620759308338,
0.014459142461419106,
-0.0017202176386490464,
0.06502848863601685,
-0.034617647528648376,
-0.009231812320649624,
-0.019867854192852974,
-0.032153207808732986,
-0.0014235544949769974,
0.025569243356585503,
0.05043601989746094,
0.027230121195316315,
-0.015420857816934586,
0.09365935623645782,
-0.042346544563770294,
0.007584389764815569,
-0.04013625159859657,
-0.048595767468214035,
0.008929058909416199,
0.027626346796751022,
0.030083855614066124,
0.023793786764144897,
0.015321047976613045,
-0.03159980848431587,
0.00940343365073204,
0.08180901408195496,
0.0385156087577343,
0.04042057320475578,
-0.020793026313185692,
-0.015986831858754158,
0.042540840804576874,
0.05898136645555496,
-0.029885927215218544,
-0.039290498942136765,
0.03782181069254875,
0.031200716271996498,
-0.02539242058992386,
0.020128080621361732,
-0.004631866700947285,
0.010685727000236511,
-0.052126139402389526,
-0.061291541904211044,
0.03939775004982948,
0.019957296550273895,
-0.0020150893833488226,
0.03181891888380051,
0.002424010308459401,
0.0024743143003433943,
0.032469555735588074,
-0.005797519348561764,
0.0049640946090221405,
-0.06849690526723862,
0.017543500289320946,
0.0010581149253994226,
0.05933882296085358,
-0.04218564182519913,
0.03219126909971237,
0.0101593267172575,
-0.00847291387617588,
0.055568523705005646,
-0.026066802442073822,
0.03316758945584297,
0.02408943511545658,
0.03850413113832474,
-0.019597608596086502,
0.016608968377113342,
0.01125954557210207,
0.028266940265893936,
0.08115186542272568,
0.005967776291072369,
0.07171809673309326,
-0.013946290127933025,
0.05834999680519104,
0.06106511130928993,
0.01426891703158617,
0.004938867874443531,
0.03302788734436035,
0.059390127658843994,
-0.005441830027848482,
-0.006811291445046663,
0.054951801896095276,
-0.05134665220975876,
0.02739746868610382,
-0.04467853531241417,
0.027908818796277046,
-0.008334838785231113,
-0.025754045695066452,
0.03504732623696327,
0.011942634359002113,
-0.03667273372411728,
0.004855476785451174,
-0.020148565992712975,
-0.02283843234181404,
0.012741104699671268,
0.0004438262549228966,
-0.02876647189259529,
0.011750925332307816,
-0.01467195525765419,
0.02227630466222763,
-0.08313044905662537,
-0.03597113862633705,
-0.016582589596509933,
-0.03823656216263771,
0.014116696082055569,
-0.08480394631624222,
-0.04818832129240036,
-0.07366328686475754,
-0.010647636838257313,
0.04655051603913307,
0.01434889156371355,
-0.006762739736586809,
-0.03445469215512276,
0.009786528535187244,
-0.03430910035967827,
-0.021392999216914177,
-0.06301640719175339,
-0.05951288342475891,
-0.014123691245913506,
-0.058822162449359894,
0.030143603682518005,
-0.010979779995977879,
0.025329455733299255,
0.014119487255811691,
-0.021866410970687866,
-0.03088398277759552,
-0.015795337036252022,
0.053529225289821625,
0.004504311829805374,
-0.011608661152422428,
-0.021757004782557487,
0.024547923356294632,
-0.03758002445101738,
0.04751967266201973,
-0.002722830045968294,
-0.03991272673010826,
0.10505199432373047,
0.05835491791367531,
0.034475672990083694,
-0.00788571871817112,
-0.035013265907764435,
-0.055742889642715454,
-0.04817026108503342,
-0.025426387786865234,
-0.02791113778948784,
-0.03145718201994896,
-0.007932762615382671,
-0.051693081855773926,
-0.015763331204652786,
-0.038236066699028015,
-0.04410245642066002,
-0.026460321620106697,
0.025973744690418243,
0.03507549688220024,
0.039844851940870285,
0.05204945057630539,
0.03035910427570343,
-0.028941277414560318,
-0.03082653135061264,
0.04238290339708328,
0.011421041563153267,
-0.005271335132420063,
-0.07599387317895889,
-0.025351909920573235,
0.04206329584121704,
0.021176788955926895,
0.0018778209341689944,
-0.02111951634287834,
0.039994705468416214,
0.015035475604236126,
0.007626053877174854,
0.0034533755388110876,
-0.009282811544835567,
-0.006241443566977978,
-0.02234167791903019,
-0.008318804204463959,
-0.037913039326667786,
-0.026200395077466965,
-0.028001712635159492,
-0.015316786244511604,
0.04175220802426338,
-0.06976859271526337,
-0.049898505210876465,
0.012229814194142818,
0.03907568380236626,
0.0353568010032177,
0.025198712944984436,
-0.023901334032416344,
0.0035590906627476215,
-0.0581744946539402,
-0.03506701812148094,
0.03286049887537956,
0.029131663963198662,
-0.002597994636744261,
0.038930781185626984,
0.03693627566099167,
-0.045403506606817245,
0.020541416481137276,
0.028235552832484245,
0.037602126598358154,
0.031768299639225006,
-0.03274989128112793,
0.02841322310268879,
-0.03885462135076523,
0.02554134838283062,
0.004796538036316633,
-0.0392732098698616,
-0.04661554470658302,
-0.083809494972229,
-0.02119658701121807,
0.012491805478930473,
-0.029493991285562515,
0.012509383261203766,
0.054316624999046326,
-0.0246953833848238,
-0.04011692851781845,
0.0013532910961657763,
0.009657597169280052,
0.06657693535089493,
-0.03167426213622093,
0.036988865584135056,
0.0025388740468770266,
0.06512422859668732,
-0.04303248971700668,
0.007256118580698967,
-0.03614996001124382,
-0.028175175189971924,
0.012492730282247066,
0.03973575681447983,
0.017101066187024117,
0.06783998757600784,
0.0713140219449997,
-0.004461953416466713,
-0.03219686076045036,
0.04152248427271843,
0.05162479355931282,
-0.0010014326544478536,
-0.030976850539445877,
0.0024612604174762964,
0.0064130439423024654,
-0.029774943366646767,
0.011710749939084053,
-0.006605496630072594,
0.021004758775234222,
0.026773137971758842,
-0.010685545392334461,
0.0035330974496901035,
-0.006475058384239674,
-0.024365339428186417,
-0.05678004026412964,
-0.03402482345700264,
-0.004502222407609224,
-0.04353755712509155,
-0.05419967696070671,
0.030557190999388695,
0.0481705442070961,
0.02509794943034649,
0.0577998086810112,
0.04664570093154907,
-0.04372292011976242,
-0.02887139469385147,
0.05487707629799843,
0.04826745390892029,
-0.03601401299238205,
-0.036764390766620636,
-0.05977807939052582,
0.03815453499555588,
0.04586717486381531,
-0.03634123504161835,
-0.09286129474639893,
0.0021457441616803408,
0.030550485476851463,
-0.026439111679792404,
0.07531272619962692,
0.012857972644269466,
0.013274419121444225,
0.04798745736479759,
-0.007644696161150932,
0.02630668878555298,
-0.024915048852562904,
0.017826389521360397,
-0.0005661832983605564,
0.046517398208379745,
-0.018275590613484383,
-0.03508903086185455,
-0.031055094674229622,
0.023805741220712662,
0.006135913077741861,
0.03240250051021576,
0.029163599014282227,
-0.012985949404537678,
-0.06578556448221207,
-0.005899899639189243,
0.0380154624581337,
-0.04072604700922966,
0.01431205216795206,
0.018956124782562256,
0.049523547291755676,
-0.04756433889269829,
-0.029066119343042374,
-0.019869301468133926,
-0.007110509555786848,
0.03274087607860565,
-0.0028948758263140917,
-0.02441769652068615,
-0.06202734634280205,
0.011241171509027481,
-0.02307135984301567,
-0.02330312877893448,
-0.09439656138420105,
0.03790386766195297,
0.002721460536122322,
-0.0075215925462543964,
0.05093985050916672,
0.048812735825777054,
0.013822004199028015,
0.0484471395611763,
-0.01564921997487545,
0.027426810935139656,
-0.04132727533578873,
0.020387200638651848,
-0.018483253195881844,
-0.016091756522655487,
-0.010389461182057858,
-0.06673063337802887,
-0.01874682307243347,
-0.04212581738829613,
-0.02948216162621975,
-0.05055840685963631,
-0.030862918123602867,
0.00840016920119524,
-0.019669856876134872,
-0.005233441013842821,
-0.006358474027365446,
0.008130394853651524,
-0.018508991226553917,
-0.016758741810917854,
-0.030983975157141685,
-0.04023047164082527,
-0.09186536073684692,
-0.023836763575673103,
0.013898064382374287,
0.034817930310964584,
0.041054971516132355,
-0.0004781911848112941,
0.011111214756965637,
0.029196621850132942,
0.0021956630516797304,
-0.01430272776633501,
0.03020901419222355,
0.00549790496006608,
-0.04156401380896568,
-0.03294754400849342,
0.011332263238728046,
0.01831888221204281,
0.011209594085812569,
-0.021921619772911072,
0.011212605983018875,
0.043568916618824005,
-0.0387691929936409,
0.0007763784960843623,
0.04243946820497513,
-0.013684524223208427,
-0.08225788921117783,
-0.035894718021154404,
-0.004397368989884853,
-0.04276079684495926,
0.03860744088888168,
-0.001794292125850916,
-0.022771237418055534,
-0.022531960159540176,
-0.0044187442399561405,
0.03283001482486725,
-0.016860896721482277,
-0.030867738649249077,
0.0041702124290168285,
-0.03501668944954872,
0.033855076879262924,
-0.0594177320599556,
0.05570271983742714,
-0.04121728986501694,
-0.0008737061289139092,
-0.016353709623217583,
-0.0054426975548267365,
-0.041413236409425735,
0.06690050661563873,
-0.014420640654861927,
-0.008706328459084034,
-0.01568145677447319,
-0.0022831005044281483,
-0.031189095228910446,
0.03580034151673317,
0.0027834756765514612,
0.00038326752837747335,
-0.03605318441987038,
0.016540562734007835,
-0.03734569624066353,
0.009064571000635624,
-0.02541181445121765,
-0.0189510565251112,
-0.015037030912935734,
-0.02363009750843048,
-0.014909722842276096,
-0.055659063160419464,
0.04433629661798477,
0.02990938350558281,
0.01914287731051445,
0.012856210581958294,
-0.019930141046643257,
-0.008069596253335476,
0.038490064442157745,
-0.07489433139562607,
-0.04357486590743065,
-0.025515694171190262,
0.0020991931669414043,
-0.017454281449317932,
0.06349264085292816,
0.0625028908252716,
-0.04696528613567352,
-0.014369445852935314,
0.021810954436659813,
0.010092264972627163,
0.0074663613922894,
0.02989749051630497,
0.024555763229727745,
0.052080802619457245,
0.05446561053395271,
-0.04932286962866783,
-0.015347780659794807,
-0.012938003987073898,
-0.008843732066452503,
-0.01393456943333149,
-0.011263406835496426,
0.024938782677054405,
-0.018288280814886093,
-0.040162842720746994,
-0.014687958173453808,
0.060670167207717896,
0.05285674333572388,
0.01706269197165966,
-0.0002827669959515333,
-0.03504811227321625,
0.01716458983719349,
0.014250935055315495,
-0.04192770645022392,
-0.03177640959620476,
0.02244030497968197,
-0.04574435576796532,
0.07707622647285461,
-0.01294192299246788,
0.01161642000079155,
0.03167717903852463,
0.03778517618775368,
0.008383533917367458,
0.054386481642723083,
-0.03165322169661522,
-0.017292607575654984,
0.041125763207674026,
-0.034936338663101196,
-0.009643500670790672,
-0.003019113792106509,
0.05974138528108597,
-0.04552343115210533,
0.043018486350774765,
0.017370283603668213,
0.025997724384069443,
-0.008530811406672001,
-0.017577901482582092,
-0.052538830786943436,
0.04093318432569504,
-0.05843953415751457,
0.06684725731611252,
-0.016916193068027496,
-0.0779646560549736,
0.08090179413557053,
0.028095513582229614,
-0.09112498909235,
0.004007658921182156,
0.03696471452713013,
0.021934809163212776,
0.039005570113658905,
0.032380830496549606,
-0.07036425173282623,
0.0029162827413529158,
-0.050498008728027344,
0.004320729523897171,
-0.059890635311603546,
-0.008690002374351025,
0.027080776169896126,
-0.05970490351319313,
0.006713252980262041,
0.022829316556453705,
-0.015720535069704056,
0.006275714375078678,
0.01760970428586006,
-0.0464300662279129,
-0.045199453830718994,
-0.015881488099694252,
0.014513077214360237,
-0.03048107959330082,
0.026266206055879593,
-0.015691617503762245,
0.03988433629274368,
0.0123284375295043,
0.007117884699255228,
-0.047471895813941956,
0.019497251138091087,
0.030118919909000397,
-0.03920220956206322,
-0.025128904730081558,
0.019437598064541817,
0.008738094940781593,
-0.014944263733923435,
0.034313518553972244,
-0.004203616175800562,
0.028042010962963104,
0.02476825937628746,
-0.023152783513069153,
0.01575651951134205,
-0.03798006474971771,
-0.005528435111045837,
0.014411299489438534,
0.011986421421170235,
0.0441553108394146,
-0.013389870524406433,
0.02478017657995224,
0.03149273991584778,
0.030037717893719673,
-0.005610419437289238,
-0.019804926589131355,
-0.007868144661188126,
0.026611987501382828,
-0.034341245889663696,
0.025080105289816856,
0.007195508107542992,
-0.047852884978055954,
-0.027566460892558098,
-0.04052024334669113,
-0.024504555389285088,
0.05096178129315376,
-0.042377397418022156,
0.0065474058501422405,
0.056271810084581375,
-0.00730000389739871,
-0.05189218744635582,
-0.07811329513788223,
-0.0021467930637300014,
-0.011781090870499611,
0.025682738050818443,
0.024716239422559738,
-0.022334353998303413,
0.0016860184259712696,
-0.046431224793195724,
-0.06327791512012482,
0.03927971050143242,
0.012725885026156902,
-0.019667023792862892,
0.050405532121658325,
0.04305214807391167,
-0.022066649049520493,
0.01595143973827362,
0.017688868567347527,
-0.04527388513088226,
0.034751664847135544,
0.014135164208710194,
0.009394054301083088,
0.030791698023676872,
0.03863067924976349,
-0.015102501958608627,
-0.042118269950151443,
-0.06729742884635925,
-0.027296947315335274,
-0.025428863242268562,
-0.013880648650228977,
0.07631608843803406
] |
Capreolus/birch-bert-large-mb | [
"pytorch",
"tf",
"jax",
"bert",
"next-sentence-prediction",
"transformers"
] | null | {
"architectures": [
"BertForNextSentencePrediction"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 1 | 2020-11-25T10:59:31Z | ---
tags:
- summarization
widget:
- text: "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
---
# CodeTrans model for code documentation generation java
Pretrained model on programming language java using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on CodeSearchNet Corpus java dataset.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_java"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_java", skip_special_tokens=True),
device=0
)
tokenized_code = "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/function%20documentation%20generation/java/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0008749521221034229,
-0.01150029618293047,
-0.00539639825001359,
0.024433976039290428,
0.03267369791865349,
0.04071354493498802,
-0.031824007630348206,
0.0022842660546302795,
-0.0036879628896713257,
0.04925079643726349,
0.029053177684545517,
-0.014400863088667393,
-0.0035137669183313847,
0.05108257010579109,
-0.045994725078344345,
-0.06644215434789658,
-0.016826508566737175,
-0.034133344888687134,
-0.03449659422039986,
-0.007667004596441984,
0.02574109099805355,
0.002212594961747527,
-0.0019254920771345496,
0.010740773752331734,
-0.011115346103906631,
0.006440224125981331,
0.008488336578011513,
0.019787371158599854,
0.03336780145764351,
-0.07346931844949722,
-0.025572074577212334,
0.0017980843549594283,
-0.033864572644233704,
-0.01752401702105999,
-0.03260524943470955,
0.020463962107896805,
0.0063973646610975266,
0.039893534034490585,
0.03074296936392784,
0.05984318628907204,
-0.0016593729378655553,
0.030112311244010925,
0.014832152053713799,
-0.03686809539794922,
0.064898781478405,
0.006858574692159891,
-0.025207890197634697,
-0.026669533923268318,
0.015921708196401596,
0.0007250906783156097,
-0.05793999135494232,
-0.07268176227807999,
-0.04356810823082924,
0.044571403414011,
-0.008106132037937641,
-0.0022017566952854395,
-0.06822400540113449,
-0.030194053426384926,
0.039682723581790924,
-0.05504300445318222,
-0.025827642530202866,
0.004042853135615587,
-0.07095914334058762,
0.02305842563509941,
0.013014803640544415,
-0.00704260403290391,
0.00419398071244359,
-0.047604359686374664,
0.03081098571419716,
-0.005741209257394075,
0.049936745315790176,
-0.02707698568701744,
0.021333768963813782,
-0.11775446683168411,
0.01590895466506481,
-0.017498506233096123,
0.02288435585796833,
0.019993728026747704,
-0.012993107549846172,
0.05856082960963249,
-0.005203924607485533,
0.012771054171025753,
0.04416201636195183,
0.0008551249047741294,
-0.014835894107818604,
0.03873492777347565,
-0.023544268682599068,
-0.017964398488402367,
-0.01395512092858553,
0.06871367990970612,
-0.05933404341340065,
-0.06026901304721832,
-0.0176393985748291,
-0.025192460045218468,
-0.03514823690056801,
0.027151690796017647,
0.04716602712869644,
-0.012225016951560974,
0.022600272670388222,
0.006632334087044001,
0.046289682388305664,
0.05773083493113518,
-0.009709279052913189,
0.03902415186166763,
0.03516627475619316,
0.009530514478683472,
-0.011490442790091038,
-0.048488207161426544,
-0.019486816599965096,
0.04580576345324516,
0.003916324581950903,
-0.04357437044382095,
-0.0464932881295681,
0.02619844302535057,
0.023297404870390892,
-0.04602649062871933,
0.050753943622112274,
-0.019657136872410774,
-0.04491248354315758,
-0.03762638941407204,
0.05021773278713226,
-0.003934171982109547,
-0.02006668411195278,
0.002415306167677045,
-0.04134243726730347,
0.013435382395982742,
-0.05195068195462227,
-0.020051153376698494,
0.013665645383298397,
0.031980160623788834,
-0.01944691874086857,
0.07974277436733246,
0.004967827349901199,
-0.03166821599006653,
0.009114227257668972,
0.021333185955882072,
-0.07093734294176102,
0.06153913214802742,
0.03792759031057358,
0.1072433590888977,
-0.06409814953804016,
-0.04257041588425636,
0.0268293097615242,
0.003692649770528078,
-0.009517256170511246,
0.020513493567705154,
-0.016696780920028687,
-0.08017027378082275,
-0.03570520132780075,
-0.011768866330385208,
0.06671896576881409,
-0.05286090448498726,
-0.011500847525894642,
0.0331224650144577,
0.0004180661926511675,
0.012898805551230907,
-0.03862150385975838,
-0.0008455283823423088,
0.000638542405795306,
-0.02735159359872341,
-0.06077572703361511,
0.02525390312075615,
-0.0031052613630890846,
-0.020658574998378754,
-0.03248431161046028,
-0.04076329991221428,
-0.005460727494210005,
0.10942766815423965,
0.01633860170841217,
-0.01285096537321806,
-0.048712145537137985,
0.016957921907305717,
0.03188915550708771,
0.03609813004732132,
-0.02048705890774727,
0.02226858399808407,
0.05132872611284256,
0.06825672835111618,
-0.034088827669620514,
0.06362676620483398,
-0.017062164843082428,
-0.0232195183634758,
-0.034660208970308304,
0.017508551478385925,
-0.006435069255530834,
-0.03916853666305542,
0.0019256494706496596,
0.017111174762248993,
-0.019901907071471214,
-0.007612100336700678,
-0.006464125122874975,
0.058975499123334885,
0.0230912733823061,
-0.012973759323358536,
-0.022362172603607178,
0.008505932986736298,
-0.020078567788004875,
0.05740838870406151,
-0.0378606878221035,
-0.0032824010122567415,
-0.021531660109758377,
-0.027410252019762993,
-0.002072107046842575,
0.02806525118649006,
0.04028785973787308,
0.021121641620993614,
-0.005500410217791796,
0.09958943724632263,
-0.04316793754696846,
0.006400986108928919,
-0.04334846884012222,
-0.0419422872364521,
0.008410293608903885,
0.03322542458772659,
0.023890739306807518,
0.02783944644033909,
0.006353697273880243,
-0.019869649782776833,
0.012921720743179321,
0.07702061533927917,
0.04519161954522133,
0.046410150825977325,
-0.022545868530869484,
-0.028374681249260902,
0.048498913645744324,
0.06605608016252518,
-0.04934770613908768,
-0.045816272497177124,
0.04706089198589325,
0.03027106076478958,
-0.013172709383070469,
0.029952405020594597,
-0.004805848002433777,
0.010469007305800915,
-0.0639301985502243,
-0.06593108922243118,
0.03921148553490639,
0.02149382419884205,
0.006810361985117197,
0.03209000825881958,
0.0025466224178671837,
-0.00926993042230606,
0.04216784983873367,
0.0037945013027638197,
0.0025294010993093252,
-0.05526663735508919,
0.007880681194365025,
-0.0014978630933910608,
0.0682196170091629,
-0.03147473558783531,
0.031091397628188133,
0.017094362527132034,
0.0026784653309732676,
0.04884129762649536,
-0.028163863345980644,
0.022007746621966362,
0.025229860097169876,
0.022212279960513115,
-0.01241379790008068,
0.027861960232257843,
0.02152223140001297,
0.03214694932103157,
0.08591382950544357,
0.012264097109436989,
0.05383148416876793,
-0.005336566362529993,
0.06385769695043564,
0.05876537412405014,
0.014687499962747097,
0.009506470523774624,
0.029131025075912476,
0.06532437354326248,
-0.0016047515673562884,
-0.009280194528400898,
0.06548907607793808,
-0.03513207659125328,
0.016274871304631233,
-0.04197951406240463,
0.034867268055677414,
-0.003986024763435125,
-0.019265342503786087,
0.033208128064870834,
0.008180121891200542,
-0.06659246236085892,
-0.0011757034808397293,
-0.02842751331627369,
-0.029096819460392,
0.016636714339256287,
-0.01425198744982481,
-0.021318631246685982,
0.010382408276200294,
-0.020710211247205734,
0.021937135607004166,
-0.08875522017478943,
-0.05449366196990013,
-0.002047889865934849,
-0.04065703600645065,
0.0022824814077466726,
-0.06884615868330002,
-0.048433441668748856,
-0.06109010800719261,
-0.02515658549964428,
0.05194336920976639,
0.010631895624101162,
-0.01788833737373352,
-0.029936663806438446,
0.011835076846182346,
-0.03886803239583969,
-0.03511417657136917,
-0.0608527734875679,
-0.07218193262815475,
-0.004537183791399002,
-0.0742325484752655,
0.029064008966088295,
-0.025814371183514595,
0.04022173583507538,
0.008344057016074657,
-0.015256970189511776,
-0.020755358040332794,
-0.01394626870751381,
0.05304470285773277,
0.02050694078207016,
-0.016015376895666122,
-0.024191536009311676,
0.022170769050717354,
-0.013063197955489159,
0.035506922751665115,
-0.003152068704366684,
-0.04272789880633354,
0.1073300763964653,
0.05061321333050728,
0.040584996342659,
-0.007737332489341497,
-0.03993944078683853,
-0.048846788704395294,
-0.0421660952270031,
-0.02489318512380123,
-0.01417024526745081,
-0.03292126953601837,
-0.008257837034761906,
-0.05593498796224594,
-0.02399955317378044,
-0.038404520601034164,
-0.04175233468413353,
-0.02547798678278923,
0.03363129869103432,
0.02806141786277294,
0.056118033826351166,
0.05223585292696953,
0.0258027296513319,
-0.025906898081302643,
-0.03952747583389282,
0.034820519387722015,
0.0015137835871428251,
-0.0032554776407778263,
-0.06266279518604279,
-0.03125958889722824,
0.025063911452889442,
0.023335278034210205,
-0.009201538749039173,
-0.013863325119018555,
0.04722454026341438,
0.012334935367107391,
0.0056479801423847675,
0.013356364332139492,
-0.010803043842315674,
-0.016987161710858345,
-0.024167535826563835,
-0.00007072272273944691,
-0.03168604522943497,
-0.02820480614900589,
-0.012267638929188251,
-0.020988941192626953,
0.043681442737579346,
-0.05804932862520218,
-0.05498536676168442,
0.008959213271737099,
0.034572210162878036,
0.027060924097895622,
0.023531729355454445,
-0.02414870262145996,
0.00208281259983778,
-0.06023270636796951,
-0.04609009250998497,
0.028552556410431862,
0.01470168586820364,
-0.004810507874935865,
0.03498550131917,
0.040207769721746445,
-0.03685282915830612,
0.03130550682544708,
0.023805251345038414,
0.037260979413986206,
0.04352559521794319,
-0.025259070098400116,
0.00743510015308857,
-0.05218648165464401,
0.022480890154838562,
0.01111429650336504,
-0.028503257781267166,
-0.043788231909275055,
-0.07671073079109192,
-0.03355814516544342,
0.015324640087783337,
-0.021142827346920967,
-0.005564539227634668,
0.05284890905022621,
-0.01419058721512556,
-0.045299138873815536,
-0.002532862825319171,
0.012358790263533592,
0.06180204078555107,
-0.022135669365525246,
0.03218022361397743,
0.01505308412015438,
0.07387645542621613,
-0.053834568709135056,
-0.005593935959041119,
-0.03621315583586693,
-0.03514456748962402,
0.017499474808573723,
0.053721826523542404,
0.0227234847843647,
0.05037283897399902,
0.06868048012256622,
0.009487352333962917,
-0.03280904144048691,
0.046745408326387405,
0.05762137845158577,
0.008297493681311607,
-0.0297256913036108,
0.0013234546640887856,
-0.0074075935408473015,
-0.0366729311645031,
0.01529389526695013,
-0.015476477332413197,
0.026404693722724915,
0.024213584139943123,
-0.00816637184470892,
-0.002936002565547824,
-0.00368356890976429,
-0.02333887480199337,
-0.04551592469215393,
-0.04654625803232193,
-0.0029287789948284626,
-0.03781775385141373,
-0.060134731233119965,
0.02004140242934227,
0.031107589602470398,
0.04241808503866196,
0.05415556952357292,
0.050777994096279144,
-0.04838684946298599,
-0.036288782954216,
0.0352322980761528,
0.0487220399081707,
-0.034424666315317154,
-0.03225195035338402,
-0.05186917260289192,
0.038689468055963516,
0.03992626070976257,
-0.02252524346113205,
-0.09543997794389725,
0.012410837225615978,
0.01751246303319931,
-0.02194312959909439,
0.07177641987800598,
0.012324633076786995,
0.020250175148248672,
0.05560186132788658,
0.006251024082303047,
0.027623875066637993,
-0.031342148780822754,
0.006288209464401007,
-0.008737201802432537,
0.03630055859684944,
-0.029571840539574623,
-0.035013407468795776,
-0.05045103281736374,
0.020845165476202965,
0.01198195293545723,
0.04150654375553131,
0.02963322214782238,
-0.016017558053135872,
-0.06853051483631134,
-0.007838902063667774,
0.029929598793387413,
-0.016819776967167854,
0.02229912020266056,
0.022651594132184982,
0.04514090344309807,
-0.03415408730506897,
-0.02767062373459339,
-0.01712046191096306,
-0.013492044992744923,
0.03187893331050873,
0.007166950032114983,
-0.023017125204205513,
-0.0669248178601265,
0.02079414390027523,
-0.018772603943943977,
-0.02686411887407303,
-0.09349458664655685,
0.047425225377082825,
-0.0003052251413464546,
-0.007461247034370899,
0.0574534572660923,
0.028817206621170044,
0.013154678046703339,
0.041972097009420395,
-0.020650364458560944,
0.027202975004911423,
-0.029908621683716774,
0.018733300268650055,
-0.01953488029539585,
-0.01686006225645542,
-0.022262349724769592,
-0.06880167126655579,
-0.015977108851075172,
-0.0345752127468586,
-0.0301943589001894,
-0.0412222221493721,
-0.02159453183412552,
-0.00043458922300487757,
-0.029797907918691635,
-0.0025779749266803265,
-0.009593266062438488,
0.013791880570352077,
-0.03406331688165665,
-0.029945753514766693,
-0.028560658916831017,
-0.040841348469257355,
-0.10513156652450562,
-0.028974393382668495,
0.012015017680823803,
0.04078010842204094,
0.035943932831287384,
0.0012635418679565191,
0.008332213386893272,
0.036118023097515106,
-0.0029236660338938236,
-0.005518024321645498,
0.007252951618283987,
0.012848768383264542,
-0.04141959920525551,
-0.028965620324015617,
0.004183631855994463,
0.007138621062040329,
0.009737610816955566,
-0.02154620923101902,
0.004826960153877735,
0.04550768435001373,
-0.029658982530236244,
0.0013583878753706813,
0.03617170453071594,
0.00681088212877512,
-0.07657182216644287,
-0.028437959030270576,
0.000026985255317413248,
-0.04754732921719551,
0.03298092633485794,
-0.0011637434363365173,
-0.03426973894238472,
-0.009275279939174652,
-0.0018747398862615228,
0.03627577796578407,
-0.0077325738966465,
-0.025924094021320343,
0.0026566674932837486,
-0.02785053476691246,
0.03383129462599754,
-0.059331636875867844,
0.049095187336206436,
-0.03686606138944626,
0.00011615767289185897,
-0.010521195828914642,
-0.010966062545776367,
-0.045330680906772614,
0.061658430844545364,
-0.01123177632689476,
-0.002821418922394514,
-0.005957069341093302,
0.014581393450498581,
-0.029197663068771362,
0.02758568711578846,
-0.006284679751843214,
0.005841145291924477,
-0.03330778330564499,
0.021189244464039803,
-0.046201206743717194,
0.01311306282877922,
-0.024855490773916245,
-0.010033286176621914,
-0.02048356831073761,
-0.020024307072162628,
-0.007336310110986233,
-0.04872552305459976,
0.05112344026565552,
0.02939065545797348,
0.03856344148516655,
0.01914903335273266,
-0.01266285590827465,
-0.017908895388245583,
0.03590286523103714,
-0.09401047229766846,
-0.038154035806655884,
-0.019788384437561035,
0.02924967184662819,
-0.016086971387267113,
0.0661187395453453,
0.04428740590810776,
-0.04644103720784187,
-0.002785915043205023,
0.019111154600977898,
0.0195329487323761,
-0.0025513574946671724,
0.02698219008743763,
0.016623634845018387,
0.050208572298288345,
0.04153949394822121,
-0.04749205708503723,
-0.013816085644066334,
-0.0025140473153442144,
-0.006830207537859678,
-0.013891871087253094,
-0.023552503436803818,
0.016746995970606804,
-0.011613033711910248,
-0.04515901580452919,
-0.023113645613193512,
0.0629366859793663,
0.04987294226884842,
0.03121129609644413,
-0.0020236221607774496,
-0.03992265835404396,
0.01847129873931408,
0.01456522662192583,
-0.04867497459053993,
-0.03469967097043991,
0.01423166785389185,
-0.054636795073747635,
0.07250930368900299,
-0.013000406324863434,
0.012142411433160305,
0.016420375555753708,
0.01943892426788807,
0.012870081700384617,
0.04005414620041847,
-0.04049178957939148,
-0.02253763936460018,
0.03755232319235802,
-0.04222238436341286,
-0.011689528822898865,
-0.013634374365210533,
0.05538487806916237,
-0.05424037203192711,
0.04538149759173393,
0.029370104894042015,
0.016811834648251534,
-0.011131001636385918,
-0.021804410964250565,
-0.03543391451239586,
0.04418656602501869,
-0.05066738277673721,
0.06988563388586044,
-0.015309391543269157,
-0.08897241950035095,
0.07555149495601654,
0.030276576057076454,
-0.10727277398109436,
-0.00015376845840364695,
0.028478307649493217,
0.025710579007864,
0.03282008320093155,
0.05222977325320244,
-0.07823555916547775,
0.004870731383562088,
-0.049627307802438736,
0.006484617479145527,
-0.056207675486803055,
-0.00830401387065649,
0.0220283605158329,
-0.055220384150743484,
-0.0032485120464116335,
0.02441110834479332,
-0.018623000010848045,
0.0014084945432841778,
0.010378381237387657,
-0.04538306966423988,
-0.040514975786209106,
-0.020647035911679268,
0.004465184174478054,
-0.029576387256383896,
0.024903954938054085,
-0.018271302804350853,
0.032128531485795975,
0.018422184512019157,
0.010348053649067879,
-0.041678536683321,
0.00986244436353445,
0.02979172207415104,
-0.040542520582675934,
-0.03242872655391693,
0.022324861958622932,
0.01988074742257595,
-0.008344612084329128,
0.034672852605581284,
-0.018744314089417458,
0.02067701891064644,
0.029813621193170547,
-0.014452185481786728,
0.01631763204932213,
-0.0507456511259079,
-0.004556892905384302,
0.013622589409351349,
0.012918868102133274,
0.03595336154103279,
-0.01135766226798296,
0.037399545311927795,
0.0350690595805645,
0.03629649803042412,
-0.014852863736450672,
-0.02285432256758213,
-0.013456515967845917,
0.03197421878576279,
-0.05047379434108734,
0.03105214424431324,
0.02108161523938179,
-0.04093073308467865,
-0.044842809438705444,
-0.04536464437842369,
-0.029478123411536217,
0.057173389941453934,
-0.04075409099459648,
0.017711414024233818,
0.06687236577272415,
-0.00775085249915719,
-0.042819831520318985,
-0.0734153762459755,
-0.014467447064816952,
-0.03501931577920914,
0.016316499561071396,
0.032699719071388245,
-0.014523188583552837,
-0.011887088418006897,
-0.05026858299970627,
-0.06497165560722351,
0.03395450487732887,
0.02435961551964283,
-0.020146416500210762,
0.03767523542046547,
0.0377548411488533,
-0.017834501340985298,
0.01278391107916832,
0.012771266512572765,
-0.05150911584496498,
0.02679803967475891,
0.004819241352379322,
0.01426022406667471,
0.03631424531340599,
0.037265531718730927,
-0.019609360024333,
-0.03693201020359993,
-0.07401283830404282,
-0.031278207898139954,
-0.029232313856482506,
-0.01212280709296465,
0.06924191862344742
] |
Capreolus/electra-base-msmarco | [
"pytorch",
"tf",
"electra",
"text-classification",
"arxiv:2008.09093",
"transformers"
] | text-classification | {
"architectures": [
"ElectraForSequenceClassification"
],
"model_type": "electra",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 110 | 2020-12-09T13:47:13Z | ---
tags:
- summarization
widget:
- text: "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
---
# CodeTrans model for code documentation generation java
Pretrained model on programming language java using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized java code functions: it works best with tokenized java functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the java function/method.
## Intended uses & limitations
The model could be used to generate the description for the java function or be fine-tuned on other java code tasks. It can be used on unparsed and untokenized java code. However, if the java code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate java function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_java_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_java_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static < T , U > Function < T , U > castFunction ( Class < U > target ) { return new CastToClass < T , U > ( target ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/java/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 4000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing java code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.0026498413644731045,
-0.013001806102693081,
-0.004042747430503368,
0.022809281945228577,
0.03540799766778946,
0.04121636226773262,
-0.0332413911819458,
-0.0008837823406793177,
-0.003825220512226224,
0.05332329869270325,
0.03490506857633591,
-0.015232267789542675,
-0.004846828989684582,
0.05046847462654114,
-0.03910346329212189,
-0.06935880333185196,
-0.016382379457354546,
-0.03486708924174309,
-0.03388933464884758,
-0.008824535645544529,
0.02974778786301613,
-0.0007826161454431713,
0.0029290698003023863,
0.004563665483146906,
-0.00855235941708088,
0.0032005624379962683,
0.006318011786788702,
0.02157716639339924,
0.034413810819387436,
-0.07671592384576797,
-0.026676325127482414,
0.005041989032179117,
-0.031648945063352585,
-0.01936028152704239,
-0.032264381647109985,
0.024340545758605003,
0.006473042536526918,
0.043574489653110504,
0.030505185946822166,
0.05982968583703041,
0.0019476335728541017,
0.028685901314020157,
0.014833575114607811,
-0.03666067123413086,
0.06289424747228622,
0.008212353102862835,
-0.026736781001091003,
-0.025435149669647217,
0.015691222622990608,
0.0004064647073391825,
-0.05440501868724823,
-0.07190611958503723,
-0.04023900255560875,
0.04594211280345917,
-0.004079686943441629,
-0.0017231629462912679,
-0.07074428349733353,
-0.03646807745099068,
0.038830384612083435,
-0.05282607674598694,
-0.02615993842482567,
0.0044723087921738625,
-0.06604943424463272,
0.019869139418005943,
0.008487539365887642,
-0.003606689628213644,
0.003700948553159833,
-0.05137748271226883,
0.031683892011642456,
-0.0033551231026649475,
0.05375762656331062,
-0.025862613692879677,
0.021818481385707855,
-0.11524834483861923,
0.016293304041028023,
-0.013894942589104176,
0.02301665022969246,
0.019781038165092468,
-0.013113307766616344,
0.05664699897170067,
-0.010432650335133076,
0.010351746343076229,
0.04748372361063957,
0.007761059328913689,
-0.012543748132884502,
0.0346645712852478,
-0.026186110451817513,
-0.016974128782749176,
-0.011045357212424278,
0.06785498559474945,
-0.05553818121552467,
-0.06277306377887726,
-0.016841158270835876,
-0.02491438016295433,
-0.037512097507715225,
0.023875869810581207,
0.04659061133861542,
-0.01410361472517252,
0.017293445765972137,
0.0017333251889795065,
0.04266324266791344,
0.05779176950454712,
-0.008384845219552517,
0.038518767803907394,
0.03692095726728439,
0.010757243260741234,
-0.014867139980196953,
-0.04962893947958946,
-0.02257765270769596,
0.04842509329319,
0.0022009816020727158,
-0.04276967793703079,
-0.045372601598501205,
0.024905312806367874,
0.01648082211613655,
-0.054605960845947266,
0.04633362218737602,
-0.020026296377182007,
-0.04526345804333687,
-0.0383269339799881,
0.04489268735051155,
-0.006726118270307779,
-0.021574588492512703,
0.009261894039809704,
-0.04054119437932968,
0.010620919987559319,
-0.052238766103982925,
-0.02659963071346283,
0.012285872362554073,
0.02710661105811596,
-0.025758763775229454,
0.08794271945953369,
0.009761061519384384,
-0.033912837505340576,
0.011236387304961681,
0.024640003219246864,
-0.0682600736618042,
0.06353100389242172,
0.03633090481162071,
0.09980458766222,
-0.06469378620386124,
-0.04626984894275665,
0.0299623291939497,
0.007686136290431023,
-0.007867038249969482,
0.024213386699557304,
-0.01634451560676098,
-0.08616583794355392,
-0.034139234572649,
-0.006084812339395285,
0.06774333864450455,
-0.0500611737370491,
-0.012163490988314152,
0.03317296877503395,
0.004834790714085102,
0.013756138272583485,
-0.0385143905878067,
-0.006164077203720808,
0.0017153233056887984,
-0.03095933608710766,
-0.06475169956684113,
0.025298871099948883,
-0.0005874609923921525,
-0.024960730224847794,
-0.031201109290122986,
-0.04172307625412941,
-0.004384711850434542,
0.10910747200250626,
0.01595233380794525,
-0.012480118311941624,
-0.050010379403829575,
0.019168097525835037,
0.032388411462306976,
0.033686574548482895,
-0.01861085370182991,
0.02764630876481533,
0.048225484788417816,
0.07071395963430405,
-0.0371914878487587,
0.06747058779001236,
-0.019141744822263718,
-0.02619929611682892,
-0.031798042356967926,
0.01627585105597973,
-0.009118624031543732,
-0.0415445901453495,
-0.0009897897252812982,
0.009060499258339405,
-0.017933838069438934,
-0.005918499547988176,
-0.00930983480066061,
0.05079320818185806,
0.02358500473201275,
-0.0162384994328022,
-0.02646530233323574,
0.009397923946380615,
-0.01629677414894104,
0.05197734385728836,
-0.03807736188173294,
-0.0024148637894541025,
-0.020320463925600052,
-0.02950954996049404,
-0.00464359438046813,
0.025121094658970833,
0.04054829850792885,
0.024678532034158707,
-0.009872574359178543,
0.09928766638040543,
-0.04116326943039894,
0.005869024898856878,
-0.04513657093048096,
-0.04046904295682907,
0.010516203939914703,
0.034667324274778366,
0.026527969166636467,
0.02452305518090725,
0.006348864175379276,
-0.018242478370666504,
0.014944306574761868,
0.0801902711391449,
0.04394238814711571,
0.0470324344933033,
-0.023350434377789497,
-0.029524896293878555,
0.05307590216398239,
0.06574642658233643,
-0.047326818108558655,
-0.0446062870323658,
0.04649919271469116,
0.028767038136720657,
-0.013282491825520992,
0.026518749073147774,
-0.0030892931390553713,
0.009986878372728825,
-0.06113993749022484,
-0.06836754828691483,
0.03796631097793579,
0.02100234106183052,
0.007604944985359907,
0.0321028009057045,
0.00838952325284481,
-0.003360568080097437,
0.04204365983605385,
-0.0007135969935916364,
0.0062229507602751255,
-0.05780047923326492,
0.00694282865151763,
-0.0034627236891537905,
0.06387343257665634,
-0.034156788140535355,
0.0321175791323185,
0.013809450902044773,
-0.0030646836385130882,
0.05721155181527138,
-0.028721660375595093,
0.021685143932700157,
0.02445964328944683,
0.0198786910623312,
-0.01647436060011387,
0.025832675397396088,
0.021165475249290466,
0.03590158745646477,
0.08953648805618286,
0.008783129043877125,
0.05712934955954552,
-0.010343761183321476,
0.06539227813482285,
0.056845635175704956,
0.017638549208641052,
0.010544243268668652,
0.025935174897313118,
0.05634436383843422,
-0.0008964494918473065,
-0.007826690562069416,
0.06472431123256683,
-0.042454082518815994,
0.014383864589035511,
-0.04481172934174538,
0.03555495664477348,
-0.00007879791519371793,
-0.019729148596525192,
0.033687710762023926,
0.008780688978731632,
-0.058449938893318176,
0.00038106294232420623,
-0.02720464952290058,
-0.02781624346971512,
0.017402010038495064,
-0.016331521794199944,
-0.021094910800457,
0.011464495211839676,
-0.019058402627706528,
0.019299792125821114,
-0.0859159380197525,
-0.0474613681435585,
-0.003777384525164962,
-0.039441175758838654,
0.005223927553743124,
-0.07243335247039795,
-0.049766793847084045,
-0.0622711218893528,
-0.021325306966900826,
0.05376071855425835,
0.014799943193793297,
-0.01734216883778572,
-0.031148381531238556,
0.015404801815748215,
-0.03643996641039848,
-0.02633163146674633,
-0.06066597253084183,
-0.07199366390705109,
-0.006046114955097437,
-0.06859339028596878,
0.02753913402557373,
-0.024767182767391205,
0.036706700921058655,
0.009453308768570423,
-0.0143958805128932,
-0.02319459617137909,
-0.016092689707875252,
0.05777060240507126,
0.01802706904709339,
-0.010937622748315334,
-0.027236077934503555,
0.017272576689720154,
-0.019105559214949608,
0.03882614150643349,
-0.0015958476578816772,
-0.04492830112576485,
0.11072512716054916,
0.05124520882964134,
0.04411495849490166,
-0.006025392096489668,
-0.0420989915728569,
-0.05493800714612007,
-0.04704422876238823,
-0.023722002282738686,
-0.015581132844090462,
-0.03251900523900986,
-0.008336658589541912,
-0.05309078469872475,
-0.025512007996439934,
-0.03838730975985527,
-0.0400921069085598,
-0.024271763861179352,
0.03409251198172569,
0.030675841495394707,
0.04926719889044762,
0.051497697830200195,
0.023783596232533455,
-0.027649089694023132,
-0.04151339828968048,
0.034296970814466476,
0.0011895319912582636,
-0.0007380360621027648,
-0.06466838717460632,
-0.028708109632134438,
0.024955442175269127,
0.023563703522086143,
-0.012075498700141907,
-0.011145420372486115,
0.04398702457547188,
0.010778354480862617,
0.005139364395290613,
0.00903535820543766,
-0.013346088118851185,
-0.00973751861602068,
-0.02448422648012638,
0.001518699573352933,
-0.03156837075948715,
-0.027770044282078743,
-0.017794081941246986,
-0.011696898378431797,
0.04493426904082298,
-0.062383826822042465,
-0.05695527791976929,
0.014662403613328934,
0.03642943501472473,
0.032854706048965454,
0.02342323400080204,
-0.02345886081457138,
0.003454132005572319,
-0.06586667150259018,
-0.043403420597314835,
0.036093804985284805,
0.023087648674845695,
-0.00805846881121397,
0.035759955644607544,
0.04254842549562454,
-0.04327024891972542,
0.0327720083296299,
0.023576494306325912,
0.03765551373362541,
0.039640918374061584,
-0.025409843772649765,
0.008945116773247719,
-0.05159740895032883,
0.021673312410712242,
0.007776040583848953,
-0.03223626688122749,
-0.04431144520640373,
-0.0779760479927063,
-0.03740832582116127,
0.017369858920574188,
-0.021556664258241653,
-0.0020541271660476923,
0.0524069108068943,
-0.013643966987729073,
-0.046051252633333206,
-0.003394641214981675,
0.0072958264499902725,
0.06420765072107315,
-0.023814167827367783,
0.0301150381565094,
0.012619804590940475,
0.07119164615869522,
-0.049360569566488266,
-0.005292108748108149,
-0.02907470613718033,
-0.028773751109838486,
0.012319800443947315,
0.05197041109204292,
0.018008816987276077,
0.05203567445278168,
0.07147528231143951,
0.009701627306640148,
-0.032058168202638626,
0.043573036789894104,
0.05620840564370155,
0.007557956967502832,
-0.02566302753984928,
-0.0020322802010923624,
-0.007628574501723051,
-0.03501713275909424,
0.013937500305473804,
-0.014087517745792866,
0.025714080780744553,
0.021452654153108597,
-0.007385972887277603,
0.00025900150649249554,
-0.0002300012856721878,
-0.023014359176158905,
-0.04707174748182297,
-0.04192689433693886,
0.00048088646144606173,
-0.03961063176393509,
-0.06273390352725983,
0.020425712689757347,
0.03453685715794563,
0.039931174367666245,
0.0537928082048893,
0.05452718213200569,
-0.04994824901223183,
-0.03539770096540451,
0.038271281868219376,
0.05030219256877899,
-0.034346479922533035,
-0.030676182359457016,
-0.05558810755610466,
0.03683476150035858,
0.04247286543250084,
-0.027655338868498802,
-0.09420331567525864,
0.009871403686702251,
0.02179248258471489,
-0.01769247278571129,
0.06874360889196396,
0.011617698706686497,
0.016730403527617455,
0.05187072604894638,
0.0052163503132760525,
0.02841884084045887,
-0.025649191811680794,
0.011130720376968384,
-0.005378784611821175,
0.036685600876808167,
-0.023861292749643326,
-0.032436806708574295,
-0.04535750672221184,
0.021128075197339058,
0.010220822878181934,
0.04213526099920273,
0.033016350120306015,
-0.012376850470900536,
-0.0699104443192482,
-0.007257396355271339,
0.0274015162140131,
-0.02039305306971073,
0.022871794179081917,
0.02086556889116764,
0.044501692056655884,
-0.0326487198472023,
-0.027222754433751106,
-0.022800378501415253,
-0.016655007377266884,
0.03673279657959938,
0.004309409763664007,
-0.02045297995209694,
-0.06648708134889603,
0.017643241211771965,
-0.02077390067279339,
-0.025835027918219566,
-0.09596392512321472,
0.05112075433135033,
0.005822727922350168,
-0.006112638860940933,
0.0564398318529129,
0.025678396224975586,
0.013095405884087086,
0.04172884300351143,
-0.01861407980322838,
0.027143921703100204,
-0.0356394499540329,
0.02073925919830799,
-0.0143740838393569,
-0.01789863035082817,
-0.020243171602487564,
-0.06937038153409958,
-0.017656438052654266,
-0.03643672168254852,
-0.03197038546204567,
-0.04247089847922325,
-0.024320309981703758,
-0.0026669499929994345,
-0.02366446889936924,
-0.007589187007397413,
-0.012373254634439945,
0.013546121306717396,
-0.026311412453651428,
-0.02723514288663864,
-0.028762919828295708,
-0.044739607721567154,
-0.09895181655883789,
-0.023705055937170982,
0.013842944987118244,
0.04279961809515953,
0.035042379051446915,
-0.0001435308950021863,
0.0077722626738250256,
0.037571340799331665,
-0.0025651443284004927,
-0.005070563871413469,
0.009009265340864658,
0.010514543391764164,
-0.03559112548828125,
-0.027253350242972374,
0.003187884809449315,
0.008792557753622532,
0.007947749458253384,
-0.019485192373394966,
0.008351401425898075,
0.04659288749098778,
-0.02330022118985653,
0.006627700757235289,
0.039160843938589096,
0.007509447634220123,
-0.07918030768632889,
-0.029203573241829872,
-0.0021093699615448713,
-0.04465571418404579,
0.0333380363881588,
0.0015997069422155619,
-0.0351586639881134,
-0.007843049243092537,
-0.008442281745374203,
0.03353940695524216,
-0.004445635713636875,
-0.0233831275254488,
0.006733671762049198,
-0.030281614512205124,
0.03299576789140701,
-0.05619049444794655,
0.05483381822705269,
-0.03377966210246086,
-0.004581867251545191,
-0.010460217483341694,
-0.007339770905673504,
-0.04124496504664421,
0.06381115317344666,
-0.011138652451336384,
-0.001796287833712995,
-0.005786628928035498,
0.009867846965789795,
-0.02588428556919098,
0.027551183477044106,
-0.0020172963850200176,
0.005450652912259102,
-0.03030870296061039,
0.016689347103238106,
-0.03750341385602951,
0.009522244334220886,
-0.023100558668375015,
-0.01601327769458294,
-0.01596112549304962,
-0.020706653594970703,
-0.01050940528512001,
-0.05025581270456314,
0.04768701642751694,
0.0296137947589159,
0.030969996005296707,
0.016957197338342667,
-0.01415217388421297,
-0.020296161994338036,
0.03510218486189842,
-0.09342967718839645,
-0.03675530478358269,
-0.02091832086443901,
0.022052476182579994,
-0.016126802191138268,
0.06843918561935425,
0.04700188711285591,
-0.04526680335402489,
-0.005382079165428877,
0.014300273731350899,
0.01878621056675911,
0.0026411244180053473,
0.03164048120379448,
0.0190874096006155,
0.05133810639381409,
0.04662900045514107,
-0.05152987316250801,
-0.008741486817598343,
-0.003932114690542221,
-0.00919954665005207,
-0.014412058517336845,
-0.017657015472650528,
0.01631261222064495,
-0.011419395916163921,
-0.04736969619989395,
-0.020227646455168724,
0.06282985210418701,
0.05471314862370491,
0.02978098765015602,
-0.0014435334596782923,
-0.037189677357673645,
0.020746920257806778,
0.013152246363461018,
-0.044544342905282974,
-0.035101886838674545,
0.016943424940109253,
-0.054949790239334106,
0.07384764403104782,
-0.009355846792459488,
0.012162608094513416,
0.015193711966276169,
0.026562809944152832,
0.016609344631433487,
0.041498832404613495,
-0.03784811496734619,
-0.020852960646152496,
0.03651418164372444,
-0.04245375469326973,
-0.00750414514914155,
-0.010814112611114979,
0.05837216600775719,
-0.05124257877469063,
0.04336867853999138,
0.02955015003681183,
0.022225340828299522,
-0.01445904839783907,
-0.01865566521883011,
-0.0418633371591568,
0.04756858944892883,
-0.045192502439022064,
0.06730735301971436,
-0.01739489659667015,
-0.0852554589509964,
0.07617007195949554,
0.03171690180897713,
-0.1071309968829155,
0.0016344009200111032,
0.03337591886520386,
0.026815684512257576,
0.03446284309029579,
0.04740466549992561,
-0.07979175448417664,
-0.000458212336525321,
-0.05231662839651108,
0.007868235930800438,
-0.05883364751935005,
-0.011136514134705067,
0.028016751632094383,
-0.059752464294433594,
-0.003984252922236919,
0.02433808706700802,
-0.02030649408698082,
-0.0015457704430446029,
0.007665848825126886,
-0.04361395537853241,
-0.04333248734474182,
-0.020933011546730995,
0.0022874865680933,
-0.029444897547364235,
0.02533945068717003,
-0.020491041243076324,
0.03155297413468361,
0.01520549226552248,
0.007356233894824982,
-0.037538036704063416,
0.009437406435608864,
0.02993065118789673,
-0.036508604884147644,
-0.02996635250747204,
0.024235771968960762,
0.021138817071914673,
-0.007794279605150223,
0.029907971620559692,
-0.02246880903840065,
0.018101532012224197,
0.029524140059947968,
-0.01930275931954384,
0.015492233447730541,
-0.04972151666879654,
-0.006615619175136089,
0.012444481253623962,
0.009616811759769917,
0.03427492082118988,
-0.010810640640556812,
0.0355558767914772,
0.03293025493621826,
0.036775026470422745,
-0.013589113019406796,
-0.019064772874116898,
-0.01234965305775404,
0.030426090583205223,
-0.048701148480176926,
0.022984284907579422,
0.02408640645444393,
-0.04487576335668564,
-0.042211372405290604,
-0.04426923766732216,
-0.0323396772146225,
0.056088533252477646,
-0.04318058118224144,
0.014340073801577091,
0.06496184319257736,
-0.00919798668473959,
-0.04782527685165405,
-0.07323876768350601,
-0.012962737120687962,
-0.02953924424946308,
0.015795188024640083,
0.03411206603050232,
-0.018976986408233643,
-0.009385652840137482,
-0.052472248673439026,
-0.06703726202249527,
0.029996996745467186,
0.01972467266023159,
-0.017421245574951172,
0.03606230020523071,
0.038065049797296524,
-0.018281878903508186,
0.013328935019671917,
0.018179520964622498,
-0.048762813210487366,
0.030191544443368912,
0.007652594242244959,
0.014445066452026367,
0.03611811250448227,
0.03694958984851837,
-0.014990686438977718,
-0.04032328352332115,
-0.07311292737722397,
-0.031442269682884216,
-0.034310221672058105,
-0.00993764866143465,
0.069512739777565
] |
Captain272/lstm | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
---
# CodeTrans model for code documentation generation javascript
Pretrained model on programming language javascript using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on CodeSearchNet Corpus javascript dataset.
## Intended uses & limitations
The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_javascript"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_javascript", skip_special_tokens=True),
device=0
)
tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/function%20documentation%20generation/javascript/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.006577928084880114,
-0.019542641937732697,
-0.007880205288529396,
0.014056648127734661,
0.03423606976866722,
0.0331970676779747,
-0.03749363124370575,
-0.005428290460258722,
-0.01821284368634224,
0.06420014798641205,
0.026897922158241272,
-0.013384575955569744,
-0.00912495981901884,
0.03790432959794998,
-0.04447854682803154,
-0.05332636460661888,
-0.02922848053276539,
-0.021984463557600975,
-0.03842070326209068,
-0.03111748769879341,
0.02678978443145752,
-0.0036262590438127518,
0.0031835762783885,
0.010131381452083588,
-0.006226159166544676,
0.020601501688361168,
0.0025828543584793806,
0.022381503134965897,
0.04312942177057266,
-0.05416741222143173,
-0.0392877571284771,
-0.005638774950057268,
-0.04728081449866295,
-0.00793991144746542,
-0.018014676868915558,
0.02550150640308857,
0.008235834538936615,
0.033639002591371536,
0.02975493296980858,
0.06780503690242767,
0.0038883585948497057,
0.02214539237320423,
0.027181701734662056,
-0.034953709691762924,
0.05157271400094032,
0.0035284801851958036,
-0.02667795494198799,
-0.024202698841691017,
0.014989765360951424,
-0.0048651075921952724,
-0.06510758399963379,
-0.07167413085699081,
-0.03128991276025772,
0.04882892593741417,
-0.0056502074003219604,
-0.019931044429540634,
-0.06471650302410126,
-0.014405293390154839,
0.06730559468269348,
-0.04643827676773071,
-0.030152514576911926,
0.015840142965316772,
-0.04883949086070061,
0.010711842216551304,
0.025631515309214592,
-0.005340388510376215,
0.017024563625454903,
-0.0537421740591526,
0.03237740322947502,
-0.0006507967482320964,
0.049478381872177124,
-0.03273320570588112,
0.020395372062921524,
-0.10442933440208435,
0.013885882683098316,
-0.009260624647140503,
0.02050880342721939,
0.012924016453325748,
-0.007341060787439346,
0.06542931497097015,
-0.018761517480015755,
0.021287482231855392,
0.05198170244693756,
0.01092504058033228,
-0.004990679677575827,
0.027582017704844475,
-0.028263598680496216,
-0.016583291813731194,
-0.005267716012895107,
0.05184119939804077,
-0.060795143246650696,
-0.05344165489077568,
-0.00807048100978136,
-0.031698860228061676,
-0.029696930199861526,
0.02581951767206192,
0.057122014462947845,
-0.015446125529706478,
0.024638792499899864,
0.004584536887705326,
0.04339981824159622,
0.055875010788440704,
-0.0057714758440852165,
0.05068226903676987,
0.012385009787976742,
0.016196131706237793,
-0.011479198932647705,
-0.04298296198248863,
-0.01095667015761137,
0.04427388310432434,
0.009913168847560883,
-0.0343051552772522,
-0.04420788213610649,
0.04093382880091667,
0.02741878107190132,
-0.05041463300585747,
0.05832095816731453,
-0.01879005692899227,
-0.06552060693502426,
-0.03339410573244095,
0.03760043904185295,
-0.00523995328694582,
-0.0033377795480191708,
0.02200426533818245,
-0.03395305946469307,
0.010020769201219082,
-0.04441080614924431,
-0.026316577568650246,
0.008106829598546028,
0.03158748894929886,
-0.004147265572100878,
0.0907183289527893,
-0.00424856785684824,
-0.036568984389305115,
0.0009427591576240957,
0.012245147489011288,
-0.061119988560676575,
0.06521624326705933,
0.02619296871125698,
0.10488489270210266,
-0.07872903347015381,
-0.03893131762742996,
0.027289414778351784,
0.011928125284612179,
-0.009304149076342583,
0.013718869537115097,
-0.004580049309879541,
-0.08000586181879044,
-0.03145938739180565,
0.008625175803899765,
0.07109779864549637,
-0.05568479001522064,
-0.02009723149240017,
0.02752145566046238,
0.010711480863392353,
0.024580560624599457,
-0.03754474222660065,
0.007135437801480293,
0.005984439980238676,
-0.0219977255910635,
-0.06901683658361435,
0.0320211723446846,
-0.0031205303966999054,
-0.01358315534889698,
-0.022642649710178375,
-0.03663813695311546,
-0.0015616320306435227,
0.09927454590797424,
0.02287624590098858,
-0.01654157042503357,
-0.07093586772680283,
0.017216233536601067,
0.04156765341758728,
0.045445289462804794,
-0.011332216672599316,
0.01918957754969597,
0.04602409899234772,
0.05085914954543114,
-0.02283244952559471,
0.07577906548976898,
-0.01591319963335991,
-0.03656306862831116,
-0.034700967371463776,
0.035789333283901215,
-0.008189085870981216,
-0.02713422104716301,
0.00023670461087021977,
0.01976178027689457,
-0.022001419216394424,
-0.01633443497121334,
-0.020137520506978035,
0.050541818141937256,
0.012040653266012669,
-0.02626168727874756,
-0.027873031795024872,
-0.00046212601591832936,
-0.013150008395314217,
0.061771899461746216,
-0.03837747126817703,
-0.009172814898192883,
-0.02415045164525509,
-0.03609110787510872,
-0.0026659746654331684,
0.02192104235291481,
0.043551959097385406,
0.024407563731074333,
0.0030793945770710707,
0.09586261957883835,
-0.047333113849163055,
-0.00025257913512177765,
-0.05848853662610054,
-0.052480548620224,
0.007948087528347969,
0.043298739939928055,
0.02770153246819973,
0.019874941557645798,
0.00780137674883008,
-0.03625129908323288,
0.005916155409067869,
0.06708018481731415,
0.04162565618753433,
0.033516775816679,
0.002365635009482503,
-0.03718329221010208,
0.04335575923323631,
0.06760755926370621,
-0.0458502359688282,
-0.06093640252947807,
0.04209812730550766,
0.0335911326110363,
-0.016593437641859055,
0.03758631646633148,
0.002838833723217249,
0.004212596919387579,
-0.04803472384810448,
-0.05812171474099159,
0.052993327379226685,
0.014262269251048565,
0.0020182360894978046,
0.02670186012983322,
0.01210229191929102,
0.0017709871754050255,
0.04054667800664902,
-0.016433371230959892,
-0.0071397097781300545,
-0.06871742010116577,
0.015776490792632103,
0.006020620930939913,
0.05403340235352516,
-0.03978137671947479,
0.04553510621190071,
0.013799653388559818,
0.010251459665596485,
0.06401528418064117,
-0.017725758254528046,
0.0430733747780323,
0.04210449382662773,
0.03219178318977356,
-0.01766047812998295,
0.020444534718990326,
0.022798869758844376,
0.022062309086322784,
0.0678592175245285,
0.009590117260813713,
0.05177239701151848,
0.005532194394618273,
0.05950774624943733,
0.06974797695875168,
0.016849882900714874,
-0.00611878652125597,
0.027914484962821007,
0.06545335054397583,
-0.00409329030662775,
-0.01720132865011692,
0.06726827472448349,
-0.0551108755171299,
0.03567472845315933,
-0.029054228216409683,
0.02487015537917614,
-0.003004208207130432,
-0.02015535533428192,
0.035893842577934265,
0.001123741501942277,
-0.06758006662130356,
-0.0014846451813355088,
-0.0478120855987072,
-0.02008608728647232,
0.012539252638816833,
-0.002788798650726676,
-0.016641562804579735,
0.004441029392182827,
-0.02786453440785408,
0.026449257507920265,
-0.06666501611471176,
-0.03734820336103439,
0.0038229317869991064,
-0.04984582960605621,
0.011312689632177353,
-0.06053552031517029,
-0.044583119451999664,
-0.07548466324806213,
-0.01740230992436409,
0.050287432968616486,
-0.0035638760309666395,
-0.012377121485769749,
-0.018006376922130585,
0.0043860324658453465,
-0.04256872087717056,
-0.026573212817311287,
-0.07163890451192856,
-0.06734298914670944,
-0.0032218657433986664,
-0.06726223975419998,
0.03854499012231827,
0.0037920651957392693,
0.022637296468019485,
0.011028523556888103,
-0.020057260990142822,
-0.023410940542817116,
-0.01419292762875557,
0.03885651379823685,
0.012098383158445358,
-0.012560592964291573,
-0.02278282307088375,
0.014370953664183617,
-0.010302996262907982,
0.04413960874080658,
-0.01305648498237133,
-0.04469073563814163,
0.1082412451505661,
0.05251970514655113,
0.02974788472056389,
-0.006273731589317322,
-0.037102844566106796,
-0.03969310224056244,
-0.0587855726480484,
-0.030243508517742157,
-0.017044968903064728,
-0.02103062905371189,
-0.007973174564540386,
-0.04522396996617317,
-0.020757406949996948,
-0.038123492151498795,
-0.05191287398338318,
-0.021834447979927063,
0.021858226507902145,
0.00986169558018446,
0.04776529595255852,
0.04953933134675026,
0.02021842822432518,
-0.04857947677373886,
-0.02313494123518467,
0.045871902257204056,
-0.001170094357803464,
-0.007921114563941956,
-0.05945513769984245,
-0.030943740159273148,
0.04066581279039383,
0.01869915798306465,
-0.01373008918017149,
-0.01398184522986412,
0.05572002753615379,
0.019429173320531845,
0.019686562940478325,
0.0011799047933891416,
-0.015030041337013245,
-0.01836536079645157,
-0.01799102872610092,
-0.0016753132222220302,
-0.05239753797650337,
-0.041857074946165085,
-0.026600174605846405,
-0.03171622008085251,
0.04177910462021828,
-0.07201974093914032,
-0.05103831738233566,
-0.0008733407594263554,
0.019168948754668236,
0.028346195816993713,
0.033447641879320145,
-0.020754514262080193,
0.0009380780975334346,
-0.05723908916115761,
-0.04746966436505318,
0.029744338244199753,
0.02700340561568737,
-0.005160263739526272,
0.04241638630628586,
0.037566494196653366,
-0.05055708810687065,
0.044348012655973434,
0.030675169080495834,
0.03305512294173241,
0.025849690660834312,
-0.02896067686378956,
0.029295654967427254,
-0.053590305149555206,
0.021073222160339355,
0.005495152901858091,
-0.028188975527882576,
-0.047617360949516296,
-0.08071286976337433,
-0.02997845970094204,
0.010180247947573662,
-0.023778997361660004,
0.003161683212965727,
0.05587109923362732,
-0.0155106820166111,
-0.030981378629803658,
-0.014869563281536102,
0.01820783130824566,
0.05463269352912903,
-0.03802698478102684,
0.03430795297026634,
-0.000979788601398468,
0.0644342303276062,
-0.03080958127975464,
0.005126447416841984,
-0.036518022418022156,
-0.03185112401843071,
0.02039635181427002,
0.051500026136636734,
0.02866661176085472,
0.06527554988861084,
0.0765184536576271,
-0.005951854400336742,
-0.0403415784239769,
0.02953953854739666,
0.046148985624313354,
0.002453597728163004,
-0.0259770005941391,
0.0017504318384453654,
-0.005678598769009113,
-0.03258214518427849,
0.007976829074323177,
-0.005917905364185572,
0.015859659761190414,
0.026354284957051277,
-0.028356170281767845,
-0.004488583654165268,
-0.013478861190378666,
-0.02880995348095894,
-0.049828145653009415,
-0.051656484603881836,
-0.009488224051892757,
-0.03779531270265579,
-0.05378701165318489,
0.040336135774850845,
0.04224109277129173,
0.03535056486725807,
0.04717014729976654,
0.048583436757326126,
-0.034847695380449295,
-0.03916103392839432,
0.03742176666855812,
0.03678954020142555,
-0.043585069477558136,
-0.04306967929005623,
-0.036657657474279404,
0.028791410848498344,
0.03864215314388275,
-0.024093948304653168,
-0.08858764916658401,
0.009824590757489204,
0.019593968987464905,
-0.022027278319001198,
0.07401807606220245,
0.006261284463107586,
0.027251120656728745,
0.056721530854701996,
0.0008531746570952237,
0.03544672951102257,
-0.03198620676994324,
0.021168159320950508,
-0.002677504438906908,
0.03859676793217659,
-0.0258907712996006,
-0.037034280598163605,
-0.04163539037108421,
0.02812279760837555,
0.01807519979774952,
0.036059871315956116,
0.031185481697320938,
-0.018533149734139442,
-0.06528954207897186,
-0.02534140646457672,
0.02401205338537693,
-0.023109806701540947,
0.013585453853011131,
0.029484564438462257,
0.03903767094016075,
-0.03857500106096268,
-0.033678457140922546,
-0.005516512785106897,
-0.008406680077314377,
0.02621498331427574,
-0.0005509465117938817,
-0.021944062784314156,
-0.05949459969997406,
0.024264078587293625,
-0.02914561703801155,
-0.015132749453186989,
-0.1067737564444542,
0.03502625972032547,
-0.015267375856637955,
-0.00258235028013587,
0.04385239630937576,
0.03846807777881622,
0.011232455261051655,
0.033824171870946884,
-0.007936099544167519,
0.019551487639546394,
-0.026249490678310394,
0.012943794019520283,
-0.005204333923757076,
-0.03252836689352989,
-0.02829313464462757,
-0.06765896826982498,
-0.015457136556506157,
-0.04089035838842392,
-0.03668646141886711,
-0.05503169819712639,
-0.030292075127363205,
0.009403543546795845,
-0.016983602195978165,
0.005282870959490538,
-0.0092652328312397,
0.002378973877057433,
-0.036782920360565186,
-0.023060565814375877,
-0.025019923225045204,
-0.04663969203829765,
-0.10117845237255096,
-0.014277189038693905,
0.01449549850076437,
0.024597061797976494,
0.04931415989995003,
0.004876758903264999,
0.0017135501839220524,
0.02074974961578846,
0.0038084054831415415,
-0.02397998236119747,
-0.0003766452718991786,
0.015362136997282505,
-0.03860018029808998,
-0.012993020936846733,
-0.005542211700230837,
0.007474840618669987,
0.0153740793466568,
-0.021872026845812798,
-0.0020723564084619284,
0.05640226602554321,
-0.035066135227680206,
-0.0005654867272824049,
0.032373543828725815,
0.004265005234628916,
-0.06873789429664612,
-0.042351752519607544,
-0.004301178734749556,
-0.055459216237068176,
0.03817923367023468,
-0.002322135027498007,
-0.03873880207538605,
-0.006900593638420105,
0.014017624780535698,
0.029261641204357147,
-0.0007185955764725804,
-0.02916269190609455,
0.007620755583047867,
-0.028313837945461273,
0.04669661819934845,
-0.06096137687563896,
0.05438298359513283,
-0.03761165216565132,
-0.004561376292258501,
-0.007113637402653694,
-0.0012814063811674714,
-0.03032786026597023,
0.05757780745625496,
-0.013115647248923779,
0.009284001775085926,
0.0011976060923188925,
0.006744991056621075,
-0.0358642116189003,
0.031720761209726334,
-0.024546019732952118,
0.014174428768455982,
-0.023518141359090805,
0.022487403824925423,
-0.05302635580301285,
0.014990637078881264,
-0.03514011204242706,
-0.02026223950088024,
-0.0044592502526938915,
-0.02768227458000183,
-0.0022052465938031673,
-0.05012558773159981,
0.047924816608428955,
0.02033088356256485,
0.02007262594997883,
0.009909347631037235,
-0.027741465717554092,
-0.017928849905729294,
0.025569703429937363,
-0.08646363019943237,
-0.04971552640199661,
-0.028419483453035355,
0.023409705609083176,
-0.015936171635985374,
0.05123913660645485,
0.034119512885808945,
-0.04579750820994377,
-0.0032650332432240248,
0.021525725722312927,
0.02346731908619404,
0.005343466065824032,
0.014795089140534401,
0.010519405826926231,
0.04286117106676102,
0.0502651184797287,
-0.04167487844824791,
-0.01011099386960268,
-0.004322798922657967,
-0.011960973031818867,
-0.019095784053206444,
-0.02258257381618023,
0.011271456256508827,
-0.01815531589090824,
-0.05586186796426773,
-0.014210996218025684,
0.05892311781644821,
0.04400814324617386,
0.012515613809227943,
0.0006774677895009518,
-0.04250439628958702,
0.007609825115650892,
0.024708138778805733,
-0.045466408133506775,
-0.023891836404800415,
0.024869831278920174,
-0.05811360478401184,
0.06499403715133667,
-0.015242896974086761,
-0.004709276836365461,
0.018251262605190277,
0.025943338871002197,
0.016247866675257683,
0.04561079666018486,
-0.040549688041210175,
-0.012849543243646622,
0.02955874614417553,
-0.04312935099005699,
-0.01425336953252554,
-0.010318731889128685,
0.06007923185825348,
-0.05826512724161148,
0.026409676298499107,
0.03456933796405792,
-0.004131666850298643,
-0.019949859008193016,
-0.022346843034029007,
-0.04286558926105499,
0.036768533289432526,
-0.054903965443372726,
0.07580030709505081,
-0.02719968371093273,
-0.08465676009654999,
0.07307326048612595,
0.04701922833919525,
-0.0852181613445282,
-0.006250138860195875,
0.03410332649946213,
0.004521459806710482,
0.03874233737587929,
0.046598128974437714,
-0.07770422101020813,
0.009333194233477116,
-0.03538844734430313,
0.012758766300976276,
-0.06800370663404465,
0.00020445184782147408,
0.03643852472305298,
-0.055051613599061966,
-0.009260209277272224,
0.02070077694952488,
-0.02166709117591381,
-0.0006953791598789394,
0.024952353909611702,
-0.03736907243728638,
-0.0390002503991127,
-0.0045270430855453014,
0.007804519962519407,
-0.019069133326411247,
0.02495371364057064,
-0.0029386694077402353,
0.04303585737943649,
0.015509133227169514,
0.011018747463822365,
-0.046929121017456055,
0.0025788249913603067,
0.02437734603881836,
-0.04633207246661186,
-0.026283279061317444,
0.03194677084684372,
0.005895162466913462,
-0.010486414656043053,
0.032266970723867416,
-0.009228687733411789,
0.019047323614358902,
0.022504249587655067,
-0.034472670406103134,
0.008246377110481262,
-0.04291117191314697,
-0.007889457046985626,
0.01780638098716736,
0.01738782413303852,
0.03365900367498398,
-0.016095638275146484,
0.03427238389849663,
0.04659101366996765,
0.040457915514707565,
-0.03178350254893303,
-0.021145744249224663,
-0.00918929185718298,
0.02646554261445999,
-0.047793835401535034,
0.022037731483578682,
0.015559131279587746,
-0.040823426097631454,
-0.05262897163629532,
-0.04597126692533493,
-0.021156148985028267,
0.04966678470373154,
-0.03590356931090355,
0.016813481226563454,
0.0629204511642456,
-0.00021199893672019243,
-0.05076483637094498,
-0.07253905385732651,
-0.017737630754709244,
-0.02870132401585579,
0.012806951999664307,
0.02488456480205059,
-0.026180695742368698,
-0.01586112566292286,
-0.03841923549771309,
-0.07112971693277359,
0.05507291853427887,
0.03050738014280796,
-0.0354619137942791,
0.04246748611330986,
0.031432218849658966,
-0.011056053452193737,
0.007245758548378944,
0.0008427457069046795,
-0.05155467614531517,
0.020411435514688492,
-0.009286153130233288,
0.021007811650633812,
0.03683033585548401,
0.0553511343896389,
-0.003797942539677024,
-0.03241313621401787,
-0.0601063072681427,
-0.032572925090789795,
-0.026449471712112427,
-0.006151437759399414,
0.08622732013463974
] |
Carlork314/Xd | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
---
# CodeTrans model for code documentation generation javascript
Pretrained model on programming language javascript using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the javascript function/method.
## Intended uses & limitations
The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_javascript_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_javascript_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/javascript/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 32,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing javascript code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.002852118108421564,
-0.02075725607573986,
-0.0037178380880504847,
0.012486306950449944,
0.035229701548814774,
0.03243408352136612,
-0.03950272127985954,
-0.007825455628335476,
-0.01882210187613964,
0.06760265678167343,
0.030233386904001236,
-0.015942009165883064,
-0.010607223026454449,
0.03918541222810745,
-0.03630339354276657,
-0.05592377856373787,
-0.026812605559825897,
-0.025432245805859566,
-0.036846574395895004,
-0.029850048944354057,
0.029166078194975853,
-0.006312160287052393,
0.009450939483940601,
0.005785737186670303,
-0.006282769609242678,
0.01773248240351677,
0.0016450798138976097,
0.021368978545069695,
0.04369821771979332,
-0.057694654911756516,
-0.03878478333353996,
-0.00240751588717103,
-0.04474087059497833,
-0.014085762202739716,
-0.017832022160291672,
0.02707417495548725,
0.008201256394386292,
0.03534426912665367,
0.030018717050552368,
0.06712505221366882,
0.007558971177786589,
0.022415373474359512,
0.02625044621527195,
-0.035689327865839005,
0.048464007675647736,
0.00357153476215899,
-0.027756312862038612,
-0.02353142574429512,
0.01242006290704012,
-0.0066938502714037895,
-0.06313291937112808,
-0.0738682746887207,
-0.031156402081251144,
0.04748653247952461,
-0.0007816902943886817,
-0.018936574459075928,
-0.06656882166862488,
-0.02265331707894802,
0.06331826746463776,
-0.04512922093272209,
-0.030491283163428307,
0.013390479609370232,
-0.04781603813171387,
0.008162540383636951,
0.01947508566081524,
-0.00025485563674010336,
0.015358923003077507,
-0.059461306780576706,
0.033146560192108154,
0.0016441515181213617,
0.05491630360484123,
-0.03128046914935112,
0.019194621592760086,
-0.10017722100019455,
0.012790974229574203,
-0.009264467284083366,
0.019519269466400146,
0.013633053749799728,
-0.009192241355776787,
0.06352590769529343,
-0.020759252831339836,
0.015724986791610718,
0.053692471235990524,
0.019605372101068497,
-0.003890927881002426,
0.022671233862638474,
-0.030516156926751137,
-0.01626543514430523,
-0.004018477629870176,
0.05232426896691322,
-0.056627288460731506,
-0.057745300233364105,
-0.008766883984208107,
-0.03013508766889572,
-0.032639339566230774,
0.023097343742847443,
0.05290519818663597,
-0.015629693865776062,
0.021060822531580925,
-0.0018021700670942664,
0.03970316797494888,
0.055394310504198074,
-0.0046258182264864445,
0.05655497685074806,
0.01657981239259243,
0.018880244344472885,
-0.01336031872779131,
-0.04578085616230965,
-0.015394494868814945,
0.044821497052907944,
0.00785862747579813,
-0.036510542035102844,
-0.04367699846625328,
0.0392029844224453,
0.02046455629169941,
-0.056290268898010254,
0.05413626506924629,
-0.01799148879945278,
-0.06330036371946335,
-0.03645220771431923,
0.030877625569701195,
-0.009294620715081692,
-0.002841312438249588,
0.02724861353635788,
-0.03292887657880783,
0.005020606331527233,
-0.04475827515125275,
-0.030468394979834557,
0.00844668596982956,
0.027005836367607117,
-0.01220311876386404,
0.09753803163766861,
-0.0006083674961701035,
-0.0399506650865078,
0.004139851313084364,
0.014800585806369781,
-0.06401069462299347,
0.06544258445501328,
0.022768817842006683,
0.10045605897903442,
-0.07713234424591064,
-0.04499232396483421,
0.02865086868405342,
0.013552790507674217,
-0.009911508299410343,
0.01640239544212818,
-0.003326266538351774,
-0.08779865503311157,
-0.028041159734129906,
0.011347922496497631,
0.07231168448925018,
-0.05143143609166145,
-0.022512344643473625,
0.029532503336668015,
0.017417296767234802,
0.020428702235221863,
-0.03863602876663208,
0.000961177283897996,
0.007719364948570728,
-0.02278781868517399,
-0.07085026055574417,
0.029843293130397797,
-0.0019878060556948185,
-0.021200016140937805,
-0.021614449098706245,
-0.03911396861076355,
0.0012758199591189623,
0.10012160986661911,
0.022027350962162018,
-0.015690578147768974,
-0.07019418478012085,
0.01854582317173481,
0.0415928028523922,
0.03697852045297623,
-0.0109515730291605,
0.021944807842373848,
0.045278992503881454,
0.05401995778083801,
-0.02935471013188362,
0.07421178370714188,
-0.01587417535483837,
-0.036908797919750214,
-0.029330892488360405,
0.03281360864639282,
-0.007731790188699961,
-0.02740309201180935,
0.002639301121234894,
0.013238959014415741,
-0.01943858154118061,
-0.01525657158344984,
-0.0213499553501606,
0.04759377986192703,
0.012541395612061024,
-0.02971228025853634,
-0.03461159020662308,
0.003649174701422453,
-0.012292088009417057,
0.05655810981988907,
-0.03727838769555092,
-0.008207131177186966,
-0.02443883940577507,
-0.03739361837506294,
-0.0036016455851495266,
0.02295217290520668,
0.04315376281738281,
0.026334771886467934,
-0.00243556615896523,
0.09818527847528458,
-0.048045817762613297,
-0.000971893547102809,
-0.06065575033426285,
-0.05012949928641319,
0.010447022505104542,
0.04524378478527069,
0.028285831212997437,
0.019914982840418816,
0.007913518697023392,
-0.03309322148561478,
0.010784096084535122,
0.06852681934833527,
0.04065011069178581,
0.032172463834285736,
0.0007447254611179233,
-0.03756411001086235,
0.04945830628275871,
0.06743400543928146,
-0.04487995803356171,
-0.05684756860136986,
0.04459351301193237,
0.03036799468100071,
-0.018090426921844482,
0.03421153500676155,
0.003334958106279373,
0.0062461416237056255,
-0.044472623616456985,
-0.06083766371011734,
0.04966042935848236,
0.012442373670637608,
0.005509862210601568,
0.025027187541127205,
0.015091737732291222,
0.004070991650223732,
0.04312589764595032,
-0.01631241850554943,
-0.004596387967467308,
-0.07075804471969604,
0.017781579867005348,
0.002784101292490959,
0.05187539756298065,
-0.04050205647945404,
0.045081257820129395,
0.010200414806604385,
0.004350997041910887,
0.0716465562582016,
-0.018112165853381157,
0.04004811868071556,
0.04344969242811203,
0.03149788826704025,
-0.02060767635703087,
0.019725807011127472,
0.023841526359319687,
0.022913670167326927,
0.07026225328445435,
0.0062295072712004185,
0.05499504879117012,
-0.0005480684340000153,
0.06145049259066582,
0.06717289239168167,
0.015018938109278679,
-0.0030106757767498493,
0.02552034892141819,
0.05862542614340782,
-0.0012108501978218555,
-0.015593008138239384,
0.06306949257850647,
-0.05959407612681389,
0.034646861255168915,
-0.033553700894117355,
0.02419716864824295,
0.0005700861802324653,
-0.020501738414168358,
0.03806942701339722,
0.005220494698733091,
-0.06189782917499542,
-0.0003093632112722844,
-0.0418434701859951,
-0.020427441224455833,
0.013191677629947662,
-0.0048238374292850494,
-0.01676888018846512,
0.006470472551882267,
-0.02511061355471611,
0.0245815496891737,
-0.06707526743412018,
-0.03342247009277344,
-0.0006526599754579365,
-0.049337130039930344,
0.014776572585105896,
-0.06601988524198532,
-0.04319997504353523,
-0.07537652552127838,
-0.014119950123131275,
0.05296631529927254,
0.003171171760186553,
-0.012678025290369987,
-0.02277356944978237,
0.010397487320005894,
-0.03931909054517746,
-0.01937425695359707,
-0.06825914978981018,
-0.07001044601202011,
-0.004532045219093561,
-0.06697093695402145,
0.036543816328048706,
0.003553260350599885,
0.01996668241918087,
0.014532534405589104,
-0.017626287415623665,
-0.024379940703511238,
-0.016638258472085,
0.04574274271726608,
0.01049380749464035,
-0.005289062391966581,
-0.028203094378113747,
0.013774273917078972,
-0.018734637647867203,
0.04394751414656639,
-0.012905755080282688,
-0.046760622411966324,
0.11222993582487106,
0.05100760981440544,
0.03071080707013607,
-0.005884251557290554,
-0.03791680932044983,
-0.04520845040678978,
-0.06253048032522202,
-0.03039460815489292,
-0.0199319738894701,
-0.021814649924635887,
-0.005903560668230057,
-0.04266961291432381,
-0.02297108992934227,
-0.03476821258664131,
-0.050184592604637146,
-0.02278980053961277,
0.021129535511136055,
0.013443022966384888,
0.044607166200876236,
0.0511922612786293,
0.020041096955537796,
-0.05098521336913109,
-0.024607978761196136,
0.044485658407211304,
-0.0007855727453716099,
-0.004637482110410929,
-0.06399337202310562,
-0.02885776199400425,
0.04108649119734764,
0.018901366740465164,
-0.016934767365455627,
-0.010783815756440163,
0.0532546229660511,
0.01852584071457386,
0.015869520604610443,
-0.0019375538686290383,
-0.014268484897911549,
-0.013982766307890415,
-0.01946023479104042,
-0.00021937218843959272,
-0.048398569226264954,
-0.0411059632897377,
-0.030054057016968727,
-0.02338371053338051,
0.0415794663131237,
-0.07311703264713287,
-0.05307729169726372,
0.00519883306697011,
0.025107741355895996,
0.03348135948181152,
0.03308343514800072,
-0.02065308392047882,
-0.0001163981287390925,
-0.06418152153491974,
-0.044321924448013306,
0.0360928475856781,
0.034295227378606796,
-0.00787920318543911,
0.041599538177251816,
0.04081832244992256,
-0.05643206462264061,
0.043756019324064255,
0.030313778668642044,
0.03225904330611229,
0.02119538001716137,
-0.02833714336156845,
0.025000303983688354,
-0.051995374262332916,
0.021995479241013527,
0.0028377710841596127,
-0.028653686866164207,
-0.0449470616877079,
-0.08291420340538025,
-0.03393914923071861,
0.013895584270358086,
-0.025787126272916794,
0.005349969025701284,
0.05420480668544769,
-0.012233813293278217,
-0.034195490181446075,
-0.014183171093463898,
0.012890075333416462,
0.054495424032211304,
-0.035555317997932434,
0.03297943249344826,
-0.0014804264064878225,
0.06016381457448006,
-0.027572566643357277,
0.002480074530467391,
-0.03250889480113983,
-0.026127228513360023,
0.013143676333129406,
0.050877366214990616,
0.022234603762626648,
0.06523626297712326,
0.07924914360046387,
-0.003501426661387086,
-0.03919606655836105,
0.031235722824931145,
0.04736871272325516,
0.0007856720476411283,
-0.021984636783599854,
-0.0009061406599357724,
-0.005014652386307716,
-0.029437478631734848,
0.005414229817688465,
-0.0038345674984157085,
0.016372233629226685,
0.022192150354385376,
-0.02992677316069603,
-0.0033283266238868237,
-0.011328419670462608,
-0.02905922941863537,
-0.05086984857916832,
-0.045792628079652786,
-0.0037615003529936075,
-0.0365249440073967,
-0.05613775923848152,
0.03941397741436958,
0.044270582497119904,
0.032927386462688446,
0.048236433416604996,
0.05265571177005768,
-0.03865019977092743,
-0.03744973987340927,
0.03931724652647972,
0.03747546300292015,
-0.04150878265500069,
-0.04165155440568924,
-0.04051635041832924,
0.029739156365394592,
0.039777278900146484,
-0.02585834451019764,
-0.08833570033311844,
0.010269410908222198,
0.021090414375066757,
-0.018239257857203484,
0.0695551410317421,
0.004240266513079405,
0.022802744060754776,
0.054005179554224014,
-0.0019130033906549215,
0.03532404825091362,
-0.02434624917805195,
0.02244267426431179,
-0.0004910401185043156,
0.03921174630522728,
-0.020429937168955803,
-0.03503179922699928,
-0.03876478970050812,
0.025469863787293434,
0.015837879851460457,
0.03902086243033409,
0.03490466997027397,
-0.016046684235334396,
-0.06643860042095184,
-0.02451903373003006,
0.022298181429505348,
-0.023641128093004227,
0.014359243214130402,
0.029395604506134987,
0.03519755229353905,
-0.03624272719025612,
-0.03432198241353035,
-0.009418211877346039,
-0.011322163045406342,
0.03111327439546585,
-0.002952135866507888,
-0.02223716303706169,
-0.057581447064876556,
0.020018186420202255,
-0.027914850041270256,
-0.016430485993623734,
-0.10613982379436493,
0.04220626875758171,
-0.007245879620313644,
-0.002990837674587965,
0.043982427567243576,
0.0379365049302578,
0.009530936367809772,
0.03694198280572891,
-0.008137674070894718,
0.01888490840792656,
-0.029981521889567375,
0.0174726489931345,
-0.003382138442248106,
-0.033439598977565765,
-0.028650056570768356,
-0.07011391967535019,
-0.01908610574901104,
-0.04282865673303604,
-0.038904935121536255,
-0.053513530641794205,
-0.03248099237680435,
0.006633582524955273,
-0.011321766301989555,
0.0015506717609241605,
-0.011000842787325382,
0.006358307786285877,
-0.03173881769180298,
-0.022087695077061653,
-0.026794632896780968,
-0.049607932567596436,
-0.099075086414814,
-0.011093863286077976,
0.016088932752609253,
0.024837814271450043,
0.04622003436088562,
0.004581242799758911,
0.003978664055466652,
0.023640941828489304,
0.005266420543193817,
-0.021589646115899086,
0.0011602785671129823,
0.016466112807393074,
-0.034363385289907455,
-0.013560784049332142,
-0.004724078346043825,
0.009158452972769737,
0.014551345258951187,
-0.019734768196940422,
0.0007465509115718305,
0.05730007216334343,
-0.029800934717059135,
0.004356828518211842,
0.035457272082567215,
0.006759883835911751,
-0.06782146543264389,
-0.04000282287597656,
-0.005249199457466602,
-0.05435088649392128,
0.03767358511686325,
0.0027132811956107616,
-0.03910095989704132,
-0.006411056499928236,
0.0069006336852908134,
0.02647823840379715,
0.0026608617044985294,
-0.03137335553765297,
0.012517173774540424,
-0.03048618882894516,
0.041113320738077164,
-0.05770595744252205,
0.057592689990997314,
-0.033957257866859436,
-0.005228768102824688,
-0.008479613810777664,
-0.002683348720893264,
-0.027361582964658737,
0.058988578617572784,
-0.014667024835944176,
0.009222856722772121,
0.0019752788357436657,
0.0032331047113984823,
-0.03260488063097,
0.03349292650818825,
-0.016364017501473427,
0.014832264743745327,
-0.021780474111437798,
0.01984788291156292,
-0.04142245277762413,
0.01503632590174675,
-0.030093004927039146,
-0.023268859833478928,
0.00010291886428603902,
-0.024343790486454964,
-0.005617419257760048,
-0.050819702446460724,
0.04549717530608177,
0.020620407536625862,
0.015354001894593239,
0.008732565678656101,
-0.027578363195061684,
-0.020391300320625305,
0.023300040513277054,
-0.08552787452936172,
-0.0487314835190773,
-0.027996378019452095,
0.017888635396957397,
-0.01665996015071869,
0.057061851024627686,
0.03701303154230118,
-0.045557670295238495,
-0.003649428253993392,
0.018294071778655052,
0.02570771425962448,
0.008853448554873466,
0.0177183635532856,
0.01613646186888218,
0.041898585855960846,
0.052071090787649155,
-0.046873439103364944,
-0.006400913465768099,
-0.006735149770975113,
-0.013110869564116001,
-0.014685851521790028,
-0.0167707409709692,
0.009609654545783997,
-0.01720982789993286,
-0.05516717582941055,
-0.01051168330013752,
0.060784731060266495,
0.051183804869651794,
0.012996704317629337,
-0.0028700835537165403,
-0.03979258984327316,
0.010643630288541317,
0.021469509229063988,
-0.04200417920947075,
-0.025026308372616768,
0.025494467467069626,
-0.05719474330544472,
0.06607787311077118,
-0.012630774639546871,
-0.0023775873705744743,
0.017743492498993874,
0.03153416886925697,
0.018908215686678886,
0.046798694878816605,
-0.04056793078780174,
-0.009115072898566723,
0.031669981777668,
-0.04416273534297943,
-0.009532694704830647,
-0.007795669138431549,
0.06213082745671272,
-0.055494051426649094,
0.025128770619630814,
0.033877186477184296,
0.0024280480574816465,
-0.02118738926947117,
-0.019756386056542397,
-0.04608480632305145,
0.037230998277664185,
-0.04857528954744339,
0.07021850347518921,
-0.03015194647014141,
-0.08368737995624542,
0.07207171618938446,
0.046590857207775116,
-0.08542004227638245,
-0.0030120033770799637,
0.037429261952638626,
0.007047631312161684,
0.04191501438617706,
0.043951135128736496,
-0.0809439867734909,
0.002375032752752304,
-0.039184339344501495,
0.015905281528830528,
-0.06987937539815903,
-0.0014640630688518286,
0.041681885719299316,
-0.058238521218299866,
-0.009177443571388721,
0.022454924881458282,
-0.017757389694452286,
-0.003735024482011795,
0.02391582354903221,
-0.03643263131380081,
-0.040086530148983,
-0.006578871514648199,
0.005255422089248896,
-0.02228686958551407,
0.02622213587164879,
-0.008208039216697216,
0.042520809918642044,
0.010836674831807613,
0.010412088595330715,
-0.04484732821583748,
0.0035139068495482206,
0.02694692648947239,
-0.03878561034798622,
-0.025242093950510025,
0.031454864889383316,
0.006899852771311998,
-0.012159460224211216,
0.027193674817681313,
-0.01520538330078125,
0.0164643507450819,
0.021503204479813576,
-0.03492189943790436,
0.007822936400771141,
-0.04332013055682182,
-0.009493978694081306,
0.018222924321889877,
0.012976527214050293,
0.03585287928581238,
-0.015415241941809654,
0.035902075469493866,
0.04574880376458168,
0.04147399216890335,
-0.02775457501411438,
-0.015357406809926033,
-0.00731987040489912,
0.026537932455539703,
-0.047608453780412674,
0.016842056065797806,
0.01723543368279934,
-0.04547717049717903,
-0.049220968037843704,
-0.04746926203370094,
-0.027122285217046738,
0.04845961555838585,
-0.0376686193048954,
0.01432079914957285,
0.06212138757109642,
-0.0032314315903931856,
-0.05601266026496887,
-0.0747755616903305,
-0.015125252306461334,
-0.025294888764619827,
0.011122586205601692,
0.024610508233308792,
-0.026626141741871834,
-0.010690640658140182,
-0.042412612587213516,
-0.07324450463056564,
0.04666527360677719,
0.02395014837384224,
-0.03351979702711105,
0.04292161017656326,
0.034824758768081665,
-0.010755486786365509,
0.008593033999204636,
0.006603073328733444,
-0.04760947823524475,
0.022334108129143715,
-0.006327376235276461,
0.023120200261473656,
0.03749992325901985,
0.05447322130203247,
-0.005107277538627386,
-0.03415319696068764,
-0.06003319472074509,
-0.03530452027916908,
-0.03525350242853165,
-0.006156208924949169,
0.08790700882673264
] |
CarlosPR/mt5-spanish-memmories-analysis | [
"pytorch",
"mt5",
"text2text-generation",
"transformers",
"autotrain_compatible"
] | text2text-generation | {
"architectures": [
"MT5ForConditionalGeneration"
],
"model_type": "mt5",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 7 | 2020-12-11T13:12:04Z | ---
tags:
- summarization
widget:
- text: "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
---
# CodeTrans model for code documentation generation javascript
Pretrained model on programming language javascript using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized javascript code functions: it works best with tokenized javascript functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain. It is then fine-tuned on the code documentation generation task for the javascript function/method.
## Intended uses & limitations
The model could be used to generate the description for the javascript function or be fine-tuned on other javascript code tasks. It can be used on unparsed and untokenized javascript code. However, if the javascript code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate javascript function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_javascript_transfer_learning_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_javascript_transfer_learning_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "function isStandardBrowserEnv ( ) { if ( typeof navigator !== 'undefined' && ( navigator . product === 'ReactNative' || navigator . product === 'NativeScript' || navigator . product === 'NS' ) ) { return false ; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/javascript/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Transfer-learning Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 40,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing javascript code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.005873539485037327,
-0.01903701387345791,
-0.004300446715205908,
0.012349724769592285,
0.03615885227918625,
0.028937876224517822,
-0.036549609154462814,
-0.006405275780707598,
-0.017828121781349182,
0.06674660742282867,
0.03133030980825424,
-0.017193909734487534,
-0.009177490137517452,
0.03946252539753914,
-0.03542150557041168,
-0.0528692826628685,
-0.03333330526947975,
-0.026068564504384995,
-0.04124027490615845,
-0.029928108677268028,
0.027848105877637863,
-0.011254219338297844,
0.005662037990987301,
0.007546020671725273,
-0.007159072440117598,
0.020305518060922623,
0.002863395493477583,
0.016553180292248726,
0.046231966465711594,
-0.05406617000699043,
-0.037033118307590485,
-0.002277224324643612,
-0.04714272916316986,
-0.014589105732738972,
-0.019389688968658447,
0.02662399597465992,
0.009095505811274052,
0.033013880252838135,
0.02758912183344364,
0.06926873326301575,
0.008037630468606949,
0.024842778220772743,
0.030351102352142334,
-0.032236941158771515,
0.04709682986140251,
0.0016024119686335325,
-0.026078801602125168,
-0.02546146884560585,
0.012756780721247196,
-0.00696667842566967,
-0.06433019787073135,
-0.07277169823646545,
-0.03466685116291046,
0.04825637489557266,
-0.0008415456395596266,
-0.019203756004571915,
-0.06753114610910416,
-0.02251838892698288,
0.06665798276662827,
-0.04502605274319649,
-0.0317247211933136,
0.012693340890109539,
-0.04584797844290733,
0.007525907829403877,
0.019893784075975418,
0.0002610274823382497,
0.014509953558444977,
-0.05454208329319954,
0.033037494868040085,
0.003922827076166868,
0.052743084728717804,
-0.028783908113837242,
0.021362263709306717,
-0.0988389104604721,
0.011858424171805382,
-0.00972631387412548,
0.020534032955765724,
0.013094228692352772,
-0.010538659058511257,
0.06679602712392807,
-0.02087659016251564,
0.01759152300655842,
0.055442191660404205,
0.019769689068198204,
-0.0016791465459391475,
0.026110412552952766,
-0.025674747303128242,
-0.018311750143766403,
-0.0034981099888682365,
0.05051448196172714,
-0.05724180117249489,
-0.05856107920408249,
-0.00746559863910079,
-0.03287152200937271,
-0.03198675066232681,
0.02014094404876232,
0.05390438064932823,
-0.014594443142414093,
0.022733863443136215,
-0.002069789683446288,
0.03959209844470024,
0.06008065491914749,
-0.005141070112586021,
0.053697727620601654,
0.017233956605196,
0.02208668738603592,
-0.011181192472577095,
-0.04423428699374199,
-0.016067232936620712,
0.04292985051870346,
0.005943837109953165,
-0.0355326272547245,
-0.045152511447668076,
0.037980832159519196,
0.018988486379384995,
-0.058888163417577744,
0.057090625166893005,
-0.020179959014058113,
-0.06281813234090805,
-0.03516797721385956,
0.03251740708947182,
-0.008784952573478222,
-0.005289625376462936,
0.02478007599711418,
-0.03685319051146507,
0.004606081172823906,
-0.046279557049274445,
-0.030038539320230484,
0.008632110431790352,
0.027100732550024986,
-0.0053330701775848866,
0.09605470299720764,
-0.0019011194817721844,
-0.036860812455415726,
0.0022017525043338537,
0.014951261691749096,
-0.061522722244262695,
0.06596729159355164,
0.023888330906629562,
0.10032060742378235,
-0.07836008071899414,
-0.04517306759953499,
0.026937438175082207,
0.012062999419867992,
-0.01091777440160513,
0.016177013516426086,
-0.0060497852973639965,
-0.08704287558794022,
-0.030231671407818794,
0.010305997915565968,
0.07311482727527618,
-0.05297115445137024,
-0.022870801389217377,
0.028965793550014496,
0.010950294323265553,
0.02030700258910656,
-0.041791852563619614,
-0.00003792706775129773,
0.006700779777020216,
-0.023461248725652695,
-0.0702672153711319,
0.03129129111766815,
-0.004575415514409542,
-0.018347598612308502,
-0.02030687779188156,
-0.0373782254755497,
-0.00007357653521467,
0.09903889149427414,
0.018434995785355568,
-0.017104223370552063,
-0.07534725964069366,
0.022214272990822792,
0.040333446115255356,
0.038019128143787384,
-0.008934391662478447,
0.016784070059657097,
0.04541373997926712,
0.05279894173145294,
-0.026775933802127838,
0.07625190168619156,
-0.015873027965426445,
-0.03883536905050278,
-0.032277628779411316,
0.03323632478713989,
-0.004369837231934071,
-0.028911998495459557,
0.0028762677684426308,
0.0163906030356884,
-0.016953133046627045,
-0.01499787624925375,
-0.016306770965456963,
0.0474652536213398,
0.011472278274595737,
-0.03055952675640583,
-0.03296750411391258,
0.0056342994794249535,
-0.014087149873375893,
0.062307100743055344,
-0.034848157316446304,
-0.007184547372162342,
-0.027185820043087006,
-0.035315368324518204,
-0.006243275944143534,
0.021302038803696632,
0.04405394569039345,
0.02148960717022419,
-0.001317553804256022,
0.09799809008836746,
-0.04926923289895058,
-0.003704112023115158,
-0.06468067318201065,
-0.052944961935281754,
0.012151294387876987,
0.045566629618406296,
0.030154073610901833,
0.01915900595486164,
0.007295490708202124,
-0.03664121776819229,
0.011606988497078419,
0.07035530358552933,
0.03830345347523689,
0.03135980665683746,
0.002238958841189742,
-0.03974372521042824,
0.05004078522324562,
0.065651074051857,
-0.05232029780745506,
-0.05800488591194153,
0.042887065559625626,
0.03541255742311478,
-0.019308175891637802,
0.03487655147910118,
0.0058617969043552876,
0.00657677324488759,
-0.03976750373840332,
-0.062184520065784454,
0.04883963242173195,
0.015505321323871613,
0.007076996378600597,
0.02476276084780693,
0.01606573909521103,
0.0020144085865467787,
0.04126112535595894,
-0.014714335091412067,
-0.0063135093078017235,
-0.06968467682600021,
0.018154660239815712,
0.00220184912905097,
0.0488586388528347,
-0.038735128939151764,
0.0459640733897686,
0.015193796716630459,
0.005870065186172724,
0.06621721386909485,
-0.016545338556170464,
0.03950781002640724,
0.047269172966480255,
0.03119506873190403,
-0.02093672938644886,
0.021536754444241524,
0.02545539289712906,
0.02037215232849121,
0.0694037601351738,
0.005264951381832361,
0.05378694459795952,
-0.00010378721344750375,
0.060040369629859924,
0.06905081868171692,
0.015757784247398376,
-0.006802256219089031,
0.026235995814204216,
0.06032653525471687,
-0.005480894818902016,
-0.017457060515880585,
0.06535964459180832,
-0.05701058357954025,
0.034635912626981735,
-0.03050985001027584,
0.025799620896577835,
-0.0017548486357554793,
-0.02276291511952877,
0.03731240704655647,
0.004024516325443983,
-0.0654541626572609,
-0.001507619977928698,
-0.04323205724358559,
-0.01695088855922222,
0.0114970738068223,
-0.0033045238815248013,
-0.012114724144339561,
0.004729292821139097,
-0.025107525289058685,
0.028855081647634506,
-0.06464150547981262,
-0.036721087992191315,
-0.000014827449376753066,
-0.05038132891058922,
0.014721479266881943,
-0.06602613627910614,
-0.045657362788915634,
-0.07505808025598526,
-0.012107775546610355,
0.050904229283332825,
-0.001438700477592647,
-0.012683192268013954,
-0.01813475787639618,
0.007982203736901283,
-0.03489444777369499,
-0.01881895214319229,
-0.0690750777721405,
-0.06996700912714005,
-0.004623095970600843,
-0.06973345577716827,
0.03618244826793671,
0.003683154471218586,
0.020666245371103287,
0.013866373337805271,
-0.016363542526960373,
-0.02396356500685215,
-0.01634577289223671,
0.04389473795890808,
0.011771694757044315,
-0.010045710951089859,
-0.029745301231741905,
0.013654639013111591,
-0.016531044617295265,
0.04461248964071274,
-0.015054356306791306,
-0.04867368936538696,
0.1104806587100029,
0.04968469217419624,
0.0310256015509367,
-0.006275509484112263,
-0.035207320004701614,
-0.042430177330970764,
-0.0583004392683506,
-0.03043440356850624,
-0.018865561112761497,
-0.021046534180641174,
-0.008606518618762493,
-0.04066593572497368,
-0.02409210614860058,
-0.03311208263039589,
-0.052744410932064056,
-0.024014275521039963,
0.018294675275683403,
0.010646977461874485,
0.04693393036723137,
0.052702397108078,
0.021894700825214386,
-0.04796357452869415,
-0.028593748807907104,
0.0475739948451519,
-0.003181681502610445,
-0.00890663918107748,
-0.0610232874751091,
-0.033986255526542664,
0.04006311297416687,
0.019954945892095566,
-0.017780866473913193,
-0.009160739369690418,
0.05398303270339966,
0.019114013761281967,
0.014439022168517113,
-0.002140889409929514,
-0.013132305815815926,
-0.02000054344534874,
-0.018382279202342033,
-0.005523876752704382,
-0.049869224429130554,
-0.04376843944191933,
-0.02751948870718479,
-0.028157085180282593,
0.041875049471855164,
-0.0714774802327156,
-0.05199320614337921,
0.0041728392243385315,
0.020405665040016174,
0.036763545125722885,
0.033671844750642776,
-0.024035098031163216,
-0.0021498585119843483,
-0.06553472578525543,
-0.04398145526647568,
0.03594404458999634,
0.03530038148164749,
-0.0064395577646791935,
0.041703276336193085,
0.04181665554642677,
-0.054812412708997726,
0.04038871452212334,
0.030741136521100998,
0.031130189076066017,
0.018663594499230385,
-0.029125526547431946,
0.025469647720456123,
-0.05682699754834175,
0.023209629580378532,
0.0015822215937078,
-0.02953786961734295,
-0.04173729196190834,
-0.080805703997612,
-0.035842444747686386,
0.009476262144744396,
-0.023463234305381775,
0.003626246005296707,
0.05265652760863304,
-0.014477112330496311,
-0.03497915714979172,
-0.017009805887937546,
0.01137335691601038,
0.052415601909160614,
-0.03439382091164589,
0.03215628117322922,
0.0010427908273413777,
0.06111481413245201,
-0.02763858437538147,
-0.002630105009302497,
-0.03145461902022362,
-0.028040634468197823,
0.012833178974688053,
0.04914237931370735,
0.023592807352542877,
0.06547443568706512,
0.07450848072767258,
-0.01010915171355009,
-0.04047664999961853,
0.03560396656394005,
0.046885598450899124,
0.0009295447380281985,
-0.023138605058193207,
-0.0005822526873089373,
-0.006581887602806091,
-0.028315817937254906,
0.006207263097167015,
-0.0017489570891484618,
0.015397532843053341,
0.02446385659277439,
-0.028216175734996796,
-0.003773217089474201,
-0.011718000285327435,
-0.020642105489969254,
-0.04944493994116783,
-0.04809068143367767,
-0.001794033101759851,
-0.03652161359786987,
-0.055494874715805054,
0.03585455194115639,
0.04049590975046158,
0.034680161625146866,
0.05087732523679733,
0.05098351091146469,
-0.040723688900470734,
-0.03937481716275215,
0.04304172471165657,
0.034362975507974625,
-0.04137427732348442,
-0.04197870194911957,
-0.042354218661785126,
0.027669791132211685,
0.04021359607577324,
-0.019571738317608833,
-0.09196873009204865,
0.008496701717376709,
0.02091829478740692,
-0.018156763166189194,
0.07004056125879288,
0.00383614469319582,
0.02592637948691845,
0.055322226136922836,
-0.00022721732966601849,
0.03409432992339134,
-0.023530662059783936,
0.01924614980816841,
-0.0025654619093984365,
0.035810936242341995,
-0.021735452115535736,
-0.03512149304151535,
-0.03982510045170784,
0.027128875255584717,
0.014946596696972847,
0.0367899052798748,
0.033843956887722015,
-0.018277807161211967,
-0.06645142287015915,
-0.026375064626336098,
0.02062360569834709,
-0.01922818087041378,
0.014785835519433022,
0.032907310873270035,
0.03220003843307495,
-0.03442061319947243,
-0.033549994230270386,
-0.008127594366669655,
-0.009989557787775993,
0.03533577546477318,
-0.0007594609051011503,
-0.022804511711001396,
-0.056323759257793427,
0.021503247320652008,
-0.027924392372369766,
-0.015571375377476215,
-0.10355325043201447,
0.04150136932730675,
-0.009687810204923153,
-0.00710588414222002,
0.04431106895208359,
0.0368926115334034,
0.010240702889859676,
0.03514118492603302,
-0.011371439322829247,
0.019828693941235542,
-0.02734367363154888,
0.017341453582048416,
-0.0011766559910029173,
-0.03478316217660904,
-0.031012054532766342,
-0.07047417759895325,
-0.021181579679250717,
-0.037887945771217346,
-0.03984467685222626,
-0.0554785281419754,
-0.030813507735729218,
0.006347729358822107,
-0.01210500206798315,
-0.00008630071533843875,
-0.009491611272096634,
0.008360643871128559,
-0.03403545543551445,
-0.024195145815610886,
-0.024742675945162773,
-0.04780396819114685,
-0.09955993294715881,
-0.011927046813070774,
0.017429742962121964,
0.024341527372598648,
0.05100482702255249,
0.00195550755597651,
0.001961339730769396,
0.026027999818325043,
0.005172659642994404,
-0.02531961351633072,
-0.0041830874979496,
0.017938805744051933,
-0.03514769673347473,
-0.016847819089889526,
-0.003626639721915126,
0.009093379601836205,
0.011443025432527065,
-0.023482240736484528,
-0.0018421588465571404,
0.058925047516822815,
-0.030575552955269814,
0.0017157950205728412,
0.038342610001564026,
0.005540747195482254,
-0.06700482219457626,
-0.04011518135666847,
-0.006829613354057074,
-0.05747762694954872,
0.03611534833908081,
-0.00025746511528268456,
-0.037848006933927536,
-0.00812536757439375,
0.014773640781641006,
0.023155029863119125,
-0.0008104518637992442,
-0.0324086993932724,
0.007029531989246607,
-0.027666201815009117,
0.04460298642516136,
-0.05395206809043884,
0.05561179667711258,
-0.0344032347202301,
-0.004261053167283535,
-0.01148854661732912,
0.0007701466092839837,
-0.029023081064224243,
0.06066033989191055,
-0.015359376557171345,
0.00810201559215784,
0.0035320480819791555,
0.009656604379415512,
-0.028838058933615685,
0.03241311013698578,
-0.020115917548537254,
0.014820195734500885,
-0.02499057538807392,
0.026996297761797905,
-0.04349035024642944,
0.01582183688879013,
-0.03167315199971199,
-0.025434056296944618,
-0.001711543882265687,
-0.023295119404792786,
-0.0025955201126635075,
-0.048529352992773056,
0.045512713491916656,
0.02025333046913147,
0.015171393752098083,
0.010306834243237972,
-0.028106937184929848,
-0.018703462556004524,
0.019558539614081383,
-0.0847778394818306,
-0.05015216022729874,
-0.022839508950710297,
0.019851209595799446,
-0.015200871974229813,
0.05596064403653145,
0.035526640713214874,
-0.046427030116319656,
-0.0021748743019998074,
0.018286477774381638,
0.027832189574837685,
0.002104088431224227,
0.013757317326962948,
0.013778265565633774,
0.04357914254069328,
0.04904269799590111,
-0.0451962947845459,
-0.011304344050586224,
-0.008527225814759731,
-0.011525636538863182,
-0.016128337010741234,
-0.01604895479977131,
0.011926219798624516,
-0.011577327735722065,
-0.05447116121649742,
-0.012840804643929005,
0.06085799261927605,
0.04970097169280052,
0.012957984581589699,
-0.0025278585962951183,
-0.04024171829223633,
0.012095182202756405,
0.01818714663386345,
-0.039050884544849396,
-0.024386482313275337,
0.02357194945216179,
-0.06042890623211861,
0.06587998569011688,
-0.011091336607933044,
-0.0033297832123935223,
0.017437217757105827,
0.03143941983580589,
0.018833739683032036,
0.046249400824308395,
-0.04102032259106636,
-0.013300759717822075,
0.02736113965511322,
-0.04348738491535187,
-0.011005254462361336,
-0.007263924460858107,
0.06075425073504448,
-0.05404903367161751,
0.03061264380812645,
0.03504616394639015,
-0.001540684257633984,
-0.020165935158729553,
-0.01964283362030983,
-0.04224861040711403,
0.037337854504585266,
-0.05429854989051819,
0.06770487129688263,
-0.02848012000322342,
-0.08786670118570328,
0.07128692418336868,
0.04652712121605873,
-0.08284468203783035,
-0.00655655562877655,
0.036758504807949066,
0.004869149532169104,
0.03987569361925125,
0.04441668838262558,
-0.0808316022157669,
0.004514158237725496,
-0.039631281048059464,
0.019714180380105972,
-0.07272765785455704,
-0.006806227844208479,
0.04165768250823021,
-0.057395897805690765,
-0.008679816499352455,
0.0254676416516304,
-0.017201488837599754,
-0.0014612239319831133,
0.02800704725086689,
-0.033397167921066284,
-0.03606275096535683,
-0.008743314072489738,
0.004258795641362667,
-0.01843511499464512,
0.01997114159166813,
-0.005947150755673647,
0.04395041614770889,
0.00988962035626173,
0.012223831377923489,
-0.043445296585559845,
0.005522457882761955,
0.02832266315817833,
-0.03932936117053032,
-0.02453773096203804,
0.032137904316186905,
0.004411427769809961,
-0.011295313946902752,
0.029348723590373993,
-0.015485947951674461,
0.013655032962560654,
0.022590678185224533,
-0.037888772785663605,
0.0064876689575612545,
-0.03768136724829674,
-0.01218489371240139,
0.015397414565086365,
0.009709745645523071,
0.035221464931964874,
-0.014751463197171688,
0.03857988119125366,
0.045207373797893524,
0.042308829724788666,
-0.027818186208605766,
-0.016031846404075623,
-0.005326416809111834,
0.02575264312326908,
-0.047538917511701584,
0.01865288056433201,
0.016530629247426987,
-0.046541109681129456,
-0.04966385290026665,
-0.04960628226399422,
-0.028766591101884842,
0.04910145327448845,
-0.03452307730913162,
0.0177531186491251,
0.06294969469308853,
-0.00024789510644041,
-0.054293449968099594,
-0.07264046370983124,
-0.01777348853647709,
-0.02597082406282425,
0.006831834092736244,
0.02349756844341755,
-0.026712970808148384,
-0.010196917690336704,
-0.03841172531247139,
-0.071461521089077,
0.04770124331116676,
0.026724038645625114,
-0.03539574518799782,
0.04289160668849945,
0.03241213783621788,
-0.01161169819533825,
0.00920381210744381,
0.0003140066401101649,
-0.04476640373468399,
0.016458818688988686,
-0.010356917977333069,
0.025310447439551353,
0.037606049329042435,
0.055108144879341125,
-0.0065819937735795975,
-0.03681712970137596,
-0.06031215563416481,
-0.03024982288479805,
-0.033926382660865784,
-0.004005324561148882,
0.08861768245697021
] |
CarlosTron/Yo | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- summarization
widget:
- text: "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
---
# CodeTrans model for code documentation generation php
Pretrained model on programming language php using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized php code functions: it works best with tokenized php functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on CodeSearchNet Corpus php dataset.
## Intended uses & limitations
The model could be used to generate the description for the php function or be fine-tuned on other php code tasks. It can be used on unparsed and untokenized php code. However, if the php code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate php function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_php"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_php", skip_special_tokens=True),
device=0
)
tokenized_code = "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/function%20documentation%20generation/php/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.003700226778164506,
-0.023894982412457466,
0.009018141776323318,
0.014528516680002213,
0.02488459274172783,
0.03420032933354378,
-0.03508993610739708,
0.01000721100717783,
-0.0019796020351350307,
0.06300845742225647,
0.04103995859622955,
0.0028748665936291218,
0.003829549765214324,
0.0369403213262558,
-0.05170896649360657,
-0.0491914302110672,
-0.03381470963358879,
-0.020884040743112564,
-0.03774479031562805,
0.005461893044412136,
0.022953668609261513,
-0.007913260720670223,
-0.005673584528267384,
0.010717480443418026,
-0.012943016365170479,
0.018050357699394226,
-0.009147977456450462,
0.04733454808592796,
0.036960162222385406,
-0.058182865381240845,
-0.018123872578144073,
-0.004934527445584536,
-0.03699607402086258,
-0.023659855127334595,
-0.028591599315404892,
0.028274621814489365,
0.006431219168007374,
0.043764062225818634,
0.03196841478347778,
0.05346539244055748,
-0.0010546609992161393,
0.021016206592321396,
0.025057200342416763,
-0.05254559591412544,
0.07321043312549591,
0.014437657780945301,
-0.039915405213832855,
-0.028612397611141205,
0.03558224067091942,
0.000436647969763726,
-0.056574929505586624,
-0.06591591238975525,
-0.0274935532361269,
0.04849362000823021,
-0.0030610868707299232,
-0.009030177257955074,
-0.0736357644200325,
-0.010931972414255142,
0.052878107875585556,
-0.05203453451395035,
-0.014551825821399689,
0.012093458324670792,
-0.05920520797371864,
0.032786447554826736,
0.018617812544107437,
-0.011968987993896008,
0.01174441259354353,
-0.04170859605073929,
0.03490228205919266,
-0.00879712775349617,
0.050405241549015045,
-0.023094158619642258,
0.022857706993818283,
-0.10285323858261108,
0.0025413725525140762,
-0.0006755692884325981,
0.025544673204421997,
0.0217046607285738,
-0.0007254816009663045,
0.05209300294518471,
-0.008512627333402634,
0.0013851011171936989,
0.03892245143651962,
0.011997298337519169,
-0.0059505850076675415,
0.042964816093444824,
-0.03413162752985954,
-0.009767712093889713,
-0.01608370989561081,
0.061206843703985214,
-0.06639693677425385,
-0.06069907546043396,
-0.0016126626869663596,
-0.01970379799604416,
-0.019150981679558754,
0.041710104793310165,
0.04314799979329109,
-0.009678947739303112,
0.019947173073887825,
0.009690030477941036,
0.03782704845070839,
0.05678090080618858,
-0.007377033121883869,
0.04080035164952278,
0.02332940511405468,
0.013992509804666042,
-0.02181928977370262,
-0.04076622799038887,
-0.03227940574288368,
0.03166554868221283,
0.022708052769303322,
-0.041757743805646896,
-0.04571972042322159,
0.032235343009233475,
0.020585110411047935,
-0.05170367285609245,
0.046046946197748184,
-0.03062962368130684,
-0.050519395619630814,
-0.03978675976395607,
0.04598282277584076,
-0.006074375472962856,
-0.010175629518926144,
-0.0074327001348137856,
-0.044351790100336075,
0.00822796393185854,
-0.06603244692087173,
-0.028870750218629837,
0.0036245284136384726,
0.015817472711205482,
-0.02132420800626278,
0.08221348375082016,
0.01847142167389393,
-0.03527824953198433,
0.001469085575081408,
0.024818135425448418,
-0.06359733641147614,
0.0627356693148613,
0.0387989841401577,
0.10828633606433868,
-0.06511382758617401,
-0.03772309422492981,
0.01311204582452774,
0.0047906325198709965,
-0.022634321823716164,
0.026401687413454056,
-0.006457944866269827,
-0.07111981511116028,
-0.014931992627680302,
-0.010005396790802479,
0.06465452909469604,
-0.04573569819331169,
-0.01570487767457962,
0.01955672726035118,
0.0025449541863054037,
0.01783316396176815,
-0.03075529634952545,
0.0063636163249611855,
-0.0035871556028723717,
-0.028120242059230804,
-0.06030566617846489,
0.020483603700995445,
-0.001655200612731278,
0.0028278310783207417,
-0.036110278218984604,
-0.039756178855895996,
0.017324214801192284,
0.10378126800060272,
0.02406061254441738,
-0.021024005487561226,
-0.052441634237766266,
0.016087248921394348,
0.03501589596271515,
0.0644020289182663,
-0.026051504537463188,
0.03521917015314102,
0.053938426077365875,
0.05729878321290016,
-0.02653086557984352,
0.06003273278474808,
-0.02532941661775112,
-0.03986091539263725,
-0.02887318842113018,
0.03306557983160019,
-0.024546414613723755,
-0.04730108380317688,
-0.01207280158996582,
0.032112009823322296,
-0.020754123106598854,
-0.01316437404602766,
-0.013711678795516491,
0.06279289722442627,
0.01411038264632225,
-0.02057626098394394,
-0.027543386444449425,
0.009074385277926922,
-0.021205604076385498,
0.0750230997800827,
-0.03260777145624161,
0.0013187843142077327,
-0.01606822945177555,
-0.03350682184100151,
0.006261419039219618,
0.02678937464952469,
0.04601425677537918,
0.02533572167158127,
-0.010793130844831467,
0.11458855122327805,
-0.044845402240753174,
0.011221116408705711,
-0.043802496045827866,
-0.04124242439866066,
0.02634786069393158,
0.02437240444123745,
0.027183568105101585,
0.031599950045347214,
0.011811485514044762,
-0.03455998748540878,
0.011534206569194794,
0.07441804558038712,
0.05174548178911209,
0.039517682045698166,
-0.009173408150672913,
-0.023257970809936523,
0.030671823769807816,
0.054850731045007706,
-0.0418875478208065,
-0.043010469526052475,
0.03337172791361809,
0.03441276773810387,
-0.018944483250379562,
0.019673440605401993,
-0.009662127122282982,
0.00945970043540001,
-0.042982835322618484,
-0.04899703711271286,
0.035272564738988876,
0.029489757493138313,
0.010798206552863121,
0.04655224084854126,
0.011056984774768353,
-0.002829869044944644,
0.03173592686653137,
-0.0034037691075354815,
0.013545605354011059,
-0.07100143283605576,
-0.002999756718054414,
-0.00808978546410799,
0.056281380355358124,
-0.03974536061286926,
0.03735982999205589,
0.01198611781001091,
0.009369278326630592,
0.053126972168684006,
-0.029515422880649567,
0.034817542880773544,
0.042102959007024765,
0.033228665590286255,
-0.019835535436868668,
0.012608224526047707,
0.02326863259077072,
0.022127285599708557,
0.08628807961940765,
0.010308211669325829,
0.06026674062013626,
0.01244721282273531,
0.04459219425916672,
0.06148102506995201,
0.027921870350837708,
0.010096019133925438,
0.024179743602871895,
0.07631062716245651,
-0.002525943797081709,
-0.01945389434695244,
0.07007454335689545,
-0.05427166074514389,
0.04050835594534874,
-0.047419097274541855,
0.024877650663256645,
-0.010293289087712765,
-0.01851489767432213,
0.04849959909915924,
0.005253450945019722,
-0.060288894921541214,
0.01978541910648346,
-0.025894952937960625,
-0.023610161617398262,
0.026836438104510307,
0.010304472409188747,
-0.01420802716165781,
0.012056956999003887,
-0.028023583814501762,
0.04060528054833412,
-0.06324853748083115,
-0.03379242867231369,
-0.002645278349518776,
-0.04959910735487938,
0.018076634034514427,
-0.06019554287195206,
-0.04591277241706848,
-0.05894499272108078,
-0.02015373297035694,
0.035539787262678146,
0.0028804622124880552,
0.0027885427698493004,
-0.024618877097964287,
0.01343116071075201,
-0.03712798282504082,
-0.03291555494070053,
-0.051389578729867935,
-0.06222832202911377,
-0.005198199301958084,
-0.06924455612897873,
0.03928225859999657,
-0.021343214437365532,
0.03289171680808067,
0.009020079858601093,
-0.019504202529788017,
-0.018569935113191605,
-0.01577187515795231,
0.04948166012763977,
0.014853841625154018,
-0.024187220260500908,
-0.02127240039408207,
0.011024937964975834,
-0.025241060182452202,
0.03514965996146202,
-0.017255263403058052,
-0.039111047983169556,
0.1097726821899414,
0.05689455568790436,
0.050509974360466,
-0.008348074741661549,
-0.04245120286941528,
-0.04807225242257118,
-0.04661242291331291,
-0.028200935572385788,
-0.0195763036608696,
-0.03218720108270645,
-0.004899593535810709,
-0.058008164167404175,
-0.023280687630176544,
-0.04498017579317093,
-0.054678019136190414,
-0.010972147807478905,
0.013258221559226513,
0.016740255057811737,
0.03434407338500023,
0.04693492501974106,
0.024974171072244644,
-0.01430498342961073,
-0.0324038527905941,
0.034757956862449646,
0.002587430877611041,
-0.006748074200004339,
-0.06916387379169464,
-0.035339679569005966,
0.028037795796990395,
0.01327721681445837,
0.00096343137556687,
-0.02663462609052658,
0.053744930773973465,
0.023086991161108017,
0.013882038183510303,
0.007190433796495199,
-0.021336091682314873,
-0.030318090692162514,
-0.0071974145248532295,
-0.0019367224304005504,
-0.02818557433784008,
-0.025809571146965027,
-0.0020952546037733555,
0.0028925256337970495,
0.03737847879528999,
-0.06817987561225891,
-0.04211430624127388,
-0.00017780011694412678,
0.025711603462696075,
0.03293759748339653,
0.017937665805220604,
-0.0340321883559227,
0.005938016343861818,
-0.05401746183633804,
-0.04862762615084648,
0.029776500537991524,
0.032315321266651154,
-0.00041142807458527386,
0.03571292385458946,
0.04091717675328255,
-0.053823016583919525,
0.03700466454029083,
0.03497698903083801,
0.03773083537817001,
0.038207899779081345,
-0.016348060220479965,
0.017894485965371132,
-0.04402972385287285,
0.03134194016456604,
0.0001826683437684551,
-0.02250291407108307,
-0.058801136910915375,
-0.06346562504768372,
-0.034669194370508194,
0.00824617687612772,
-0.027641281485557556,
-0.009437337517738342,
0.05382077023386955,
-0.006996618118137121,
-0.04382701963186264,
-0.01691003516316414,
0.017767999321222305,
0.07359342277050018,
-0.027737729251384735,
0.027331173419952393,
0.012454729527235031,
0.0484287403523922,
-0.04408496990799904,
0.0037647178396582603,
-0.02102580852806568,
-0.024136627092957497,
0.016584306955337524,
0.039663106203079224,
0.03402198851108551,
0.07148024439811707,
0.05483442172408104,
-0.0020109100732952356,
-0.0340423546731472,
0.04344838857650757,
0.05334574356675148,
0.008021069690585136,
-0.0218981821089983,
-0.003424911294132471,
-0.013146763667464256,
-0.03471874073147774,
0.016425378620624542,
-0.024841824546456337,
0.023891780525445938,
0.027493039146065712,
-0.011363008059561253,
0.0011299483012408018,
-0.006749466527253389,
-0.00899487268179655,
-0.056377068161964417,
-0.05292489752173424,
-0.0044790590181946754,
-0.03983666002750397,
-0.052960582077503204,
0.026461154222488403,
0.04334495961666107,
0.032387975603342056,
0.062852643430233,
0.031434040516614914,
-0.050171349197626114,
-0.02825227752327919,
0.04305344074964523,
0.0436105914413929,
-0.03876711055636406,
-0.041053175926208496,
-0.05683254823088646,
0.029343364760279655,
0.040233027189970016,
-0.0230192132294178,
-0.09012406319379807,
-0.001938137225806713,
0.02275407873094082,
-0.04046967998147011,
0.06841638684272766,
0.022235509008169174,
0.008550572209060192,
0.0446896031498909,
-0.007027851417660713,
0.029706811532378197,
-0.03630594536662102,
0.005062995478510857,
-0.015363059006631374,
0.04302097484469414,
-0.015023753046989441,
-0.028783099725842476,
-0.04230382293462753,
0.023645756766200066,
0.004167275968939066,
0.05588784068822861,
0.016634700819849968,
-0.010267870500683784,
-0.06040060520172119,
0.0010059679625555873,
0.032126206904649734,
-0.025087742134928703,
0.024942368268966675,
0.03592315688729286,
0.041916921734809875,
-0.03346342220902443,
-0.04103602096438408,
-0.024828461930155754,
-0.037110403180122375,
0.0307212732732296,
-0.006403791718184948,
-0.02855474315583706,
-0.06966332346200943,
0.02047109045088291,
-0.0279622133821249,
-0.020971840247511864,
-0.1051061600446701,
0.030444098636507988,
0.0018675393657758832,
-0.016000503674149513,
0.04530896991491318,
0.04182058200240135,
0.022860262542963028,
0.03266546130180359,
-0.011850018985569477,
0.024486999958753586,
-0.01718464493751526,
0.03287842497229576,
-0.013531430624425411,
-0.017346607521176338,
-0.008040389977395535,
-0.060521189123392105,
-0.03154553100466728,
-0.042778320610523224,
-0.03937982767820358,
-0.03688636049628258,
-0.01566748507320881,
-0.000188891077414155,
-0.02059037983417511,
-0.0053580584935843945,
-0.010476697236299515,
0.010179380886256695,
-0.023789644241333008,
-0.0148721132427454,
-0.019827695563435555,
-0.047594279050827026,
-0.10250946879386902,
-0.03291390836238861,
0.01709967851638794,
0.04523388296365738,
0.04389616847038269,
-0.00731571763753891,
0.0019519656198099256,
0.02084144577383995,
-0.0004044191737193614,
-0.019547205418348312,
0.02984890528023243,
0.005691788624972105,
-0.041449155658483505,
-0.03712312504649162,
-0.00781956221908331,
0.012695293873548508,
0.020532062277197838,
-0.028433144092559814,
0.0060829403810203075,
0.0522395521402359,
-0.0443856343626976,
-0.0051412321627140045,
0.03441890329122543,
-0.0026791859418153763,
-0.08760884404182434,
-0.040241315960884094,
0.010213312692940235,
-0.04095282033085823,
0.028381727635860443,
-0.0030593203846365213,
-0.015988139435648918,
-0.020779799669981003,
0.004575885832309723,
0.037028566002845764,
0.010734651237726212,
-0.03709617629647255,
-0.007729826960712671,
-0.03479485586285591,
0.044841866940259933,
-0.06757769733667374,
0.045435830950737,
-0.027323385700583458,
-0.007493614684790373,
-0.00442366860806942,
0.01033481489866972,
-0.04250183701515198,
0.059723861515522,
-0.002099868142977357,
0.002366177039220929,
-0.01633969321846962,
0.01279135886579752,
-0.03507306054234505,
0.03264535218477249,
-0.029227765277028084,
0.012128584086894989,
-0.01900152489542961,
0.023004237562417984,
-0.050362955778837204,
-0.0021557325962930918,
-0.03557763248682022,
-0.01490702759474516,
-0.015486900694668293,
-0.008777872659265995,
-0.006549467798322439,
-0.05151353031396866,
0.04482454061508179,
0.014147770591080189,
0.03867253288626671,
0.019976940006017685,
-0.032260961830616,
-0.01175339799374342,
0.03045942448079586,
-0.07463571429252625,
-0.03852725028991699,
-0.029077623039484024,
0.018130028620362282,
-0.010905429720878601,
0.06287944316864014,
0.03254818543791771,
-0.04317918419837952,
-0.015068648383021355,
0.006760099902749062,
0.024672619998455048,
0.008446821942925453,
0.02191362902522087,
-0.004144107922911644,
0.04845457896590233,
0.04791973903775215,
-0.02832155115902424,
-0.007822763174772263,
-0.006494786124676466,
-0.010357995517551899,
-0.007030269596725702,
-0.020328203216195107,
0.025342630222439766,
-0.018474189564585686,
-0.039920732378959656,
-0.018972549587488174,
0.06524322926998138,
0.03284144029021263,
0.012663686648011208,
-0.0047820331528782845,
-0.035337142646312714,
0.027181968092918396,
0.023723715916275978,
-0.047687385231256485,
-0.025861894711852074,
0.01582498662173748,
-0.05385185778141022,
0.060027334839105606,
-0.013036840595304966,
0.011239312589168549,
0.026546085253357887,
0.023946575820446014,
0.000386718544177711,
0.023297328501939774,
-0.036848172545433044,
-0.02138747274875641,
0.02598223090171814,
-0.039725545793771744,
0.005995575804263353,
-0.00030863238498568535,
0.06285552680492401,
-0.05332601070404053,
0.039349284023046494,
0.03378023952245712,
0.02018221840262413,
-0.004326743073761463,
-0.022051800042390823,
-0.034309323877096176,
0.03324493020772934,
-0.050400376319885254,
0.06637056171894073,
-0.015337909571826458,
-0.07837983220815659,
0.06687391549348831,
0.03651179000735283,
-0.08686871826648712,
-0.00949312187731266,
0.03260695934295654,
0.013180284760892391,
0.027009205892682076,
0.04716610163450241,
-0.07597405463457108,
0.011208134703338146,
-0.044724564999341965,
0.009551280178129673,
-0.08086176961660385,
-0.003066834295168519,
0.03415845334529877,
-0.07110241800546646,
0.010316518135368824,
0.042115867137908936,
-0.03305276855826378,
0.010531144216656685,
0.02547391690313816,
-0.03143605589866638,
-0.04459653049707413,
-0.02088674157857895,
0.007241902872920036,
-0.029398567974567413,
0.027242964133620262,
-0.026565242558717728,
0.03990689665079117,
0.023583795875310898,
-0.002327384427189827,
-0.054265834391117096,
0.014326859265565872,
0.015984132885932922,
-0.04010264575481415,
-0.0342617891728878,
0.012437868863344193,
0.010713501833379269,
-0.004729957319796085,
0.03310577943921089,
-0.005672967992722988,
0.02621283568441868,
0.03308062255382538,
-0.014444871805608273,
0.029966937378048897,
-0.05733490735292435,
-0.0018907923949882388,
0.007292790804058313,
0.018921012058854103,
0.03635700047016144,
-0.021040571853518486,
0.03823243826627731,
0.02785968966782093,
0.03290598839521408,
-0.026702875271439552,
-0.01621105708181858,
-0.015155929140746593,
0.025335483253002167,
-0.038521334528923035,
0.030057787895202637,
0.021106943488121033,
-0.044277504086494446,
-0.042120035737752914,
-0.05513974279165268,
-0.036838699132204056,
0.04769046977162361,
-0.036007970571517944,
0.009879035875201225,
0.06823261082172394,
-0.010811234824359417,
-0.049439456313848495,
-0.07247170060873032,
-0.004901603329926729,
-0.02894648350775242,
0.01716473512351513,
0.02620396949350834,
-0.023115428164601326,
-0.014375912956893444,
-0.04737742245197296,
-0.08337477594614029,
0.040151361376047134,
0.012365731410682201,
-0.01714717596769333,
0.05689700320363045,
0.028135601431131363,
-0.025168823078274727,
0.021402843296527863,
0.027382850646972656,
-0.06244266405701637,
0.033857230097055435,
0.010688750073313713,
0.0069095962680876255,
0.03838258609175682,
0.04069998487830162,
-0.011624361388385296,
-0.03768240287899971,
-0.056423719972372055,
-0.03595513850450516,
-0.027285534888505936,
-0.0008945697918534279,
0.0926005095243454
] |
CasualHomie/DialoGPT-small-harrypotter | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 11 | null | ---
tags:
- summarization
widget:
- text: "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
---
# CodeTrans model for code documentation generation php
Pretrained model on programming language php using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized php code functions: it works best with tokenized php functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the php function/method.
## Intended uses & limitations
The model could be used to generate the description for the php function or be fine-tuned on other php code tasks. It can be used on unparsed and untokenized php code. However, if the php code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate php function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_php_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_php_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/php/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 10,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing php code.
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.006609705276787281,
-0.024888992309570312,
0.010008503682911396,
0.012033875100314617,
0.02709268406033516,
0.03387841954827309,
-0.036803971976041794,
0.0075219678692519665,
-0.0027331761084496975,
0.06510742753744125,
0.04387878626585007,
0.00029242734308354557,
0.002494430635124445,
0.03936656937003136,
-0.04152090474963188,
-0.05436965078115463,
-0.029465146362781525,
-0.025789130479097366,
-0.03387324884533882,
0.0033887026365846395,
0.02378029190003872,
-0.008412263356149197,
0.0015342525439336896,
0.005485949106514454,
-0.011197994463145733,
0.013943961821496487,
-0.00949222594499588,
0.04350265860557556,
0.03737847879528999,
-0.062281787395477295,
-0.01809217780828476,
-0.00021736824419349432,
-0.036272838711738586,
-0.029607728123664856,
-0.028397466987371445,
0.03161036595702171,
0.008455539122223854,
0.0468498133122921,
0.033150508999824524,
0.052297018468379974,
0.003109910059720278,
0.021026376634836197,
0.02386941760778427,
-0.05160012096166611,
0.06882889568805695,
0.012437834404408932,
-0.04065212979912758,
-0.026953306049108505,
0.03115701675415039,
-0.003178991610184312,
-0.053004201501607895,
-0.06659707427024841,
-0.025790972635149956,
0.044411659240722656,
0.003026483813300729,
-0.008519907481968403,
-0.07272614538669586,
-0.02054212987422943,
0.04854816943407059,
-0.05201971158385277,
-0.01798892207443714,
0.008734399452805519,
-0.05883783847093582,
0.02609928511083126,
0.009340042248368263,
-0.007970946840941906,
0.009309542365372181,
-0.049043502658605576,
0.03501201421022415,
-0.007627836894243956,
0.058541249483823776,
-0.02381955087184906,
0.02177133411169052,
-0.10077670216560364,
0.0008335684542544186,
-0.00152534747030586,
0.02368823066353798,
0.023544281721115112,
-0.0022037122398614883,
0.05092513561248779,
-0.011566000990569592,
-0.0024525090120732784,
0.043013203889131546,
0.017491864040493965,
-0.00616117101162672,
0.03773072734475136,
-0.03497806936502457,
-0.008922029286623001,
-0.013942536897957325,
0.06107819080352783,
-0.060136232525110245,
-0.06549549102783203,
-0.001778168953023851,
-0.019826620817184448,
-0.024451570585370064,
0.03533319756388664,
0.03988567367196083,
-0.01214738842099905,
0.015813931822776794,
0.00337634957395494,
0.03543613478541374,
0.0560651570558548,
-0.007123676594346762,
0.046187933534383774,
0.029445139691233635,
0.0174573827534914,
-0.02429594285786152,
-0.043781619518995285,
-0.03501154109835625,
0.034420836716890335,
0.019031992182135582,
-0.044971928000450134,
-0.045020941644907,
0.03161031752824783,
0.013766901567578316,
-0.0567525252699852,
0.043411239981651306,
-0.029519785195589066,
-0.05079656466841698,
-0.044317614287137985,
0.03824382647871971,
-0.010589818470180035,
-0.01192737091332674,
0.00042174183181487024,
-0.0418783538043499,
0.003425322938710451,
-0.06247779726982117,
-0.03268011286854744,
0.0042283120565116405,
0.01136871799826622,
-0.02912864275276661,
0.09344470500946045,
0.018779313191771507,
-0.040348201990127563,
0.0038573204074054956,
0.028073444962501526,
-0.06437025964260101,
0.06264309585094452,
0.03791358321905136,
0.10230538994073868,
-0.06444112211465836,
-0.04212302342057228,
0.01691090129315853,
0.010031883604824543,
-0.019473804160952568,
0.02737274020910263,
-0.004118138458579779,
-0.07834245264530182,
-0.012650922872126102,
-0.007072566542774439,
0.06464461982250214,
-0.04354080930352211,
-0.0199283454567194,
0.022334586828947067,
0.010329793207347393,
0.014128843322396278,
-0.03281499072909355,
-0.0015746847493574023,
-0.002056470839306712,
-0.028973091393709183,
-0.06373182684183121,
0.019582323729991913,
0.0003042936441488564,
-0.005655741319060326,
-0.03347766026854515,
-0.04321569204330444,
0.017861751839518547,
0.10561353713274002,
0.02219661884009838,
-0.017978213727474213,
-0.052163220942020416,
0.01790679804980755,
0.03733845800161362,
0.05429629236459732,
-0.025291701778769493,
0.03581898659467697,
0.05223030224442482,
0.06214127317070961,
-0.03236789628863335,
0.06064315885305405,
-0.024752384051680565,
-0.04222751408815384,
-0.0238975677639246,
0.030145756900310516,
-0.021420789882540703,
-0.04648977890610695,
-0.007749213371425867,
0.02328331209719181,
-0.01791323535144329,
-0.012796476483345032,
-0.015209521166980267,
0.05897136032581329,
0.015621397644281387,
-0.024277808144688606,
-0.033633753657341,
0.01222589984536171,
-0.019913604483008385,
0.06721433252096176,
-0.032793570309877396,
0.00008919405081542209,
-0.013831122778356075,
-0.03546157851815224,
0.005535528529435396,
0.028467638418078423,
0.04318569228053093,
0.026370396837592125,
-0.015278592705726624,
0.11417769640684128,
-0.04552896320819855,
0.009589471854269505,
-0.04557694494724274,
-0.03674279525876045,
0.02615063264966011,
0.026244504377245903,
0.028419356793165207,
0.0295000858604908,
0.010923192836344242,
-0.029749076813459396,
0.016853610053658485,
0.07600001990795135,
0.05108663812279701,
0.03978057578206062,
-0.009595583193004131,
-0.023686321452260017,
0.0380113422870636,
0.05450595170259476,
-0.0419786162674427,
-0.03951722010970116,
0.036505915224552155,
0.02984754368662834,
-0.02106013335287571,
0.015538173727691174,
-0.007673740386962891,
0.010066907852888107,
-0.041614729911088943,
-0.053823474794626236,
0.03399180620908737,
0.027190659195184708,
0.013206075876951218,
0.044213321059942245,
0.015222110785543919,
0.00025995992473326623,
0.0348808653652668,
-0.00390906585380435,
0.01542287040501833,
-0.07342339307069778,
0.00011045475548598915,
-0.00931975245475769,
0.05417227745056152,
-0.04087214171886444,
0.037370726466178894,
0.006811619270592928,
0.0024380451068282127,
0.06438654661178589,
-0.02694898284971714,
0.033462923020124435,
0.04220253974199295,
0.030460139736533165,
-0.0235136691480875,
0.012658421881496906,
0.022779123857617378,
0.02081996388733387,
0.09083635360002518,
0.007042823359370232,
0.06445997953414917,
0.002747936174273491,
0.04872165620326996,
0.05938101187348366,
0.027186814695596695,
0.012884676456451416,
0.02131659910082817,
0.06503071635961533,
0.00018477837147656828,
-0.018119199201464653,
0.06627129763364792,
-0.05947341397404671,
0.03708457201719284,
-0.05182530730962753,
0.02537926658987999,
-0.0060295481234788895,
-0.019105907529592514,
0.04914036765694618,
0.006956888362765312,
-0.055486127734184265,
0.01952233538031578,
-0.021684909239411354,
-0.024122081696987152,
0.026982014998793602,
0.006140734069049358,
-0.013123642653226852,
0.011894420720636845,
-0.025479953736066818,
0.03799121454358101,
-0.06523220986127853,
-0.033261723816394806,
-0.007825668901205063,
-0.047496091574430466,
0.020682793110609055,
-0.06746833026409149,
-0.04459478706121445,
-0.058847952634096146,
-0.017128638923168182,
0.039266981184482574,
0.010130898095667362,
0.001615998218767345,
-0.027347125113010406,
0.01743631809949875,
-0.03288806974887848,
-0.025867700576782227,
-0.05071507766842842,
-0.06515264511108398,
-0.0059862807393074036,
-0.06754062324762344,
0.03740242123603821,
-0.020454997196793556,
0.030464904382824898,
0.01329115405678749,
-0.01894879899919033,
-0.02063099853694439,
-0.018012335523962975,
0.05754071846604347,
0.014946484938263893,
-0.015054832212626934,
-0.027004363015294075,
0.008557885885238647,
-0.031189626082777977,
0.037627335637807846,
-0.017912941053509712,
-0.043345797806978226,
0.11452437937259674,
0.05573802441358566,
0.04974983632564545,
-0.007016903255134821,
-0.04346250370144844,
-0.053876765072345734,
-0.05065504088997841,
-0.027231784537434578,
-0.019152119755744934,
-0.033358383923769,
-0.004425805993378162,
-0.05505506321787834,
-0.026029841974377632,
-0.04206285625696182,
-0.05376105383038521,
-0.012986482121050358,
0.014464889653027058,
0.020163532346487045,
0.03223221376538277,
0.04703264310956001,
0.022977909073233604,
-0.017817147076129913,
-0.03374345973134041,
0.03518032655119896,
0.002034025965258479,
-0.003915159497410059,
-0.0718672052025795,
-0.031578630208969116,
0.027807623147964478,
0.015540669672191143,
-0.004448726773262024,
-0.020446980372071266,
0.04999568685889244,
0.020008176565170288,
0.011434878222644329,
0.0035301365423947573,
-0.022170064970850945,
-0.022593319416046143,
-0.01123457495123148,
-0.0006851719808764756,
-0.02601013332605362,
-0.02537521906197071,
-0.007557149510830641,
0.0098229655995965,
0.03868081420660019,
-0.07006149739027023,
-0.04541828855872154,
0.006285843439400196,
0.031692903488874435,
0.03888668492436409,
0.018827687948942184,
-0.034502092748880386,
0.005705366842448711,
-0.060915783047676086,
-0.04539121314883232,
0.03742077946662903,
0.039263367652893066,
-0.006227268371731043,
0.036144331097602844,
0.04287596046924591,
-0.05942714214324951,
0.038444969803094864,
0.033535949885845184,
0.03686823695898056,
0.03327767923474312,
-0.017919179052114487,
0.0156524907797575,
-0.04334810748696327,
0.030678845942020416,
0.00048271968262270093,
-0.024424171075224876,
-0.05409051850438118,
-0.06916075944900513,
-0.037898775190114975,
0.014515938237309456,
-0.02865668013691902,
-0.005087106954306364,
0.05410178005695343,
-0.004598360508680344,
-0.04557057470083237,
-0.015351245179772377,
0.01109637226909399,
0.0722711905837059,
-0.026423875242471695,
0.025248588994145393,
0.009324779734015465,
0.04528048634529114,
-0.041654299944639206,
0.0013222191482782364,
-0.01866716332733631,
-0.018488749861717224,
0.010383842512965202,
0.039850033819675446,
0.02394144795835018,
0.06778416037559509,
0.060363657772541046,
0.0013912053545936942,
-0.03263642638921738,
0.04322165250778198,
0.05269579961895943,
0.006511111278086901,
-0.017988860607147217,
-0.005951623897999525,
-0.010637722909450531,
-0.029846224933862686,
0.011631677858531475,
-0.023038698360323906,
0.024759404361248016,
0.02324996329843998,
-0.013086137361824512,
0.0033263717778027058,
-0.0033845577854663134,
-0.011558432132005692,
-0.055280447006225586,
-0.04662415012717247,
0.00154801644384861,
-0.03790738806128502,
-0.056434620171785355,
0.026562795042991638,
0.04529089853167534,
0.029470153152942657,
0.06253065913915634,
0.03622261434793472,
-0.052117809653282166,
-0.027040360495448112,
0.04508121311664581,
0.04451940581202507,
-0.038695767521858215,
-0.039349526166915894,
-0.05976378172636032,
0.029837384819984436,
0.042004067450761795,
-0.026706689968705177,
-0.0895904079079628,
-0.001310182036831975,
0.024397874251008034,
-0.033887796103954315,
0.0633184015750885,
0.017820069566369057,
0.00438728928565979,
0.04458494111895561,
-0.008135507814586163,
0.029850179329514503,
-0.026770301163196564,
0.009236747398972511,
-0.011042975820600986,
0.044829536229372025,
-0.009282898157835007,
-0.02895834669470787,
-0.037588827311992645,
0.022536592558026314,
0.0028453897684812546,
0.05560080334544182,
0.0207348819822073,
-0.008138848468661308,
-0.06255074590444565,
-0.0011139243142679334,
0.027699938043951988,
-0.02649577148258686,
0.024730360135436058,
0.035210464149713516,
0.039546798914670944,
-0.031621430069208145,
-0.03897757828235626,
-0.02806217223405838,
-0.0383189357817173,
0.0355052649974823,
-0.00919683463871479,
-0.026358705013990402,
-0.06869019567966461,
0.016166340559720993,
-0.026789885014295578,
-0.021018510684370995,
-0.10565471649169922,
0.040188323706388474,
0.010892719030380249,
-0.015887927263975143,
0.046374768018722534,
0.038564249873161316,
0.022322803735733032,
0.034490831196308136,
-0.012474487535655499,
0.02542734332382679,
-0.022252157330513,
0.03822813183069229,
-0.01050045620650053,
-0.019052304327487946,
-0.008170584216713905,
-0.06318069994449615,
-0.03370721638202667,
-0.043688736855983734,
-0.038796789944171906,
-0.03530454635620117,
-0.02035120688378811,
-0.0019483387004584074,
-0.01344975270330906,
-0.01131726335734129,
-0.012982210144400597,
0.011138695292174816,
-0.017658429220318794,
-0.014245578087866306,
-0.021450180560350418,
-0.04797610267996788,
-0.09758194535970688,
-0.02755059115588665,
0.017237158492207527,
0.04508109390735626,
0.039379049092531204,
-0.004709700122475624,
0.004707280080765486,
0.025209583342075348,
-0.0025910455733537674,
-0.018394365906715393,
0.03051868826150894,
0.007270165253430605,
-0.036529283970594406,
-0.035126250237226486,
-0.007432819344103336,
0.01513420045375824,
0.018312187865376472,
-0.0245473925024271,
0.00863200519233942,
0.05187363922595978,
-0.03828300163149834,
0.0021984667982906103,
0.036775946617126465,
-0.0012119244784116745,
-0.08734643459320068,
-0.03895408287644386,
0.006236799992620945,
-0.039348844438791275,
0.029136450961232185,
0.0008352029835805297,
-0.02033739537000656,
-0.017765801399946213,
-0.0036372479517012835,
0.03146554157137871,
0.014820135198533535,
-0.03748106583952904,
-0.0006798626272939146,
-0.035159651190042496,
0.041771214455366135,
-0.06360047310590744,
0.04991396516561508,
-0.02698899433016777,
-0.006785841193050146,
-0.00476580997928977,
0.0080886734649539,
-0.03729001432657242,
0.06203947588801384,
-0.004444838035851717,
0.0031956082675606012,
-0.015689335763454437,
0.0068496097810566425,
-0.030832339078187943,
0.03226359561085701,
-0.01757556013762951,
0.010625792667269707,
-0.017193593084812164,
0.01880333013832569,
-0.038213253021240234,
-0.0016354648396372795,
-0.03034176118671894,
-0.019580256193876266,
-0.010789066553115845,
-0.007668237667530775,
-0.01022364106029272,
-0.05209874361753464,
0.04194582253694534,
0.014013411477208138,
0.03234725818037987,
0.01953587308526039,
-0.03234098479151726,
-0.01564137451350689,
0.028260957449674606,
-0.07535314559936523,
-0.03813409432768822,
-0.029531722888350487,
0.011916100978851318,
-0.01070320699363947,
0.06868767738342285,
0.03661179915070534,
-0.04481346160173416,
-0.014689956791698933,
0.0035171082708984613,
0.02477015182375908,
0.010195822454988956,
0.0255281962454319,
0.002119970042258501,
0.049063634127378464,
0.052864816039800644,
-0.03316346928477287,
-0.003945456352084875,
-0.008419083431363106,
-0.01004862505942583,
-0.004826879128813744,
-0.013661056756973267,
0.02229238860309124,
-0.01755947433412075,
-0.040282994508743286,
-0.014503749087452888,
0.06675133854150772,
0.041126228868961334,
0.01314559020102024,
-0.007081147748976946,
-0.03310085088014603,
0.029554063454270363,
0.0206806268543005,
-0.04426078870892525,
-0.028659509494900703,
0.018060646951198578,
-0.051619913429021835,
0.061586398631334305,
-0.009611664339900017,
0.012250727042555809,
0.02729180082678795,
0.03019743412733078,
0.005078726448118687,
0.026607034727931023,
-0.03365872800350189,
-0.018347669392824173,
0.028352277353405952,
-0.0427769310772419,
0.008733879774808884,
0.0013859677128493786,
0.06616975367069244,
-0.04897862672805786,
0.037048615515232086,
0.03372406214475632,
0.02800625190138817,
-0.007216176018118858,
-0.018929939717054367,
-0.04029057174921036,
0.03463156521320343,
-0.04410512372851372,
0.06107962876558304,
-0.01791921816766262,
-0.07607155293226242,
0.06785263121128082,
0.037823423743247986,
-0.08921655267477036,
-0.007373879663646221,
0.034177958965301514,
0.015112137421965599,
0.03208835795521736,
0.04341675713658333,
-0.07956906408071518,
0.004474071320146322,
-0.04866599664092064,
0.00942938681691885,
-0.08147667348384857,
-0.0052210190333426,
0.03862329199910164,
-0.07429995387792587,
0.008801203221082687,
0.04085373133420944,
-0.02926274575293064,
0.007453800644725561,
0.021346356719732285,
-0.031138982623815536,
-0.047630466520786285,
-0.021656639873981476,
0.002457049209624529,
-0.03209834173321724,
0.026783065870404243,
-0.030353274196386337,
0.03906439617276192,
0.020613089203834534,
-0.0014653722755610943,
-0.05038075894117355,
0.013553012162446976,
0.020229043439030647,
-0.03241705521941185,
-0.030329877510666847,
0.012210848741233349,
0.015246160328388214,
-0.0053841546177864075,
0.026578951627016068,
-0.013212071731686592,
0.025480706244707108,
0.031687404960393906,
-0.019204940646886826,
0.02591158263385296,
-0.056410714983940125,
-0.0032647266052663326,
0.007502455729991198,
0.014815759845077991,
0.03538526967167854,
-0.019500261172652245,
0.039929814636707306,
0.027569543570280075,
0.034450430423021317,
-0.022170037031173706,
-0.010646413080394268,
-0.01314469799399376,
0.024849195033311844,
-0.03770521655678749,
0.02410482056438923,
0.021910682320594788,
-0.048580143600702286,
-0.040330227464437485,
-0.05401189997792244,
-0.0402103029191494,
0.04634777456521988,
-0.03769834712147713,
0.007603297475725412,
0.06613493710756302,
-0.01345678698271513,
-0.055216629058122635,
-0.07546881586313248,
-0.004098311997950077,
-0.024151580408215523,
0.016281206160783768,
0.02747238799929619,
-0.023361096158623695,
-0.008920376189053059,
-0.05073171854019165,
-0.08358969539403915,
0.031032517552375793,
0.004633905831724405,
-0.016425682231783867,
0.05655531585216522,
0.032767537981271744,
-0.024754809215664864,
0.022594138979911804,
0.03165208920836449,
-0.056396473199129105,
0.039191585034132004,
0.012329005636274815,
0.012064238078892231,
0.037754159420728683,
0.03922329843044281,
-0.008756432682275772,
-0.0395069494843483,
-0.05683564394712448,
-0.03701206296682358,
-0.0383976548910141,
-0.0008719753823243082,
0.09224370121955872
] |
Cathy/reranking_model | [
"pytorch",
"roberta",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"RobertaForSequenceClassification"
],
"model_type": "roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 27 | null | ---
tags:
- summarization
widget:
- text: "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
---
# CodeTrans model for code documentation generation python
Pretrained model on programming language python using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on CodeSearchNet Corpus python dataset.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_python"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_python", skip_special_tokens=True),
device=0
)
tokenized_code = "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/function%20documentation%20generation/python/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.01179816946387291,
-0.017733756452798843,
-0.008362440392374992,
0.02087944746017456,
0.03707168623805046,
0.03959960862994194,
-0.028125016018748283,
0.00004946750414092094,
-0.02262662723660469,
0.05537024512887001,
0.038764726370573044,
-0.003276329953223467,
-0.006362349260598421,
0.044993702322244644,
-0.041734080761671066,
-0.05767044425010681,
-0.02015542984008789,
-0.031145572662353516,
-0.0382034070789814,
-0.006150011904537678,
0.011314082890748978,
0.00853664055466652,
0.0024801865220069885,
0.006141480058431625,
-0.003440534695982933,
0.017191052436828613,
0.0012727392604574561,
0.027866005897521973,
0.04117143154144287,
-0.07197292894124985,
-0.017927980050444603,
-0.004833174869418144,
-0.03794996812939644,
-0.005816945340484381,
-0.021626969799399376,
0.019494932144880295,
0.008946907706558704,
0.026237593963742256,
0.02040827088057995,
0.05672663822770119,
0.00016102548397611827,
0.02414187788963318,
0.021456772461533546,
-0.04092328995466232,
0.06692586839199066,
0.004851899109780788,
-0.03635213524103165,
-0.02701941505074501,
0.018665311858057976,
-0.001370707293972373,
-0.05803893133997917,
-0.07110615074634552,
-0.021625760942697525,
0.060095567256212234,
-0.010540503077208996,
-0.0020312215201556683,
-0.07665227353572845,
-0.013842776417732239,
0.05212617293000221,
-0.04514073580503464,
-0.03827337920665741,
0.018241098150610924,
-0.07132530957460403,
0.0192087534815073,
0.02095518633723259,
0.005892815068364143,
0.012423028238117695,
-0.05083993449807167,
0.017204388976097107,
-0.0014328297693282366,
0.054628074169158936,
-0.013059446588158607,
0.0193672776222229,
-0.1140129566192627,
0.01134402770549059,
-0.01607316918671131,
0.02222728729248047,
0.005726458504796028,
-0.009295526891946793,
0.05280951038002968,
-0.006829474586993456,
0.006123473402112722,
0.038475751876831055,
0.004869676195085049,
-0.0103024672716856,
0.03673947602510452,
-0.04037798196077347,
-0.01568736881017685,
-0.01847492903470993,
0.06729753315448761,
-0.0655769407749176,
-0.05804545059800148,
-0.016826579347252846,
-0.023914286866784096,
-0.021997829899191856,
0.02978792041540146,
0.04425578564405441,
-0.015813777223229408,
0.022361474111676216,
0.01241119671612978,
0.047077685594558716,
0.05532297492027283,
-0.006176460068672895,
0.04503614455461502,
0.022843528538942337,
0.015331708826124668,
-0.010856480337679386,
-0.045821402221918106,
-0.02822895720601082,
0.04224017262458801,
0.010432673618197441,
-0.02848169580101967,
-0.04772906377911568,
0.02832897938787937,
0.023167375475168228,
-0.04319475591182709,
0.052951764315366745,
-0.01976570300757885,
-0.04856835678219795,
-0.026930106803774834,
0.04594334587454796,
-0.010990841314196587,
-0.016859490424394608,
0.009384332224726677,
-0.04384971782565117,
0.002907045418396592,
-0.05600294843316078,
-0.02953999862074852,
0.0024975885171443224,
0.029286781325936317,
-0.010560140013694763,
0.0878409892320633,
0.008929007686674595,
-0.025981316342949867,
0.0018151979893445969,
0.023892536759376526,
-0.07915650308132172,
0.06348751485347748,
0.02662607841193676,
0.10786943882703781,
-0.06565777957439423,
-0.03768981248140335,
0.013700369745492935,
0.005539583507925272,
-0.014246470294892788,
0.023767653852701187,
-0.01370658166706562,
-0.06899886578321457,
-0.034144189208745956,
0.0040854765102267265,
0.06881651282310486,
-0.049685534089803696,
-0.021734541282057762,
0.021489979699254036,
0.003928157966583967,
0.019878145307302475,
-0.03157110512256622,
0.0067982240580022335,
-0.011713323183357716,
-0.028680281713604927,
-0.0647466853260994,
0.032226692885160446,
-0.004078743513673544,
-0.020305590704083443,
-0.03125641867518425,
-0.04638633877038956,
0.009925415739417076,
0.10724757611751556,
0.012000985443592072,
-0.009392996318638325,
-0.042452432215213776,
0.013073067180812359,
0.037868648767471313,
0.05636639520525932,
-0.026866475120186806,
0.018317990005016327,
0.04494486004114151,
0.0638752430677414,
-0.03257202357053757,
0.06918978691101074,
-0.019838187843561172,
-0.04223954305052757,
-0.03154415637254715,
0.023660097271203995,
-0.019057396799325943,
-0.04639355093240738,
-0.0054413434118032455,
0.026122625917196274,
-0.020710542798042297,
-0.003978085238486528,
-0.010255341418087482,
0.05993631109595299,
0.026299480348825455,
-0.012514380738139153,
-0.027662908658385277,
0.0005661711329594254,
-0.01380356214940548,
0.06894578784704208,
-0.035334378480911255,
-0.007383433636277914,
-0.021590210497379303,
-0.02722472883760929,
-0.001719109364785254,
0.017117677256464958,
0.04540899395942688,
0.032629966735839844,
-0.006304084323346615,
0.09510469436645508,
-0.046747636049985886,
0.0027956892736256123,
-0.045454468578100204,
-0.05238271504640579,
0.012075783684849739,
0.03220009803771973,
0.038423214107751846,
0.029524633660912514,
0.01942390948534012,
-0.027220066636800766,
0.012688874267041683,
0.070867158472538,
0.04256116598844528,
0.0289282388985157,
-0.019420728087425232,
-0.01485422533005476,
0.03736370429396629,
0.06692588329315186,
-0.029961271211504936,
-0.03604378551244736,
0.04294382780790329,
0.027994215488433838,
-0.024915311485528946,
0.02146446518599987,
-0.006235492415726185,
0.009591496549546719,
-0.054642315953969955,
-0.06609722226858139,
0.0485137477517128,
0.01682918891310692,
0.010957757011055946,
0.029442723840475082,
-0.004592949524521828,
-0.0056321341544389725,
0.03863495588302612,
0.0009078485891222954,
0.0011553956428542733,
-0.06542694568634033,
0.011587102897465229,
0.004721950739622116,
0.0608922578394413,
-0.03366532549262047,
0.04248267412185669,
0.012233169749379158,
-0.003129966789856553,
0.04825782775878906,
-0.022463718429207802,
0.04010019451379776,
0.026653936132788658,
0.033895354717969894,
-0.021134499460458755,
0.015225814655423164,
0.011112083680927753,
0.020679594948887825,
0.08264914900064468,
0.011718148365616798,
0.05882686376571655,
0.002640695543959737,
0.05785788595676422,
0.06449336558580399,
0.017249174416065216,
0.008565359748899937,
0.034259457141160965,
0.06328678131103516,
-0.0021182093769311905,
-0.012407856993377209,
0.06720054149627686,
-0.046444639563560486,
0.021832061931490898,
-0.047342751175165176,
0.041938040405511856,
-0.01376793161034584,
-0.020737294107675552,
0.04225829616189003,
-0.0005754976882599294,
-0.055811118334531784,
0.005856228061020374,
-0.029070928692817688,
-0.028031904250383377,
0.014860537834465504,
0.0021992989350110292,
-0.02597358636558056,
0.014187240041792393,
-0.02379460632801056,
0.02810462936758995,
-0.08036276698112488,
-0.042147669941186905,
-0.0003174064331687987,
-0.05465834587812424,
0.011381923221051693,
-0.06891536712646484,
-0.04993785172700882,
-0.06677218526601791,
-0.011145479045808315,
0.04133940488100052,
0.005676702130585909,
-0.007862316444516182,
-0.029123356565833092,
0.0026903587859123945,
-0.037193674594163895,
-0.03010440059006214,
-0.06056346371769905,
-0.0604446642100811,
-0.004329581279307604,
-0.07024268805980682,
0.04184531420469284,
-0.014813488349318504,
0.0327778086066246,
0.009459293447434902,
-0.01592295803129673,
-0.021776320412755013,
-0.015749817714095116,
0.054162945598363876,
0.004702103789895773,
-0.01290703471750021,
-0.03611137345433235,
0.013575364835560322,
-0.013467532582581043,
0.04904872551560402,
-0.0031488484237343073,
-0.03134790062904358,
0.1049005463719368,
0.05778445675969124,
0.035292621701955795,
-0.011500488966703415,
-0.038035888224840164,
-0.04807525873184204,
-0.0492301806807518,
-0.023346398025751114,
-0.014601451344788074,
-0.03251539170742035,
-0.005482739303261042,
-0.06024915352463722,
-0.024737490341067314,
-0.03491587191820145,
-0.04449817165732384,
-0.016504252329468727,
0.021497070789337158,
0.023889273405075073,
0.04907350242137909,
0.04897860810160637,
0.03316202387213707,
-0.026099639013409615,
-0.030148614197969437,
0.029289675876498222,
0.00500871054828167,
-0.0007234808290377259,
-0.08044405281543732,
-0.03585398197174072,
0.023657627403736115,
0.027345115318894386,
-0.009831451810896397,
-0.022947458550333977,
0.05049281567335129,
0.022744866088032722,
0.006025322712957859,
0.005008819047361612,
-0.014967864379286766,
-0.016171952709555626,
-0.022421853616833687,
-0.0015810374170541763,
-0.03627937659621239,
-0.03112008050084114,
-0.011543120257556438,
-0.016818033531308174,
0.04109315946698189,
-0.05895794928073883,
-0.05347083881497383,
0.0016149122966453433,
0.027053695172071457,
0.03533415496349335,
0.020209768787026405,
-0.02921268716454506,
0.0007003843202255666,
-0.0618489533662796,
-0.036966048181056976,
0.030592283234000206,
0.014122875407338142,
-0.00866625178605318,
0.0470677874982357,
0.03904370963573456,
-0.038295451551675797,
0.03663656860589981,
0.022873440757393837,
0.04631992056965828,
0.033033587038517,
-0.03385867178440094,
0.01902560144662857,
-0.05216306075453758,
0.02599201537668705,
0.012725074775516987,
-0.02707740105688572,
-0.049048248678445816,
-0.0819673091173172,
-0.03041190840303898,
0.007407256402075291,
-0.019347012042999268,
0.001827159198001027,
0.04283885285258293,
-0.026722103357315063,
-0.04988408088684082,
-0.005952138919383287,
0.0042802258394658566,
0.07108847796916962,
-0.03800513967871666,
0.035029858350753784,
0.0075997463427484035,
0.06841349601745605,
-0.04310816153883934,
0.003188240807503462,
-0.032052457332611084,
-0.030164189636707306,
0.014716421253979206,
0.04759267345070839,
0.023130495101213455,
0.060610607266426086,
0.07068128138780594,
0.010364547371864319,
-0.03982258215546608,
0.04780194163322449,
0.048888854682445526,
0.0062363105826079845,
-0.026455361396074295,
-0.004014105070382357,
-0.004134491551667452,
-0.03075055405497551,
0.02313845232129097,
-0.01330801285803318,
0.024480605497956276,
0.023533156141638756,
-0.0067480141296982765,
-0.00022756587713956833,
-0.005244425497949123,
-0.029133949428796768,
-0.047980427742004395,
-0.04647217318415642,
-0.013474584557116032,
-0.04313996806740761,
-0.04577304795384407,
0.0243573896586895,
0.030854450538754463,
0.017207061871886253,
0.054380521178245544,
0.03968891501426697,
-0.03997649997472763,
-0.039830658584833145,
0.043008994311094284,
0.04582730308175087,
-0.037668224424123764,
-0.04691086336970329,
-0.04956434294581413,
0.03500060737133026,
0.047499846667051315,
-0.02028139866888523,
-0.09221138060092926,
0.0023072906769812107,
0.024316588416695595,
-0.02738504484295845,
0.06973256915807724,
0.026275401934981346,
0.017866361886262894,
0.05912737920880318,
-0.001253975206054747,
0.027386939153075218,
-0.03275725990533829,
0.01211743988096714,
-0.008257478475570679,
0.045789677649736404,
-0.02475164271891117,
-0.033323321491479874,
-0.04410497844219208,
0.02585415728390217,
0.013430825434625149,
0.03708008676767349,
0.02656339854001999,
-0.00961766205728054,
-0.06843803077936172,
-0.004436834249645472,
0.02785322815179825,
-0.028190789744257927,
0.009157480672001839,
0.02292036823928356,
0.050524525344371796,
-0.05311587452888489,
-0.03274644911289215,
-0.01134982705116272,
-0.01385685708373785,
0.028396645560860634,
0.0021020181011408567,
-0.019458821043372154,
-0.07263176143169403,
0.01168359350413084,
-0.02670343592762947,
-0.024607496336102486,
-0.08894910663366318,
0.03306163102388382,
-0.008240516297519207,
-0.0057875653728842735,
0.048176418989896774,
0.04073243588209152,
0.014453914016485214,
0.035702355206012726,
-0.019423162564635277,
0.03834552317857742,
-0.024493547156453133,
0.01891596056520939,
-0.008552953600883484,
-0.02208068035542965,
-0.02086102031171322,
-0.06819327175617218,
-0.021925171837210655,
-0.045332275331020355,
-0.03362015262246132,
-0.04905533045530319,
-0.021228604018688202,
0.010421927087008953,
-0.014073584228754044,
-0.009639397263526917,
-0.004142548888921738,
0.008132340386509895,
-0.031815141439437866,
-0.014439982362091541,
-0.030827147886157036,
-0.03818276897072792,
-0.10228963196277618,
-0.0355989933013916,
-0.002221032977104187,
0.04036043584346771,
0.03899078816175461,
-0.00042736256727948785,
0.007619904819875956,
0.02320781908929348,
-0.006390363909304142,
-0.016070248559117317,
0.01507122628390789,
0.009925899095833302,
-0.04664894565939903,
-0.03233710676431656,
0.008012685924768448,
0.016874490305781364,
0.012757907621562481,
-0.01223603542894125,
0.00897145178169012,
0.04899056255817413,
-0.03516003489494324,
-0.009453956969082355,
0.03455790877342224,
-0.005553636234253645,
-0.0765516608953476,
-0.03600148484110832,
-0.0009038449497893453,
-0.04448269307613373,
0.03780878335237503,
-0.002521356102079153,
-0.018154513090848923,
-0.02344631962478161,
0.0005635975394397974,
0.03335393965244293,
-0.017553046345710754,
-0.028609832748770714,
0.0014762007631361485,
-0.037015173584222794,
0.039633601903915405,
-0.06414361298084259,
0.04847624525427818,
-0.03184529393911362,
-0.002861201763153076,
-0.01329951174557209,
0.002181760733947158,
-0.04040766507387161,
0.0594027154147625,
-0.004873556084930897,
0.0006841935683041811,
-0.009134422987699509,
0.0065719555132091045,
-0.0267486609518528,
0.032121095806360245,
-0.014404824934899807,
0.010733767412602901,
-0.03316660225391388,
0.01550536509603262,
-0.046541813760995865,
0.00843147560954094,
-0.03679068014025688,
-0.01167877484112978,
-0.01978524588048458,
-0.02164531871676445,
-0.006941058207303286,
-0.05462803319096565,
0.044470686465501785,
0.028055036440491676,
0.03402050957083702,
0.01444932259619236,
-0.027810467407107353,
-0.01014402974396944,
0.033709656447172165,
-0.09220625460147858,
-0.04282841458916664,
-0.022919226437807083,
0.014990918338298798,
-0.023266905918717384,
0.06304454058408737,
0.055851470679044724,
-0.04905605688691139,
-0.011276342906057835,
0.02980613522231579,
0.014238736592233181,
0.0013852603733539581,
0.025558939203619957,
0.019501667469739914,
0.046451300382614136,
0.05354863405227661,
-0.038302790373563766,
-0.014382735826075077,
-0.0015090798260644078,
-0.004539612215012312,
-0.02639884129166603,
-0.015253026969730854,
0.018118087202310562,
-0.00558219151571393,
-0.046857964247465134,
-0.023591015487909317,
0.055967506021261215,
0.051102180033922195,
0.01942010037600994,
0.012242771685123444,
-0.03305860981345177,
0.0283475574105978,
0.0036843002308160067,
-0.05762027949094772,
-0.03644199296832085,
0.014146740548312664,
-0.04544936493039131,
0.0756680965423584,
-0.014833231456577778,
0.013748571276664734,
0.023875905200839043,
0.026014680042862892,
0.006640201900154352,
0.044982198625802994,
-0.03360451012849808,
-0.006701524835079908,
0.029028119519352913,
-0.054878655821084976,
-0.013030683621764183,
-0.0029678959399461746,
0.06071857735514641,
-0.04773499444127083,
0.0349324531853199,
0.024611646309494972,
0.017691906541585922,
-0.006256903987377882,
-0.029372144490480423,
-0.03896647319197655,
0.0389641635119915,
-0.06549544632434845,
0.06915216147899628,
-0.01289271004498005,
-0.081497922539711,
0.07927185297012329,
0.02627156488597393,
-0.09422744810581207,
0.0013888217508792877,
0.03960612043738365,
0.010701478458940983,
0.025359226390719414,
0.046155985444784164,
-0.0685584768652916,
0.00804093200713396,
-0.04414815455675125,
0.005238253157585859,
-0.06323644518852234,
-0.002227187855169177,
0.022350139915943146,
-0.05351714417338371,
0.006661095656454563,
0.033148352056741714,
-0.015844115987420082,
0.006017625797539949,
0.020443543791770935,
-0.053095683455467224,
-0.03616872429847717,
-0.016581429168581963,
-0.0018097067950293422,
-0.02457229420542717,
0.025434521958231926,
-0.01718258112668991,
0.04004357010126114,
0.015514862723648548,
0.009568922221660614,
-0.04680424556136131,
0.010891028679907322,
0.02423681877553463,
-0.040619805455207825,
-0.030141619965434074,
0.024533940479159355,
0.007172237616032362,
-0.011498154141008854,
0.028151877224445343,
-0.009731529280543327,
0.02131054550409317,
0.03546493500471115,
-0.018804414197802544,
0.016629869118332863,
-0.043012216687202454,
0.001901240088045597,
0.023742005228996277,
0.02013028785586357,
0.04241102933883667,
-0.00903153046965599,
0.037274837493896484,
0.029908519238233566,
0.03165125474333763,
-0.018474828451871872,
-0.027441440150141716,
-0.017404401674866676,
0.01689705066382885,
-0.03663522005081177,
0.030605191364884377,
0.0206899493932724,
-0.039931103587150574,
-0.046996958553791046,
-0.029740042984485626,
-0.016682343557476997,
0.05783133953809738,
-0.04085218161344528,
0.014399971812963486,
0.06690225750207901,
-0.006618546321988106,
-0.05029669031500816,
-0.0661696121096611,
-0.012744901701807976,
-0.01850985921919346,
0.026815297082066536,
0.028654346242547035,
-0.02721589244902134,
-0.012426606379449368,
-0.04773098975419998,
-0.07037574797868729,
0.045175887644290924,
0.022121667861938477,
-0.020697392523288727,
0.05448201671242714,
0.04939694330096245,
-0.02525358833372593,
0.017418915405869484,
0.010823259130120277,
-0.050713423639535904,
0.03255463019013405,
0.004996912553906441,
0.016120797023177147,
0.03330060467123985,
0.03637734428048134,
-0.012101358734071255,
-0.04050373286008835,
-0.07660498470067978,
-0.026472071185708046,
-0.02655724436044693,
-0.017983026802539825,
0.07237262278795242
] |
Cdial/hausa-asr | [
"wav2vec2",
"automatic-speech-recognition",
"ha",
"dataset:mozilla-foundation/common_voice_8_0",
"transformers",
"mozilla-foundation/common_voice_8_0",
"generated_from_trainer",
"robust-speech-event",
"model_for_talk",
"hf-asr-leaderboard",
"license:apache-2.0",
"model-index"
] | automatic-speech-recognition | {
"architectures": [
"Wav2Vec2ForCTC"
],
"model_type": "wav2vec2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 8 | 2020-12-07T18:03:50Z | ---
tags:
- summarization
widget:
- text: "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
---
# CodeTrans model for code documentation generation python
Pretrained model on programming language python using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_python_multitask"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_python_multitask", skip_special_tokens=True),
device=0
)
tokenized_code = "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/pre-training/function%20documentation%20generation/python/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 420,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.010267496109008789,
-0.02125665172934532,
-0.006335676182061434,
0.02150573581457138,
0.041030749678611755,
0.03907636180520058,
-0.02999315783381462,
-0.0038007141556590796,
-0.023337915539741516,
0.059978507459163666,
0.04346707463264465,
-0.002701445482671261,
-0.008594411425292492,
0.0470103956758976,
-0.03306955844163895,
-0.0609084814786911,
-0.018089771270751953,
-0.03151680529117584,
-0.03809962049126625,
-0.006633678916841745,
0.014471745118498802,
0.0050474004819989204,
0.009686746634542942,
0.002745208563283086,
-0.0006681248196400702,
0.012933099642395973,
0.00017310137627646327,
0.027942705899477005,
0.040344882756471634,
-0.07700067013502121,
-0.019363652914762497,
-0.004725234117358923,
-0.03677259385585785,
-0.009849369525909424,
-0.022106941789388657,
0.02164483442902565,
0.008915993385016918,
0.028832154348492622,
0.020229501649737358,
0.05627734959125519,
0.005027649458497763,
0.022460702806711197,
0.018744802102446556,
-0.04191121459007263,
0.06385587155818939,
0.008070327341556549,
-0.0367204025387764,
-0.023001806810498238,
0.019713902845978737,
-0.0027419442776590586,
-0.05664742738008499,
-0.0710601806640625,
-0.019488679245114326,
0.058841727674007416,
-0.008505553007125854,
-0.004404094535857439,
-0.075403593480587,
-0.02012561447918415,
0.04981764033436775,
-0.042825039476156235,
-0.03755800426006317,
0.016275402158498764,
-0.06780193001031876,
0.01557797659188509,
0.014009733684360981,
0.008422434329986572,
0.009091882966458797,
-0.054341722279787064,
0.016107041388750076,
0.0013115184847265482,
0.058898672461509705,
-0.01113184168934822,
0.018628213554620743,
-0.10988736897706985,
0.01022353395819664,
-0.01676100306212902,
0.023527519777417183,
0.005319615360349417,
-0.011422320269048214,
0.0502646267414093,
-0.007936692796647549,
0.001023888005875051,
0.04291451349854469,
0.011721084825694561,
-0.00849134661257267,
0.03199033439159393,
-0.04473528265953064,
-0.014293433167040348,
-0.015498031862080097,
0.06875475496053696,
-0.0619058832526207,
-0.060456376522779465,
-0.016913611441850662,
-0.022163670510053635,
-0.026013832539319992,
0.02516762912273407,
0.04276777803897858,
-0.014689933508634567,
0.020774809643626213,
0.007479127962142229,
0.0471123643219471,
0.05300648510456085,
-0.005053582601249218,
0.04848010092973709,
0.02447032928466797,
0.01667478308081627,
-0.010905349627137184,
-0.04500633478164673,
-0.030679186806082726,
0.044166646897792816,
0.008041043765842915,
-0.028692858293652534,
-0.049573976546525955,
0.030255671590566635,
0.01870776154100895,
-0.04487330839037895,
0.04824773967266083,
-0.018952492624521255,
-0.0485723502933979,
-0.029125697910785675,
0.041580308228731155,
-0.011451411060988903,
-0.01899722032248974,
0.015196838416159153,
-0.04233923926949501,
-0.0025993050076067448,
-0.05522112920880318,
-0.03142073377966881,
0.0026276304852217436,
0.024194881319999695,
-0.017777126282453537,
0.09356942027807236,
0.011715373955667019,
-0.028216948732733727,
0.007364095654338598,
0.02339828386902809,
-0.07745293527841568,
0.0668269693851471,
0.024403434246778488,
0.10240814834833145,
-0.06849557161331177,
-0.04199450835585594,
0.016904715448617935,
0.007447912357747555,
-0.01447027362883091,
0.02514924295246601,
-0.01079649105668068,
-0.07296878099441528,
-0.03149430453777313,
0.004364104941487312,
0.06759118288755417,
-0.04629674181342125,
-0.020832756534218788,
0.023615185171365738,
0.008092347532510757,
0.017366377636790276,
-0.03293367847800255,
-0.002043746877461672,
-0.006996351759880781,
-0.031482402235269547,
-0.06675233691930771,
0.03133654221892357,
-0.0016130057629197836,
-0.027314942330121994,
-0.030185772106051445,
-0.044537145644426346,
0.012531997635960579,
0.10702285915613174,
0.010997422970831394,
-0.007956689223647118,
-0.04124080389738083,
0.012126116082072258,
0.03743666782975197,
0.04684450849890709,
-0.025713276118040085,
0.02343611791729927,
0.04456377029418945,
0.06499519944190979,
-0.036371488124132156,
0.07008811086416245,
-0.016744699329137802,
-0.04356654733419418,
-0.029236391186714172,
0.020468877628445625,
-0.02188192307949066,
-0.04693611338734627,
-0.004930208437144756,
0.01987404376268387,
-0.020699024200439453,
-0.004830357152968645,
-0.012590650469064713,
0.05313698202371597,
0.029325367882847786,
-0.014953347854316235,
-0.03548417240381241,
0.002744832541793585,
-0.012267333455383778,
0.06132783740758896,
-0.033062685281038284,
-0.008587678894400597,
-0.022415176033973694,
-0.027775511145591736,
-0.0062017072923481464,
0.016733402386307716,
0.0462183840572834,
0.03307364881038666,
-0.009545431472361088,
0.09483394026756287,
-0.044722966849803925,
0.0051271552219986916,
-0.048147305846214294,
-0.052065037190914154,
0.014488546177744865,
0.03455304726958275,
0.03981111943721771,
0.029593409970402718,
0.018318308517336845,
-0.022884098812937737,
0.015548024326562881,
0.07193750888109207,
0.039187587797641754,
0.02847105823457241,
-0.02121671661734581,
-0.013406665995717049,
0.04284436255693436,
0.06769125163555145,
-0.028930656611919403,
-0.03336644172668457,
0.04241358861327171,
0.029107987880706787,
-0.02429155260324478,
0.02046719193458557,
-0.0054955510422587395,
0.010821153409779072,
-0.05345907434821129,
-0.06761253625154495,
0.04525437578558922,
0.016858980059623718,
0.011604457162320614,
0.026695555076003075,
0.0012525059282779694,
-0.0013524469686672091,
0.04001426324248314,
-0.002109738066792488,
0.0033271813299506903,
-0.0666799247264862,
0.011328855529427528,
0.0017950906185433269,
0.06199191138148308,
-0.0363292396068573,
0.04258709028363228,
0.009991449303925037,
-0.005737280007451773,
0.057879481464624405,
-0.025042805820703506,
0.03731309622526169,
0.027173690497875214,
0.0317968875169754,
-0.023135757073760033,
0.013930230401456356,
0.011036653071641922,
0.021910516545176506,
0.08223389089107513,
0.007689515128731728,
0.06408381462097168,
-0.004160869400948286,
0.05720921605825424,
0.06275489181280136,
0.017366159707307816,
0.010482125915586948,
0.030963808298110962,
0.059334058314561844,
0.003198316553607583,
-0.007164305076003075,
0.06400389224290848,
-0.05053534358739853,
0.023142611607909203,
-0.04719684273004532,
0.040980588644742966,
-0.009192018769681454,
-0.020795375108718872,
0.04447285830974579,
0.0011065168073400855,
-0.04614415019750595,
0.006459824740886688,
-0.026968063786625862,
-0.028061827644705772,
0.01792108081281185,
-0.0004522204108070582,
-0.027894727885723114,
0.017909107729792595,
-0.022135719656944275,
0.024350246414542198,
-0.07839816808700562,
-0.03693075105547905,
-0.004164582118391991,
-0.05207850784063339,
0.012849386781454086,
-0.07427400350570679,
-0.04771275445818901,
-0.0680164024233818,
-0.006009741220623255,
0.04516123980283737,
0.008496653288602829,
-0.010389929637312889,
-0.02968432754278183,
0.006955297663807869,
-0.037217579782009125,
-0.02403871715068817,
-0.05778169259428978,
-0.06473368406295776,
-0.005359715782105923,
-0.0657607913017273,
0.03913869708776474,
-0.014294136315584183,
0.025070229545235634,
0.012532749213278294,
-0.013691090978682041,
-0.0248243510723114,
-0.020808789879083633,
0.05947449430823326,
0.0024170789401978254,
-0.00805628951638937,
-0.04191570729017258,
0.008154063485562801,
-0.02258061058819294,
0.04836513102054596,
-0.0033201975747942924,
-0.034372471272945404,
0.10816138237714767,
0.05558653175830841,
0.03598420321941376,
-0.012438792735338211,
-0.03999416157603264,
-0.05454912781715393,
-0.0522441603243351,
-0.021659230813384056,
-0.01748320832848549,
-0.029750626534223557,
-0.005935851018875837,
-0.054261911660432816,
-0.028899498283863068,
-0.03594426438212395,
-0.043751634657382965,
-0.014696449041366577,
0.021416442468762398,
0.030880730599164963,
0.04529441520571709,
0.051238834857940674,
0.032968927174806595,
-0.031303681433200836,
-0.03148577734827995,
0.0281042642891407,
0.004115674179047346,
0.00030994272674433887,
-0.08492404967546463,
-0.032950181514024734,
0.026961779221892357,
0.02544245682656765,
-0.012819929979741573,
-0.020536355674266815,
0.05051033943891525,
0.02341047115623951,
0.000892906857188791,
0.004759842995554209,
-0.014506476931273937,
-0.007398053538054228,
-0.024096697568893433,
-0.0014736022567376494,
-0.03332395851612091,
-0.030955521389842033,
-0.015771377831697464,
-0.011026029475033283,
0.04205597937107086,
-0.06293653696775436,
-0.057826604694128036,
0.006116687320172787,
0.03208690881729126,
0.037527307868003845,
0.020460965111851692,
-0.027886275202035904,
0.0006465021870099008,
-0.0673159658908844,
-0.034671902656555176,
0.03659692779183388,
0.022603031247854233,
-0.01222723163664341,
0.046602725982666016,
0.03808189556002617,
-0.04669627547264099,
0.03498336300253868,
0.0239051952958107,
0.046287085860967636,
0.029871705919504166,
-0.034842316061258316,
0.01819012500345707,
-0.04785992205142975,
0.023342709988355637,
0.00824704859405756,
-0.03065594471991062,
-0.04630959779024124,
-0.0863695964217186,
-0.034566279500722885,
0.011222150176763535,
-0.023657886311411858,
0.00451285345479846,
0.04463313892483711,
-0.024568554013967514,
-0.046238984912633896,
-0.006104009225964546,
0.0023894570767879486,
0.06999342888593674,
-0.037185054272413254,
0.03354514017701149,
0.004346452187746763,
0.06322105973958969,
-0.03836046904325485,
0.004839259199798107,
-0.02541736327111721,
-0.02213703840970993,
0.005625736899673939,
0.04634170979261398,
0.018539682030677795,
0.061350177973508835,
0.07505501806735992,
0.013403198681771755,
-0.03910798206925392,
0.044965315610170364,
0.04829084500670433,
0.0020994648803025484,
-0.02433330938220024,
-0.005257117096334696,
-0.0071521359495818615,
-0.028912341222167015,
0.019544048234820366,
-0.01057047862559557,
0.021933071315288544,
0.021012667566537857,
-0.004313298966735601,
0.0026699351146817207,
0.0004626402514986694,
-0.026348227635025978,
-0.04890900477766991,
-0.04001537710428238,
-0.011865423992276192,
-0.0408535934984684,
-0.04824863746762276,
0.023130031302571297,
0.03548843041062355,
0.015095004811882973,
0.05347554385662079,
0.04251258075237274,
-0.04382803663611412,
-0.039742812514305115,
0.04401098191738129,
0.04642024636268616,
-0.03675928711891174,
-0.04704761877655983,
-0.052791666239500046,
0.03541659936308861,
0.047096919268369675,
-0.025099363178014755,
-0.09221559017896652,
0.0036747767589986324,
0.030099835246801376,
-0.022172987461090088,
0.06584107130765915,
0.024351926520466805,
0.015465134754776955,
0.05449774116277695,
-0.005319520365446806,
0.027708031237125397,
-0.027040455490350723,
0.014737454243004322,
-0.0040101404301822186,
0.04549914598464966,
-0.02025465853512287,
-0.031862881034612656,
-0.04161201789975166,
0.025103004649281502,
0.015842018648982048,
0.03816448152065277,
0.03020375780761242,
-0.006881032604724169,
-0.07254426181316376,
-0.0060782949440181255,
0.029012033715844154,
-0.028692860156297684,
0.010828197002410889,
0.02226586639881134,
0.048354122787714005,
-0.051259007304906845,
-0.03002406470477581,
-0.01630370132625103,
-0.01582447811961174,
0.03175797685980797,
-0.0012445903848856688,
-0.017337344586849213,
-0.06811441481113434,
0.008025911636650562,
-0.026371389627456665,
-0.024320075288414955,
-0.08855289965867996,
0.04023993760347366,
-0.003646771190688014,
-0.0026596877723932266,
0.049804314970970154,
0.03749937564134598,
0.0118532944470644,
0.037741489708423615,
-0.017784900963306427,
0.03777269273996353,
-0.030771303921937943,
0.021753650158643723,
-0.006582896690815687,
-0.021843958646059036,
-0.018980611115694046,
-0.0712178647518158,
-0.02256615459918976,
-0.0495154932141304,
-0.03645337000489235,
-0.04585304483771324,
-0.026957174763083458,
0.008947026915848255,
-0.006980644538998604,
-0.012433329597115517,
-0.0047641596756875515,
0.009298093616962433,
-0.025719953700900078,
-0.014448062516748905,
-0.03302442654967308,
-0.0415591299533844,
-0.09559120237827301,
-0.03434446081519127,
0.00009842979488894343,
0.04107217490673065,
0.03654824569821358,
-0.0011881773825734854,
0.009967334568500519,
0.02706153318285942,
-0.008526698686182499,
-0.011065731756389141,
0.01551660057157278,
0.012151874601840973,
-0.04117543622851372,
-0.029551858082413673,
0.0066778273321688175,
0.017608830705285072,
0.012434798292815685,
-0.010221803560853004,
0.010725151747465134,
0.049715783447027206,
-0.029771223664283752,
-0.0035254480317234993,
0.038971006870269775,
-0.004685694817453623,
-0.07651998847723007,
-0.03485748544335365,
-0.0007706193719059229,
-0.044182661920785904,
0.03353467583656311,
-0.0004203004646115005,
-0.019311808049678802,
-0.019660478457808495,
-0.004420173354446888,
0.03171224519610405,
-0.01384990755468607,
-0.025928150862455368,
0.004232145380228758,
-0.041067976504564285,
0.0387408472597599,
-0.06168757751584053,
0.05387122556567192,
-0.026792293414473534,
-0.006778472103178501,
-0.012032108381390572,
-0.0005242332699708641,
-0.03510763868689537,
0.060771360993385315,
-0.006147636566311121,
0.00025519696646369994,
-0.008889744989573956,
0.004600419197231531,
-0.024079808965325356,
0.03328026831150055,
-0.006875647231936455,
0.010255367495119572,
-0.03239234909415245,
0.009181266650557518,
-0.03834164887666702,
0.008856087923049927,
-0.03037649393081665,
-0.01599697209894657,
-0.014197083190083504,
-0.023837141692638397,
-0.009291413240134716,
-0.05752968415617943,
0.04187711700797081,
0.026989391073584557,
0.027136454358696938,
0.013404952362179756,
-0.029334301128983498,
-0.012934821657836437,
0.028370555490255356,
-0.08981943875551224,
-0.0429174043238163,
-0.023303786292672157,
0.009863587096333504,
-0.02529175393283367,
0.06664549559354782,
0.05828726291656494,
-0.05018877983093262,
-0.014611584134399891,
0.025162523612380028,
0.01684398204088211,
0.00744364969432354,
0.028823569416999817,
0.022367211058735847,
0.044286973774433136,
0.056587327271699905,
-0.042492061853408813,
-0.0062439278699457645,
-0.004050620831549168,
-0.008965357206761837,
-0.023581083863973618,
-0.012326127849519253,
0.017743442207574844,
-0.006768683437258005,
-0.0497104786336422,
-0.018142228946089745,
0.05982901528477669,
0.05673746019601822,
0.022067934274673462,
0.012580745853483677,
-0.029974916949868202,
0.03221089765429497,
0.000050918388296850026,
-0.05132641643285751,
-0.0365314818918705,
0.01802893355488777,
-0.04453326389193535,
0.0795217752456665,
-0.011221600696444511,
0.014450966380536556,
0.023360516875982285,
0.0318307988345623,
0.012197370640933514,
0.045384250581264496,
-0.031015926972031593,
-0.001810530200600624,
0.03292175382375717,
-0.05591672286391258,
-0.006824759766459465,
0.0005331491702236235,
0.06337697803974152,
-0.04830038174986839,
0.03687957674264908,
0.02110694721341133,
0.024166075512766838,
-0.00845238845795393,
-0.025450510904192924,
-0.04857995733618736,
0.04279349744319916,
-0.05830036848783493,
0.06435531377792358,
-0.017506226897239685,
-0.07580932229757309,
0.08307119458913803,
0.027249060571193695,
-0.09449213743209839,
0.005902661010622978,
0.03912416845560074,
0.01227610930800438,
0.029818762093782425,
0.04454830661416054,
-0.07167671620845795,
0.00006122243939898908,
-0.046107422560453415,
0.00932896975427866,
-0.06373380869626999,
-0.0029595771338790655,
0.028799964115023613,
-0.05585237219929695,
0.005804699379950762,
0.03395158797502518,
-0.013950972817838192,
0.0009579524048604071,
0.01704900711774826,
-0.054316114634275436,
-0.042149949818849564,
-0.01953214406967163,
-0.000493283907417208,
-0.026218688115477562,
0.025554105639457703,
-0.01993555948138237,
0.041512586176395416,
0.013355134986341,
0.007314929272979498,
-0.0434294156730175,
0.007843389175832272,
0.027498431503772736,
-0.036268677562475204,
-0.027952197939157486,
0.023195704445242882,
0.007599175442010164,
-0.01187735702842474,
0.023685304448008537,
-0.016930149868130684,
0.02094028703868389,
0.03328406438231468,
-0.021827537566423416,
0.014992889948189259,
-0.04394865781068802,
-0.00019475695444270968,
0.02205974981188774,
0.01963813230395317,
0.03931523114442825,
-0.008862459100782871,
0.03585698455572128,
0.02738180011510849,
0.03299649804830551,
-0.014288865961134434,
-0.022369198501110077,
-0.019806861877441406,
0.014359729364514351,
-0.03940438851714134,
0.02501005120575428,
0.02415868639945984,
-0.043660420924425125,
-0.04478228837251663,
-0.029871782287955284,
-0.01865301840007305,
0.055280957370996475,
-0.03944516181945801,
0.012288466095924377,
0.06301239877939224,
-0.010986900888383389,
-0.05840200558304787,
-0.06657564640045166,
-0.012325618416070938,
-0.015301058068871498,
0.027576403692364693,
0.03144521266222,
-0.030294809490442276,
-0.010373690165579319,
-0.04881579056382179,
-0.07317978143692017,
0.0414370521903038,
0.01692206785082817,
-0.015878653153777122,
0.055069707334041595,
0.05262875184416771,
-0.02501201629638672,
0.019331572577357292,
0.013712665997445583,
-0.04889838024973869,
0.035249002277851105,
0.008631438948214054,
0.016562826931476593,
0.03391095995903015,
0.04001406580209732,
-0.008180500008165836,
-0.0429375022649765,
-0.07363590598106384,
-0.024286901578307152,
-0.032848961651325226,
-0.01575552299618721,
0.07071356475353241
] |
Cedille/fr-boris | [
"pytorch",
"gptj",
"text-generation",
"fr",
"dataset:c4",
"arxiv:2202.03371",
"transformers",
"causal-lm",
"license:mit",
"has_space"
] | text-generation | {
"architectures": [
"GPTJForCausalLM"
],
"model_type": "gptj",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 401 | null | ---
tags:
- summarization
widget:
- text: "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
---
# CodeTrans model for code documentation generation python
Pretrained model on programming language python using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the python function/method.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_python_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_python_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "def e ( message , exit_code = None ) : print_log ( message , YELLOW , BOLD ) if exit_code is not None : sys . exit ( exit_code )"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/python/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 4000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing python code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.007119745947420597,
-0.021732494235038757,
-0.006130669731646776,
0.021631307899951935,
0.03789762407541275,
0.03987622633576393,
-0.030533399432897568,
-0.002787558129057288,
-0.019402313977479935,
0.059805747121572495,
0.04484739154577255,
-0.0020172211807221174,
-0.008977308869361877,
0.046506308019161224,
-0.03313237801194191,
-0.06253962963819504,
-0.01997707225382328,
-0.0356898196041584,
-0.038734614849090576,
-0.006437415722757578,
0.017220892012119293,
0.0028568480629473925,
0.010604838840663433,
0.0009027223568409681,
-0.002629572292789817,
0.009984892792999744,
-0.001580979092977941,
0.028451666235923767,
0.04077963903546333,
-0.07575148344039917,
-0.021173983812332153,
0.0006615685997530818,
-0.03460566699504852,
-0.009519431740045547,
-0.02321399189531803,
0.022446222603321075,
0.008077503181993961,
0.031131770461797714,
0.02028629556298256,
0.05664250627160072,
0.0065175811760127544,
0.02551978826522827,
0.021151719614863396,
-0.03854188695549965,
0.06393526494503021,
0.007481065578758717,
-0.036171749234199524,
-0.02624158374965191,
0.01918928697705269,
-0.0019902714993804693,
-0.05453406646847725,
-0.07136763632297516,
-0.02155477926135063,
0.05973890423774719,
-0.005518798716366291,
-0.0021232878789305687,
-0.07773707062005997,
-0.021512798964977264,
0.04761112108826637,
-0.045178111642599106,
-0.03536434844136238,
0.01603597216308117,
-0.06654124706983566,
0.014379659667611122,
0.013247780501842499,
0.007476394064724445,
0.008114861324429512,
-0.056540124118328094,
0.01739768125116825,
0.0007702153525315225,
0.05894755944609642,
-0.013871404342353344,
0.01961652934551239,
-0.11083782464265823,
0.013719389215111732,
-0.012184333056211472,
0.022312404587864876,
0.004020370077341795,
-0.010516788810491562,
0.04898631572723389,
-0.010785810649394989,
0.0023052641190588474,
0.04217975214123726,
0.012492513284087181,
-0.008973294869065285,
0.03346388414502144,
-0.04016349837183952,
-0.014268181286752224,
-0.017869744449853897,
0.06619013845920563,
-0.06251991540193558,
-0.06210161745548248,
-0.016036150977015495,
-0.02289060316979885,
-0.028421469032764435,
0.023255955427885056,
0.04247691482305527,
-0.015331653878092766,
0.015978345647454262,
0.003810745431110263,
0.04168463498353958,
0.05438676103949547,
-0.00583244115114212,
0.04609315097332001,
0.02688199281692505,
0.01676901988685131,
-0.012293131090700626,
-0.0479290671646595,
-0.03258386626839638,
0.04358258843421936,
0.007127502001821995,
-0.028691183775663376,
-0.048365045338869095,
0.02720741741359234,
0.016921434551477432,
-0.05099640041589737,
0.04696103185415268,
-0.020609017461538315,
-0.04934905469417572,
-0.029082395136356354,
0.04180091992020607,
-0.014791260473430157,
-0.018389258533716202,
0.015355028212070465,
-0.04149371013045311,
-0.0006558693130500615,
-0.05932530015707016,
-0.03625491261482239,
0.0027210821863263845,
0.02525899186730385,
-0.021538393571972847,
0.09593264758586884,
0.010569814592599869,
-0.029863379895687103,
0.006359434686601162,
0.025064410641789436,
-0.07569291442632675,
0.06727814674377441,
0.027961013838648796,
0.10248409956693649,
-0.06647258251905441,
-0.04318305477499962,
0.01867719553411007,
0.007688002195209265,
-0.01331245992332697,
0.026647357270121574,
-0.015300383791327477,
-0.07543190568685532,
-0.0304554533213377,
0.0063867466524243355,
0.0699608251452446,
-0.04487699270248413,
-0.02093333937227726,
0.02379133738577366,
0.011446703225374222,
0.019263502210378647,
-0.03529192879796028,
-0.0019757295958697796,
-0.005364654585719109,
-0.032348841428756714,
-0.07001110911369324,
0.030232509598135948,
0.0014159169513732195,
-0.02632230706512928,
-0.029002293944358826,
-0.045754287391901016,
0.009789101779460907,
0.1080559715628624,
0.010490600019693375,
-0.009226873517036438,
-0.044173695147037506,
0.013084759935736656,
0.036601848900318146,
0.04633677378296852,
-0.02626483514904976,
0.025846144184470177,
0.04180976375937462,
0.06694093346595764,
-0.03672787919640541,
0.06991492211818695,
-0.021157993003726006,
-0.04495459049940109,
-0.029836105182766914,
0.021369878202676773,
-0.020102543756365776,
-0.04764267057180405,
-0.006478969473391771,
0.019466161727905273,
-0.018429260700941086,
-0.0018956172280013561,
-0.011284545995295048,
0.053734127432107925,
0.02713889814913273,
-0.017308542504906654,
-0.03390626981854439,
0.005367964971810579,
-0.010903917253017426,
0.06288613379001617,
-0.03514889255166054,
-0.00802652444690466,
-0.020100954920053482,
-0.02898385562002659,
-0.003958077169954777,
0.01819104328751564,
0.04654260352253914,
0.03229449316859245,
-0.009400849230587482,
0.0966784730553627,
-0.04575520381331444,
0.0017266736831516027,
-0.04716962203383446,
-0.048074718564748764,
0.0161494929343462,
0.03427669033408165,
0.0376732274889946,
0.026979703456163406,
0.01772887445986271,
-0.02392454817891121,
0.016822615638375282,
0.07169096916913986,
0.0416126474738121,
0.03182795271277428,
-0.020368188619613647,
-0.017547601833939552,
0.045728106051683426,
0.06713957339525223,
-0.028723502531647682,
-0.03450284153223038,
0.04030384495854378,
0.026593653485178947,
-0.025261560454964638,
0.017449218779802322,
-0.005749008618295193,
0.011039992794394493,
-0.053232938051223755,
-0.06965985894203186,
0.046411700546741486,
0.017520735040307045,
0.012803031131625175,
0.030500689521431923,
0.001335891429334879,
0.0011575270909816027,
0.03995122015476227,
-0.0032999496906995773,
0.004571784753352404,
-0.06635047495365143,
0.010565904900431633,
-0.0014869788428768516,
0.05901685729622841,
-0.03648284822702408,
0.04256517440080643,
0.0074851540848612785,
-0.007255074568092823,
0.05832584947347641,
-0.025786012411117554,
0.03694430738687515,
0.024163570255041122,
0.032071031630039215,
-0.02397492341697216,
0.016908282414078712,
0.012753588147461414,
0.02479676902294159,
0.08519168198108673,
0.006315448321402073,
0.06214814633131027,
-0.003996778279542923,
0.060410305857658386,
0.06435251235961914,
0.017779745161533356,
0.008586223237216473,
0.027927452698349953,
0.05509231612086296,
-0.0008562813745811582,
-0.007692145649343729,
0.06593213975429535,
-0.052404459565877914,
0.021814433857798576,
-0.049585092812776566,
0.03880394250154495,
-0.009075026027858257,
-0.021865060552954674,
0.043155230581760406,
0.00382691016420722,
-0.048982564359903336,
0.007487630471587181,
-0.025312626734375954,
-0.026966221630573273,
0.0147292111068964,
-0.0006196729955263436,
-0.02916058711707592,
0.017478415742516518,
-0.019851479679346085,
0.02167552337050438,
-0.0755951926112175,
-0.03577234596014023,
-0.00446650106459856,
-0.05188118293881416,
0.013247686438262463,
-0.07421687245368958,
-0.05092150717973709,
-0.06689570844173431,
-0.008175856433808804,
0.04302416741847992,
0.010299649089574814,
-0.008023210801184177,
-0.03144824504852295,
0.004811931401491165,
-0.03555288910865784,
-0.02410140447318554,
-0.05838528275489807,
-0.06218507140874863,
-0.005636491812765598,
-0.06452992558479309,
0.0406176820397377,
-0.0183549951761961,
0.028055910021066666,
0.012508275918662548,
-0.015532117336988449,
-0.024575063958764076,
-0.01803821325302124,
0.06035878509283066,
0.003390047699213028,
-0.007704966235905886,
-0.03937862440943718,
0.007744185160845518,
-0.022691763937473297,
0.050334371626377106,
-0.004385068081319332,
-0.03555925935506821,
0.10828982293605804,
0.058055657893419266,
0.03792218491435051,
-0.009636328555643559,
-0.04203198477625847,
-0.054202113300561905,
-0.052586477249860764,
-0.021753884851932526,
-0.016619807109236717,
-0.03241923078894615,
-0.004366862587630749,
-0.05648117884993553,
-0.02729647234082222,
-0.03304261341691017,
-0.04154568165540695,
-0.015218713320791721,
0.022372212260961533,
0.028033602982759476,
0.042794086039066315,
0.05143630504608154,
0.029384644702076912,
-0.028379444032907486,
-0.03305354714393616,
0.028243687003850937,
0.005054752342402935,
0.000777405861299485,
-0.08290793001651764,
-0.03318031504750252,
0.026933180168271065,
0.025487752631306648,
-0.01215387973934412,
-0.017674554139375687,
0.04713673144578934,
0.019652454182505608,
0.0028349340427666903,
0.0030445540323853493,
-0.016404787078499794,
-0.006249273661524057,
-0.02552124112844467,
0.000590512587223202,
-0.03426869586110115,
-0.030317163094878197,
-0.017029287293553352,
-0.0071541075594723225,
0.04120742157101631,
-0.06290459632873535,
-0.057176873087882996,
0.010282965376973152,
0.03194865956902504,
0.03904939070343971,
0.02092478796839714,
-0.029699960723519325,
0.001124082482419908,
-0.06842773407697678,
-0.03406020998954773,
0.039083193987607956,
0.025565534830093384,
-0.015337536111474037,
0.04488884285092354,
0.038695819675922394,
-0.04722851514816284,
0.03638693690299988,
0.02644326351583004,
0.04629772529006004,
0.029441041871905327,
-0.0323779471218586,
0.019074350595474243,
-0.049579817801713943,
0.023222791031003,
0.006025885697454214,
-0.02989341877400875,
-0.04828380048274994,
-0.08293686807155609,
-0.03394699841737747,
0.01088563259691,
-0.020299989730119705,
0.002722554374486208,
0.04303675889968872,
-0.023394688963890076,
-0.05053768306970596,
-0.0035101280082017183,
0.0010695109376683831,
0.07244233042001724,
-0.03812491148710251,
0.03210243210196495,
0.006884564645588398,
0.06436384469270706,
-0.03807308152318001,
0.0030448753386735916,
-0.023739296942949295,
-0.021953292191028595,
0.007756749168038368,
0.0463707409799099,
0.017114855349063873,
0.06130146235227585,
0.07292112708091736,
0.010926802642643452,
-0.036281853914260864,
0.04540689289569855,
0.04762796685099602,
0.0040272860787808895,
-0.023205455392599106,
-0.004741163458675146,
-0.003913124557584524,
-0.0308932326734066,
0.02014068327844143,
-0.011087687686085701,
0.024012750014662743,
0.020894592627882957,
-0.006680235732346773,
0.002309346105903387,
-0.0008731132838875055,
-0.026622846722602844,
-0.04940913990139961,
-0.03959924355149269,
-0.009860089048743248,
-0.045709479600191116,
-0.05286925658583641,
0.02463752031326294,
0.03724876046180725,
0.017431683838367462,
0.05259118974208832,
0.04499909281730652,
-0.043338507413864136,
-0.03747124597430229,
0.04560042545199394,
0.0489567331969738,
-0.03819448873400688,
-0.044709667563438416,
-0.05496860295534134,
0.034060038626194,
0.04878643527626991,
-0.025967899709939957,
-0.09278983622789383,
0.0018002329161390662,
0.026217103004455566,
-0.02244938164949417,
0.06611786782741547,
0.02619696408510208,
0.014961076900362968,
0.05366087704896927,
-0.0019534151069819927,
0.028757905587553978,
-0.026411952450871468,
0.016549885272979736,
-0.004927040543407202,
0.04716607928276062,
-0.017730941995978355,
-0.02963433600962162,
-0.038614753633737564,
0.02610178478062153,
0.013110326603055,
0.03710973635315895,
0.029132375493645668,
-0.006716503296047449,
-0.07057669013738632,
-0.00446906266734004,
0.02584705874323845,
-0.030910534784197807,
0.014719060622155666,
0.02236819639801979,
0.046896498650312424,
-0.04802536591887474,
-0.03201279789209366,
-0.019075164571404457,
-0.017482377588748932,
0.032518018037080765,
0.0015204183291643858,
-0.019563166424632072,
-0.06992682069540024,
0.0067480504512786865,
-0.02618640474975109,
-0.02371976710855961,
-0.09319888800382614,
0.038937170058488846,
0.0009077288559637964,
-0.004923183936625719,
0.048840101808309555,
0.036600690335035324,
0.012869644910097122,
0.03620101138949394,
-0.016339804977178574,
0.034169889986515045,
-0.030394764617085457,
0.02319965697824955,
-0.004681013524532318,
-0.024346521124243736,
-0.01671362854540348,
-0.06818479299545288,
-0.024832244962453842,
-0.04794040322303772,
-0.036343611776828766,
-0.04624517261981964,
-0.02544136717915535,
0.008065097965300083,
-0.008850102312862873,
-0.013833963312208652,
-0.006828883662819862,
0.007693178486078978,
-0.021652473136782646,
-0.013964400626718998,
-0.031941771507263184,
-0.042679257690906525,
-0.0941682979464531,
-0.02920420840382576,
0.0010464310180395842,
0.039668865501880646,
0.037061307579278946,
-0.0021689508575946093,
0.007571094203740358,
0.027071621268987656,
-0.004903585184365511,
-0.011197908781468868,
0.017110271379351616,
0.010031198151409626,
-0.041524965316057205,
-0.031594306230545044,
0.007090230006724596,
0.017566045746207237,
0.0075660753063857555,
-0.01050023827701807,
0.010536503046751022,
0.04904122278094292,
-0.028857676312327385,
-0.0032105017453432083,
0.03833698481321335,
-0.0036173483822494745,
-0.07835371792316437,
-0.03307226672768593,
-0.0023784274235367775,
-0.043783947825431824,
0.037536218762397766,
0.003568850690498948,
-0.021757012233138084,
-0.021695733070373535,
-0.0073613193817436695,
0.03173862397670746,
-0.013566173613071442,
-0.025540471076965332,
0.004017270170152187,
-0.041614044457674026,
0.03747466951608658,
-0.0615880973637104,
0.05431288480758667,
-0.02839842438697815,
-0.005530412308871746,
-0.012552843429148197,
0.000897702993825078,
-0.0374610535800457,
0.06234901770949364,
-0.0057569085620343685,
0.00034588019479997456,
-0.009396011009812355,
0.0016217672964558005,
-0.025190748274326324,
0.03276478871703148,
-0.008489232510328293,
0.011416309513151646,
-0.030474994331598282,
0.009424898773431778,
-0.03677655756473541,
0.0068211681209504604,
-0.033174239099025726,
-0.017426028847694397,
-0.013844799250364304,
-0.021752549335360527,
-0.011050623841583729,
-0.05527597293257713,
0.04329141229391098,
0.027404358610510826,
0.027932746335864067,
0.011716063134372234,
-0.027425803244113922,
-0.012897389940917492,
0.031699288636446,
-0.09121181815862656,
-0.04214809834957123,
-0.022258926182985306,
0.008737354539334774,
-0.021825136616826057,
0.06819354742765427,
0.05845853313803673,
-0.04648107662796974,
-0.013295330107212067,
0.023089563474059105,
0.015615159645676613,
0.007567385211586952,
0.029223809018731117,
0.02097729593515396,
0.04471380263566971,
0.056780509650707245,
-0.044960565865039825,
-0.008352157659828663,
-0.0014639251166954637,
-0.007896900177001953,
-0.023387795314192772,
-0.011628719046711922,
0.019403256475925446,
-0.0054810261353850365,
-0.04879014939069748,
-0.01766865886747837,
0.05704940855503082,
0.05580313131213188,
0.019550781697034836,
0.010073192417621613,
-0.029513109475374222,
0.03126907721161842,
0.0034254328347742558,
-0.052743617445230484,
-0.03736910969018936,
0.018731778487563133,
-0.04788617789745331,
0.07520318776369095,
-0.010434343479573727,
0.01342030055820942,
0.020626181736588478,
0.031959302723407745,
0.011881530284881592,
0.044776689261198044,
-0.032571882009506226,
-0.005250857211649418,
0.029917098581790924,
-0.05347154289484024,
-0.006880802568048239,
-0.0010317596606910229,
0.061364639550447464,
-0.046106912195682526,
0.03238397091627121,
0.02434593252837658,
0.02400980331003666,
-0.010035451501607895,
-0.024666981771588326,
-0.04608249291777611,
0.040567804127931595,
-0.0565398633480072,
0.06506980955600739,
-0.01727381721138954,
-0.07842890173196793,
0.0819937139749527,
0.025147875770926476,
-0.09540115296840668,
0.004632193129509687,
0.04086175560951233,
0.01484986674040556,
0.030737468972802162,
0.040879033505916595,
-0.07131697982549667,
0.0003678228531498462,
-0.04688102751970291,
0.009687798097729683,
-0.06413305550813675,
-0.003815028350800276,
0.027762949466705322,
-0.06021083518862724,
0.007097802124917507,
0.031945548951625824,
-0.015325828455388546,
0.0037598179187625647,
0.01617463491857052,
-0.04933865740895271,
-0.038595642894506454,
-0.020373651757836342,
-0.0011737397871911526,
-0.02634301967918873,
0.025186048820614815,
-0.02018560841679573,
0.03912707418203354,
0.01242277305573225,
0.006638184655457735,
-0.04227028042078018,
0.010001469403505325,
0.025438342243433,
-0.035942405462265015,
-0.02846265770494938,
0.025175558403134346,
0.009020865894854069,
-0.01241377741098404,
0.02314607985317707,
-0.013717353343963623,
0.020638493821024895,
0.032648246735334396,
-0.024435535073280334,
0.01369396224617958,
-0.04406038299202919,
0.0008408335270360112,
0.0230378657579422,
0.01565081998705864,
0.04123358055949211,
-0.009486711584031582,
0.03601483255624771,
0.02804415114223957,
0.03385377302765846,
-0.015611550770699978,
-0.021336819976568222,
-0.017881793901324272,
0.01599961705505848,
-0.03838669881224632,
0.022378094494342804,
0.02284185215830803,
-0.0453241728246212,
-0.04208185151219368,
-0.029633762314915657,
-0.024023110046982765,
0.05571172013878822,
-0.04195263236761093,
0.010597717948257923,
0.06347052752971649,
-0.008894616737961769,
-0.05587378144264221,
-0.06580483168363571,
-0.011807865463197231,
-0.013946940191090107,
0.02443273924291134,
0.02969607524573803,
-0.02931922674179077,
-0.010329890064895153,
-0.0516105554997921,
-0.06996294856071472,
0.03959425911307335,
0.01669037528336048,
-0.016742300242185593,
0.05089201405644417,
0.04874516651034355,
-0.023537078872323036,
0.01929786615073681,
0.017488490790128708,
-0.047469452023506165,
0.033622678369283676,
0.007180263753980398,
0.0178570207208395,
0.03534042462706566,
0.036543671041727066,
-0.008846933953464031,
-0.044378358870744705,
-0.07456162571907043,
-0.026082761585712433,
-0.033161457628011703,
-0.014996652491390705,
0.07156132161617279
] |
dccuchile/albert-base-spanish-finetuned-ner | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 14 | null | ---
tags:
- summarization
widget:
- text: "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
---
# CodeTrans model for code documentation generation ruby
Pretrained model on programming language ruby using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized ruby code functions: it works best with tokenized ruby functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on CodeSearchNet Corpus ruby dataset.
## Intended uses & limitations
The model could be used to generate the description for the ruby function or be fine-tuned on other ruby code tasks. It can be used on unparsed and untokenized ruby code. However, if the ruby code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate ruby function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_ruby"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_ruby", skip_special_tokens=True),
device=0
)
tokenized_code = "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/function%20documentation%20generation/ruby/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.004386824555695057,
-0.01684948243200779,
-0.01035293098539114,
0.02174256183207035,
0.04462498053908348,
0.038197338581085205,
-0.035964563488960266,
-0.0030196241568773985,
-0.01686769165098667,
0.06185994669795036,
0.038551215082407,
-0.00036416127113625407,
-0.00884621124714613,
0.04228376969695091,
-0.04004768654704094,
-0.06325896084308624,
-0.024253299459815025,
-0.021403999999165535,
-0.042911991477012634,
-0.010269696824252605,
0.014587691985070705,
0.0016978519270196557,
-0.0038625127635896206,
-0.0019401253666728735,
0.0014402776723727584,
0.014277122914791107,
-0.008651642128825188,
0.023584531620144844,
0.0355973094701767,
-0.06805862486362457,
-0.021738551557064056,
0.00252414308488369,
-0.03692330792546272,
-0.0007196259684860706,
-0.017010506242513657,
0.024166254326701164,
0.014088575728237629,
0.03552815318107605,
0.012769224122166634,
0.05251702666282654,
0.014462659135460854,
0.02228686399757862,
0.017278695479035378,
-0.044654782861471176,
0.056576553732156754,
0.0017461184179410338,
-0.03425972908735275,
-0.025482196360826492,
0.023539811372756958,
-0.012208612635731697,
-0.06120266765356064,
-0.06593860685825348,
-0.01891576685011387,
0.05503901094198227,
-0.008824488148093224,
-0.006765632424503565,
-0.07123484462499619,
-0.0157824344933033,
0.05209650471806526,
-0.0458022765815258,
-0.03193647041916847,
0.013528114184737206,
-0.06700294464826584,
0.022392434999346733,
0.019079403951764107,
-0.00608168775215745,
0.008749980479478836,
-0.045105841010808945,
0.02716250531375408,
-0.0024865695741027594,
0.053088173270225525,
-0.021354125812649727,
0.02965712919831276,
-0.11187957227230072,
0.016037141904234886,
-0.005272154230624437,
0.018161162734031677,
0.01078538317233324,
-0.0022173679899424314,
0.05501110106706619,
-0.010056332685053349,
0.006319465581327677,
0.046074606478214264,
0.0018974271370097995,
-0.002334905555471778,
0.038337863981723785,
-0.029729535803198814,
-0.013373558409512043,
-0.02838478609919548,
0.06103837117552757,
-0.06383579224348068,
-0.05897381156682968,
-0.022066989913582802,
-0.02031775750219822,
-0.036530159413814545,
0.03310537710785866,
0.04931534081697464,
-0.024364003911614418,
0.024023184552788734,
0.012054393999278545,
0.03719598054885864,
0.05567746236920357,
-0.007361315190792084,
0.03146211802959442,
0.022793123498558998,
0.01555224321782589,
-0.02268221043050289,
-0.03503132984042168,
-0.028969740495085716,
0.04921494796872139,
0.007880901917815208,
-0.032227177172899246,
-0.04811694845557213,
0.015416464768350124,
0.02072001062333584,
-0.04273746907711029,
0.04703056812286377,
-0.020058413967490196,
-0.04947059229016304,
-0.04007086902856827,
0.049993231892585754,
-0.008542504161596298,
-0.02285153418779373,
0.026648953557014465,
-0.04676208272576332,
0.014956796541810036,
-0.06293261796236038,
-0.03671451285481453,
0.007423408329486847,
0.02733812853693962,
-0.006740803364664316,
0.09403938055038452,
0.008218645118176937,
-0.03814295306801796,
-0.0033821521792560816,
0.022107861936092377,
-0.07569456100463867,
0.06440816819667816,
0.034747276455163956,
0.11551021784543991,
-0.05529871582984924,
-0.038765694946050644,
0.029540814459323883,
0.0057301754131913185,
-0.013166640885174274,
0.027845170348882675,
-0.014526713639497757,
-0.07035494595766068,
-0.02552456595003605,
0.003575165756046772,
0.056435756385326385,
-0.05137904733419418,
-0.03072926588356495,
0.01839367300271988,
0.007296391762793064,
0.02297115884721279,
-0.02911122515797615,
0.0036856401711702347,
-0.005872868932783604,
-0.029035530984401703,
-0.06845719367265701,
0.03387843817472458,
-0.014765915460884571,
-0.01987430825829506,
-0.023465076461434364,
-0.04376733675599098,
0.003799912054091692,
0.10415013879537582,
0.014055291190743446,
-0.009869282133877277,
-0.03796001896262169,
0.016443327069282532,
0.04104345291852951,
0.05585882067680359,
-0.023327916860580444,
0.017831195145845413,
0.03353290259838104,
0.06567233055830002,
-0.03435898199677467,
0.07378369569778442,
-0.0219737458974123,
-0.048391763120889664,
-0.03125985711812973,
0.028173668310046196,
-0.011379185132682323,
-0.04126423969864845,
-0.0010106080444529653,
0.02871684730052948,
-0.011346965096890926,
-0.006701895035803318,
-0.012392794713377953,
0.05716174840927124,
0.01044227834790945,
-0.011877065524458885,
-0.02079284004867077,
0.01841353252530098,
-0.006242919247597456,
0.07029041647911072,
-0.035230834037065506,
-0.014285990968346596,
-0.024857064709067345,
-0.029352307319641113,
0.007556861266493797,
0.02543499507009983,
0.040175482630729675,
0.03315233811736107,
-0.007131542544811964,
0.10270287841558456,
-0.04618457704782486,
0.007743807975202799,
-0.045395974069833755,
-0.043545227497816086,
0.013980239629745483,
0.030637944117188454,
0.03361213952302933,
0.0262891985476017,
0.010028078220784664,
-0.0297759510576725,
0.012583384290337563,
0.07863219082355499,
0.045911721885204315,
0.033464301377534866,
-0.010707458481192589,
-0.02449464239180088,
0.0326990932226181,
0.05587637051939964,
-0.032714441418647766,
-0.04073835909366608,
0.04696710407733917,
0.025245780125260353,
-0.020809100940823555,
0.02611147053539753,
-0.007058482151478529,
0.002717037918046117,
-0.051087986677885056,
-0.0618557371199131,
0.044156838208436966,
0.009726359508931637,
0.0044062212109565735,
0.03710426390171051,
-0.00455210916697979,
-0.005211359355598688,
0.03586327284574509,
0.006034293677657843,
0.001389225828461349,
-0.06192251294851303,
0.006250888109207153,
0.006556532811373472,
0.06127341464161873,
-0.02752348780632019,
0.03551945462822914,
0.01804271526634693,
0.0036345524713397026,
0.04483333230018616,
-0.02469441294670105,
0.03222637623548508,
0.03284712880849838,
0.02803339995443821,
-0.01918966881930828,
0.017625970765948296,
0.019557839259505272,
0.021298931911587715,
0.08711059391498566,
0.013420983217656612,
0.060947615653276443,
0.005379086825996637,
0.054541829973459244,
0.06843291223049164,
0.022630851715803146,
0.0017365809762850404,
0.029449116438627243,
0.06505773961544037,
-0.011143974959850311,
-0.017913132905960083,
0.0681060329079628,
-0.05535910278558731,
0.0230749249458313,
-0.04339300096035004,
0.027210185304284096,
-0.018457870930433273,
-0.029955828562378883,
0.030607527121901512,
0.007438707165420055,
-0.04906841367483139,
0.008991643786430359,
-0.02599041908979416,
-0.03132638335227966,
0.009855247102677822,
0.00422945199534297,
-0.017689134925603867,
0.011818825267255306,
-0.028181860223412514,
0.024444391950964928,
-0.08121919631958008,
-0.05130591243505478,
-0.006616094149649143,
-0.042819805443286896,
0.015337804332375526,
-0.07313834130764008,
-0.06192094832658768,
-0.06887170672416687,
-0.020612429827451706,
0.03486018255352974,
0.0016364536713808775,
-0.009028754197061062,
-0.02280651219189167,
-0.00028178479988127947,
-0.028683917596936226,
-0.031311359256505966,
-0.06251170486211777,
-0.06459800899028778,
-0.012443390674889088,
-0.06554634869098663,
0.0346493162214756,
-0.01936451718211174,
0.03416898474097252,
0.004988460335880518,
-0.019987478852272034,
-0.025907764211297035,
-0.018112700432538986,
0.05390055477619171,
0.004658411722630262,
-0.011026056483387947,
-0.018045498058199883,
0.013129409402608871,
-0.016974816098809242,
0.044045452028512955,
0.0099346237257123,
-0.04378766566514969,
0.1026989221572876,
0.0521746426820755,
0.042218126356601715,
-0.00569402938708663,
-0.04055706411600113,
-0.04608706012368202,
-0.048404160887002945,
-0.02653813734650612,
-0.012520255520939827,
-0.037187494337558746,
-0.007125565316528082,
-0.06293205171823502,
-0.016382887959480286,
-0.027891600504517555,
-0.033702436834573746,
-0.014619952067732811,
0.030571049079298973,
0.018354836851358414,
0.041113775223493576,
0.055077020078897476,
0.025200366973876953,
-0.019853267818689346,
-0.02543541230261326,
0.03376339003443718,
0.008183447644114494,
0.000607790076173842,
-0.07859737426042557,
-0.026497362181544304,
0.02947268635034561,
0.0227399542927742,
-0.002262682421132922,
-0.01911906898021698,
0.035446710884571075,
0.01954539678990841,
0.013472828082740307,
0.005661144852638245,
-0.007684854790568352,
-0.015248830430209637,
-0.011988518759608269,
-0.004023680463433266,
-0.037540871649980545,
-0.027560463175177574,
-0.021892333403229713,
-0.012271587736904621,
0.0419776476919651,
-0.05463750660419464,
-0.05162573233246803,
-0.0022155994083732367,
0.029059384018182755,
0.029300911352038383,
0.016788285225629807,
-0.023477934300899506,
0.009908938780426979,
-0.04873652756214142,
-0.04411216452717781,
0.03500070050358772,
0.005972783546894789,
-0.010553580708801746,
0.03534773364663124,
0.03805956244468689,
-0.04552913457155228,
0.04358417168259621,
0.020405840128660202,
0.0416034497320652,
0.027948744595050812,
-0.03308245539665222,
0.015290780924260616,
-0.048874396830797195,
0.028529630973935127,
0.010562889277935028,
-0.03336595371365547,
-0.04937756061553955,
-0.07956404983997345,
-0.0253278985619545,
0.014659896492958069,
-0.01931261643767357,
0.007090090308338404,
0.04962199181318283,
-0.020636847242712975,
-0.04742022976279259,
-0.00758453831076622,
0.008197946473956108,
0.06571221351623535,
-0.033053431659936905,
0.0321066789329052,
0.009463297203183174,
0.07060733437538147,
-0.0491119921207428,
0.00481530511751771,
-0.03781577944755554,
-0.031846579164266586,
0.01826264150440693,
0.060596056282520294,
0.029932044446468353,
0.06452472507953644,
0.06999394297599792,
0.01324961706995964,
-0.03576976805925369,
0.03658658266067505,
0.05827641487121582,
0.003440297907218337,
-0.017252137884497643,
-0.0005927897873334587,
0.0050314050167799,
-0.021591443568468094,
0.018906785175204277,
-0.008291179314255714,
0.023666298016905785,
0.028972797095775604,
-0.006720495875924826,
0.005802446976304054,
-0.010386371985077858,
-0.04482158273458481,
-0.05397973954677582,
-0.05012505128979683,
0.00018813228234648705,
-0.04353828355669975,
-0.05509255826473236,
0.03069906309247017,
0.040333449840545654,
0.023056570440530777,
0.05422364920377731,
0.03876020014286041,
-0.03160238265991211,
-0.03452535346150398,
0.041901830583810806,
0.044166449457407,
-0.04529695212841034,
-0.03951257839798927,
-0.04889870062470436,
0.028294550254940987,
0.05054260045289993,
-0.01947595365345478,
-0.09073115885257721,
0.011309171095490456,
0.028316831216216087,
-0.03170348331332207,
0.0729093924164772,
0.027969826012849808,
0.02003958821296692,
0.049624551087617874,
-0.0073061310686171055,
0.02810666337609291,
-0.031551580876111984,
0.027042651548981667,
-0.004933582153171301,
0.04420030117034912,
-0.012314427644014359,
-0.021268220618367195,
-0.038624778389930725,
0.023448236286640167,
-0.0013121571391820908,
0.04017316922545433,
0.0288104061037302,
-0.015454458072781563,
-0.06565932184457779,
0.0009591974085196853,
0.0291762612760067,
-0.03550446033477783,
0.014271825551986694,
0.028735928237438202,
0.05572627857327461,
-0.04528115689754486,
-0.026380114257335663,
-0.01871149241924286,
-0.0023313353303819895,
0.03055000491440296,
-0.0007804018096067011,
-0.019713783636689186,
-0.0709722563624382,
0.01683690957725048,
-0.025496484711766243,
-0.028974592685699463,
-0.09738577902317047,
0.039281491190195084,
-0.0006617848412133753,
-0.011056806892156601,
0.04447580501437187,
0.030687382444739342,
0.01991693302989006,
0.03398184850811958,
-0.018765652552247047,
0.03173758462071419,
-0.02890738658607006,
0.01383479405194521,
-0.008662993088364601,
-0.022968443110585213,
-0.017774518579244614,
-0.06310492753982544,
-0.028823699802160263,
-0.028109852224588394,
-0.03304827958345413,
-0.053010907024145126,
-0.017083998769521713,
0.012237262912094593,
-0.015737969428300858,
-0.01130407303571701,
-0.007642036769539118,
0.012299168854951859,
-0.021709315478801727,
-0.012221749871969223,
-0.019391067326068878,
-0.04572867974638939,
-0.10883353650569916,
-0.031212927773594856,
0.006341935135424137,
0.04819416254758835,
0.029365621507167816,
0.003543557832017541,
0.0029004556126892567,
0.0334542915225029,
-0.005291732493788004,
-0.017622141167521477,
0.013751227408647537,
0.008876269683241844,
-0.03217436000704765,
-0.04406675696372986,
0.003715863451361656,
0.014507561922073364,
0.006387181114405394,
-0.025862760841846466,
0.014340100809931755,
0.04274812340736389,
-0.03246225789189339,
-0.011000383645296097,
0.02607041783630848,
-0.003692627651616931,
-0.07960033416748047,
-0.04445068538188934,
-0.008384834975004196,
-0.04406869411468506,
0.038245655596256256,
0.0024822058621793985,
-0.01798708550632,
-0.021985437721014023,
0.00048063675058074296,
0.03183530271053314,
-0.009384951554238796,
-0.03319112956523895,
0.00037880855961702764,
-0.026972996070981026,
0.04459317773580551,
-0.05582917481660843,
0.056025128811597824,
-0.04405268654227257,
-0.011137209832668304,
-0.015756826847791672,
-0.006512143183499575,
-0.04409744590520859,
0.05712173879146576,
-0.005639174021780491,
0.00024759836378507316,
-0.011195147410035133,
0.013158719055354595,
-0.024628372862935066,
0.03371778875589371,
-0.002801010385155678,
0.009881515987217426,
-0.030412131920456886,
0.019698305055499077,
-0.050974126905202866,
-0.0008153407252393663,
-0.035224318504333496,
-0.010651146993041039,
-0.017219077795743942,
-0.0244838185608387,
-0.01281341165304184,
-0.05868290364742279,
0.04609987512230873,
0.028785908594727516,
0.03583618253469467,
0.016405867412686348,
-0.017524538561701775,
-0.010262162424623966,
0.03148961812257767,
-0.08442871272563934,
-0.04565074294805527,
-0.029929269105196,
0.006531739141792059,
-0.014048714190721512,
0.06350020319223404,
0.04893559589982033,
-0.044564295560121536,
-0.01640661060810089,
0.020279036834836006,
0.015626808628439903,
0.007563719525933266,
0.024221600964665413,
0.01842421665787697,
0.05507941171526909,
0.054586898535490036,
-0.035888466984033585,
-0.016989009454846382,
0.0014795245369896293,
-0.004161865916103125,
-0.020201705396175385,
-0.016350407153367996,
0.007568415254354477,
-0.019216831773519516,
-0.052472151815891266,
-0.027973312884569168,
0.061294056475162506,
0.04404415935277939,
0.016443796455860138,
0.006909731309860945,
-0.03866422176361084,
0.024280844256281853,
0.0095015624538064,
-0.06206439808011055,
-0.02985631488263607,
0.0187241118401289,
-0.0562618114054203,
0.07074212282896042,
-0.015411724336445332,
0.008825384080410004,
0.02215072326362133,
0.02376883290708065,
0.006105190142989159,
0.035698533058166504,
-0.03648260980844498,
-0.021801253780722618,
0.03637783229351044,
-0.04816379025578499,
-0.0098874531686306,
-0.010381477884948254,
0.052738044410943985,
-0.0518658421933651,
0.04351445287466049,
0.021411379799246788,
0.025288663804531097,
-0.004331656266003847,
-0.021342966705560684,
-0.04156821221113205,
0.036365434527397156,
-0.06022365763783455,
0.07238146662712097,
-0.017696117982268333,
-0.08739203959703445,
0.08212088793516159,
0.0309546310454607,
-0.09659502655267715,
-0.0029941548127681017,
0.03918195888400078,
0.021481599658727646,
0.03015717677772045,
0.05035179480910301,
-0.07549221068620682,
0.01843106932938099,
-0.04839889705181122,
0.013260427862405777,
-0.06699483096599579,
-0.003182743676006794,
0.029582221060991287,
-0.05527011305093765,
-0.0022354614920914173,
0.02295987494289875,
-0.022824399173259735,
0.015829022973775864,
0.02368852123618126,
-0.05010299012064934,
-0.04058993235230446,
-0.019140614196658134,
-0.00004557497595669702,
-0.017742929980158806,
0.032848890870809555,
-0.021270819008350372,
0.02994401939213276,
0.01838010363280773,
-0.0006236765184439719,
-0.05129602178931236,
0.012116176076233387,
0.024842096492648125,
-0.04110046103596687,
-0.03730962052941322,
0.026979267597198486,
0.006839324254542589,
-0.00758662773296237,
0.043397221714258194,
-0.0004126734274905175,
0.017726272344589233,
0.03164837136864662,
-0.012764371000230312,
0.017862869426608086,
-0.04343728721141815,
0.013522214256227016,
0.023448990657925606,
0.01724545657634735,
0.03801124542951584,
-0.009334244765341282,
0.027308357879519463,
0.03626452386379242,
0.030279679223895073,
-0.019105471670627594,
-0.01658797077834606,
-0.019436638802289963,
0.026909738779067993,
-0.046367011964321136,
0.021722322329878807,
0.013713236898183823,
-0.03634500131011009,
-0.0427556186914444,
-0.03499222174286842,
-0.03404708579182625,
0.06035744398832321,
-0.040681276470422745,
0.013147711753845215,
0.07087026536464691,
-0.01406526193022728,
-0.04293328523635864,
-0.07322283834218979,
-0.003793448442593217,
-0.017177637666463852,
0.023204386234283447,
0.026097014546394348,
-0.020854245871305466,
-0.012966267764568329,
-0.04479195550084114,
-0.07209362834692001,
0.042069271206855774,
0.016733787953853607,
-0.0265218336135149,
0.05684926360845566,
0.044709447771310806,
-0.02033144421875477,
-0.001032689935527742,
0.012756713666021824,
-0.05453413724899292,
0.027510423213243484,
0.008128181099891663,
0.006678481586277485,
0.03580469265580177,
0.024865634739398956,
-0.0021177707239985466,
-0.03605618327856064,
-0.060841694474220276,
-0.030363548547029495,
-0.021205902099609375,
-0.01925904117524624,
0.07993005961179733
] |
dccuchile/albert-base-spanish-finetuned-pos | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 5 | null | ---
tags:
- summarization
widget:
- text: "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
---
# CodeTrans model for code documentation generation ruby
Pretrained model on programming language ruby using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized ruby code functions: it works best with tokenized ruby functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the code documentation generation task for the ruby function/method.
## Intended uses & limitations
The model could be used to generate the description for the ruby function or be fine-tuned on other ruby code tasks. It can be used on unparsed and untokenized ruby code. However, if the ruby code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate ruby function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_ruby_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_code_documentation_generation_ruby_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "def add ( severity , progname , & block ) return true if io . nil? || severity < level message = format_message ( severity , progname , yield ) MUTEX . synchronize { io . write ( message ) } true end"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/function%20documentation%20generation/ruby/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 2,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing ruby code.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | Java | Go | Php | Ruby | JavaScript |
| -------------------- | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 17.31 | 16.65 | 16.89 | 23.05 | 9.19 | 13.7 |
| CodeTrans-ST-Base | 16.86 | 17.17 | 17.16 | 22.98 | 8.23 | 13.17 |
| CodeTrans-TF-Small | 19.93 | 19.48 | 18.88 | 25.35 | 13.15 | 17.23 |
| CodeTrans-TF-Base | 20.26 | 20.19 | 19.50 | 25.84 | 14.07 | 18.25 |
| CodeTrans-TF-Large | 20.35 | 20.06 | **19.54** | 26.18 | 14.94 | **18.98** |
| CodeTrans-MT-Small | 19.64 | 19.00 | 19.15 | 24.68 | 14.91 | 15.26 |
| CodeTrans-MT-Base | **20.39** | 21.22 | 19.43 | **26.23** | **15.26** | 16.11 |
| CodeTrans-MT-Large | 20.18 | **21.87** | 19.38 | 26.08 | 15.00 | 16.23 |
| CodeTrans-MT-TF-Small | 19.77 | 20.04 | 19.36 | 25.55 | 13.70 | 17.24 |
| CodeTrans-MT-TF-Base | 19.77 | 21.12 | 18.86 | 25.79 | 14.24 | 18.62 |
| CodeTrans-MT-TF-Large | 18.94 | 21.42 | 18.77 | 26.20 | 14.19 | 18.83 |
| State of the art | 19.06 | 17.65 | 18.07 | 25.16 | 12.16 | 14.90 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.006965332664549351,
-0.018370360136032104,
-0.00795790646225214,
0.021012719720602036,
0.04396709054708481,
0.036961935460567474,
-0.03825792297720909,
-0.00423626322299242,
-0.01719779521226883,
0.06480059027671814,
0.044470202177762985,
-0.0012456192634999752,
-0.007932176813483238,
0.04236243665218353,
-0.03232411667704582,
-0.0650019571185112,
-0.024002335965633392,
-0.02405615709722042,
-0.04044634476304054,
-0.010599865578114986,
0.01968647725880146,
-0.0020848377607762814,
0.006307052448391914,
-0.0074710180051624775,
0.004792855121195316,
0.011064697057008743,
-0.009048505686223507,
0.024376416578888893,
0.036458827555179596,
-0.07304994016885757,
-0.023218322545289993,
0.002901422791182995,
-0.03508542850613594,
-0.0062967343255877495,
-0.019711697474122047,
0.027781177312135696,
0.014481844380497932,
0.0398784801363945,
0.013352093286812305,
0.05446024611592293,
0.01740286499261856,
0.02101673185825348,
0.01782718300819397,
-0.0442020520567894,
0.05303260311484337,
0.0056862304918468,
-0.03357858583331108,
-0.021863361820578575,
0.021172942593693733,
-0.010074170306324959,
-0.05805768445134163,
-0.0664830282330513,
-0.01750710979104042,
0.05431722104549408,
-0.004796294029802084,
-0.005751644726842642,
-0.07254918664693832,
-0.023574475198984146,
0.0502903088927269,
-0.04422251135110855,
-0.02990599535405636,
0.0107137281447649,
-0.061779994517564774,
0.01890592649579048,
0.012656887993216515,
-0.002998222829774022,
0.007688123732805252,
-0.05007918179035187,
0.0273154117166996,
0.00018849543994292617,
0.05825398862361908,
-0.01978137716650963,
0.02884180098772049,
-0.10939641296863556,
0.013392929919064045,
-0.004897317383438349,
0.02113146334886551,
0.011027118191123009,
-0.004577574320137501,
0.05218726769089699,
-0.013947450555860996,
0.0037019681185483932,
0.050919584929943085,
0.00950508750975132,
-0.004134916700422764,
0.03329106792807579,
-0.032223910093307495,
-0.010757037438452244,
-0.022826742380857468,
0.06128846853971481,
-0.05999899283051491,
-0.0628853291273117,
-0.021437862887978554,
-0.020141635090112686,
-0.03896888345479965,
0.027330638840794563,
0.050052449107170105,
-0.024070950224995613,
0.02017877623438835,
0.00407137768343091,
0.036398399621248245,
0.05536967143416405,
-0.005611001048237085,
0.03349830582737923,
0.026218077167868614,
0.016078952699899673,
-0.02118726260960102,
-0.03912214934825897,
-0.03163302689790726,
0.04994316026568413,
0.0051614646799862385,
-0.03385389596223831,
-0.0465509258210659,
0.017150985077023506,
0.013880305923521519,
-0.051074717193841934,
0.04258454963564873,
-0.021710248664021492,
-0.050203271210193634,
-0.04002655670046806,
0.0462455153465271,
-0.011546219699084759,
-0.022940093651413918,
0.030588341876864433,
-0.044705796986818314,
0.009962385520339012,
-0.06248192489147186,
-0.041200362145900726,
0.005688048433512449,
0.021885236725211143,
-0.017564622685313225,
0.10129356384277344,
0.011861027218401432,
-0.03891340270638466,
0.000594085140619427,
0.025510894134640694,
-0.0720551535487175,
0.06710489094257355,
0.032977860420942307,
0.10756289213895798,
-0.05967753753066063,
-0.042849138379096985,
0.03203737735748291,
0.009989874437451363,
-0.012484937906265259,
0.02924937754869461,
-0.013778789900243282,
-0.0781136155128479,
-0.024169350042939186,
0.006447456311434507,
0.0595775805413723,
-0.04830930009484291,
-0.028888558968901634,
0.018803153187036514,
0.012956907972693443,
0.02036621794104576,
-0.03104493021965027,
-0.00450846366584301,
-0.0038926727138459682,
-0.03222334757447243,
-0.07236817479133606,
0.032800301909446716,
-0.008442156948149204,
-0.024465173482894897,
-0.0228660237044096,
-0.04406041279435158,
0.006577542517334223,
0.10277470201253891,
0.013683343306183815,
-0.01168183796107769,
-0.038431912660598755,
0.016375161707401276,
0.03713532164692879,
0.05062992125749588,
-0.021327046677470207,
0.024049922823905945,
0.03461463749408722,
0.06854065507650375,
-0.03938787057995796,
0.0761328637599945,
-0.021528616547584534,
-0.05039342865347862,
-0.026666566729545593,
0.02474752627313137,
-0.012779727578163147,
-0.04297317564487457,
-0.0016860869945958257,
0.018546322360634804,
-0.01228681392967701,
-0.006684352643787861,
-0.01239133719354868,
0.049395665526390076,
0.014230318367481232,
-0.01418654341250658,
-0.026876917108893394,
0.017775895074009895,
-0.004489011596888304,
0.06171324849128723,
-0.035347361117601395,
-0.01269423495978117,
-0.02208995819091797,
-0.02935316413640976,
0.0028489064425230026,
0.02203448861837387,
0.03924037888646126,
0.03416718170046806,
-0.011951964348554611,
0.10378770530223846,
-0.04375540837645531,
0.007587401196360588,
-0.04863150417804718,
-0.042240019887685776,
0.014398892410099506,
0.03281048685312271,
0.03502550721168518,
0.022617150098085403,
0.009858784265816212,
-0.026895226910710335,
0.014950028620660305,
0.08176784217357635,
0.043503910303115845,
0.034592147916555405,
-0.010881823487579823,
-0.023987825959920883,
0.03886987641453743,
0.05804036557674408,
-0.0320759117603302,
-0.038084667176008224,
0.045508384704589844,
0.024442048743367195,
-0.018926698714494705,
0.02341277152299881,
-0.005305373575538397,
0.0005445331917144358,
-0.05144469439983368,
-0.06509251147508621,
0.041441552340984344,
0.013444449752569199,
0.006766629405319691,
0.03709905967116356,
0.003550915513187647,
0.0005155495018698275,
0.03556273505091667,
0.0014894506894052029,
0.0055174450390040874,
-0.06537975370883942,
0.0043063778430223465,
0.0012609539553523064,
0.058324262499809265,
-0.03146269917488098,
0.03582918643951416,
0.013552212156355381,
-0.0032252876553684473,
0.05619446188211441,
-0.026153232902288437,
0.029741274192929268,
0.03274992108345032,
0.025384025648236275,
-0.021845504641532898,
0.0178885068744421,
0.020423905923962593,
0.025570731610059738,
0.08885299414396286,
0.00773510430008173,
0.06455038487911224,
-0.0011113681830465794,
0.0573798269033432,
0.06552999466657639,
0.023629220202565193,
0.002722423756495118,
0.023810571059584618,
0.0572802796959877,
-0.0077430615201592445,
-0.014600105583667755,
0.06662075221538544,
-0.059037573635578156,
0.021956151351332664,
-0.04545212909579277,
0.027934160083532333,
-0.011984847486019135,
-0.02861814573407173,
0.03533569350838661,
0.009936423972249031,
-0.04298483580350876,
0.007747123949229717,
-0.02355819381773472,
-0.02880377322435379,
0.01195450872182846,
0.001399634056724608,
-0.019965412095189095,
0.012177214957773685,
-0.024678373709321022,
0.020686151459813118,
-0.0776432678103447,
-0.04489663243293762,
-0.009997541084885597,
-0.038416385650634766,
0.015551476739346981,
-0.07690685242414474,
-0.061838679015636444,
-0.06630769371986389,
-0.015416529029607773,
0.04064732417464256,
0.007541778963059187,
-0.01074526458978653,
-0.026153793558478355,
0.005528833717107773,
-0.028304213657975197,
-0.023761894553899765,
-0.05984453856945038,
-0.06713991612195969,
-0.013381578028202057,
-0.06078467145562172,
0.034565553069114685,
-0.01983620785176754,
0.03169126436114311,
0.008774783462285995,
-0.018745560199022293,
-0.028533935546875,
-0.021126272156834602,
0.06217877194285393,
0.004136802162975073,
-0.006051668897271156,
-0.023594742640852928,
0.006389714777469635,
-0.022629857063293457,
0.045052576810121536,
0.008563844487071037,
-0.046447597444057465,
0.10629540681838989,
0.05229916796088219,
0.04347875341773033,
-0.0020863860845565796,
-0.04309169575572014,
-0.052954547107219696,
-0.05249667167663574,
-0.024880332872271538,
-0.015087872743606567,
-0.03730302304029465,
-0.007566344924271107,
-0.05712221935391426,
-0.019878841936588287,
-0.0285944901406765,
-0.03542640805244446,
-0.012948650866746902,
0.02889420837163925,
0.022329779341816902,
0.03734888136386871,
0.05412204936146736,
0.023064469918608665,
-0.02327149175107479,
-0.02751723676919937,
0.030414734035730362,
0.004760752897709608,
0.0013150324812158942,
-0.08155915141105652,
-0.0250908974558115,
0.03008880838751793,
0.022240974009037018,
-0.006926041096448898,
-0.01601223275065422,
0.03346486762166023,
0.015906378626823425,
0.010708536952733994,
0.002415734576061368,
-0.012212330475449562,
-0.006056125275790691,
-0.015429099090397358,
-0.000998989213258028,
-0.03737824782729149,
-0.027202490717172623,
-0.0287199504673481,
-0.004648732952773571,
0.04311930388212204,
-0.059094320982694626,
-0.055289532989263535,
0.004075013101100922,
0.03060171566903591,
0.03606948256492615,
0.019791020080447197,
-0.02309534326195717,
0.011042186990380287,
-0.05641832575201988,
-0.041304755955934525,
0.043050367385149,
0.016840608790516853,
-0.013251672498881817,
0.03681737184524536,
0.04196231812238693,
-0.052180349826812744,
0.04103659838438034,
0.021634656935930252,
0.04059898480772972,
0.026497401297092438,
-0.032451752573251724,
0.015161555260419846,
-0.0483354777097702,
0.026668617501854897,
0.00587813276797533,
-0.03811454772949219,
-0.049684397876262665,
-0.08088050782680511,
-0.03086630441248417,
0.016232647001743317,
-0.023047083988785744,
0.010150148533284664,
0.05011456087231636,
-0.01787429302930832,
-0.046217549592256546,
-0.00731597188860178,
0.0035851418506354094,
0.06803940236568451,
-0.030417269095778465,
0.03063080832362175,
0.008006626740098,
0.06783023476600647,
-0.04308505728840828,
0.003919536247849464,
-0.02958648093044758,
-0.02600591443479061,
0.009781653061509132,
0.059027962386608124,
0.020795753225684166,
0.06496578454971313,
0.07337296009063721,
0.012706407345831394,
-0.03698652610182762,
0.03707905858755112,
0.056980740278959274,
0.00243766070343554,
-0.014775027520954609,
-0.0020225432235747576,
0.0013465700903907418,
-0.023096434772014618,
0.01572510227560997,
-0.006533019244670868,
0.02200109325349331,
0.025258781388401985,
-0.008060211315751076,
0.009342338889837265,
-0.00450410321354866,
-0.0392257422208786,
-0.055544815957546234,
-0.04345940425992012,
0.0033117663115262985,
-0.04395702853798866,
-0.05925591662526131,
0.02853209339082241,
0.04576575383543968,
0.024093009531497955,
0.05239180475473404,
0.042837902903556824,
-0.03653060272336006,
-0.035105522722005844,
0.04478970170021057,
0.04671682417392731,
-0.04400718957185745,
-0.03704090788960457,
-0.054469309747219086,
0.02635415457189083,
0.05011700466275215,
-0.024649590253829956,
-0.08914189785718918,
0.012038846500217915,
0.029595427215099335,
-0.02550152689218521,
0.06858214735984802,
0.025461729615926743,
0.0154726542532444,
0.0480179563164711,
-0.007648171856999397,
0.027477258816361427,
-0.024042228236794472,
0.030177028849720955,
-0.0019363226601853967,
0.04295126721262932,
-0.009377471171319485,
-0.01965053752064705,
-0.03311346098780632,
0.02494763769209385,
-0.0012294914340600371,
0.03902674466371536,
0.03211589530110359,
-0.011876032687723637,
-0.06795761734247208,
0.0007011754787527025,
0.027093980461359024,
-0.03739234805107117,
0.016467688605189323,
0.027576830238103867,
0.0518607534468174,
-0.041243281215429306,
-0.023998064920306206,
-0.023820767179131508,
-0.007957945577800274,
0.036913201212882996,
-0.002719622105360031,
-0.01768483966588974,
-0.0679750144481659,
0.013386079110205173,
-0.025238122791051865,
-0.02722342684864998,
-0.09946244210004807,
0.0439816452562809,
0.00686371186748147,
-0.007623704150319099,
0.045432403683662415,
0.028043104335665703,
0.01801132969558239,
0.032715290784835815,
-0.016079910099506378,
0.03189966827630997,
-0.03296477347612381,
0.01802215911448002,
-0.0068871574476361275,
-0.024013174697756767,
-0.01457004714757204,
-0.06514346599578857,
-0.030656689777970314,
-0.03243457153439522,
-0.035759177058935165,
-0.05232652649283409,
-0.018822718411684036,
0.009051108732819557,
-0.011139615438878536,
-0.015067883767187595,
-0.010202893987298012,
0.01205003634095192,
-0.0143563412129879,
-0.011749169789254665,
-0.02117830701172352,
-0.04895070567727089,
-0.1026342436671257,
-0.025437192991375923,
0.009451473131775856,
0.04893191531300545,
0.02970379777252674,
0.0015825394075363874,
0.004702563863247633,
0.036374736577272415,
-0.005945188924670219,
-0.013348370790481567,
0.014976805076003075,
0.00989560130983591,
-0.02806904911994934,
-0.039700835943222046,
0.002540349727496505,
0.01570744812488556,
0.005010566674172878,
-0.024636756628751755,
0.016398070380091667,
0.04447402432560921,
-0.026283366605639458,
-0.0009468057542107999,
0.029381778091192245,
-0.005390029400587082,
-0.07990167289972305,
-0.0399906188249588,
-0.008378787897527218,
-0.04235774278640747,
0.03772668540477753,
0.004421382211148739,
-0.021441271528601646,
-0.02133426070213318,
-0.006171131040900946,
0.03033241257071495,
-0.005280110519379377,
-0.029632769525051117,
0.006688131019473076,
-0.02974396012723446,
0.042774803936481476,
-0.05192255228757858,
0.06094515323638916,
-0.03899060934782028,
-0.012812266126275063,
-0.013861572369933128,
-0.004251157399266958,
-0.039700571447610855,
0.06071442365646362,
-0.009457079693675041,
0.0028633426409214735,
-0.009762507863342762,
0.007854734547436237,
-0.0205733273178339,
0.036267269402742386,
0.002053758129477501,
0.010122386738657951,
-0.02788393944501877,
0.012814930640161037,
-0.04226580262184143,
-0.0017635354306548834,
-0.030218247324228287,
-0.018441392108798027,
-0.011373596265912056,
-0.024778997525572777,
-0.014429722912609577,
-0.05936175212264061,
0.044270675629377365,
0.027769871056079865,
0.02752339467406273,
0.01444336213171482,
-0.01699458435177803,
-0.01376332063227892,
0.028221458196640015,
-0.08264336735010147,
-0.043553102761507034,
-0.031109293922781944,
0.0018883211305364966,
-0.013524199835956097,
0.06672608852386475,
0.05093320086598396,
-0.04512949660420418,
-0.017026709392666817,
0.013475238345563412,
0.016027096658945084,
0.011965298093855381,
0.029698576778173447,
0.022626977413892746,
0.05801676586270332,
0.05902880057692528,
-0.041991036385297775,
-0.009002182632684708,
-0.0006881465669721365,
-0.008009083569049835,
-0.019522469490766525,
-0.011108228005468845,
0.00877692736685276,
-0.017430949956178665,
-0.05380580201745033,
-0.024208324030041695,
0.06344828009605408,
0.04975193366408348,
0.017611341550946236,
0.0056602549739181995,
-0.03546275943517685,
0.026140710338950157,
0.006773974746465683,
-0.05223404988646507,
-0.029646994546055794,
0.01994956098496914,
-0.056894443929195404,
0.07178431004285812,
-0.01057190727442503,
0.011844366788864136,
0.01865158975124359,
0.030780164524912834,
0.010348969139158726,
0.03786436468362808,
-0.035072967410087585,
-0.018349826335906982,
0.03671373799443245,
-0.04893017187714577,
-0.006555586121976376,
-0.008671705611050129,
0.05675886571407318,
-0.04861586540937424,
0.04110882803797722,
0.020661259070038795,
0.031543996185064316,
-0.00924932025372982,
-0.016609398648142815,
-0.0497000478208065,
0.041990723460912704,
-0.0535942018032074,
0.06555376201868057,
-0.020115531980991364,
-0.08304326981306076,
0.08275087177753448,
0.03174693509936333,
-0.09941384196281433,
0.0007534052128903568,
0.04212982952594757,
0.02210112288594246,
0.03347655013203621,
0.046673767268657684,
-0.07802456617355347,
0.009746205992996693,
-0.05072151497006416,
0.015701523050665855,
-0.06668148189783096,
-0.004414125811308622,
0.034668974578380585,
-0.061363205313682556,
-0.00220230664126575,
0.02458788827061653,
-0.021322030574083328,
0.011654011905193329,
0.019413288682699203,
-0.048343706876039505,
-0.04453068971633911,
-0.020938057452440262,
-0.0008677066653035581,
-0.019757390022277832,
0.03381216898560524,
-0.0222936999052763,
0.032124169170856476,
0.014687447808682919,
-0.002872742712497711,
-0.04513894021511078,
0.011690348386764526,
0.024781489744782448,
-0.0363759770989418,
-0.03360552713274956,
0.026778947561979294,
0.010539228096604347,
-0.006634933408349752,
0.03628375753760338,
-0.008255084045231342,
0.016197428107261658,
0.03227593004703522,
-0.018216585740447044,
0.01607491448521614,
-0.043625522404909134,
0.010222873650491238,
0.0212519820779562,
0.015349834226071835,
0.036863405257463455,
-0.010910028591752052,
0.026727354153990746,
0.03422176092863083,
0.0321531817317009,
-0.016038574278354645,
-0.013908149674534798,
-0.0178047027438879,
0.023837121203541756,
-0.04452136904001236,
0.01756155677139759,
0.01761620305478573,
-0.04165680333971977,
-0.03920406848192215,
-0.03605996072292328,
-0.03677127882838249,
0.059226199984550476,
-0.04256376251578331,
0.01108590792864561,
0.06638574600219727,
-0.015192374587059021,
-0.049875058233737946,
-0.0725281685590744,
-0.005405684933066368,
-0.013283712789416313,
0.02061920054256916,
0.027726955711841583,
-0.02537406235933304,
-0.012370588257908821,
-0.04835483431816101,
-0.07346906512975693,
0.038966886699199677,
0.012139794416725636,
-0.02063106559216976,
0.053722891956567764,
0.04347788542509079,
-0.02086634933948517,
0.0016575001645833254,
0.018876230344176292,
-0.05154552683234215,
0.030669178813695908,
0.010262795723974705,
0.009008469060063362,
0.036867205053567886,
0.02738344483077526,
0.0008679535239934921,
-0.03864290565252304,
-0.05847880616784096,
-0.028620896860957146,
-0.028846710920333862,
-0.016173608601093292,
0.07888590544462204
] |
dccuchile/albert-base-spanish-finetuned-xnli | [
"pytorch",
"albert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"AlbertForSequenceClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 28 | null | ---
tags:
- summarization
widget:
- text: "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
---
# CodeTrans model for git commit message generation
Pretrained model on git commit using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized git commit: it works best with tokenized git commit.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on Git Commit Message Generation dataset.
## Intended uses & limitations
The model could be used to generate the git commit message for the git commit changes or be fine-tuned on other relevant tasks. It can be used on unparsed and untokenized commit changes. However, if the change is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate git commit message using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_commit_generation"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_commit_generation", skip_special_tokens=True),
device=0
)
tokenized_code = "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/commit%20generation/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the git commit message generation task, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 39.61 |
| CodeTrans-ST-Base | 38.67 |
| CodeTrans-TF-Small | 44.22 |
| CodeTrans-TF-Base | 44.17 |
| CodeTrans-TF-Large | **44.41** |
| CodeTrans-MT-Small | 36.17 |
| CodeTrans-MT-Base | 39.25 |
| CodeTrans-MT-Large | 41.18 |
| CodeTrans-MT-TF-Small | 43.96 |
| CodeTrans-MT-TF-Base | 44.19 |
| CodeTrans-MT-TF-Large | 44.34 |
| State of the art | 32.81 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.010224456898868084,
-0.024315789341926575,
-0.004510985687375069,
0.019516265019774437,
0.04053143784403801,
0.03787125274538994,
-0.01671719364821911,
0.0051528336480259895,
-0.028584113344550133,
0.07813036441802979,
0.04034065082669258,
-0.00229119835421443,
0.005411557387560606,
0.04533679410815239,
-0.004601906519383192,
-0.05506236478686333,
-0.028182750567793846,
-0.022069960832595825,
-0.042994849383831024,
-0.015408155508339405,
0.012045529671013355,
-0.012771773152053356,
0.011759515851736069,
-0.003107778960838914,
-0.003602544544264674,
0.0131385438144207,
-0.004802256356924772,
0.017616018652915955,
0.019244059920310974,
-0.07408231496810913,
-0.009662354364991188,
-0.01346635352820158,
-0.04545658454298973,
-0.000473057443741709,
-0.019624309614300728,
0.033240679651498795,
0.02931181527674198,
0.011652031913399696,
0.010918810963630676,
0.055521558970212936,
0.029008297249674797,
0.014254146255552769,
0.010396973229944706,
-0.05028654262423515,
0.060244347900152206,
-0.0001485874381614849,
-0.025147493928670883,
-0.027324235066771507,
0.023006998002529144,
-0.011062363162636757,
-0.07428604364395142,
-0.052732352167367935,
-0.06195133179426193,
0.030643867328763008,
-0.0051458245143294334,
-0.016469959169626236,
-0.07090379297733307,
-0.026465052738785744,
0.05812820792198181,
-0.06161845102906227,
-0.03293502703309059,
0.029705710709095,
-0.049709755927324295,
0.022256305441260338,
0.02540801279246807,
-0.021384596824645996,
-0.002103799721226096,
-0.03183695301413536,
0.02769540622830391,
-0.006841664668172598,
0.03949826955795288,
-0.02206154726445675,
0.03985745832324028,
-0.087895967066288,
-0.010060477070510387,
-0.015976330265402794,
0.02452496625483036,
0.01952972449362278,
-0.00802858266979456,
0.04841218516230583,
0.013581646606326103,
-0.006857403554022312,
0.041608747094869614,
0.022698311135172844,
0.009083445183932781,
0.02789848856627941,
-0.054155848920345306,
-0.00506195705384016,
-0.03379874303936958,
0.05434297397732735,
-0.05431855842471123,
-0.038265809416770935,
-0.0341385118663311,
-0.03311972692608833,
-0.050071801990270615,
0.015206480398774147,
0.053975481539964676,
-0.0005902081611566246,
0.030088309198617935,
0.024510130286216736,
0.03897727280855179,
0.07168299704790115,
-0.00047361638280563056,
0.03532155603170395,
0.019710268825292587,
0.025839732959866524,
-0.02335551381111145,
-0.03423153609037399,
-0.04766437038779259,
0.044902391731739044,
0.018600236624479294,
-0.01723628304898739,
-0.04557464271783829,
0.025660540908575058,
0.030109357088804245,
-0.02969699166715145,
0.02272920124232769,
-0.010056269355118275,
-0.041379623115062714,
-0.03504632040858269,
0.062360264360904694,
0.005955840460956097,
-0.01408127136528492,
0.02523089572787285,
-0.03824585676193237,
0.010979940183460712,
-0.04305068403482437,
-0.022290825843811035,
0.002885844325646758,
0.028781933709979057,
0.004550653509795666,
0.07915981858968735,
0.006450588349252939,
-0.033681720495224,
0.030261779204010963,
0.009903010912239552,
-0.0710999071598053,
0.05298444628715515,
0.05278478562831879,
0.0815514549612999,
-0.05371750518679619,
-0.062355320900678635,
-0.0006538120796903968,
0.0006305630085989833,
-0.00630242470651865,
0.024905100464820862,
-0.00010096700134454295,
-0.06656821072101593,
-0.02370535396039486,
-0.009866449981927872,
0.06025431305170059,
-0.044037554413080215,
-0.02513602003455162,
0.019919248297810555,
0.0018418297404423356,
0.004482584074139595,
-0.04256003722548485,
-0.0000015680595879530301,
0.01508550625294447,
-0.032100386917591095,
-0.05307215824723244,
0.016923105344176292,
-0.006758787203580141,
-0.041406162083148956,
-0.017440825700759888,
-0.03863862156867981,
0.015458866022527218,
0.07300172001123428,
0.005244829226285219,
-0.020928962156176567,
-0.039786215871572495,
0.0029577838722616434,
0.01935204677283764,
0.03777553141117096,
-0.01894397661089897,
0.025855235755443573,
0.05870036035776138,
0.05966978520154953,
-0.01612616516649723,
0.05145353078842163,
-0.0011115280212834477,
-0.03084886074066162,
-0.021183624863624573,
-0.002411616500467062,
-0.019301602616906166,
-0.03433654084801674,
0.0125028807669878,
0.028858089819550514,
-0.031164901331067085,
-0.030079282820224762,
-0.00772554986178875,
0.06287577748298645,
0.01803179271519184,
0.0015993831912055612,
-0.023904863744974136,
-0.0075325616635382175,
-0.0013937692856416106,
0.051061637699604034,
-0.027817320078611374,
-0.019946308806538582,
-0.03417963907122612,
-0.03153397887945175,
-0.004555745515972376,
0.014067823067307472,
0.040264151990413666,
0.0259617380797863,
-0.025393037125468254,
0.08652414381504059,
-0.05304589122533798,
0.006090495269745588,
-0.04212591424584389,
-0.05774156376719475,
0.0004203871067147702,
0.037191975861787796,
-0.006756930612027645,
0.05057978630065918,
0.0021731730084866285,
0.005593182984739542,
0.011801007203757763,
0.061317723244428635,
0.00670954305678606,
0.020913850516080856,
-0.009623403660953045,
-0.021336521953344345,
0.026590732857584953,
0.0618804395198822,
-0.042403459548950195,
-0.048580847680568695,
0.04587554931640625,
0.052560292184352875,
-0.013822161592543125,
0.023768175393342972,
-0.012864172458648682,
0.013988506980240345,
-0.03896208107471466,
-0.051546599715948105,
0.038636837154626846,
0.02073654718697071,
-0.00198808079585433,
0.0291378702968359,
-0.006034263409674168,
-0.010974469594657421,
0.03442622721195221,
0.002248370088636875,
-0.001665886607952416,
-0.05705106630921364,
0.02177698165178299,
0.013851386494934559,
0.06723207235336304,
-0.027276240289211273,
0.0327143520116806,
0.015826907008886337,
0.015819180756807327,
0.05937900394201279,
-0.030827531591057777,
0.020730504766106606,
0.031722187995910645,
0.016680002212524414,
-0.009149200282990932,
0.006026502698659897,
0.01678447239100933,
0.018392445519566536,
0.07591522485017776,
0.003399049397557974,
0.0894923135638237,
0.0032217756379395723,
0.04180116206407547,
0.08269675821065903,
0.03274601325392723,
0.02380242757499218,
0.03877478465437889,
0.058546002954244614,
0.012059589847922325,
-0.0127639789134264,
0.07576640695333481,
-0.05713947117328644,
0.04290715605020523,
-0.03175795078277588,
0.03214927017688751,
0.00017178848793264478,
-0.014158277772367,
0.029039671644568443,
0.007299807853996754,
-0.035051897168159485,
0.004653639625757933,
-0.018232669681310654,
-0.02998242899775505,
0.018520798534154892,
-0.009252815507352352,
-0.027603119611740112,
0.0390532948076725,
-0.03159887716174126,
0.021341359242796898,
-0.07774562388658524,
-0.05050397291779518,
-0.006728520616889,
-0.038719967007637024,
0.006875761318951845,
-0.08707498759031296,
-0.058098796755075455,
-0.06821746379137039,
-0.02213730663061142,
0.038239143788814545,
0.009237262420356274,
0.0014641144080087543,
-0.004044358152896166,
0.010629353113472462,
-0.03187600150704384,
-0.022999251261353493,
-0.05734226852655411,
-0.055525731295347214,
-0.02462881989777088,
-0.09020771086215973,
0.021654939278960228,
0.0011506659211590886,
0.02632816508412361,
-0.0190729983150959,
0.00026581669226288795,
-0.040767934173345566,
-0.02550145983695984,
0.06757818907499313,
0.003839022945612669,
-0.00970060471445322,
-0.01500533428043127,
0.027200475335121155,
-0.040376219898462296,
0.01766156405210495,
-0.013777964748442173,
-0.042160261422395706,
0.09201154857873917,
0.059966739267110825,
0.03791545331478119,
-0.006297035608440638,
-0.04586639627814293,
-0.04526086151599884,
-0.05187126249074936,
-0.030806349590420723,
-0.030211463570594788,
-0.048058487474918365,
-0.017011728137731552,
-0.0511261411011219,
-0.02628626674413681,
-0.03606364503502846,
-0.03731942176818848,
-0.012628848664462566,
0.029092496261000633,
0.046562839299440384,
0.03858691826462746,
0.07148826867341995,
0.02975267730653286,
-0.03906694054603577,
-0.019163383170962334,
0.04483106732368469,
-0.0011984932934865355,
0.010157723911106586,
-0.07935743778944016,
-0.042515501379966736,
0.04607381299138069,
0.004671682603657246,
0.003080981085076928,
-0.00790367554873228,
0.062584288418293,
0.03138147294521332,
0.006067811977118254,
0.028714537620544434,
0.018661685287952423,
-0.007691434118896723,
-0.01592085137963295,
-0.009602496400475502,
-0.023853378370404243,
-0.029204264283180237,
-0.023521294817328453,
-0.030298711732029915,
0.03393983468413353,
-0.06634218245744705,
-0.054810550063848495,
-0.004468376748263836,
0.041216976940631866,
0.016576582565903664,
0.009570607915520668,
-0.0254795104265213,
-0.025319306179881096,
-0.04114517942070961,
-0.024860283359885216,
0.03548511862754822,
0.004699592012912035,
0.0009974746499210596,
0.0464676097035408,
0.025008566677570343,
-0.04158554971218109,
0.026288572698831558,
0.03210057318210602,
0.04502743482589722,
0.011217902414500713,
-0.03234405070543289,
0.023491380736231804,
-0.04636499285697937,
0.01737336255609989,
0.013846119865775108,
-0.03260597214102745,
-0.04960474371910095,
-0.08031769096851349,
-0.025788718834519386,
0.019923316314816475,
-0.028127742931246758,
0.0000367636421287898,
0.044629812240600586,
-0.036754999309778214,
-0.03250224515795708,
-0.012952102348208427,
0.02358054928481579,
0.06083274260163307,
-0.03434181213378906,
0.027648068964481354,
-0.008139325305819511,
0.06653665006160736,
-0.06511581689119339,
-0.007582963444292545,
-0.02040966786444187,
-0.020748671144247055,
0.006098321173340082,
0.04191289842128754,
0.011433468200266361,
0.05044251307845116,
0.05251621454954147,
0.04358282312750816,
-0.03849327936768532,
0.032470572739839554,
0.05834507942199707,
-0.0047271461226046085,
-0.03271755576133728,
0.012801737524569035,
0.017407508566975594,
-0.035892993211746216,
0.003395435167476535,
-0.0026721651665866375,
0.012560844421386719,
0.02834978885948658,
-0.01179233007133007,
0.012278060428798199,
0.014470329508185387,
-0.03943299874663353,
-0.05165461078286171,
-0.06075713038444519,
-0.01318072248250246,
-0.021188173443078995,
-0.04406587406992912,
0.017868511378765106,
0.04986405000090599,
0.013075842522084713,
0.05704601854085922,
0.04430821165442467,
-0.04055923596024513,
-0.044652536511421204,
0.04697536304593086,
0.06344316899776459,
-0.04436427727341652,
-0.0668337494134903,
-0.05149698257446289,
0.029345756396651268,
0.04356018826365471,
-0.029236948117613792,
-0.09460926055908203,
0.029577845707535744,
0.06116268038749695,
-0.019470088183879852,
0.07453899085521698,
0.01332553755491972,
0.04212098941206932,
0.0636860802769661,
-0.0184708870947361,
0.020112771540880203,
-0.017025334760546684,
-0.002930703340098262,
-0.02143986150622368,
0.03567318618297577,
-0.0379912443459034,
-0.029693949967622757,
-0.04605869948863983,
0.02624676749110222,
0.01409961935132742,
0.04309451952576637,
0.0374835766851902,
-0.004870719742029905,
-0.0717998668551445,
0.006436921656131744,
0.03218294307589531,
-0.03819809854030609,
0.013492187485098839,
0.019924551248550415,
0.04904864728450775,
-0.03998931124806404,
-0.01157977432012558,
-0.024355784058570862,
-0.0031344895251095295,
0.04407734051346779,
-0.019021129235625267,
-0.023926405236124992,
-0.0325208455324173,
0.020069558173418045,
-0.0017011595191434026,
-0.036057889461517334,
-0.07528787106275558,
0.05197540298104286,
0.002378403441980481,
-0.000908173096831888,
0.04568919911980629,
0.03631134703755379,
0.021127091720700264,
0.0487239845097065,
0.0007446064264513552,
0.01751011423766613,
-0.03461496904492378,
0.021024323999881744,
-0.022929692640900612,
-0.028189994394779205,
-0.011301528662443161,
-0.07523717731237411,
-0.02794705703854561,
-0.039764273911714554,
-0.04171634092926979,
-0.034287866204977036,
-0.02954891510307789,
0.013973006047308445,
-0.009430402889847755,
0.0009072423563338816,
0.010503903962671757,
0.013500223867595196,
-0.04539455845952034,
-0.032041627913713455,
-0.042891569435596466,
-0.04991168528795242,
-0.11606888473033905,
-0.037618618458509445,
-0.0029911177698522806,
0.051578521728515625,
0.017962472513318062,
0.004661438055336475,
0.002972619142383337,
0.011460424400866032,
0.011812284588813782,
-0.022350363433361053,
0.01505351159721613,
0.014980432577431202,
-0.05222172662615776,
-0.040352605283260345,
0.007178750354796648,
0.026586752384901047,
0.02797839604318142,
-0.017720362171530724,
0.014166153036057949,
0.027014806866645813,
-0.025408165529370308,
-0.0010812946129590273,
0.031875286251306534,
-0.0006665732944384217,
-0.07859321683645248,
-0.045171674340963364,
0.0041697160340845585,
-0.054919201880693436,
0.03419136255979538,
-0.018720369786024094,
-0.025782449170947075,
-0.004381612408906221,
0.028756864368915558,
0.016282547265291214,
-0.028959600254893303,
-0.022316543385386467,
0.0068031735718250275,
-0.039873577654361725,
0.03893774747848511,
-0.05005072429776192,
0.04004013165831566,
-0.03901665657758713,
-0.0022353269159793854,
-0.016089007258415222,
-0.011409154161810875,
-0.029339101165533066,
0.07941632717847824,
0.00018821432604454458,
0.00819326750934124,
-0.01983026973903179,
0.025075217708945274,
-0.022668123245239258,
0.03830365464091301,
0.013066229410469532,
0.014624886214733124,
-0.032029151916503906,
0.01672017015516758,
-0.05681901052594185,
0.007019469048827887,
-0.019890470430254936,
-0.02565937116742134,
-0.004301882348954678,
-0.035163212567567825,
-0.006576702930033207,
-0.05870042368769646,
0.046344857662916183,
0.03551490232348442,
0.022240763530135155,
0.02238481678068638,
-0.024628594517707825,
-0.005393661092966795,
0.018446240574121475,
-0.06712982803583145,
-0.027896638959646225,
-0.016344813629984856,
0.014198940247297287,
-0.02403363399207592,
0.04973970726132393,
0.05929683521389961,
-0.03913191705942154,
-0.04292740672826767,
0.02357308380305767,
0.004132353700697422,
0.011513832956552505,
0.011207790113985538,
0.02266416884958744,
0.05957011878490448,
0.040949203073978424,
-0.03315877169370651,
0.0011488451855257154,
-0.005064049270004034,
-0.03229652717709541,
-0.00362360174767673,
-0.0175037682056427,
0.03082280047237873,
-0.004137379117310047,
-0.04235638305544853,
-0.02864851802587509,
0.06829608231782913,
0.0225075650960207,
0.02586694061756134,
0.004623680841177702,
-0.03231366351246834,
0.04215150699019432,
0.0011840277584269643,
-0.05508093535900116,
-0.018021786585450172,
0.024752866476774216,
-0.043328866362571716,
0.08838789165019989,
-0.013276254758238792,
0.017659543082118034,
0.033990636467933655,
0.00008681970939505845,
0.014638504013419151,
0.04340638592839241,
-0.04913162440061569,
-0.002712380373850465,
0.057933952659368515,
-0.044043805450201035,
0.004117592703551054,
-0.02375490963459015,
0.05160573497414589,
-0.057212114334106445,
0.06058385968208313,
0.015597663819789886,
0.03797191381454468,
-0.004016363527625799,
-0.013065512292087078,
-0.07081468403339386,
0.03806120529770851,
-0.06102423742413521,
0.07119015604257584,
-0.012350340373814106,
-0.07112689316272736,
0.08642805367708206,
0.026528770104050636,
-0.09627270698547363,
0.022527769207954407,
0.02538786455988884,
0.020559661090373993,
0.012824740260839462,
0.04880524054169655,
-0.05713212117552757,
0.0006461829179897904,
-0.04182900860905647,
0.02489784173667431,
-0.06468117237091064,
-0.013558362610638142,
0.009243047796189785,
-0.02727927640080452,
-0.010323591530323029,
0.04116307944059372,
0.0013745881151407957,
0.012839487753808498,
0.026190049946308136,
-0.06705830991268158,
-0.043282926082611084,
-0.022889137268066406,
0.025135410949587822,
-0.043374430388212204,
0.03885550796985626,
-0.005073685199022293,
0.04076313599944115,
0.012057365849614143,
0.000015360146790044382,
-0.036705199629068375,
0.008389730006456375,
0.03500910848379135,
-0.04561198502779007,
-0.02545558288693428,
0.030588069930672646,
0.00784800574183464,
-0.01063508726656437,
0.044249482452869415,
-0.00764645216986537,
0.03772617504000664,
0.042597535997629166,
-0.012513675726950169,
0.02053689770400524,
-0.04762539267539978,
-0.0029768459498882294,
0.010456561110913754,
0.02307824231684208,
0.02064462937414646,
-0.007637304253876209,
0.014172826893627644,
0.03767986223101616,
0.018492456525564194,
-0.016085300594568253,
-0.013396410271525383,
-0.03157568722963333,
0.016554730013012886,
-0.04866977781057358,
0.020119791850447655,
0.02168009988963604,
-0.02788284420967102,
-0.039614055305719376,
-0.039692945778369904,
-0.006970117799937725,
0.046428583562374115,
-0.04695428907871246,
-0.0029455209150910378,
0.06527230143547058,
-0.02847042866051197,
-0.06629236042499542,
-0.06050286814570427,
-0.009368767961859703,
-0.028094066306948662,
0.02753819152712822,
0.03576252982020378,
-0.02314949594438076,
0.015665698796510696,
-0.027127722278237343,
-0.07552167773246765,
0.048974815756082535,
0.016651498153805733,
-0.025528347119688988,
0.0412120446562767,
0.05250530317425728,
-0.008135084062814713,
0.015831978991627693,
0.011152536608278751,
-0.05615781620144844,
0.015218134969472885,
0.004455548245459795,
0.017107315361499786,
0.024798674508929253,
0.05138572305440903,
-0.020208198577165604,
-0.020447013899683952,
-0.04571978375315666,
-0.02448280155658722,
-0.024123437702655792,
-0.017160477116703987,
0.06616772711277008
] |
dccuchile/albert-large-spanish-finetuned-ner | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 3 | null | ---
tags:
- summarization
widget:
- text: "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
---
# CodeTrans model for git commit message generation
Pretrained model on git commit using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized git commit: it works best with tokenized git commit.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the git commit message generation task for the java commit changes.
## Intended uses & limitations
The model could be used to generate the git commit message for the git commit changes or be fine-tuned on other relevant tasks. It can be used on unparsed and untokenized commit changes. However, if the change is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate git commit message using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_commit_generation_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_commit_generation_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "new file mode 100644 index 000000000 . . 892fda21b Binary files / dev / null and b / src / plugins / gateway / lib / joscar . jar differ"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/commit%20generation/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 8,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing commit changes.
## Evaluation results
For the git commit message generation task, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Java |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 39.61 |
| CodeTrans-ST-Base | 38.67 |
| CodeTrans-TF-Small | 44.22 |
| CodeTrans-TF-Base | 44.17 |
| CodeTrans-TF-Large | **44.41** |
| CodeTrans-MT-Small | 36.17 |
| CodeTrans-MT-Base | 39.25 |
| CodeTrans-MT-Large | 41.18 |
| CodeTrans-MT-TF-Small | 43.96 |
| CodeTrans-MT-TF-Base | 44.19 |
| CodeTrans-MT-TF-Large | 44.34 |
| State of the art | 32.81 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.00790529977530241,
-0.026195373386144638,
-0.003754864213988185,
0.015910064801573753,
0.03980492427945137,
0.03958907350897789,
-0.017881467938423157,
0.007165820803493261,
-0.02153857797384262,
0.07409680634737015,
0.041426800191402435,
0.00041552988113835454,
0.008164487779140472,
0.043640557676553726,
-0.007644725032150745,
-0.05622882395982742,
-0.026449941098690033,
-0.025491943582892418,
-0.03644340857863426,
-0.01701429858803749,
0.018998386338353157,
-0.01830015517771244,
0.011714351363480091,
-0.004681820515543222,
-0.0005052204360254109,
0.01210834365338087,
-0.00885593332350254,
0.02134964056313038,
0.021228963509202003,
-0.07619942724704742,
-0.013698113150894642,
-0.015905704349279404,
-0.04392761364579201,
-0.0034589467104524374,
-0.020810870453715324,
0.0361945815384388,
0.03423934057354927,
0.019147569313645363,
0.015431566163897514,
0.05243905633687973,
0.030582306906580925,
0.012237817980349064,
0.008908702060580254,
-0.05036544427275658,
0.05847378447651863,
0.0010590822203084826,
-0.02167036198079586,
-0.021919511258602142,
0.018551794812083244,
-0.013926361687481403,
-0.07078748941421509,
-0.05493013933300972,
-0.060711462050676346,
0.03533234819769859,
-0.002871754579246044,
-0.012060319073498249,
-0.06861644238233566,
-0.026103228330612183,
0.05389387160539627,
-0.06557269394397736,
-0.03638197109103203,
0.02805168740451336,
-0.049752213060855865,
0.020586201921105385,
0.023645754903554916,
-0.024935485795140266,
0.0006127646192908287,
-0.03259401023387909,
0.029877793043851852,
-0.0006695952033624053,
0.046101413667201996,
-0.019724547863006592,
0.03958604112267494,
-0.08562110364437103,
-0.009667748585343361,
-0.01817667856812477,
0.026919974014163017,
0.01913055032491684,
-0.009628723375499249,
0.04631008580327034,
0.006558479741215706,
-0.005176008213311434,
0.044544219970703125,
0.025437355041503906,
0.009176758117973804,
0.02612900733947754,
-0.051919396966695786,
-0.004560644738376141,
-0.03159259632229805,
0.05025216192007065,
-0.05128807947039604,
-0.040350500494241714,
-0.033945515751838684,
-0.02868783101439476,
-0.051318541169166565,
0.019101960584521294,
0.054143741726875305,
-0.0034963120706379414,
0.033924754709005356,
0.02183731459081173,
0.04026774689555168,
0.06922278553247452,
-0.0019707255996763706,
0.0359371118247509,
0.022819358855485916,
0.02672715298831463,
-0.026342283934354782,
-0.03203515708446503,
-0.049341533333063126,
0.049714673310518265,
0.01433970034122467,
-0.02238217554986477,
-0.044446103274822235,
0.027424281463027,
0.025313131511211395,
-0.029814500361680984,
0.02221134677529335,
-0.011891739442944527,
-0.036455366760492325,
-0.0349622517824173,
0.055074792355298996,
0.005819894373416901,
-0.018203945830464363,
0.025625383481383324,
-0.03879152610898018,
0.005575910210609436,
-0.03998808190226555,
-0.0224052332341671,
0.004435449372977018,
0.02526027522981167,
-0.004471981432288885,
0.08156494796276093,
0.012625825591385365,
-0.03845042735338211,
0.031077353283762932,
0.016366979107260704,
-0.07343751192092896,
0.05553891509771347,
0.05323855206370354,
0.07921119779348373,
-0.0582629032433033,
-0.060579609125852585,
-0.0015486004995182157,
0.0057948012836277485,
-0.005133026745170355,
0.030131611973047256,
-0.0023688217625021935,
-0.07311590760946274,
-0.016813505440950394,
-0.011766307055950165,
0.06638222187757492,
-0.04642326384782791,
-0.020719747990369797,
0.022963913157582283,
0.00233594817109406,
0.0027198654133826494,
-0.04204227030277252,
-0.0007084335666149855,
0.016066940501332283,
-0.03400449454784393,
-0.05329697206616402,
0.019636642187833786,
-0.0044285692274570465,
-0.04435907304286957,
-0.022324835881590843,
-0.0405612513422966,
0.017463695257902145,
0.07399747520685196,
0.007719327230006456,
-0.02432563155889511,
-0.038825999945402145,
0.00462415860965848,
0.020660972222685814,
0.03980530425906181,
-0.02129845693707466,
0.02855352684855461,
0.055150989443063736,
0.05903642997145653,
-0.018699361011385918,
0.054105035960674286,
0.0004985330160707235,
-0.03121916577219963,
-0.01878178119659424,
0.0005023250705562532,
-0.02016507275402546,
-0.0429123118519783,
0.006653257645666599,
0.026005005463957787,
-0.03329937905073166,
-0.029244955629110336,
-0.012487669475376606,
0.0590440109372139,
0.012323667295277119,
-0.0030346615239977837,
-0.026130756363272667,
0.0021174687426537275,
0.002091061556711793,
0.043992072343826294,
-0.028634564951062202,
-0.016814757138490677,
-0.03426007553935051,
-0.026451414451003075,
-0.006271404679864645,
0.014623990282416344,
0.039720457047224045,
0.026067854836583138,
-0.029780246317386627,
0.08536133915185928,
-0.05202507600188255,
0.0074401176534593105,
-0.04446244239807129,
-0.05504545569419861,
0.0025170594453811646,
0.038358837366104126,
-0.0007973875617608428,
0.04611271247267723,
0.0014023496769368649,
0.006036939099431038,
0.018946992233395576,
0.05990936979651451,
0.013229835778474808,
0.02136566862463951,
-0.00902167521417141,
-0.018235567957162857,
0.028999406844377518,
0.057654064148664474,
-0.04194941744208336,
-0.04861360415816307,
0.05037331208586693,
0.05581187456846237,
-0.012344219721853733,
0.02610044740140438,
-0.014806185849010944,
0.010263155214488506,
-0.0395619198679924,
-0.04999452084302902,
0.03720652312040329,
0.02142612263560295,
-0.0009127664961852133,
0.027644218876957893,
-0.004910342860966921,
-0.011086579412221909,
0.03464975580573082,
-0.0006423393497243524,
-0.00038152761408127844,
-0.06289853155612946,
0.01932150311768055,
0.008274644613265991,
0.06932272017002106,
-0.029728176072239876,
0.03762149065732956,
0.018595952540636063,
0.012526438571512699,
0.06430505216121674,
-0.02753155492246151,
0.01941745914518833,
0.03644443675875664,
0.01376099232584238,
-0.005238865036517382,
0.0033997499849647284,
0.020731713622808456,
0.02560339868068695,
0.07964680343866348,
0.0017978011164814234,
0.08643118292093277,
0.0007256693206727505,
0.039012350142002106,
0.07450713962316513,
0.033344969153404236,
0.029069913551211357,
0.03959934040904045,
0.05550623685121536,
0.015646474435925484,
-0.013133869506418705,
0.07456576824188232,
-0.06107937544584274,
0.04110686853528023,
-0.028307262808084488,
0.029267819598317146,
0.0015370725886896253,
-0.014233882538974285,
0.03513257950544357,
0.006582537200301886,
-0.032541561871767044,
0.0020674748811870813,
-0.019454684108495712,
-0.029386993497610092,
0.019648585468530655,
-0.009067165665328503,
-0.026167701929807663,
0.03494257479906082,
-0.02798452042043209,
0.01754974201321602,
-0.07986772805452347,
-0.04740777239203453,
-0.005048100370913744,
-0.038113512098789215,
0.013304919935762882,
-0.08496144413948059,
-0.05994525924324989,
-0.06667260080575943,
-0.021845098584890366,
0.046483997255563736,
0.009393183514475822,
-0.0018951635574921966,
-0.004738464951515198,
0.00963442213833332,
-0.032160889357328415,
-0.01890965923666954,
-0.06070750951766968,
-0.06015855446457863,
-0.02625046670436859,
-0.09320246428251266,
0.01967424713075161,
-0.0016538220224902034,
0.02576821856200695,
-0.0182295311242342,
0.00013052980648353696,
-0.04033209756016731,
-0.028456801548600197,
0.06891544908285141,
0.0010980343213304877,
-0.007042554672807455,
-0.014243717305362225,
0.02187877707183361,
-0.039607249200344086,
0.020874759182333946,
-0.018280956894159317,
-0.04619147628545761,
0.09208045899868011,
0.057557426393032074,
0.03928160294890404,
-0.0046785627491772175,
-0.046907227486371994,
-0.051786262542009354,
-0.060287557542324066,
-0.030104124918580055,
-0.031397972255945206,
-0.04626365005970001,
-0.015016377903521061,
-0.048130519688129425,
-0.026836618781089783,
-0.03604597598314285,
-0.03214360401034355,
-0.014808306470513344,
0.02631550095975399,
0.03625188767910004,
0.039293333888053894,
0.07198288291692734,
0.026175035163760185,
-0.03712133690714836,
-0.018015073612332344,
0.039294175803661346,
-0.004394802264869213,
0.007536100689321756,
-0.08207997679710388,
-0.04575653374195099,
0.0503273531794548,
0.005209699738770723,
-0.0004983109538443387,
-0.004694947507232428,
0.058161456137895584,
0.033136602491140366,
0.005660088267177343,
0.02591557614505291,
0.013003428466618061,
-0.0011329266708344221,
-0.01794152520596981,
-0.004170047119259834,
-0.02945615164935589,
-0.030613336712121964,
-0.024283399805426598,
-0.026232091709971428,
0.034180499613285065,
-0.0696106031537056,
-0.05529399961233139,
0.0024485846515744925,
0.037784699350595474,
0.021582309156656265,
0.008792593143880367,
-0.02432774379849434,
-0.029910732060670853,
-0.044331930577754974,
-0.02879931405186653,
0.034769777208566666,
0.010224951431155205,
-0.002516436157748103,
0.04726032540202141,
0.018567580729722977,
-0.0455579049885273,
0.028114696964621544,
0.02412518672645092,
0.0429447777569294,
0.017646819353103638,
-0.031122885644435883,
0.02535710670053959,
-0.04819544032216072,
0.01563229225575924,
0.01615830697119236,
-0.03319390118122101,
-0.05325522646307945,
-0.08041506260633469,
-0.030389508232474327,
0.014743811450898647,
-0.024689700454473495,
-0.003258593613281846,
0.04300077259540558,
-0.03000158816576004,
-0.03212777525186539,
-0.009728377684950829,
0.02257082797586918,
0.06043953448534012,
-0.029564056545495987,
0.02841051109135151,
-0.009345084428787231,
0.06455705314874649,
-0.056889381259679794,
-0.008238590322434902,
-0.022643156349658966,
-0.021092958748340607,
0.005366412922739983,
0.03889825567603111,
0.008391550742089748,
0.05525227636098862,
0.05643916875123978,
0.0452103428542614,
-0.03529715910553932,
0.03216497227549553,
0.06135604530572891,
-0.00743739353492856,
-0.026072079315781593,
0.00823228433728218,
0.01135173812508583,
-0.03408680856227875,
0.003529423149302602,
-0.004762447904795408,
0.017404718324542046,
0.03008381277322769,
-0.01629169099032879,
0.01749284937977791,
0.015685446560382843,
-0.03601262345910072,
-0.05425059050321579,
-0.06353265047073364,
-0.009730606339871883,
-0.020651107653975487,
-0.043262116611003876,
0.01603850908577442,
0.048929352313280106,
0.011966790072619915,
0.05706854909658432,
0.05018040910363197,
-0.04429344832897186,
-0.047685638070106506,
0.047583285719156265,
0.06705673038959503,
-0.04536554217338562,
-0.06989830732345581,
-0.05304981395602226,
0.028643056750297546,
0.046381399035453796,
-0.03357752040028572,
-0.09180965274572372,
0.029012121260166168,
0.06278277188539505,
-0.022970184683799744,
0.07124463468790054,
0.012130461633205414,
0.04041244834661484,
0.06309127807617188,
-0.013423407450318336,
0.02057608775794506,
-0.015270804055035114,
-0.0000644414612906985,
-0.014558373019099236,
0.03442817181348801,
-0.03282327204942703,
-0.029104294255375862,
-0.04533718526363373,
0.026701433584094048,
0.01245771162211895,
0.04268452525138855,
0.034942492842674255,
0.0005442445981316268,
-0.0668073520064354,
0.003935039509087801,
0.033043891191482544,
-0.03656233102083206,
0.015184196643531322,
0.022604625672101974,
0.04728459194302559,
-0.037832111120224,
-0.010556913912296295,
-0.02974603697657585,
-0.008331267163157463,
0.04476292058825493,
-0.016559695824980736,
-0.02662183903157711,
-0.036123793572187424,
0.018878618255257607,
-0.004486510995775461,
-0.03476637229323387,
-0.07458074390888214,
0.05276642367243767,
0.007311005610972643,
-0.0007420514011755586,
0.05032166466116905,
0.031215546652674675,
0.02074473164975643,
0.048427514731884,
-0.0028703061398118734,
0.01641440950334072,
-0.04064718633890152,
0.025934720411896706,
-0.017096184194087982,
-0.029066728428006172,
-0.010418189689517021,
-0.0826386883854866,
-0.02829497493803501,
-0.03968274965882301,
-0.037643756717443466,
-0.035828035324811935,
-0.031692780554294586,
0.007063235156238079,
-0.007562574464827776,
0.0006929155206307769,
0.008814537897706032,
0.012097884900867939,
-0.03709598630666733,
-0.031243132427334785,
-0.04845836013555527,
-0.052474621683359146,
-0.11111196875572205,
-0.035911381244659424,
0.0006356552476063371,
0.054319702088832855,
0.019001340493559837,
0.003903194796293974,
0.0023335684090852737,
0.010777926072478294,
0.012454110197722912,
-0.02165081538259983,
0.012599488720297813,
0.012023749761283398,
-0.04511067643761635,
-0.03388766571879387,
0.0003326734295114875,
0.02922527864575386,
0.02736733667552471,
-0.02009335532784462,
0.013009324669837952,
0.026833321899175644,
-0.021509364247322083,
-0.001425561960786581,
0.03375333175063133,
0.0034064077772200108,
-0.08133499324321747,
-0.04359034448862076,
-0.0007947472622618079,
-0.05194339528679848,
0.031409695744514465,
-0.023070158436894417,
-0.031475819647312164,
0.0010168439475819468,
0.022594965994358063,
0.017609892413020134,
-0.0267914067953825,
-0.020791810005903244,
0.013346157036721706,
-0.041286442428827286,
0.0402335487306118,
-0.04636674374341965,
0.047446902841329575,
-0.03820662945508957,
-0.00386360683478415,
-0.015499632805585861,
-0.0070183794014155865,
-0.03239841386675835,
0.08246374130249023,
-0.002220116788521409,
0.0077934591099619865,
-0.021994171664118767,
0.02667100355029106,
-0.0232506413012743,
0.038921114057302475,
0.01322926301509142,
0.009376476518809795,
-0.030690638348460197,
0.012649360112845898,
-0.05073733627796173,
0.011665095575153828,
-0.016732055693864822,
-0.028835993260145187,
-0.0033809859305620193,
-0.034355998039245605,
-0.00684729777276516,
-0.05917166918516159,
0.04506818950176239,
0.03258906677365303,
0.020946208387613297,
0.022526901215314865,
-0.024432338774204254,
-0.007980545982718468,
0.018117494881153107,
-0.06805174052715302,
-0.027026638388633728,
-0.015653260052204132,
0.018143046647310257,
-0.0223025344312191,
0.0461290217936039,
0.05642286688089371,
-0.04023122787475586,
-0.044040847569704056,
0.021118171513080597,
0.009323343634605408,
0.016464710235595703,
0.011549687944352627,
0.015373201109468937,
0.05880574882030487,
0.04537719115614891,
-0.031737178564071655,
0.005184060428291559,
-0.004223051480948925,
-0.02738189324736595,
-0.0011635981500148773,
-0.013401776552200317,
0.029190095141530037,
-0.004704754333943129,
-0.043842896819114685,
-0.030802374705672264,
0.07089956104755402,
0.023646941408514977,
0.025956682860851288,
0.002806358737871051,
-0.028856491670012474,
0.043607790023088455,
0.005221579689532518,
-0.05164100602269173,
-0.024521896615624428,
0.02442927099764347,
-0.043444450944662094,
0.08709639310836792,
-0.011274122633039951,
0.017133206129074097,
0.026118192821741104,
0.004279526881873608,
0.02073919214308262,
0.04547344893217087,
-0.0478266105055809,
-0.0017824494279921055,
0.05758587643504143,
-0.0451962910592556,
0.011301757767796516,
-0.017507536336779594,
0.054118506610393524,
-0.05608711391687393,
0.061755891889333725,
0.014316418208181858,
0.040442198514938354,
-0.0011884497944265604,
-0.010261629708111286,
-0.06888995319604874,
0.0387655533850193,
-0.05063445866107941,
0.06398829817771912,
-0.016037384048104286,
-0.06637372821569443,
0.08451015502214432,
0.028875889256596565,
-0.09799563884735107,
0.01941577158868313,
0.021899523213505745,
0.016631891950964928,
0.016916314139962196,
0.04539727792143822,
-0.05949939787387848,
-0.008621154353022575,
-0.046010375022888184,
0.02716819941997528,
-0.06795579940080643,
-0.013647953979671001,
0.0152409877628088,
-0.032425522804260254,
-0.010085503570735455,
0.0413309782743454,
0.005979184526950121,
0.011902637779712677,
0.02554316073656082,
-0.06575431674718857,
-0.04816863313317299,
-0.02223837375640869,
0.023306282237172127,
-0.048121917992830276,
0.03880578652024269,
-0.009225663729012012,
0.03896956518292427,
0.004996652249246836,
0.0009286346030421555,
-0.031028369441628456,
0.006298133637756109,
0.037045761942863464,
-0.04093135520815849,
-0.024428918957710266,
0.030047092586755753,
0.010205807164311409,
-0.016835683956742287,
0.04104863107204437,
-0.01550078485161066,
0.03214910998940468,
0.039423342794179916,
-0.015900909900665283,
0.021173451095819473,
-0.04586230218410492,
-0.010245864279568195,
0.014185236766934395,
0.0196630097925663,
0.021123111248016357,
-0.003834286704659462,
0.009686318226158619,
0.03810868784785271,
0.02028893306851387,
-0.017580527812242508,
-0.012629635632038116,
-0.0320136696100235,
0.016955001279711723,
-0.0462225079536438,
0.017627684399485588,
0.02028583362698555,
-0.02798941545188427,
-0.04121565446257591,
-0.0430329255759716,
-0.012333190068602562,
0.04563737288117409,
-0.049118202179670334,
-0.006885037757456303,
0.06314996629953384,
-0.029181888327002525,
-0.07191263884305954,
-0.06393084675073624,
-0.007159346714615822,
-0.026005566120147705,
0.031033584848046303,
0.03210049867630005,
-0.020875073969364166,
0.01743415743112564,
-0.024237899109721184,
-0.07690922170877457,
0.044433850795030594,
0.014549407176673412,
-0.02605646289885044,
0.040262315422296524,
0.04780998453497887,
-0.007624110206961632,
0.016466299071907997,
0.014918149448931217,
-0.05840455740690231,
0.022527949884533882,
0.0061295125633478165,
0.015340673737227917,
0.025049421936273575,
0.04988214746117592,
-0.022267313674092293,
-0.021401163190603256,
-0.0452246256172657,
-0.023109380155801773,
-0.023268597200512886,
-0.013824797235429287,
0.06800583004951477
] |
dccuchile/albert-large-spanish-finetuned-pos | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 1 | 2020-11-26T15:33:23Z | ---
tags:
- summarization
widget:
- text: "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
---
# CodeTrans model for program synthesis
Pretrained model on programming language lisp inspired DSL using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on Program Synthesis dataset.
## Intended uses & limitations
The model could be used to generate lisp inspired DSL code given the human language description tasks.
### How to use
Here is how to use this model to generate lisp inspired DSL code using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_program_synthese"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_program_synthese", skip_special_tokens=True),
device=0
)
tokenized_code = "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/program%20synthesis/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | LISP |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 89.43 |
| CodeTrans-ST-Base | 89.65 |
| CodeTrans-TF-Small | 90.30 |
| CodeTrans-TF-Base | 90.24 |
| CodeTrans-TF-Large | 90.21 |
| CodeTrans-MT-Small | 82.88 |
| CodeTrans-MT-Base | 86.99 |
| CodeTrans-MT-Large | 90.27 |
| CodeTrans-MT-TF-Small | **90.31** |
| CodeTrans-MT-TF-Base | 90.30 |
| CodeTrans-MT-TF-Large | 90.17 |
| State of the art | 85.80 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.03254479914903641,
-0.031047314405441284,
-0.018779626116156578,
0.0482947863638401,
0.02809341438114643,
0.025122279301285744,
-0.03450817987322807,
0.0026225498877465725,
-0.018139181658625603,
0.06057105213403702,
0.044616859406232834,
0.012721440754830837,
-0.041652899235486984,
0.059243228286504745,
-0.040510907769203186,
-0.05184544622898102,
-0.01998685859143734,
-0.03208070248365402,
-0.01947813853621483,
-0.023306572809815407,
0.012932894751429558,
-0.01214191596955061,
0.0132753262296319,
0.002410306828096509,
-0.008002101443707943,
0.022033564746379852,
-0.0014838819624856114,
0.028069457039237022,
0.024983782321214676,
-0.07696343213319778,
-0.02202272228896618,
-0.02148209512233734,
-0.04087686166167259,
-0.0031550799030810595,
-0.01834123209118843,
0.021704254671931267,
0.010006848722696304,
0.02344050072133541,
0.026730209589004517,
0.056599635630846024,
0.005513974465429783,
0.005559880752116442,
-0.00038083185791037977,
-0.03791530802845955,
0.057426657527685165,
0.010101638734340668,
-0.020210782065987587,
-0.008488652296364307,
0.023756105452775955,
0.0020083144772797823,
-0.05515563488006592,
-0.05854415148496628,
-0.03508514165878296,
0.03887348622083664,
-0.012056747451424599,
-0.021759098395705223,
-0.0576569139957428,
-0.006731101777404547,
0.05751507729291916,
-0.0500112920999527,
-0.03208259493112564,
0.021147817373275757,
-0.060992851853370667,
0.014847800135612488,
0.030587784945964813,
-0.014296992681920528,
0.009590520523488522,
-0.03558375686407089,
0.010113690979778767,
-0.012133684009313583,
0.05639934167265892,
-0.018011705949902534,
0.017118435353040695,
-0.10709872096776962,
0.02125569060444832,
-0.002510901540517807,
0.01304442435503006,
0.026966454461216927,
-0.029295140877366066,
0.05121739208698273,
0.015027636662125587,
-0.013884611427783966,
0.040281523019075394,
0.011616446077823639,
-0.004104628227651119,
0.05278787016868591,
-0.03596207872033119,
-0.00889915693551302,
-0.020445767790079117,
0.06273901462554932,
-0.04809987172484398,
-0.046290818601846695,
-0.02927931398153305,
-0.019539032131433487,
-0.022375041618943214,
0.013326161541044712,
0.02377399057149887,
-0.0054600657895207405,
0.03343520686030388,
0.021963896229863167,
0.04375234618782997,
0.04079163447022438,
-0.018073100596666336,
0.047850120812654495,
0.028186189010739326,
0.02165917307138443,
0.00984595250338316,
-0.04721931368112564,
-0.04116415977478027,
0.04532771185040474,
0.0200554970651865,
-0.02977394312620163,
-0.04700586572289467,
0.04258699342608452,
0.017395231872797012,
-0.02813994325697422,
0.04613867029547691,
-0.01825624331831932,
-0.05385422334074974,
-0.019923822954297066,
0.03451161831617355,
-0.0013751111691817641,
-0.014347934164106846,
0.012831510975956917,
-0.0500776506960392,
0.00861560832709074,
-0.06846299022436142,
-0.04036494344472885,
0.014625050127506256,
0.02887752093374729,
-0.004519765730947256,
0.08058591187000275,
-0.00038742803735658526,
-0.05018050968647003,
-0.00046892339014448225,
0.014863056130707264,
-0.08418098092079163,
0.050261713564395905,
0.039402831345796585,
0.1344868242740631,
-0.06604699045419693,
-0.042594749480485916,
0.015434877946972847,
-0.009451954625546932,
-0.04121151566505432,
0.016614289954304695,
0.001808448345400393,
-0.05863390117883682,
-0.02783104032278061,
-0.02192757837474346,
0.06930208951234818,
-0.04741205275058746,
-0.01034408900886774,
0.037417221814394,
0.0011237981962040067,
0.021441660821437836,
-0.04257090389728546,
0.0048220339231193066,
-0.014744868502020836,
-0.02275240048766136,
-0.04410269111394882,
0.02798808366060257,
-0.014147699810564518,
-0.025343934074044228,
-0.0404924601316452,
-0.028650367632508278,
0.0118979187682271,
0.08657911419868469,
0.01272820308804512,
-0.022098300978541374,
-0.025306081399321556,
0.005069330334663391,
0.035028789192438126,
0.03503641486167908,
-0.04980272054672241,
0.021188218146562576,
0.045748669654130936,
0.05108080059289932,
-0.027062909677624702,
0.06785140186548233,
-0.008036548271775246,
-0.037905503064394,
-0.023640736937522888,
-0.007263037841767073,
-0.011493753641843796,
-0.033421073108911514,
0.0015391036868095398,
0.030756844207644463,
-0.007586135063320398,
0.0031465624924749136,
-0.02131970413029194,
0.0746300145983696,
0.012747112661600113,
-0.007923822849988937,
-0.03087904118001461,
0.006996196694672108,
-0.023503132164478302,
0.05562981218099594,
-0.030349470674991608,
-0.007837497629225254,
-0.020220346748828888,
-0.04307619854807854,
-0.0091464314609766,
0.020524337887763977,
0.04585346579551697,
0.027351461350917816,
0.006965865381062031,
0.09730648249387741,
-0.05070916935801506,
0.011753986589610577,
-0.0572395995259285,
-0.03311751037836075,
0.013686939142644405,
0.05600011348724365,
0.008944489061832428,
0.04816069453954697,
0.0061746141873300076,
-0.03335334360599518,
0.02528027817606926,
0.06297378987073898,
0.027751054614782333,
0.0203187745064497,
-0.026936372742056847,
-0.02301955036818981,
0.0316629521548748,
0.07460420578718185,
-0.05167188495397568,
-0.02982061170041561,
0.038612619042396545,
0.03321000188589096,
-0.022090375423431396,
0.023821432143449783,
-0.00890550296753645,
0.017591681331396103,
-0.062244512140750885,
-0.06313084810972214,
0.029747210443019867,
0.0015930255176499486,
0.016658881679177284,
0.017300158739089966,
-0.0009946073405444622,
-0.01525850035250187,
0.04443736374378204,
0.003697493812069297,
-0.0032102344557642937,
-0.06629174947738647,
-0.0034764152951538563,
0.0018386438023298979,
0.030442284420132637,
-0.03462696075439453,
0.0325898714363575,
0.0018236463656648993,
0.006776352878659964,
0.052986592054367065,
-0.02324952371418476,
0.03031172603368759,
0.032830290496349335,
0.022340992465615273,
-0.012470247223973274,
0.022708458825945854,
0.008438079617917538,
0.03282931447029114,
0.06528142839670181,
-0.002408423228189349,
0.07210229337215424,
-0.009986015036702156,
0.05449714511632919,
0.06506163626909256,
0.014684243127703667,
0.007516760844737291,
0.039371997117996216,
0.08135566115379333,
-0.007278724107891321,
-0.006257581990212202,
0.05039325729012489,
-0.06384241580963135,
0.03928220272064209,
-0.024084636941552162,
0.025965537875890732,
-0.022627858445048332,
-0.016237525269389153,
0.05482713133096695,
0.004366433247923851,
-0.027888035401701927,
0.0013559317449107766,
-0.0356944240629673,
-0.01881318911910057,
0.010353926569223404,
-0.008900284767150879,
-0.02318061888217926,
0.02501068450510502,
-0.028893811628222466,
0.011379675939679146,
-0.08408071100711823,
-0.054983362555503845,
-0.01998886466026306,
-0.04074932634830475,
0.021300431340932846,
-0.0737842321395874,
-0.050447750836610794,
-0.060723815113306046,
-0.018366793170571327,
0.024225354194641113,
0.004136550705879927,
0.0071210903115570545,
-0.02417394518852234,
0.022837406024336815,
-0.040893830358982086,
-0.020852234214544296,
-0.047886915504932404,
-0.05573097988963127,
-0.01228452567011118,
-0.050142865628004074,
0.033944498747587204,
0.0037196518387645483,
0.011006307788193226,
-0.0017902700928971171,
-0.005623337812721729,
-0.03315022215247154,
-0.020335882902145386,
0.06685508042573929,
0.017370864748954773,
-0.022198151797056198,
-0.03442588448524475,
0.013272883370518684,
-0.022769520059227943,
0.027538107708096504,
-0.03235848993062973,
-0.02993490919470787,
0.08574306219816208,
0.05592886731028557,
0.025472382083535194,
-0.005405886564403772,
-0.03766028583049774,
-0.0600847564637661,
-0.05759108066558838,
-0.015240496024489403,
-0.02461399883031845,
-0.0338752306997776,
-0.0015203789807856083,
-0.041871290653944016,
-0.012649481184780598,
-0.03909099102020264,
-0.03175188973546028,
-0.0025983043015003204,
0.028500501066446304,
0.044737379997968674,
0.03556245565414429,
0.053774625062942505,
0.028582045808434486,
-0.028685467317700386,
-0.016722407191991806,
0.04037130996584892,
0.006416757125407457,
0.010891656391322613,
-0.07780308276414871,
-0.02233138494193554,
0.03912253677845001,
0.027410436421632767,
0.007128621451556683,
-0.01728162169456482,
0.08295604586601257,
0.020794659852981567,
0.001388971577398479,
0.005960986018180847,
0.011896135285496712,
-0.012280849739909172,
-0.005325885023921728,
-0.0020232570823282003,
-0.029066892340779305,
-0.05216680467128754,
-0.021594315767288208,
-0.0325760692358017,
0.04402925446629524,
-0.05499841645359993,
-0.04563739523291588,
-0.017846057191491127,
0.03350270166993141,
0.014749961905181408,
0.011032181791961193,
-0.0215012114495039,
-0.004981019999831915,
-0.056570302695035934,
-0.036145031452178955,
0.030049307271838188,
0.015370150096714497,
-0.016573462635278702,
0.03604226931929588,
0.020871547982096672,
-0.04569607228040695,
0.026281140744686127,
0.01572912186384201,
0.05422835424542427,
0.03697987273335457,
-0.04515320062637329,
0.01634075492620468,
-0.03421845659613609,
0.02883513644337654,
0.006134014576673508,
-0.04133615270256996,
-0.06349972635507584,
-0.08504410833120346,
-0.02714451029896736,
0.004074914380908012,
-0.031209580600261688,
0.0039088851772248745,
0.0483567975461483,
-0.026959694921970367,
-0.019689975306391716,
0.004156542010605335,
0.014475025236606598,
0.0499725304543972,
-0.042683444917201996,
0.03553112596273422,
0.011043325997889042,
0.06366363167762756,
-0.03793875128030777,
0.010584949515759945,
-0.03276052698493004,
-0.017497118562459946,
0.01037887018173933,
0.04121837764978409,
0.03244515508413315,
0.05632245913147926,
0.06356479972600937,
0.026743073016405106,
-0.04505065456032753,
0.037822458893060684,
0.0577266663312912,
0.0036005398724228144,
-0.0344051867723465,
0.012997463345527649,
0.000369013607269153,
-0.03578219562768936,
0.01639457792043686,
-0.01406932808458805,
0.018879549577832222,
0.037619125097990036,
-0.010273248888552189,
-0.006514317821711302,
0.0037526607047766447,
-0.029341135174036026,
-0.03969237580895424,
-0.05269217863678932,
-0.0239312294870615,
-0.02241649478673935,
-0.07377592474222183,
0.04476344585418701,
0.034744665026664734,
0.031201757490634918,
0.05194743350148201,
0.04814143106341362,
-0.035008061677217484,
-0.038309816271066666,
0.04378064349293709,
0.038306087255477905,
-0.04668052867054939,
-0.05195779725909233,
-0.06819916516542435,
0.02617611549794674,
0.04021482914686203,
-0.026643503457307816,
-0.09146939218044281,
0.014547210186719894,
0.041404951363801956,
-0.02406296879053116,
0.07718712836503983,
0.0041534979827702045,
0.026255959644913673,
0.04074118286371231,
-0.012389610521495342,
0.02708016335964203,
-0.024975363165140152,
0.020645728334784508,
0.009570619091391563,
0.059059128165245056,
-0.04211292415857315,
-0.03685837611556053,
-0.05758967995643616,
0.03998386487364769,
0.023372462019324303,
0.041701145470142365,
0.03821152448654175,
-0.011190097779035568,
-0.07088704407215118,
0.0050880336202681065,
0.010788860730826855,
-0.03125087171792984,
0.013844984583556652,
0.0359368696808815,
0.04874715581536293,
-0.05665602907538414,
-0.01600661687552929,
-0.01093093492090702,
-0.0027536095585674047,
0.026091862469911575,
-0.003921040333807468,
-0.028465645387768745,
-0.05959734693169594,
0.013091371394693851,
-0.029966318979859352,
-0.02223510481417179,
-0.09641028940677643,
0.037715017795562744,
-0.013960635289549828,
-0.0200241357088089,
0.0591614805161953,
0.04700704663991928,
0.022180601954460144,
0.04193230718374252,
-0.016996070742607117,
0.02903476543724537,
-0.030182404443621635,
0.04519731178879738,
-0.01020395290106535,
-0.01651693508028984,
-0.019712243229150772,
-0.0788910984992981,
-0.014077340252697468,
-0.02911306545138359,
-0.032719824463129044,
-0.03931451588869095,
-0.04659806191921234,
0.008299846202135086,
-0.0003182383079547435,
0.004483242053538561,
0.00261103268712759,
0.022240987047553062,
-0.026787279173731804,
-0.023170266300439835,
-0.04283267259597778,
-0.048323873430490494,
-0.09443031251430511,
-0.030687950551509857,
0.0011525875888764858,
0.025455642491579056,
0.030788876116275787,
0.002302760723978281,
0.008263453841209412,
0.032956913113594055,
-0.003826606087386608,
-0.026490503922104836,
0.025975670665502548,
0.018060414120554924,
-0.0551927275955677,
-0.01799570955336094,
-0.009069432504475117,
-0.004224199336022139,
0.014300205744802952,
-0.03618123382329941,
0.007800261490046978,
0.0237718615680933,
-0.029651183634996414,
-0.005748522933572531,
0.020522495731711388,
0.007784624118357897,
-0.07667654007673264,
-0.05232127383351326,
-0.01444858219474554,
-0.05999024957418442,
0.02769186720252037,
-0.0034611194860190153,
-0.028417816385626793,
-0.007717738393694162,
0.016822516918182373,
0.01779664121568203,
-0.010748138651251793,
-0.02822483889758587,
-0.005319096148014069,
-0.04831511899828911,
0.03994607925415039,
-0.06222088634967804,
0.04748810455203056,
-0.03714953735470772,
-0.007211454212665558,
-0.011786852031946182,
-0.02590605802834034,
-0.0323420912027359,
0.045360736548900604,
-0.017083192244172096,
0.00146967894397676,
-0.019608987495303154,
0.030136987566947937,
-0.03660249337553978,
0.05419911444187164,
0.0007627370650880039,
0.007167153991758823,
-0.03239326924085617,
0.017433656379580498,
-0.047764405608177185,
0.01613815315067768,
-0.021992772817611694,
-0.022469153627753258,
-0.019299808889627457,
-0.03157858923077583,
-0.024823686107993126,
-0.0477573536336422,
0.04134321212768555,
0.03079911507666111,
0.034936849027872086,
0.011866380460560322,
-0.0016952482983469963,
-0.015340184792876244,
0.017048044130206108,
-0.07552482187747955,
-0.042634017765522,
-0.011647290550172329,
0.025501130148768425,
-0.02503129653632641,
0.060715120285749435,
0.040083933621644974,
-0.04907148703932762,
-0.031755514442920685,
0.013756158761680126,
0.005170606542378664,
0.007265102583914995,
0.02527577243745327,
0.03457142412662506,
0.04131293669342995,
0.05816235765814781,
-0.030422411859035492,
-0.000580974796321243,
0.004412372130900621,
-0.008139641024172306,
-0.01698920503258705,
-0.011333168484270573,
0.02676285244524479,
-0.009893830865621567,
-0.04158848524093628,
-0.02621709369122982,
0.05690176412463188,
0.03094918467104435,
0.023797471076250076,
0.006812496110796928,
-0.03842587023973465,
0.01834724470973015,
0.014095869846642017,
-0.045638252049684525,
-0.026571283116936684,
0.01306290365755558,
-0.04849271476268768,
0.07766247540712357,
-0.026119733229279518,
0.02435879223048687,
0.0426202267408371,
0.030638044700026512,
0.0022364279720932245,
0.03652423992753029,
-0.031939614564180374,
0.005539922975003719,
0.04273226112127304,
-0.05542001873254776,
-0.012469111010432243,
-0.006775017827749252,
0.06782511621713638,
-0.05077195540070534,
0.06385345757007599,
0.01946599781513214,
0.01668754406273365,
0.009185533039271832,
-0.012641476467251778,
-0.06346594542264938,
0.022641433402895927,
-0.046688735485076904,
0.076393261551857,
-0.015500804409384727,
-0.0674624815583229,
0.07672182470560074,
0.032550014555454254,
-0.08348891139030457,
0.005561471451073885,
0.039000846445560455,
0.023175043985247612,
0.038744233548641205,
0.02881813980638981,
-0.07865206152200699,
-0.01080633420497179,
-0.026920288801193237,
0.014964135363698006,
-0.057559844106435776,
-0.012466257438063622,
0.028445865958929062,
-0.05428219214081764,
-0.0022569228895008564,
0.025191331282258034,
0.006717585492879152,
0.00309613230638206,
0.017861485481262207,
-0.06044571474194527,
-0.043396495282649994,
-0.02775844931602478,
0.0156624186784029,
-0.04521514102816582,
0.025152988731861115,
-0.018902111798524857,
0.038884617388248444,
0.024740133434534073,
0.0033948856871575117,
-0.04981604218482971,
0.008565327152609825,
0.02971455454826355,
-0.05681421980261803,
-0.034822799265384674,
0.022470492869615555,
0.01408954244107008,
-0.029359526932239532,
0.032958030700683594,
-0.021868975833058357,
0.03719286248087883,
0.032241903245449066,
-0.008479312993586063,
0.007375855464488268,
-0.04303024709224701,
-0.006964912638068199,
0.0205848291516304,
0.011256629601120949,
0.012284684926271439,
-0.008699070662260056,
0.03219769522547722,
0.050781216472387314,
0.04118676111102104,
-0.007230130024254322,
-0.0026648719795048237,
-0.00826976727694273,
0.02223971299827099,
-0.03961894288659096,
0.022793669253587723,
0.02219841070473194,
-0.034385766834020615,
-0.03732629120349884,
-0.043865203857421875,
-0.02463018149137497,
0.04205692559480667,
-0.03893594071269035,
0.002978004515171051,
0.04556754231452942,
-0.017491735517978668,
-0.04605337604880333,
-0.0658762976527214,
-0.0017179262358695269,
-0.030288174748420715,
0.045495789498090744,
0.039098240435123444,
-0.03775370121002197,
-0.00008493020868627355,
-0.04782821610569954,
-0.06601625680923462,
0.04220319166779518,
0.02605416253209114,
-0.017100725322961807,
0.045602671802043915,
0.03963100537657738,
-0.026634087786078453,
0.01822652295231819,
0.01848691888153553,
-0.04731868579983711,
0.02248537167906761,
0.02220514789223671,
0.028181778267025948,
0.04206356406211853,
0.037611205130815506,
-0.036485038697719574,
-0.04016503319144249,
-0.07205664366483688,
-0.013139394111931324,
-0.03673791140317917,
-0.00721715809777379,
0.06242658570408821
] |
dccuchile/albert-large-spanish-finetuned-xnli | [
"pytorch",
"albert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"AlbertForSequenceClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 29 | 2020-12-10T16:37:45Z | ---
tags:
- summarization
widget:
- text: "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
---
# CodeTrans model for program synthesis
Pretrained model on programming language lisp inspired DSL using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the program synthesis task for the lisp inspired DSL code.
## Intended uses & limitations
The model could be used to generate lisp inspired DSL code given the human language description tasks.
### How to use
Here is how to use this model to generate lisp inspired DSL code using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_program_synthese_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_program_synthese_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "you are given an array of numbers a and a number b , compute the difference of elements in a and b"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/program%20synthesis/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 16,000 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing lisp inspired DSL data.
## Evaluation results
For the code documentation tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | LISP |
| -------------------- | :------------: |
| CodeTrans-ST-Small | 89.43 |
| CodeTrans-ST-Base | 89.65 |
| CodeTrans-TF-Small | 90.30 |
| CodeTrans-TF-Base | 90.24 |
| CodeTrans-TF-Large | 90.21 |
| CodeTrans-MT-Small | 82.88 |
| CodeTrans-MT-Base | 86.99 |
| CodeTrans-MT-Large | 90.27 |
| CodeTrans-MT-TF-Small | **90.31** |
| CodeTrans-MT-TF-Base | 90.30 |
| CodeTrans-MT-TF-Large | 90.17 |
| State of the art | 85.80 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.028900349512696266,
-0.03108718991279602,
-0.014855235815048218,
0.040035851299762726,
0.027911989018321037,
0.02962881699204445,
-0.03300730884075165,
0.0023577434476464987,
-0.013661345466971397,
0.06633846461772919,
0.04878062754869461,
0.0132706044241786,
-0.03477882966399193,
0.05327283591032028,
-0.040249139070510864,
-0.0580034963786602,
-0.020475586876273155,
-0.03307459503412247,
-0.020830655470490456,
-0.02481868490576744,
0.019516240805387497,
-0.010540502145886421,
0.021954331547021866,
0.0030142944306135178,
-0.008570968173444271,
0.019518695771694183,
-0.0007691875798627734,
0.028676072135567665,
0.02671065367758274,
-0.0811309963464737,
-0.023865297436714172,
-0.02092181332409382,
-0.04315245896577835,
-0.005043708253651857,
-0.021195929497480392,
0.03002581186592579,
0.011974215507507324,
0.026591919362545013,
0.023500721901655197,
0.05807154253125191,
0.00882259476929903,
0.0015171418199315667,
-0.0050815315917134285,
-0.03664279356598854,
0.05600119009613991,
0.012737260200083256,
-0.017834916710853577,
-0.013406338170170784,
0.02561473660171032,
0.0037532239221036434,
-0.05555156618356705,
-0.05826208367943764,
-0.03754173591732979,
0.04090152680873871,
-0.01135154627263546,
-0.014791867695748806,
-0.058063507080078125,
-0.01134160440415144,
0.056862395256757736,
-0.04930160939693451,
-0.03084743022918701,
0.021098244935274124,
-0.058101195842027664,
0.017267078161239624,
0.029937364161014557,
-0.01454926561564207,
0.01367153786122799,
-0.03720269724726677,
0.014262114651501179,
-0.011823324486613274,
0.05773346498608589,
-0.018676921725273132,
0.020535435527563095,
-0.107422836124897,
0.019100286066532135,
-0.004991859197616577,
0.023405058309435844,
0.019936393946409225,
-0.026104219257831573,
0.04563288390636444,
0.013909689150750637,
-0.01081826351583004,
0.03901121765375137,
0.011327807791531086,
-0.00317770941182971,
0.05154234543442726,
-0.03700784221291542,
-0.007521997205913067,
-0.01952848955988884,
0.060099754482507706,
-0.054077550768852234,
-0.047165606170892715,
-0.030494431033730507,
-0.023310750722885132,
-0.024329444393515587,
0.01863449066877365,
0.028606129810214043,
-0.006057295482605696,
0.03452235460281372,
0.017529603093862534,
0.04390311613678932,
0.042697906494140625,
-0.01550312526524067,
0.0450059249997139,
0.02648916095495224,
0.01972508430480957,
0.006848907098174095,
-0.045086201280355453,
-0.04005057364702225,
0.045722320675849915,
0.023148031905293465,
-0.03078470751643181,
-0.04635334014892578,
0.04472916200757027,
0.013515472412109375,
-0.026459766551852226,
0.044922616332769394,
-0.020473746582865715,
-0.049806706607341766,
-0.026310544461011887,
0.0336298830807209,
0.001451335847377777,
-0.014256921596825123,
0.021084250882267952,
-0.04816561937332153,
0.0053670452907681465,
-0.06766064465045929,
-0.041991718113422394,
0.015747949481010437,
0.026323486119508743,
-0.008310786448419094,
0.08393676578998566,
0.005364496260881424,
-0.050983089953660965,
0.006049554329365492,
0.01689925789833069,
-0.08226277679204941,
0.053391069173812866,
0.04573817551136017,
0.13370999693870544,
-0.06254222244024277,
-0.041378844529390335,
0.007755850907415152,
-0.007060521747916937,
-0.037698376923799515,
0.019783293828368187,
0.002170904539525509,
-0.061677780002355576,
-0.022350387647747993,
-0.018219487741589546,
0.06837444752454758,
-0.049960434436798096,
-0.016702573746442795,
0.0349232479929924,
0.005739241372793913,
0.01594894751906395,
-0.04366415739059448,
-0.0012136619770899415,
-0.014936218969523907,
-0.023058485239744186,
-0.05006229877471924,
0.02784588746726513,
-0.01027840469032526,
-0.026190539821982384,
-0.038619499653577805,
-0.028445282950997353,
0.009877524338662624,
0.08437683433294296,
0.009838617406785488,
-0.024721743538975716,
-0.02609638310968876,
0.008774513378739357,
0.03319497033953667,
0.038399193435907364,
-0.04376110062003136,
0.025985021144151688,
0.04912790656089783,
0.054627854377031326,
-0.026146281510591507,
0.07067238539457321,
-0.008804555051028728,
-0.03311435878276825,
-0.024974830448627472,
-0.0027430893387645483,
-0.012120427563786507,
-0.037630703300237656,
0.001785252708941698,
0.03177470341324806,
-0.015108736231923103,
0.0015658995835110545,
-0.02170504629611969,
0.06441131979227066,
0.014413912780582905,
-0.011494580656290054,
-0.028592970222234726,
0.0041946712881326675,
-0.020567990839481354,
0.061056144535541534,
-0.030952855944633484,
-0.0034594412427395582,
-0.014823703095316887,
-0.04392946511507034,
-0.011789231561124325,
0.020272815600037575,
0.048500027507543564,
0.031093260273337364,
0.005737706087529659,
0.09564206004142761,
-0.044313155114650726,
0.00993781816214323,
-0.05302027240395546,
-0.03762480989098549,
0.017349151894450188,
0.05610688030719757,
0.007264905143529177,
0.042901571840047836,
0.007169737014919519,
-0.02892506867647171,
0.018741630017757416,
0.05916590616106987,
0.023006271570920944,
0.017179612070322037,
-0.0312317106872797,
-0.0260316114872694,
0.03458581119775772,
0.0698084682226181,
-0.046278584748506546,
-0.03020920418202877,
0.03648203983902931,
0.035520873963832855,
-0.019500460475683212,
0.025988085195422173,
-0.008681588806211948,
0.015288849361240864,
-0.05752265825867653,
-0.0572364516556263,
0.028324639424681664,
0.005869043525308371,
0.010249418206512928,
0.015013547614216805,
0.004621533211320639,
-0.016367962583899498,
0.04496854916214943,
-0.003843126352876425,
-0.003869990585371852,
-0.06787773221731186,
-0.011678475886583328,
-0.0007758378051221371,
0.03431333228945732,
-0.033330999314785004,
0.03777984902262688,
0.00528450682759285,
0.0062640649266541,
0.05996761471033096,
-0.024439455941319466,
0.02559446170926094,
0.03359152376651764,
0.0261355172842741,
-0.013678288087248802,
0.01826605014503002,
0.013779638335108757,
0.03858526796102524,
0.0644230917096138,
-0.007021558005362749,
0.07535931468009949,
-0.010537738911807537,
0.05585487559437752,
0.06244798004627228,
0.015245013870298862,
0.00690856296569109,
0.0390847846865654,
0.07504898309707642,
-0.002481954637914896,
-0.009057438932359219,
0.04814397916197777,
-0.06999387592077255,
0.036956537514925,
-0.019975675269961357,
0.028498519212007523,
-0.018222426995635033,
-0.016794590279459953,
0.0547599270939827,
0.0015152832493185997,
-0.02434767596423626,
-0.004295389633625746,
-0.03555091470479965,
-0.025450732558965683,
0.009302872233092785,
-0.010347024537622929,
-0.022082656621932983,
0.028238976374268532,
-0.02692556567490101,
0.009664562530815601,
-0.09047884494066238,
-0.05363370105624199,
-0.012607592158019543,
-0.039577364921569824,
0.02298993244767189,
-0.0739574134349823,
-0.055157620459795,
-0.06176542863249779,
-0.020227953791618347,
0.027911294251680374,
0.004460949916392565,
0.00800130795687437,
-0.022302167490124702,
0.024481182917952538,
-0.047084372490644455,
-0.02174379862844944,
-0.05423498898744583,
-0.059257060289382935,
-0.009410746395587921,
-0.05035965144634247,
0.029283439740538597,
0.0008381023653782904,
0.010734177194535732,
-0.0028151487931609154,
-0.0007679534028284252,
-0.034132592380046844,
-0.020556025207042694,
0.0739816278219223,
0.013002178631722927,
-0.017584357410669327,
-0.028584536164999008,
0.01196243241429329,
-0.02409294992685318,
0.030093681067228317,
-0.029251793399453163,
-0.036776937544345856,
0.08858165144920349,
0.055108651518821716,
0.027236657217144966,
-0.005238048732280731,
-0.03550885245203972,
-0.06040896475315094,
-0.061461977660655975,
-0.017552878707647324,
-0.035811297595500946,
-0.033117178827524185,
-0.0000300142837659223,
-0.04426085203886032,
-0.011776575818657875,
-0.041506409645080566,
-0.03327609971165657,
-0.0029852138832211494,
0.030997786670923233,
0.04491100460290909,
0.03359239920973778,
0.05499902740120888,
0.022234715521335602,
-0.036303821951150894,
-0.01847432181239128,
0.0387556329369545,
0.004997214302420616,
0.009273312985897064,
-0.07881928235292435,
-0.02080695331096649,
0.03360416740179062,
0.03156685829162598,
0.0038183440919965506,
-0.015516171231865883,
0.07657337933778763,
0.026101436465978622,
0.003902594093233347,
0.006555925589054823,
0.011687103658914566,
-0.011765426024794579,
-0.005154183134436607,
-0.001777160563506186,
-0.029817752540111542,
-0.04649428278207779,
-0.015672076493501663,
-0.02626531571149826,
0.04218416288495064,
-0.05148233100771904,
-0.04289799928665161,
-0.0194122102111578,
0.034932613372802734,
0.022360168397426605,
0.01913822442293167,
-0.02291434444487095,
-0.011181527748703957,
-0.057131797075271606,
-0.03586891293525696,
0.03479161858558655,
0.013566111214458942,
-0.016046924516558647,
0.037736862897872925,
0.02281339280307293,
-0.051117658615112305,
0.019535064697265625,
0.016525547951459885,
0.0504826195538044,
0.03876827657222748,
-0.038752537220716476,
0.018167322501540184,
-0.04123290628194809,
0.02838253788650036,
0.00745320925489068,
-0.044592175632715225,
-0.06493490189313889,
-0.08344320952892303,
-0.02536478266119957,
0.003044316079467535,
-0.0285257026553154,
0.006099041551351547,
0.05057793855667114,
-0.027681762352585793,
-0.02268053963780403,
0.007298636715859175,
0.018903814256191254,
0.05403873696923256,
-0.03697777912020683,
0.03672679141163826,
0.0037287750747054815,
0.05789073556661606,
-0.04023020341992378,
0.008204158395528793,
-0.026415370404720306,
-0.01991540938615799,
0.015512227080762386,
0.04037836566567421,
0.03746158629655838,
0.058268945664167404,
0.0624663271009922,
0.027053656056523323,
-0.0420353002846241,
0.032605208456516266,
0.05928577482700348,
0.004273370373994112,
-0.03483781963586807,
0.009821586310863495,
-0.0027595132123678923,
-0.038319870829582214,
0.014705704525113106,
-0.015771109610795975,
0.02124968357384205,
0.03296899423003197,
-0.010620406828820705,
-0.005869399290531874,
-0.0013835104182362556,
-0.03089831955730915,
-0.041186172515153885,
-0.05632559210062027,
-0.021923106163740158,
-0.02520507574081421,
-0.07188858836889267,
0.04465840756893158,
0.03626642003655434,
0.028393827378749847,
0.051729317754507065,
0.048887766897678375,
-0.034989628940820694,
-0.03951285406947136,
0.05133500322699547,
0.03880606219172478,
-0.04838632047176361,
-0.05365551635622978,
-0.06762456893920898,
0.027159400284290314,
0.03991350904107094,
-0.031789589673280716,
-0.08888338506221771,
0.015450937673449516,
0.045749686658382416,
-0.026370394974946976,
0.07610613107681274,
0.008589914068579674,
0.02571406029164791,
0.04061615839600563,
-0.0128307631239295,
0.028004363179206848,
-0.02304975315928459,
0.02265346050262451,
0.015635153278708458,
0.0592222698032856,
-0.035405974835157394,
-0.03543611615896225,
-0.05472130328416824,
0.03658192977309227,
0.019552189856767654,
0.04688957333564758,
0.03971201926469803,
-0.008585629053413868,
-0.07040847092866898,
0.0017746132798492908,
0.013024533167481422,
-0.03241996467113495,
0.012190110981464386,
0.03287133947014809,
0.051476214081048965,
-0.05115311220288277,
-0.015297048725187778,
-0.015705667436122894,
-0.0043516927398741245,
0.028441710397601128,
-0.0051728892140090466,
-0.028760088607668877,
-0.05746005102992058,
0.01241759117692709,
-0.026484163478016853,
-0.015872517600655556,
-0.10153159499168396,
0.04191317781805992,
-0.010253490880131721,
-0.01629006303846836,
0.05814868584275246,
0.04595597833395004,
0.02942952886223793,
0.040674854069948196,
-0.015277889557182789,
0.029628198593854904,
-0.0325021967291832,
0.04610532894730568,
-0.009501133114099503,
-0.020971210673451424,
-0.015385528095066547,
-0.08190082758665085,
-0.01792529597878456,
-0.028290944173932076,
-0.03720735386013985,
-0.044009238481521606,
-0.048819586634635925,
0.003560679964721203,
0.0018240052741020918,
0.010011760517954826,
0.003329227212816477,
0.02049679309129715,
-0.020796285942196846,
-0.017441770061850548,
-0.035770632326602936,
-0.05110643059015274,
-0.09634639322757721,
-0.026878034695982933,
0.004591037984937429,
0.027704885229468346,
0.02723519131541252,
-0.004036330617964268,
0.0038546898867934942,
0.028111636638641357,
0.0053656636737287045,
-0.023351026698946953,
0.02893679402768612,
0.011579738929867744,
-0.05500134080648422,
-0.017401954159140587,
-0.01320715807378292,
-0.006981124170124531,
0.012868554331362247,
-0.041954588145017624,
0.013330141082406044,
0.024139460176229477,
-0.02966255135834217,
-0.007506596855819225,
0.02452390268445015,
0.00553981214761734,
-0.07767049968242645,
-0.05118235945701599,
-0.01892797276377678,
-0.06075954809784889,
0.025668581947684288,
-0.003475963370874524,
-0.0253923162817955,
-0.003909779246896505,
0.015704235062003136,
0.013667273335158825,
-0.013561222702264786,
-0.025289347395300865,
-0.004308318253606558,
-0.04529283195734024,
0.036852940917015076,
-0.060269031673669815,
0.05494467169046402,
-0.036513250321149826,
-0.0032579160761088133,
-0.011657948605716228,
-0.024323850870132446,
-0.033706843852996826,
0.050517670810222626,
-0.013265966437757015,
0.0021762484684586525,
-0.019761284813284874,
0.021698763594031334,
-0.03972645848989487,
0.05267118290066719,
0.0009925677441060543,
0.00853523425757885,
-0.03210114315152168,
0.015833130106329918,
-0.03945688530802727,
0.01269970741122961,
-0.016933351755142212,
-0.021167095750570297,
-0.010874766856431961,
-0.029102765023708344,
-0.029479438439011574,
-0.0474637895822525,
0.04914805293083191,
0.02937249094247818,
0.029483700171113014,
0.008946683257818222,
-0.007725870236754417,
-0.017123399302363396,
0.01745792292058468,
-0.075477734208107,
-0.03857744112610817,
-0.016104746609926224,
0.02350553311407566,
-0.022238347679376602,
0.06273255497217178,
0.04338204115629196,
-0.046485453844070435,
-0.02932794578373432,
0.012318287044763565,
0.006794863846153021,
0.007115690968930721,
0.02466454729437828,
0.032170288264751434,
0.04220626503229141,
0.05344996601343155,
-0.03072037361562252,
0.00019548038835637271,
-0.0008333318401128054,
-0.012831194326281548,
-0.01484754029661417,
-0.013803626410663128,
0.022770462557673454,
-0.010775435715913773,
-0.03848588466644287,
-0.02238483354449272,
0.06024954095482826,
0.03148151934146881,
0.02649233303964138,
0.008548755198717117,
-0.03977082297205925,
0.016907112672924995,
0.01796441152691841,
-0.04949886351823807,
-0.03221750259399414,
0.015019940212368965,
-0.0468161404132843,
0.0797801986336708,
-0.02055261842906475,
0.023497899994254112,
0.04064974561333656,
0.028722450137138367,
0.006152082234621048,
0.035047583281993866,
-0.036762818694114685,
0.012887619435787201,
0.047697920352220535,
-0.05336190015077591,
-0.010805624537169933,
-0.00970961432904005,
0.06632368266582489,
-0.05373924970626831,
0.06211855635046959,
0.01504526473581791,
0.01900245063006878,
0.005425466224551201,
-0.007638564798980951,
-0.06987272948026657,
0.027869557961821556,
-0.045194342732429504,
0.07236772775650024,
-0.01787431724369526,
-0.06507211178541183,
0.08302870392799377,
0.02894796058535576,
-0.08377642184495926,
0.011248585768043995,
0.03752191364765167,
0.01915775053203106,
0.035893190652132034,
0.02467915043234825,
-0.08269916474819183,
-0.013733070343732834,
-0.029241010546684265,
0.013850860297679901,
-0.058477822691202164,
-0.009283755905926228,
0.027732860296964645,
-0.0520249605178833,
-0.0005280165933072567,
0.024390453472733498,
0.0009419177076779306,
0.003427535528317094,
0.015446186996996403,
-0.05631120502948761,
-0.04390436410903931,
-0.02005443163216114,
0.012941466644406319,
-0.04371078312397003,
0.020182305946946144,
-0.015489693731069565,
0.03427918255329132,
0.02215726301074028,
0.0036005531437695026,
-0.04993731155991554,
0.007036871276795864,
0.02757708728313446,
-0.05272731930017471,
-0.02954282984137535,
0.01965932920575142,
0.014858550392091274,
-0.02754736877977848,
0.033520642668008804,
-0.019425176084041595,
0.03614993765950203,
0.03099501132965088,
-0.0151510089635849,
0.010451716370880604,
-0.04080185294151306,
-0.009479123167693615,
0.02105925790965557,
0.00875238236039877,
0.013180697336792946,
-0.007119463291019201,
0.03465535491704941,
0.051567550748586655,
0.0425255186855793,
-0.01281095203012228,
-0.007734598126262426,
-0.009177182801067829,
0.01572556607425213,
-0.03956734389066696,
0.020932570099830627,
0.024502163752913475,
-0.031845707446336746,
-0.033366262912750244,
-0.046189695596694946,
-0.02551618032157421,
0.03931557014584541,
-0.04090479016304016,
0.005027643870562315,
0.047693733125925064,
-0.01806293986737728,
-0.0484541617333889,
-0.06552325189113617,
-0.0005024475394748151,
-0.02164335548877716,
0.0467473566532135,
0.03313324227929115,
-0.032426998019218445,
-0.0016469877446070313,
-0.04283459112048149,
-0.06550352275371552,
0.039726849645376205,
0.025554204359650612,
-0.014364253729581833,
0.045823097229003906,
0.03325797617435455,
-0.025120019912719727,
0.016206858679652214,
0.022417228668928146,
-0.05164806917309761,
0.03382039815187454,
0.019709382206201553,
0.018666988238692284,
0.039707381278276443,
0.032640594989061356,
-0.03363378345966339,
-0.04136396199464798,
-0.07048323005437851,
-0.013231373392045498,
-0.03562380373477936,
-0.00525191705673933,
0.06859841197729111
] |
dccuchile/albert-tiny-spanish-finetuned-ner | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 8 | 2020-11-26T10:48:10Z | ---
tags:
- summarization
widget:
- text: "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
---
# CodeTrans model for source code summarization csharp
Pretrained model on programming language csharp using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized csharp code functions: it works best with tokenized csharp functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on source code summarization csharp dataset.
## Intended uses & limitations
The model could be used to generate the description for the csharp function or be fine-tuned on other csharp code tasks. It can be used on unparsed and untokenized csharp code. However, if the csharp code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate csharp function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_csharp"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_csharp", skip_special_tokens=True),
device=0
)
tokenized_code = "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/source%20code%20summarization/csharp/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.004912909120321274,
-0.022527674213051796,
-0.010147196240723133,
0.021552421152591705,
0.028521709144115448,
0.03457624837756157,
-0.027780909091234207,
0.007694020867347717,
-0.026467280462384224,
0.06438393890857697,
0.04589415341615677,
0.008607467636466026,
-0.00570141663774848,
0.04439185932278633,
-0.03407652676105499,
-0.07241754233837128,
-0.021418806165456772,
-0.038531556725502014,
-0.030954979360103607,
-0.013379525393247604,
0.02371017448604107,
0.004953877069056034,
0.0026046272832900286,
0.0022397011052817106,
-0.003708094358444214,
0.020177112892270088,
0.006017505191266537,
0.021504536271095276,
0.03395185247063637,
-0.078618124127388,
-0.034187715500593185,
0.0021546108182519674,
-0.0538269504904747,
-0.02042842097580433,
-0.009618982672691345,
0.0181899294257164,
-0.005117654800415039,
0.04004925861954689,
0.02108008973300457,
0.05668573081493378,
-0.002554565202444792,
0.0203761737793684,
0.016085166484117508,
-0.035460010170936584,
0.06050333008170128,
0.0072585707530379295,
-0.024533512070775032,
-0.031147554516792297,
0.0240876954048872,
-0.001595279318280518,
-0.0651949942111969,
-0.05514463782310486,
-0.03230508416891098,
0.047185372561216354,
-0.012674132362008095,
-0.003441193839535117,
-0.06668566167354584,
-0.020381957292556763,
0.053731709718704224,
-0.05323931574821472,
-0.028199825435876846,
0.01151011697947979,
-0.057363227009773254,
0.01998753659427166,
0.02641197480261326,
0.007547707296907902,
0.004906727932393551,
-0.04605817422270775,
0.030743373557925224,
0.0010495397727936506,
0.05531452223658562,
-0.025014298036694527,
0.029527826234698296,
-0.10999057441949844,
0.0150840412825346,
0.0057489220052957535,
0.02188788168132305,
0.016078079119324684,
-0.006153832655400038,
0.05722464248538017,
0.004872834775596857,
-0.013704899698495865,
0.051463983952999115,
0.007827499881386757,
-0.011853314004838467,
0.04025972634553909,
-0.039437778294086456,
-0.021483948454260826,
-0.02336513251066208,
0.05763768404722214,
-0.06086380034685135,
-0.0599677674472332,
-0.01651388220489025,
-0.028107797726988792,
-0.03213907405734062,
0.011193851009011269,
0.05525822192430496,
-0.011999939568340778,
0.024637937545776367,
0.02137387916445732,
0.03695519268512726,
0.05193556845188141,
-0.011697151698172092,
0.02832959033548832,
0.030301421880722046,
0.013877609744668007,
-0.008170023560523987,
-0.040915653109550476,
-0.011722791008651257,
0.0488780178129673,
0.01866110973060131,
-0.03987153246998787,
-0.04337519034743309,
0.03142965957522392,
0.022450724616646767,
-0.041326697915792465,
0.04454393684864044,
-0.028012197464704514,
-0.04580128565430641,
-0.03634745627641678,
0.03603333607316017,
-0.013059736229479313,
-0.02117784507572651,
0.006786148529499769,
-0.040323927998542786,
0.007962791249155998,
-0.054729096591472626,
-0.025209471583366394,
0.01531420648097992,
0.04587533324956894,
0.004821670241653919,
0.08454693853855133,
0.020870892331004143,
-0.03404213860630989,
0.024105817079544067,
0.020662978291511536,
-0.06490299105644226,
0.05474906414747238,
0.04570823162794113,
0.10731784254312515,
-0.05974473059177399,
-0.044129628688097,
0.02462076209485531,
-0.007776255719363689,
-0.03367171436548233,
0.020957307890057564,
-0.009998113848268986,
-0.07009851187467575,
-0.03372935950756073,
-0.0040517994202673435,
0.05347319319844246,
-0.04792950302362442,
-0.011440134607255459,
0.018050502985715866,
0.003753427416086197,
0.015424158424139023,
-0.04246888309717178,
-0.002192526124417782,
-0.0053126392886042595,
-0.02273673750460148,
-0.06473840773105621,
0.033996399492025375,
0.0008011047029867768,
-0.025359120219945908,
-0.031703028827905655,
-0.03752521798014641,
0.003354505868628621,
0.10408084094524384,
0.011420730501413345,
-0.011042939499020576,
-0.06429668515920639,
0.0077311997301876545,
0.022019317373633385,
0.0485784113407135,
-0.022307539358735085,
0.031010309234261513,
0.04590883478522301,
0.08094323426485062,
-0.021785784512758255,
0.0769229382276535,
-0.016444068402051926,
-0.036914944648742676,
-0.0335981585085392,
0.02111067622900009,
0.003780943341553211,
-0.024280861020088196,
0.0073814732022583485,
0.02706650085747242,
-0.018835516646504402,
-0.00844393577426672,
-0.026987362653017044,
0.05879099294543266,
0.0075570521876215935,
0.0006827955949120224,
-0.026840176433324814,
0.01298571564257145,
-0.02090640738606453,
0.06062990427017212,
-0.03238920867443085,
-0.016820281744003296,
-0.0036282632499933243,
-0.030825236812233925,
-0.015650950372219086,
0.026111846789717674,
0.04115229845046997,
0.022932682186365128,
-0.0104440338909626,
0.11365946382284164,
-0.04489634186029434,
-0.009098534472286701,
-0.04347323998808861,
-0.03572981432080269,
0.025008661672472954,
0.04146348312497139,
0.029960179701447487,
0.03484783321619034,
0.006488923914730549,
-0.024956118315458298,
0.0225635077804327,
0.08362222462892532,
0.022667042911052704,
0.03309912607073784,
-0.006251039449125528,
-0.0295567587018013,
0.051775652915239334,
0.06487644463777542,
-0.02969571202993393,
-0.05015191435813904,
0.0462806411087513,
0.017697976902127266,
0.00638691196218133,
0.02602577582001686,
-0.009233287535607815,
0.01923476532101631,
-0.048487670719623566,
-0.06089639291167259,
0.05769604817032814,
0.011803412809967995,
-0.007168505806475878,
0.041021861135959625,
-0.002206402597948909,
0.0016783385071903467,
0.030340535566210747,
-0.0031948855612426996,
0.0007748423959128559,
-0.06064439192414284,
0.0022418880835175514,
0.004849509801715612,
0.0640529915690422,
-0.03784065693616867,
0.02576436847448349,
0.02278515323996544,
-0.0017703783232718706,
0.058209750801324844,
-0.03582561016082764,
0.029343366622924805,
0.03703350946307182,
0.030163465067744255,
-0.01992323063313961,
0.020077748224139214,
0.016915949061512947,
0.03870418667793274,
0.08153191208839417,
0.014145554043352604,
0.06441551446914673,
0.006519645918160677,
0.05715472623705864,
0.07002913951873779,
0.015499387867748737,
0.013464509509503841,
0.02300107292830944,
0.04892025142908096,
-0.004138832446187735,
-0.013526393100619316,
0.06893129646778107,
-0.058538809418678284,
0.025519344955682755,
-0.03236514702439308,
0.022798774763941765,
-0.012973945587873459,
-0.020191363990306854,
0.03736951947212219,
-0.003892859211191535,
-0.045925166457891464,
0.00902974046766758,
-0.029745198786258698,
-0.02432825416326523,
0.012828861363232136,
0.0011661681346595287,
-0.023153699934482574,
0.013712754473090172,
-0.025048470124602318,
0.019516905769705772,
-0.08015774190425873,
-0.04812606796622276,
-0.01185971312224865,
-0.04440620541572571,
0.008804111741483212,
-0.06937295198440552,
-0.04882052540779114,
-0.07045501470565796,
-0.023031849414110184,
0.0249819066375494,
0.00590306194499135,
-0.015776874497532845,
-0.02336300164461136,
0.016200672835111618,
-0.03602380305528641,
-0.03418462350964546,
-0.05418219044804573,
-0.05789266154170036,
-0.0017432975582778454,
-0.06807974725961685,
0.03951396048069,
-0.013041130267083645,
0.02339187078177929,
0.005298049654811621,
-0.009869472123682499,
-0.02398395724594593,
-0.01982547715306282,
0.07167937606573105,
0.015177852474153042,
-0.020115157589316368,
-0.03495270013809204,
0.025099510326981544,
-0.025262003764510155,
0.03604507073760033,
-0.017179235816001892,
-0.04511650651693344,
0.09643618017435074,
0.06081126630306244,
0.05426739156246185,
-0.011151076294481754,
-0.03428458049893379,
-0.04058535397052765,
-0.05817291885614395,
-0.03271105885505676,
-0.03832381218671799,
-0.03365376591682434,
0.0016608901787549257,
-0.055676162242889404,
-0.025018375366926193,
-0.019544143229722977,
-0.03654419630765915,
-0.030053773894906044,
0.029281558468937874,
0.018785197287797928,
0.03986942023038864,
0.05756876990199089,
0.010387035086750984,
-0.041847266256809235,
-0.03678146004676819,
0.04064812511205673,
0.0025204382836818695,
0.012465988285839558,
-0.07367706298828125,
-0.02945624105632305,
0.042660683393478394,
0.010567785240709782,
0.013737024739384651,
-0.030548566952347755,
0.04999728128314018,
0.01343458704650402,
0.006982166785746813,
0.010778989642858505,
0.007203965447843075,
-0.01969420723617077,
-0.025244615972042084,
0.007064284756779671,
-0.03271523118019104,
-0.03417424112558365,
-0.024634020403027534,
-0.005460189655423164,
0.041650693863630295,
-0.05917663127183914,
-0.054087165743112564,
-0.0003445114125497639,
0.0308829378336668,
0.03967733681201935,
0.023969318717718124,
-0.01944730058312416,
-0.011278747580945492,
-0.06353848427534103,
-0.02940765954554081,
0.045352447777986526,
0.02340487204492092,
-0.008176862262189388,
0.035906560719013214,
0.04117965325713158,
-0.04944728687405586,
0.023315586149692535,
0.02967403642833233,
0.04136170074343681,
0.027662841603159904,
-0.03357122465968132,
0.011173035949468613,
-0.05334758013486862,
0.014745323918759823,
0.010723969899117947,
-0.025710003450512886,
-0.04648114740848541,
-0.07174762338399887,
-0.03318873792886734,
0.023859256878495216,
-0.013657622039318085,
-0.008463067933917046,
0.04456821456551552,
-0.028269613161683083,
-0.04273483529686928,
-0.01309961173683405,
-0.004414509516209364,
0.06305218487977982,
-0.038558702915906906,
0.020894449204206467,
0.005565989296883345,
0.050145719200372696,
-0.04800171032547951,
0.0029644612222909927,
-0.03468462452292442,
-0.0197503250092268,
0.005299976095557213,
0.04603409022092819,
0.01933521218597889,
0.0610964372754097,
0.07502387464046478,
0.005849107168614864,
-0.02457108348608017,
0.04384295269846916,
0.04673672094941139,
0.005232018418610096,
-0.025263361632823944,
0.014164750464260578,
0.02244461514055729,
-0.026346096768975258,
0.014960004948079586,
-0.005637342110276222,
0.02542169950902462,
0.024347977712750435,
-0.015191089361906052,
-0.004026127513498068,
0.003507929388433695,
-0.02544042095541954,
-0.04114759713411331,
-0.05570961907505989,
-0.01848042942583561,
-0.02538282424211502,
-0.05389004573225975,
0.03157923370599747,
0.03395157307386398,
0.028971513733267784,
0.043788984417915344,
0.03481529280543327,
-0.04462628811597824,
-0.02423015609383583,
0.048864271491765976,
0.05039053410291672,
-0.04504287615418434,
-0.02785785123705864,
-0.056222040206193924,
0.03629099577665329,
0.047047268599271774,
-0.01927187666296959,
-0.08383787423372269,
0.0009675246546976268,
0.01856323331594467,
-0.017868109047412872,
0.06710350513458252,
0.019418811425566673,
0.021986613050103188,
0.04190417751669884,
-0.002199206966906786,
0.029221968725323677,
-0.01409365888684988,
0.02090049907565117,
0.002693175571039319,
0.036188095808029175,
-0.02742748335003853,
-0.03417022153735161,
-0.03491811454296112,
0.018344391137361526,
0.005330934189260006,
0.029270919039845467,
0.035362325608730316,
-0.01582132838666439,
-0.0780337005853653,
0.012507554143667221,
0.03644271567463875,
-0.030295781791210175,
0.017067182809114456,
0.01725712977349758,
0.04362216591835022,
-0.05454334244132042,
-0.029946062713861465,
-0.016733605414628983,
-0.012413715943694115,
0.029857492074370384,
0.012231191620230675,
-0.030122224241495132,
-0.06269245594739914,
0.013099148869514465,
-0.020288147032260895,
-0.028926385566592216,
-0.08364513516426086,
0.03273864835500717,
0.006317307706922293,
-0.006744897924363613,
0.05480717495083809,
0.040152937173843384,
0.027165114879608154,
0.034368716180324554,
-0.01916608214378357,
0.03977716714143753,
-0.01343345083296299,
0.02477465756237507,
-0.01791493594646454,
-0.02869243361055851,
-0.014383334666490555,
-0.06265203654766083,
-0.030001651495695114,
-0.03177390620112419,
-0.039405204355716705,
-0.048766929656267166,
-0.034286461770534515,
0.008007639087736607,
-0.00822135154157877,
-0.007322120945900679,
-0.015326999127864838,
0.002308682771399617,
-0.02429215796291828,
-0.032905396074056625,
-0.028544573113322258,
-0.043494004756212234,
-0.09847626835107803,
-0.024388931691646576,
0.01092348713427782,
0.042463935911655426,
0.03887090086936951,
0.005233927629888058,
0.010160176083445549,
0.015089565888047218,
0.016393180936574936,
-0.022482534870505333,
0.006429503206163645,
0.0038613867945969105,
-0.048714812844991684,
-0.023319222033023834,
-0.007432089652866125,
0.009822786785662174,
0.01511511392891407,
-0.0329781100153923,
0.005494486074894667,
0.050838813185691833,
-0.029354549944400787,
-0.0005251148832030594,
0.03773936256766319,
0.0009039980941452086,
-0.08393195271492004,
-0.047315992414951324,
0.006413388531655073,
-0.04747021198272705,
0.04722496494650841,
-0.0015699105570092797,
-0.03101854957640171,
-0.0070264157839119434,
0.007343837060034275,
0.036727119237184525,
-0.01205059327185154,
-0.02862081676721573,
0.004665154032409191,
-0.026986248791217804,
0.044328473508358,
-0.064107745885849,
0.048482745885849,
-0.03982383385300636,
0.00612892908975482,
-0.00828623678535223,
-0.003478109138086438,
-0.026837287470698357,
0.0653953030705452,
-0.008156471885740757,
-0.012439071200788021,
-0.005689420737326145,
0.028096621856093407,
-0.024989096447825432,
0.04492364823818207,
0.012488357722759247,
0.012356630526483059,
-0.030270248651504517,
0.013437128625810146,
-0.03879457339644432,
0.007457582745701075,
-0.03345804661512375,
-0.019314227625727654,
-0.02742825262248516,
-0.03442941978573799,
-0.010873167775571346,
-0.050391506403684616,
0.05517240986227989,
0.033333174884319305,
0.035764433443546295,
0.018364885821938515,
-0.024301210418343544,
-0.018481971696019173,
0.03024228662252426,
-0.08706720173358917,
-0.04741474241018295,
-0.03554471582174301,
0.02385035902261734,
-0.025999214500188828,
0.06927277892827988,
0.04410666972398758,
-0.058632973581552505,
-0.009586824104189873,
0.014844936318695545,
0.005192711018025875,
0.0008066775044426322,
0.028208507224917412,
0.027880018576979637,
0.05293794348835945,
0.03188871592283249,
-0.034273941069841385,
-0.0135341826826334,
-0.010808838531374931,
-0.029753241688013077,
-0.017762677744030952,
-0.025693323463201523,
0.026459304615855217,
-0.008513914421200752,
-0.03602781146764755,
-0.020698653534054756,
0.056940797716379166,
0.053925223648548126,
0.01593615487217903,
-0.005889002699404955,
-0.03884365037083626,
0.03131810203194618,
0.020260948687791824,
-0.05158209055662155,
-0.022915827110409737,
0.012775951065123081,
-0.047860872000455856,
0.07664526998996735,
-0.010659510269761086,
0.015247111208736897,
0.04109613224864006,
0.019458245486021042,
-0.005294627510011196,
0.03134705871343613,
-0.04006985202431679,
0.000556100916583091,
0.034924402832984924,
-0.05302884057164192,
-0.005042808596044779,
-0.017062325030565262,
0.05459047481417656,
-0.054060935974121094,
0.0352502167224884,
0.031476590782403946,
0.017575951293110847,
-0.006176276598125696,
-0.017568815499544144,
-0.0584249272942543,
0.04551991447806358,
-0.056532688438892365,
0.0715285986661911,
-0.01179534662514925,
-0.09045958518981934,
0.0779239758849144,
0.018801182508468628,
-0.093989796936512,
-0.0017517886590212584,
0.021188344806432724,
0.018090441823005676,
0.02667350322008133,
0.04456276819109917,
-0.09298890829086304,
0.004935381934046745,
-0.03596027195453644,
0.0113656772300601,
-0.05465149134397507,
-0.003831948386505246,
0.03381653502583504,
-0.056961044669151306,
-0.0009964588098227978,
0.03105321153998375,
-0.021023733541369438,
0.0035767171066254377,
0.02281682752072811,
-0.05217686668038368,
-0.0446043387055397,
-0.01363435946404934,
0.012711944058537483,
-0.03209623321890831,
0.030713798478245735,
-0.015138744376599789,
0.02778252214193344,
0.018802601844072342,
0.0016367619391530752,
-0.04006388038396835,
0.008947922848165035,
0.03279751166701317,
-0.038274120539426804,
-0.024299826472997665,
0.024245094507932663,
0.016759738326072693,
-0.007599272299557924,
0.027480803430080414,
-0.012576608918607235,
0.024112725630402565,
0.03638598322868347,
-0.013290864415466785,
0.024793166667222977,
-0.045506469905376434,
-0.008340016938745975,
0.023640785366296768,
0.01251170039176941,
0.03721197322010994,
-0.015331538394093513,
0.04956879839301109,
0.03838513791561127,
0.03089098632335663,
-0.02352491021156311,
-0.018910471349954605,
-0.018419310450553894,
0.007519049104303122,
-0.04470724239945412,
0.025528283789753914,
0.01948573999106884,
-0.04475364089012146,
-0.04331822693347931,
-0.0434405542910099,
-0.01650152914226055,
0.04551384598016739,
-0.036170266568660736,
0.014475646428763866,
0.055742550641298294,
-0.014410857111215591,
-0.04337804764509201,
-0.061451103538274765,
-0.0052122073248028755,
-0.02346719428896904,
0.015425958670675755,
0.021944373846054077,
-0.0215995442122221,
-0.02268816903233528,
-0.050501007586717606,
-0.07731179147958755,
0.033870480954647064,
0.014008820056915283,
-0.02689005620777607,
0.0514950193464756,
0.041286054998636246,
-0.018486283719539642,
0.0013629700988531113,
0.025334378704428673,
-0.05334436148405075,
0.021810773760080338,
-0.0011946834856644273,
0.009110135957598686,
0.03575841337442398,
0.033344566822052,
-0.010753116570413113,
-0.043010205030441284,
-0.050658922642469406,
-0.03372820094227791,
-0.03075174242258072,
-0.01568271405994892,
0.07886901497840881
] |
dccuchile/albert-tiny-spanish-finetuned-pos | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 5 | 2020-12-10T10:40:17Z | ---
tags:
- summarization
widget:
- text: "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
---
# CodeTrans model for source code summarization csharp
Pretrained model on programming language csharp using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized csharp code functions: it works best with tokenized csharp functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the source code summarization task for the csharp code snippets.
## Intended uses & limitations
The model could be used to generate the description for the csharp function or be fine-tuned on other csharp code tasks. It can be used on unparsed and untokenized csharp code. However, if the csharp code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate csharp function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_csharp_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_csharp_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "public static DateTime ParseUnixDateTime ( double unixTime ) { var dt = new DateTime ( CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , CODE_INTEGER , System . DateTimeKind . Utc ) ; dt = dt . AddSeconds ( unixTimeStamp ) . ToLocalTime ( ) ; return dt ; }"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/source%20code%20summarization/csharp/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 1200 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing csharp code.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
0.004994495771825314,
-0.024459198117256165,
-0.011352257803082466,
0.023900868371129036,
0.03026871755719185,
0.03166532143950462,
-0.027663912624120712,
0.003915242850780487,
-0.02493433840572834,
0.06510716676712036,
0.04905259609222412,
0.01631162129342556,
-0.006897088140249252,
0.04415011405944824,
-0.035064492374658585,
-0.0716528370976448,
-0.025272635743021965,
-0.03734339028596878,
-0.029399201273918152,
-0.012620104476809502,
0.02737598493695259,
0.0004968850989826024,
0.0070514981634914875,
-0.0026774925645440817,
-0.002170705236494541,
0.020082935690879822,
0.005221838131546974,
0.02846255898475647,
0.03624163940548897,
-0.07850116491317749,
-0.03750428929924965,
0.0015314245829358697,
-0.054098065942525864,
-0.01468193344771862,
-0.006679977290332317,
0.020619956776499748,
-0.004614556208252907,
0.04435170069336891,
0.021219711750745773,
0.05905405059456825,
0.00007722690497757867,
0.014602968469262123,
0.01222730241715908,
-0.034721873700618744,
0.05789428949356079,
0.01291239820420742,
-0.024188078939914703,
-0.02883075922727585,
0.02399335615336895,
0.0015088653890416026,
-0.06771651655435562,
-0.053964726626873016,
-0.0273672454059124,
0.052653614431619644,
-0.013379276730120182,
-0.0053351097740232944,
-0.06207408383488655,
-0.016733035445213318,
0.0568084716796875,
-0.05271400883793831,
-0.02732098288834095,
0.01398050133138895,
-0.04982468858361244,
0.017471982166171074,
0.023901676759123802,
-0.0010196034563705325,
0.0063177612610161304,
-0.045949459075927734,
0.030267126858234406,
0.0011947380844503641,
0.05791090056300163,
-0.021260404959321022,
0.02637440152466297,
-0.10762786120176315,
0.016262473538517952,
0.004843158647418022,
0.027705028653144836,
0.015534564852714539,
-0.005083676427602768,
0.05386364459991455,
0.00009441070142202079,
-0.011372542940080166,
0.05376971885561943,
0.0074450308457016945,
-0.0070678493939340115,
0.03864450007677078,
-0.04090132191777229,
-0.019711490720510483,
-0.02236233279109001,
0.055975813418626785,
-0.05843717232346535,
-0.05944862961769104,
-0.018955418840050697,
-0.028442416340112686,
-0.034592412412166595,
0.014603926800191402,
0.05560022220015526,
-0.016890982165932655,
0.025031665340065956,
0.020325127989053726,
0.03779389336705208,
0.04817698523402214,
-0.01605720818042755,
0.02702769637107849,
0.028749041259288788,
0.012786638922989368,
-0.008655233308672905,
-0.04011714458465576,
-0.010416483506560326,
0.05040411651134491,
0.017187083140015602,
-0.039276354014873505,
-0.04306533560156822,
0.030353030189871788,
0.021913157775998116,
-0.03812309727072716,
0.04113056883215904,
-0.02847113087773323,
-0.047054585069417953,
-0.0345785953104496,
0.03503124788403511,
-0.011095866560935974,
-0.0236828550696373,
0.012046387419104576,
-0.04057368263602257,
0.006746189668774605,
-0.05685238912701607,
-0.025853468105196953,
0.014034353196620941,
0.04491663724184036,
-0.0010775270638987422,
0.08416803926229477,
0.02400287240743637,
-0.03986717760562897,
0.02759929932653904,
0.023281708359718323,
-0.061251383274793625,
0.05577884986996651,
0.04593969136476517,
0.10743583738803864,
-0.06589293479919434,
-0.04826398938894272,
0.02874768152832985,
-0.000541532295756042,
-0.030264126136898994,
0.023076577112078667,
-0.013374878093600273,
-0.07375528663396835,
-0.03090496174991131,
-0.00009684378892416134,
0.054757557809352875,
-0.04985116049647331,
-0.00843045674264431,
0.022513948380947113,
0.003994091879576445,
0.017477983608841896,
-0.04105911776423454,
-0.0035562573466449976,
-0.0004510478174779564,
-0.025434449315071106,
-0.06590958684682846,
0.03494291752576828,
0.0032668758649379015,
-0.02759682759642601,
-0.03428236022591591,
-0.036206308752298355,
0.00450983876362443,
0.10168080031871796,
0.011809819377958775,
-0.012767080217599869,
-0.06503672152757645,
0.005511948373168707,
0.02132452093064785,
0.04825036972761154,
-0.024024374783039093,
0.03281499072909355,
0.042680855840444565,
0.07937940210103989,
-0.02535996586084366,
0.0780031681060791,
-0.016586624085903168,
-0.03942473977804184,
-0.03475252911448479,
0.0212271548807621,
0.00117058539763093,
-0.02865891344845295,
0.0027374597266316414,
0.025595512241125107,
-0.018751103430986404,
-0.01017676293849945,
-0.03257947042584419,
0.05370119586586952,
0.006231975741684437,
-0.00033760396763682365,
-0.02620686963200569,
0.015165836550295353,
-0.016077255830168724,
0.054086074233055115,
-0.03234429284930229,
-0.015207340940833092,
-0.0038259781431406736,
-0.0316854752600193,
-0.013570128008723259,
0.022489668801426888,
0.03957759588956833,
0.026124058291316032,
-0.007841617800295353,
0.1130855605006218,
-0.044365424662828445,
-0.006464690435677767,
-0.04643695801496506,
-0.0383383072912693,
0.022365348413586617,
0.03925899416208267,
0.03384881839156151,
0.030620813369750977,
0.005615544505417347,
-0.025774337351322174,
0.024144655093550682,
0.08136481046676636,
0.021669315174221992,
0.030929498374462128,
-0.009293600916862488,
-0.027468595653772354,
0.0547025129199028,
0.06354178488254547,
-0.025200339034199715,
-0.047435589134693146,
0.04557391256093979,
0.021242832764983177,
0.007291891612112522,
0.024512169882655144,
-0.008810424245893955,
0.016501639038324356,
-0.050448980182409286,
-0.060429152101278305,
0.05450506508350372,
0.013778120279312134,
-0.007471311371773481,
0.03778322786092758,
0.002403692342340946,
0.00416069058701396,
0.03093615546822548,
-0.009177694097161293,
0.003564898855984211,
-0.062189701944589615,
-0.0026349497493356466,
0.0012017253320664167,
0.061229780316352844,
-0.04115166515111923,
0.02902045287191868,
0.02323705144226551,
-0.0038523816037923098,
0.06552529335021973,
-0.033115603029727936,
0.03355108201503754,
0.04360712692141533,
0.02584555745124817,
-0.018844250589609146,
0.018720880150794983,
0.018563086166977882,
0.04498916491866112,
0.07340920716524124,
0.011950800195336342,
0.06504885107278824,
0.005987573880702257,
0.05676113814115524,
0.06820245832204819,
0.01987559348344803,
0.010738975368440151,
0.022436751052737236,
0.04880718141794205,
-0.0019403273472562432,
-0.010472891852259636,
0.07107716798782349,
-0.06719508022069931,
0.024956563487648964,
-0.029854493215680122,
0.021478010341525078,
-0.008340873755514622,
-0.021614329889416695,
0.03955281525850296,
-0.006703079678118229,
-0.04462491720914841,
0.008306685835123062,
-0.02939189225435257,
-0.02628747746348381,
0.015363411977887154,
-0.0009011626243591309,
-0.026052327826619148,
0.01287145260721445,
-0.024914059787988663,
0.013899348676204681,
-0.07678335160017014,
-0.042522840201854706,
-0.011766431853175163,
-0.0427689403295517,
0.011855488643050194,
-0.0719563439488411,
-0.052345506846904755,
-0.06967995315790176,
-0.02198481559753418,
0.027188435196876526,
0.005199073348194361,
-0.01638014242053032,
-0.019911235198378563,
0.015045232139527798,
-0.03856963291764259,
-0.028269929811358452,
-0.0538073368370533,
-0.05761692300438881,
-0.005880462005734444,
-0.06393014639616013,
0.03848147764801979,
-0.015971215441823006,
0.018686611205339432,
0.007534202188253403,
-0.012574930675327778,
-0.02841450832784176,
-0.021329715847969055,
0.0711749792098999,
0.012301423586905003,
-0.015575763769447803,
-0.030583182349801064,
0.018625041469931602,
-0.027905823662877083,
0.04090114310383797,
-0.021019533276557922,
-0.04638667404651642,
0.096525177359581,
0.05931134521961212,
0.0533754788339138,
-0.008608953095972538,
-0.036025118082761765,
-0.04554968699812889,
-0.06599413603544235,
-0.027882253751158714,
-0.03708997741341591,
-0.03241139277815819,
-0.003084033727645874,
-0.05408867076039314,
-0.026497269049286842,
-0.020205345004796982,
-0.034473966807127,
-0.029109638184309006,
0.02565649151802063,
0.01695096120238304,
0.03809872269630432,
0.05688079074025154,
0.004212519619613886,
-0.04373918101191521,
-0.0353223942220211,
0.03734048828482628,
0.0015563899651169777,
0.01146741583943367,
-0.07535477727651596,
-0.0313580147922039,
0.04447893053293228,
0.010508320294320583,
0.012008857913315296,
-0.0290425643324852,
0.04620923474431038,
0.01213254127651453,
0.0106909004971385,
0.014074114151299,
0.006008682772517204,
-0.011873518116772175,
-0.02267674170434475,
0.010576801374554634,
-0.040380701422691345,
-0.03599385544657707,
-0.021349528804421425,
-0.003800185164436698,
0.042090658098459244,
-0.061210256069898605,
-0.053518038243055344,
0.0018608885584399104,
0.026887351647019386,
0.04243554174900055,
0.024680985137820244,
-0.016968023031949997,
-0.010462061502039433,
-0.05973638966679573,
-0.028117991983890533,
0.04694670811295509,
0.025471283122897148,
-0.011835314333438873,
0.039351362735033035,
0.035882387310266495,
-0.05303121358156204,
0.023069964721798897,
0.02671516314148903,
0.03890743851661682,
0.031367748975753784,
-0.03138452023267746,
0.016186416149139404,
-0.052449099719524384,
0.010424754582345486,
0.008945104666054249,
-0.027295246720314026,
-0.0506250336766243,
-0.073390893638134,
-0.0318179614841938,
0.02195827290415764,
-0.013745223172008991,
-0.0063444264233112335,
0.045714884996414185,
-0.030223581939935684,
-0.03579177334904671,
-0.01021064817905426,
-0.004270762670785189,
0.06527841091156006,
-0.039455611258745193,
0.021326879039406776,
0.0028269144240766764,
0.04942891374230385,
-0.043836869299411774,
0.0023974592331796885,
-0.03297009691596031,
-0.01808454468846321,
0.00256503582932055,
0.04745800793170929,
0.01850825548171997,
0.06622972339391708,
0.07685249298810959,
0.006438585463911295,
-0.024901866912841797,
0.040790606290102005,
0.046793367713689804,
0.0039319139905273914,
-0.019275126978754997,
0.015401135198771954,
0.02310878410935402,
-0.028890328481793404,
0.012017683126032352,
-0.005397596396505833,
0.0258043073117733,
0.02733467146754265,
-0.015124816447496414,
0.00034093379508703947,
0.005184016190469265,
-0.026393869891762733,
-0.040711820125579834,
-0.05447075515985489,
-0.025752834975719452,
-0.028455523774027824,
-0.056021302938461304,
0.030242208391427994,
0.036949772387742996,
0.02680891938507557,
0.042813483625650406,
0.03608410432934761,
-0.046754077076911926,
-0.025512030348181725,
0.05027294531464577,
0.05647846311330795,
-0.048333168029785156,
-0.026022953912615776,
-0.06116800755262375,
0.03676646947860718,
0.04930778965353966,
-0.02455715648829937,
-0.08557990938425064,
0.0003252429887652397,
0.02530248463153839,
-0.019549855962395668,
0.06717986613512039,
0.01916344277560711,
0.021677041426301003,
0.037848688662052155,
-0.002516757696866989,
0.03201098367571831,
-0.014754424802958965,
0.02477368153631687,
0.00662287836894393,
0.03623390197753906,
-0.02256210334599018,
-0.03435933589935303,
-0.030992014333605766,
0.024664750322699547,
0.0022509919945150614,
0.027489161118865013,
0.03207416087388992,
-0.014301772229373455,
-0.07828997820615768,
0.011185497045516968,
0.03799881786108017,
-0.03196723386645317,
0.02062990888953209,
0.01633971370756626,
0.04593265801668167,
-0.06146971508860588,
-0.025940939784049988,
-0.022852884605526924,
-0.014767073094844818,
0.028626540675759315,
0.012407363392412663,
-0.030105287209153175,
-0.06389136612415314,
0.012731647118926048,
-0.019848888739943504,
-0.02629188261926174,
-0.08596384525299072,
0.03472236543893814,
0.007207936607301235,
-0.005300102289766073,
0.05370325967669487,
0.03616391867399216,
0.026166288182139397,
0.032098595052957535,
-0.018330436199903488,
0.040070101618766785,
-0.016522547230124474,
0.026786165311932564,
-0.01417967677116394,
-0.033644307404756546,
-0.010871092788875103,
-0.06825724244117737,
-0.028002258390188217,
-0.035761915147304535,
-0.03932969272136688,
-0.04785618185997009,
-0.03487061336636543,
0.009068737737834454,
-0.0063104163855314255,
-0.007108849007636309,
-0.013949115760624409,
-0.002782894065603614,
-0.01970542222261429,
-0.028533712029457092,
-0.03504769504070282,
-0.05102077126502991,
-0.09126139432191849,
-0.023109382018446922,
0.01186788734048605,
0.04481812193989754,
0.03706424683332443,
0.005595821887254715,
0.009149148128926754,
0.01307632215321064,
0.015798138454556465,
-0.018231326714158058,
0.010865585878491402,
0.002289762254804373,
-0.047267261892557144,
-0.019982492551207542,
-0.012776317074894905,
0.010151227936148643,
0.007980135269463062,
-0.03431834653019905,
0.005507421214133501,
0.049888160079717636,
-0.02928370051085949,
0.0016105747781693935,
0.04097703844308853,
0.0020239786244928837,
-0.08364921808242798,
-0.04369805380702019,
0.006873264908790588,
-0.04492407292127609,
0.04466736689209938,
-0.001734749530442059,
-0.030364524573087692,
-0.00799799058586359,
0.0021262613590806723,
0.03345398232340813,
-0.012124013155698776,
-0.026621460914611816,
0.006478799507021904,
-0.031127870082855225,
0.046558916568756104,
-0.06529687345027924,
0.05496496707201004,
-0.03950166702270508,
-0.0017880297964438796,
-0.003085697302594781,
0.00016358915308956057,
-0.02641712874174118,
0.0651368647813797,
-0.010852919891476631,
-0.012525469996035099,
-0.0038526267744600773,
0.02741037867963314,
-0.025409189984202385,
0.04660920426249504,
0.009783437475562096,
0.011365026235580444,
-0.029739568009972572,
0.012880991213023663,
-0.03707036375999451,
0.004513075575232506,
-0.03389471024274826,
-0.023638537153601646,
-0.025618668645620346,
-0.03706115111708641,
-0.00985304918140173,
-0.051480866968631744,
0.056780796498060226,
0.03524792194366455,
0.03300720080733299,
0.016680896282196045,
-0.02623378299176693,
-0.020969092845916748,
0.02736872434616089,
-0.08775795251131058,
-0.04447592794895172,
-0.03421423211693764,
0.022986043244600296,
-0.02440994419157505,
0.06300976872444153,
0.042425286024808884,
-0.059349603950977325,
-0.01518566720187664,
0.011167125776410103,
0.010334933176636696,
0.004319319035857916,
0.03035210259258747,
0.021015552803874016,
0.0527212880551815,
0.0352703295648098,
-0.033278241753578186,
-0.008485765196383,
-0.008346418850123882,
-0.028846757486462593,
-0.022892244160175323,
-0.025232402607798576,
0.031427908688783646,
-0.01070780772715807,
-0.03834124282002449,
-0.023479226976633072,
0.05651954561471939,
0.05535237118601799,
0.014902394264936447,
-0.006485029589384794,
-0.035674575716257095,
0.03168493136763573,
0.021677415817975998,
-0.05114065855741501,
-0.024227513000369072,
0.015308436937630177,
-0.04685356467962265,
0.0763055756688118,
-0.0068089934065938,
0.015112399123609066,
0.041972894221544266,
0.019050220027565956,
-0.004100441467016935,
0.03148338571190834,
-0.03982384875416756,
-0.0007258289260789752,
0.036805227398872375,
-0.0566788949072361,
0.002761194482445717,
-0.015960343182086945,
0.056060925126075745,
-0.05937189236283302,
0.03767036646604538,
0.02764829806983471,
0.017370346933603287,
-0.00956782978028059,
-0.012861664406955242,
-0.062290292233228683,
0.04866233468055725,
-0.04854295030236244,
0.06890705972909927,
-0.0150230647996068,
-0.08499336242675781,
0.07972193509340286,
0.021332498639822006,
-0.09124790877103806,
0.00012121973122702911,
0.02301955409348011,
0.014963904395699501,
0.030889781191945076,
0.04248705506324768,
-0.09197600930929184,
-0.0035186398308724165,
-0.04043757915496826,
0.015585102140903473,
-0.05279915779829025,
-0.005574459210038185,
0.033575788140296936,
-0.05824653059244156,
-0.0011400183429941535,
0.030455458909273148,
-0.020598962903022766,
0.00036831392208114266,
0.020169131457805634,
-0.05595666542649269,
-0.04384356364607811,
-0.011270121671259403,
0.00998225249350071,
-0.03552192449569702,
0.03174622356891632,
-0.012730902060866356,
0.02501378208398819,
0.013812538236379623,
-0.0023673393297940493,
-0.0340203195810318,
0.008445181883871555,
0.02763361856341362,
-0.03500988706946373,
-0.0240987166762352,
0.023841163143515587,
0.015420719049870968,
-0.010517643764615059,
0.0225046556442976,
-0.013550586067140102,
0.021555058658123016,
0.03190245106816292,
-0.015996364876627922,
0.023575982078909874,
-0.048256780952215195,
-0.01005159504711628,
0.02700376696884632,
0.015165484510362148,
0.03363547846674919,
-0.013107970356941223,
0.043836358934640884,
0.03557378426194191,
0.03385469689965248,
-0.021437859162688255,
-0.01744907908141613,
-0.01641753502190113,
0.006805815733969212,
-0.045808564871549606,
0.023320721462368965,
0.021074555814266205,
-0.04302658885717392,
-0.04015512019395828,
-0.04394664615392685,
-0.015519827604293823,
0.04430896416306496,
-0.0371449775993824,
0.012016568332910538,
0.0521150566637516,
-0.016626369208097458,
-0.04740680381655693,
-0.06079179048538208,
-0.004425161983817816,
-0.02374996617436409,
0.021982338279485703,
0.019643262028694153,
-0.018342943862080574,
-0.023370806127786636,
-0.05225419998168945,
-0.07619982957839966,
0.038647737354040146,
0.017798900604248047,
-0.026089664548635483,
0.04645926505327225,
0.036100395023822784,
-0.01893574558198452,
0.0028730055782943964,
0.029606861993670464,
-0.053949885070323944,
0.026529045775532722,
-0.001575188129208982,
0.008210753090679646,
0.038234639912843704,
0.03152163326740265,
-0.005579393357038498,
-0.04482777416706085,
-0.045518480241298676,
-0.03248710557818413,
-0.03212040290236473,
-0.01175628136843443,
0.07694916427135468
] |
dccuchile/albert-tiny-spanish-finetuned-xnli | [
"pytorch",
"albert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"AlbertForSequenceClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 31 | null | ---
tags:
- summarization
widget:
- text: '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
---
# CodeTrans model for source code summarization python
Pretrained model on programming language python using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on source code summarization python dataset.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_python"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_python", skip_special_tokens=True),
device=0
)
tokenized_code = '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/source%20code%20summarization/python/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0009263811516575515,
-0.026376847177743912,
-0.01309140957891941,
0.03060452826321125,
0.029267551377415657,
0.030984021723270416,
-0.02706797793507576,
0.000726700818631798,
-0.025828860700130463,
0.06145944446325302,
0.04355631023645401,
0.004861496854573488,
-0.005752789322286844,
0.04707479104399681,
-0.038425520062446594,
-0.0653248056769371,
-0.024166997522115707,
-0.03254467993974686,
-0.029377548024058342,
-0.011568550951778889,
0.016869036480784416,
0.0007553944597020745,
0.0137281883507967,
0.007360368967056274,
-0.005019481759518385,
0.012346691451966763,
0.003252496011555195,
0.017105232924222946,
0.035342033952474594,
-0.08035068958997726,
-0.023836670443415642,
0.001746437163092196,
-0.048035141080617905,
-0.01204654574394226,
-0.016547823324799538,
0.020341604948043823,
0.0031047624070197344,
0.026661034673452377,
0.015420100651681423,
0.06515698879957199,
-0.0014571717474609613,
0.02522028610110283,
0.01245805248618126,
-0.03371735289692879,
0.059236038476228714,
0.005069009028375149,
-0.028684334829449654,
-0.030751841142773628,
0.018592065200209618,
0.005401964765042067,
-0.05689592286944389,
-0.07007390260696411,
-0.029461897909641266,
0.05308770760893822,
-0.008387803100049496,
-0.012740259058773518,
-0.07143479585647583,
-0.01361461728811264,
0.04523295536637306,
-0.058042220771312714,
-0.032431524246931076,
0.009146342054009438,
-0.059479970484972,
0.017076749354600906,
0.01277090609073639,
0.008217754773795605,
0.007959472946822643,
-0.03625914826989174,
0.027165153995156288,
0.0023176847025752068,
0.05956936255097389,
-0.017865369096398354,
0.03180547058582306,
-0.11186578124761581,
0.021104028448462486,
-0.006172910798341036,
0.014453139156103134,
0.010740148834884167,
-0.013830514624714851,
0.05310935527086258,
0.003992599900811911,
-0.009910857304930687,
0.041851069778203964,
0.014109526760876179,
-0.015189651399850845,
0.04033366218209267,
-0.03579932078719139,
-0.015790602192282677,
-0.024089200422167778,
0.06728501617908478,
-0.07076837867498398,
-0.0657099038362503,
-0.007753554731607437,
-0.025984127074480057,
-0.03257523477077484,
0.018777422606945038,
0.04588136449456215,
-0.010357480496168137,
0.02217712625861168,
0.0078034535981714725,
0.03845793753862381,
0.051323339343070984,
-0.0036952111404389143,
0.04555262252688408,
0.027332350611686707,
0.01448198314756155,
-0.014251239597797394,
-0.044063158333301544,
-0.019843680784106255,
0.04034837707877159,
0.016952864825725555,
-0.032260265201330185,
-0.04896999150514603,
0.03320354223251343,
0.022857967764139175,
-0.043263472616672516,
0.04071582108736038,
-0.024634771049022675,
-0.049044862389564514,
-0.032944146543741226,
0.040627870708703995,
-0.009267727844417095,
-0.01256592757999897,
0.009267358109354973,
-0.04255877435207367,
-0.0006281479727476835,
-0.058630768209695816,
-0.026074405759572983,
0.010970246978104115,
0.040199775248765945,
-0.003996904939413071,
0.08810114115476608,
0.012731939554214478,
-0.025848833844065666,
0.007191562559455633,
0.013874147087335587,
-0.0746307522058487,
0.06605778634548187,
0.03964528441429138,
0.11143235862255096,
-0.06272026151418686,
-0.040614210069179535,
0.023838765919208527,
-0.010004060342907906,
-0.025591373443603516,
0.019689273089170456,
-0.0037944703362882137,
-0.07690045982599258,
-0.02876543439924717,
-0.006996171083301306,
0.06530795246362686,
-0.04017668962478638,
-0.022323492914438248,
0.019063187763094902,
0.005374356638640165,
0.00985434465110302,
-0.0406530424952507,
0.0030447335448116064,
-0.002152184024453163,
-0.026905396953225136,
-0.0659632533788681,
0.03140813857316971,
-0.0008241684408858418,
-0.025854380801320076,
-0.026516256853938103,
-0.04040475934743881,
0.00965537317097187,
0.11112482845783234,
0.0005820333026349545,
-0.011133371852338314,
-0.048519399017095566,
0.012936709448695183,
0.02442256547510624,
0.0485415980219841,
-0.017917538061738014,
0.01898600161075592,
0.04361551254987717,
0.07202551513910294,
-0.025149567052721977,
0.07437040656805038,
-0.01617688313126564,
-0.035628728568553925,
-0.03200743719935417,
0.018006600439548492,
-0.01335261669009924,
-0.03623117133975029,
0.009579867124557495,
0.028429588302969933,
-0.015104222111403942,
-0.0058488138020038605,
-0.00882155355066061,
0.058385979384183884,
0.02573232911527157,
-0.006118788383901119,
-0.03146936371922493,
0.013118352741003036,
-0.02080434001982212,
0.0667584165930748,
-0.04125818610191345,
-0.010753612034022808,
-0.013703691773116589,
-0.03542998433113098,
-0.010134346783161163,
0.028880881145596504,
0.047487903386354446,
0.019201306626200676,
-0.011000084690749645,
0.10620910674333572,
-0.04107879102230072,
0.0036677673924714327,
-0.04723384603857994,
-0.03498483821749687,
0.024914177134633064,
0.03514557704329491,
0.03047465905547142,
0.0315542034804821,
0.014367406256496906,
-0.025167075917124748,
0.013759251683950424,
0.07339020073413849,
0.028251558542251587,
0.0429685115814209,
-0.010998428799211979,
-0.02909220941364765,
0.032187044620513916,
0.06943850964307785,
-0.041812747716903687,
-0.041107743978500366,
0.04256853088736534,
0.029323557391762733,
-0.00831893552094698,
0.02803228236734867,
-0.009601479396224022,
0.012094908393919468,
-0.04401572048664093,
-0.06398409605026245,
0.04494897276163101,
0.01597096212208271,
0.0035026941914111376,
0.034785445779561996,
-0.0014148190384730697,
-0.00014198834833223373,
0.034166764467954636,
0.002908606780692935,
-0.0004113019385840744,
-0.05788925662636757,
0.009829303249716759,
0.0019020413747057319,
0.0628504678606987,
-0.03574395552277565,
0.0330868698656559,
0.015826348215341568,
-0.00034904564381577075,
0.05603398010134697,
-0.03355911374092102,
0.027829144150018692,
0.03347620740532875,
0.027096576988697052,
-0.01757795922458172,
0.01959470473229885,
0.02438829466700554,
0.026789013296365738,
0.08324571698904037,
0.012205646373331547,
0.06352926790714264,
-0.0034728460013866425,
0.05977442115545273,
0.07487912476062775,
0.013219814747571945,
0.01043752208352089,
0.021958613768219948,
0.06703122705221176,
-0.010254831053316593,
-0.014071762561798096,
0.06547373533248901,
-0.04765746742486954,
0.028066495433449745,
-0.03850318118929863,
0.029952771961688995,
-0.014480143785476685,
-0.015943892300128937,
0.03522659093141556,
0.0028081953059881926,
-0.047631435096263885,
0.004743147641420364,
-0.0275576114654541,
-0.02589978277683258,
0.009811855852603912,
0.0021880054846405983,
-0.03056100755929947,
0.024365348741412163,
-0.02068590186536312,
0.025442035868763924,
-0.08522512018680573,
-0.04828967899084091,
-0.005659606773406267,
-0.04048887640237808,
0.013506311923265457,
-0.07168278843164444,
-0.05700228363275528,
-0.06396367400884628,
-0.019455166533589363,
0.0314536914229393,
0.0036193663254380226,
-0.008786527439951897,
-0.029469111934304237,
0.00886220671236515,
-0.04236423224210739,
-0.0274009108543396,
-0.05523074418306351,
-0.05828329175710678,
-0.002831843448802829,
-0.06488882005214691,
0.04103808104991913,
-0.02042047493159771,
0.02970532327890396,
0.008881350979208946,
-0.013832989148795605,
-0.028276612982153893,
-0.018190473318099976,
0.06982802599668503,
0.010162588208913803,
-0.012924408540129662,
-0.0338745042681694,
0.01678643748164177,
-0.022816073149442673,
0.031211944296956062,
-0.00022762303706258535,
-0.038853827863931656,
0.1008581817150116,
0.06637478619813919,
0.04195090010762215,
-0.013520204462110996,
-0.03905986621975899,
-0.04331798851490021,
-0.04745987057685852,
-0.02305203676223755,
-0.027691364288330078,
-0.03226510062813759,
-0.00007368732622126117,
-0.055775728076696396,
-0.02239033579826355,
-0.028020396828651428,
-0.04580635577440262,
-0.019643735140562057,
0.029476163908839226,
0.0306264515966177,
0.040606409311294556,
0.05098420009016991,
0.022338146343827248,
-0.03966319188475609,
-0.03388706594705582,
0.041604120284318924,
0.0018386834999546409,
0.00280802883207798,
-0.07414979487657547,
-0.04032352939248085,
0.039492975920438766,
0.012297595851123333,
-0.0001184892826131545,
-0.025385932996869087,
0.05194733664393425,
0.014691030606627464,
0.01060884352773428,
-0.0006354438373818994,
-0.005938182584941387,
-0.01768375001847744,
-0.02184031344950199,
-0.0013824079651385546,
-0.030576113611459732,
-0.03578263521194458,
-0.01903851330280304,
-0.0072982097044587135,
0.04313632845878601,
-0.06132442131638527,
-0.05943744629621506,
-0.005078326910734177,
0.03617998585104942,
0.034672170877456665,
0.02285265550017357,
-0.02020789124071598,
-0.006343082059174776,
-0.06465378403663635,
-0.04214530065655708,
0.036098651587963104,
0.013072160072624683,
-0.007330270018428564,
0.04645383358001709,
0.04992438107728958,
-0.054517559707164764,
0.02556382305920124,
0.03710469231009483,
0.05005163699388504,
0.019993789494037628,
-0.03368549048900604,
0.01014731451869011,
-0.047730762511491776,
0.019981451332569122,
0.008269491605460644,
-0.030178915709257126,
-0.0492374487221241,
-0.07201728969812393,
-0.02961764484643936,
0.011724704876542091,
-0.012887543998658657,
-0.00020949025929439813,
0.04583532363176346,
-0.029817653819918633,
-0.051023002713918686,
-0.0063316477462649345,
0.005642500706017017,
0.07185030728578568,
-0.040838271379470825,
0.033524349331855774,
0.010502294637262821,
0.062240295112133026,
-0.039880845695734024,
0.004482940770685673,
-0.030433151870965958,
-0.019234461709856987,
0.006581847555935383,
0.05008662864565849,
0.029883237555623055,
0.057597290724515915,
0.07707619667053223,
0.010658972896635532,
-0.03380992263555527,
0.04522549733519554,
0.053745679557323456,
0.010271497070789337,
-0.026012888178229332,
0.006171515677124262,
0.016483474522829056,
-0.029240664094686508,
0.018283680081367493,
-0.002194484928622842,
0.01647769846022129,
0.025791900232434273,
-0.003373068058863282,
0.0013945159735158086,
-0.0010006035445258021,
-0.02396296337246895,
-0.04498521238565445,
-0.0464436411857605,
-0.004613101948052645,
-0.032321151345968246,
-0.049494046717882156,
0.02879963628947735,
0.03906622901558876,
0.027084698900580406,
0.04719150811433792,
0.04242308810353279,
-0.03250846639275551,
-0.026952696964144707,
0.04624148830771446,
0.049132201820611954,
-0.04080258309841156,
-0.04438596963882446,
-0.05118810385465622,
0.033991605043411255,
0.046917788684368134,
-0.01828586310148239,
-0.09730339050292969,
0.001413075951859355,
0.023646432906389236,
-0.019436312839388847,
0.06464195251464844,
0.029783383011817932,
0.02381405048072338,
0.05444527044892311,
-0.0043237474747002125,
0.024455919861793518,
-0.014694469049572945,
0.0171484537422657,
0.00015774335770402104,
0.03811752051115036,
-0.025440461933612823,
-0.03292585909366608,
-0.04408340901136398,
0.019478006288409233,
0.008727814070880413,
0.03778214380145073,
0.03256019949913025,
-0.013073999434709549,
-0.07719815522432327,
0.0016881232149899006,
0.029025878757238388,
-0.02879258617758751,
0.013074064627289772,
0.02785542793571949,
0.03377430886030197,
-0.05028187856078148,
-0.030843107029795647,
-0.018070805817842484,
-0.012963458895683289,
0.03122260607779026,
0.0026327765081077814,
-0.015478860586881638,
-0.06651072949171066,
0.01159198023378849,
-0.02116774395108223,
-0.030881492421030998,
-0.0825323686003685,
0.035321641713380814,
0.004993323236703873,
-0.0013107912382110953,
0.05332667753100395,
0.03631679713726044,
0.019678549841046333,
0.029607202857732773,
-0.015946807339787483,
0.03213733434677124,
-0.024149034172296524,
0.021704811602830887,
-0.017444664612412453,
-0.025403611361980438,
-0.023186232894659042,
-0.05662749335169792,
-0.0308297798037529,
-0.038347028195858,
-0.04673396050930023,
-0.04695247858762741,
-0.02834388241171837,
0.007648177910596132,
-0.012876241467893124,
-0.007396330591291189,
-0.011583904735744,
0.006321127526462078,
-0.02751636691391468,
-0.02465991862118244,
-0.029815079644322395,
-0.04088257625699043,
-0.1026049256324768,
-0.02606978267431259,
0.0042031751945614815,
0.0406251959502697,
0.037073541432619095,
-0.0026690615341067314,
0.003609919222071767,
0.024771638214588165,
0.006409115623682737,
-0.00719243660569191,
0.020024916157126427,
0.008007846772670746,
-0.04746294021606445,
-0.03126109391450882,
0.007446844130754471,
0.011200910434126854,
0.009791928343474865,
-0.02361707016825676,
0.00528136920183897,
0.04939699172973633,
-0.030420124530792236,
-0.0009542013285681605,
0.03737498074769974,
0.00030988280195742846,
-0.08140376955270767,
-0.040641363710165024,
0.0051998477429151535,
-0.04534946382045746,
0.037177301943302155,
0.0004698159173130989,
-0.027350952848792076,
-0.014631657861173153,
0.014077057130634785,
0.03337477892637253,
-0.01507078018039465,
-0.030392592772841454,
-0.0052858092822134495,
-0.03513859957456589,
0.038470808416604996,
-0.06454411894083023,
0.040505968034267426,
-0.03265945613384247,
-0.0035160742700099945,
-0.009614460170269012,
-0.005322359502315521,
-0.03421409800648689,
0.06564369797706604,
-0.01228963490575552,
-0.008501304313540459,
-0.01190891396254301,
0.007364016957581043,
-0.024303488433361053,
0.04220907762646675,
-0.01107427105307579,
0.006280898116528988,
-0.029790598899126053,
0.015330638736486435,
-0.04683181643486023,
0.004224525764584541,
-0.030674129724502563,
-0.014687013812363148,
-0.02406086027622223,
-0.029357828199863434,
-0.005789491813629866,
-0.05414772033691406,
0.047575101256370544,
0.023913733661174774,
0.03676728904247284,
0.01429405901581049,
-0.022207507863640785,
-0.012077431194484234,
0.025310810655355453,
-0.08574832230806351,
-0.05153016373515129,
-0.031952738761901855,
0.01935555972158909,
-0.024324538186192513,
0.06464585661888123,
0.052640143781900406,
-0.05739575996994972,
-0.008944922126829624,
0.014586636796593666,
0.011709284968674183,
0.003274479415267706,
0.03003433160483837,
0.03035152517259121,
0.040603071451187134,
0.046522896736860275,
-0.038750242441892624,
-0.009100236929953098,
-0.00951042678207159,
-0.0191216878592968,
-0.015310368500649929,
-0.019585859030485153,
0.023245038464665413,
-0.012903316877782345,
-0.03985591232776642,
-0.024302786216139793,
0.06103939935564995,
0.06602219492197037,
0.023485170677304268,
0.00014677701983600855,
-0.03579069301486015,
0.028025878593325615,
0.011704149655997753,
-0.05274044722318649,
-0.026064440608024597,
0.014982137829065323,
-0.0465451143682003,
0.08348038047552109,
-0.006110913120210171,
0.013819040730595589,
0.024472791701555252,
0.025094881653785706,
-0.003335986752063036,
0.04142610728740692,
-0.03441821038722992,
-0.0039296578615903854,
0.03645570948719978,
-0.04603779315948486,
-0.009746083989739418,
-0.0071988156996667385,
0.048875726759433746,
-0.051547031849622726,
0.04037727043032646,
0.026689298450946808,
0.014226948842406273,
-0.011772199533879757,
-0.0258037056773901,
-0.052683327347040176,
0.0407475121319294,
-0.0644131749868393,
0.06967820972204208,
-0.015566355548799038,
-0.07784236967563629,
0.09182628989219666,
0.01602981984615326,
-0.09606471657752991,
0.002149923238903284,
0.0237385593354702,
0.0180607158690691,
0.0265774168074131,
0.04475343972444534,
-0.08629036694765091,
0.0034275082871317863,
-0.03647656366229057,
0.009819403290748596,
-0.06405074894428253,
-0.0027580708265304565,
0.0322958305478096,
-0.05328342691063881,
0.005887659732252359,
0.03546944260597229,
-0.017906971275806427,
0.008472674526274204,
0.019626950845122337,
-0.048403557389974594,
-0.038915857672691345,
-0.02171603962779045,
0.013266876339912415,
-0.02794625423848629,
0.03152061626315117,
-0.013833167962729931,
0.0361243300139904,
0.02008291706442833,
0.0006163669168017805,
-0.04759602248668671,
0.009871837683022022,
0.029032425954937935,
-0.0437593013048172,
-0.039695583283901215,
0.020474690943956375,
0.00433500437065959,
-0.005443450063467026,
0.03527417778968811,
-0.008753828704357147,
0.02458576112985611,
0.0327489972114563,
-0.014055570587515831,
0.019390854984521866,
-0.039742425084114075,
0.00044480166980065405,
0.016098378226161003,
0.013008412905037403,
0.03751407936215401,
-0.017093678936362267,
0.033933695405721664,
0.029935607686638832,
0.03282567858695984,
-0.022769222036004066,
-0.021562442183494568,
-0.013305503875017166,
0.015487481839954853,
-0.03976691886782646,
0.025812285020947456,
0.025106100365519524,
-0.037329304963350296,
-0.043943505734205246,
-0.03372298553586006,
-0.018518732860684395,
0.05529685318470001,
-0.03753918409347534,
0.01714434288442135,
0.05644062161445618,
-0.017710082232952118,
-0.050865333527326584,
-0.060250312089920044,
-0.011301934719085693,
-0.024319151416420937,
0.02663571387529373,
0.02415628172457218,
-0.024926457554101944,
-0.0160662904381752,
-0.05076703429222107,
-0.07066599279642105,
0.045331504195928574,
0.022782180458307266,
-0.017728561535477638,
0.04441996291279793,
0.03823879361152649,
-0.020488524809479713,
0.007865737192332745,
0.022697370499372482,
-0.04664921388030052,
0.015919677913188934,
0.007205320987850428,
0.013030262663960457,
0.039262983947992325,
0.03638681769371033,
-0.01503022201359272,
-0.03524009510874748,
-0.06792976707220078,
-0.02325175516307354,
-0.03317246213555336,
-0.011580334044992924,
0.07977814227342606
] |
dccuchile/albert-xlarge-spanish-finetuned-ner | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 5 | null | ---
tags:
- summarization
widget:
- text: '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
---
# CodeTrans model for source code summarization python
Pretrained model on programming language python using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized python code functions: it works best with tokenized python functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the source code summarization task for the python code snippets.
## Intended uses & limitations
The model could be used to generate the description for the python function or be fine-tuned on other python code tasks. It can be used on unparsed and untokenized python code. However, if the python code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate python function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_python_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_python_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = '''with open ( CODE_STRING , CODE_STRING ) as in_file : buf = in_file . readlines ( ) with open ( CODE_STRING , CODE_STRING ) as out_file : for line in buf : if line == " ; Include this text " : line = line + " Include below " out_file . write ( line ) '''
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/source%20code%20summarization/python/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 600 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing python code.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.00044333760160952806,
-0.029428062960505486,
-0.01070751529186964,
0.02843843773007393,
0.031124861910939217,
0.031089862808585167,
-0.028623513877391815,
-0.0008767320541664958,
-0.024776926264166832,
0.06357894837856293,
0.045912958681583405,
0.010389924049377441,
-0.008595201186835766,
0.04842371493577957,
-0.035219792276620865,
-0.0656232088804245,
-0.02221827208995819,
-0.035829365253448486,
-0.023463958874344826,
-0.015073035843670368,
0.021892283111810684,
-0.0018359291134402156,
0.017744731158018112,
0.004684014245867729,
-0.004806151147931814,
0.013648826628923416,
0.0008544728043489158,
0.019124465063214302,
0.035151928663253784,
-0.08172526210546494,
-0.025426439940929413,
0.0019286320311948657,
-0.0464034341275692,
-0.012368083000183105,
-0.01436096802353859,
0.023453239351511,
0.005318550392985344,
0.028485789895057678,
0.01818772219121456,
0.06076868996024132,
0.0008018361986614764,
0.019130438566207886,
0.01031789742410183,
-0.035197656601667404,
0.05717691779136658,
0.0047098184004426,
-0.02889556623995304,
-0.026747824624180794,
0.015543341636657715,
0.0013188772136345506,
-0.056136827915906906,
-0.07063797116279602,
-0.030345924198627472,
0.053961776196956635,
-0.006620555650442839,
-0.013566634617745876,
-0.06731059402227402,
-0.01719621568918228,
0.04278188943862915,
-0.05947055667638779,
-0.034698646515607834,
0.00885804183781147,
-0.054683417081832886,
0.015240499749779701,
0.008077500388026237,
0.00803680531680584,
0.008011403493583202,
-0.03888358548283577,
0.02839771844446659,
0.004180064424872398,
0.06532223522663116,
-0.017705559730529785,
0.029057791456580162,
-0.10727482289075851,
0.018903156742453575,
-0.007894984446465969,
0.014911524020135403,
0.011259849183261395,
-0.01209677942097187,
0.04972803592681885,
-0.001376007916405797,
-0.010531250387430191,
0.043259475380182266,
0.01694573648273945,
-0.013170924969017506,
0.03823571652173996,
-0.03536560386419296,
-0.013849383220076561,
-0.026227880269289017,
0.06404983997344971,
-0.06482010334730148,
-0.06658513098955154,
-0.008938436396420002,
-0.02475162409245968,
-0.03575284406542778,
0.021753966808319092,
0.043895721435546875,
-0.01359853520989418,
0.023906320333480835,
0.006335705518722534,
0.038428619503974915,
0.04843484237790108,
-0.005900653079152107,
0.04869387298822403,
0.02941732294857502,
0.01933109387755394,
-0.015395980328321457,
-0.04206986725330353,
-0.02101587876677513,
0.04146692529320717,
0.016564441844820976,
-0.03524791821837425,
-0.047064408659935,
0.031137831509113312,
0.02012665942311287,
-0.04265841841697693,
0.03702881559729576,
-0.023754991590976715,
-0.043505165725946426,
-0.034749165177345276,
0.034088801592588425,
-0.009184470400214195,
-0.013620907440781593,
0.015437556430697441,
-0.04173337668180466,
-0.0012667254777625203,
-0.05607370659708977,
-0.02805570513010025,
0.012678680010139942,
0.037991948425769806,
-0.009702221490442753,
0.09071153402328491,
0.015316637232899666,
-0.03232896327972412,
0.009340682066977024,
0.017990047112107277,
-0.0759720429778099,
0.06787647306919098,
0.03960031643509865,
0.11222314089536667,
-0.0652133971452713,
-0.04285474494099617,
0.024788163602352142,
-0.004529634024947882,
-0.020939063280820847,
0.024831829592585564,
-0.005054626613855362,
-0.08230073004961014,
-0.02325882576406002,
-0.0059890300035476685,
0.06859234720468521,
-0.03955409675836563,
-0.024138901382684708,
0.02286224626004696,
0.009114894084632397,
0.005205104593187571,
-0.03970504552125931,
-0.0003275117196608335,
-0.0008403523243032396,
-0.025016626343131065,
-0.06622322648763657,
0.03189990669488907,
0.00011350382555974647,
-0.032672978937625885,
-0.028042828664183617,
-0.042137280106544495,
0.012301196344196796,
0.11105228215456009,
0.0023130839690566063,
-0.013948801904916763,
-0.046016350388526917,
0.0139093529433012,
0.027775203809142113,
0.04454474523663521,
-0.019380757585167885,
0.020379073917865753,
0.040833789855241776,
0.07235647737979889,
-0.02674141898751259,
0.07290352880954742,
-0.015335869044065475,
-0.03899609297513962,
-0.028443682938814163,
0.01781770959496498,
-0.014304586686193943,
-0.03898955136537552,
0.006457298528403044,
0.02545909211039543,
-0.016192980110645294,
-0.007294989190995693,
-0.016171902418136597,
0.05833185464143753,
0.02372588962316513,
-0.009850806556642056,
-0.035070568323135376,
0.016718534752726555,
-0.01678628847002983,
0.06194093078374863,
-0.041013963520526886,
-0.009052394889295101,
-0.013592522591352463,
-0.03697670251131058,
-0.00840047374367714,
0.028148943558335304,
0.04858414828777313,
0.021431785076856613,
-0.013378179632127285,
0.10419075191020966,
-0.04078584909439087,
0.003027426777407527,
-0.04847736284136772,
-0.03404504060745239,
0.025268519297242165,
0.037481505423784256,
0.030951544642448425,
0.030313627794384956,
0.014126076363027096,
-0.020484959706664085,
0.019127821549773216,
0.07138179242610931,
0.028482958674430847,
0.04220367968082428,
-0.01153075136244297,
-0.0246732234954834,
0.03460031747817993,
0.0663982629776001,
-0.038706064224243164,
-0.03935135900974274,
0.046882759779691696,
0.03137749060988426,
-0.009433872997760773,
0.026848802343010902,
-0.008498390205204487,
0.010362592525780201,
-0.04251732677221298,
-0.06438121199607849,
0.04177316650748253,
0.011254831217229366,
0.002335701370611787,
0.032174691557884216,
-0.0015683224191889167,
-0.0001454575394745916,
0.03623054176568985,
0.0004512970335781574,
0.0008762261131778359,
-0.062080610543489456,
0.008214816451072693,
-0.001800140249542892,
0.06269120424985886,
-0.03697842359542847,
0.036284737288951874,
0.014764666557312012,
-0.0023497191723436117,
0.06475069373846054,
-0.028293948620557785,
0.02909015491604805,
0.03832333907485008,
0.026576684787869453,
-0.014943970367312431,
0.01438389252871275,
0.02552570216357708,
0.028332926332950592,
0.08409914374351501,
0.010851267725229263,
0.06460275501012802,
-0.006949459668248892,
0.056982748210430145,
0.07049340009689331,
0.015758082270622253,
0.014105097390711308,
0.02609025500714779,
0.06446341425180435,
-0.004247236531227827,
-0.013121470808982849,
0.06371885538101196,
-0.053594086319208145,
0.028080429881811142,
-0.03570699691772461,
0.025593485683202744,
-0.010550743900239468,
-0.0156027190387249,
0.03960492089390755,
0.0015094369882717729,
-0.04418998211622238,
0.0038062594830989838,
-0.02540072612464428,
-0.026547104120254517,
0.012449667789041996,
0.001406686962582171,
-0.03001866489648819,
0.02420559525489807,
-0.01995868980884552,
0.022477637976408005,
-0.08577774465084076,
-0.04444529861211777,
-0.007330072578042746,
-0.04118053615093231,
0.018906481564044952,
-0.07516221702098846,
-0.05838543921709061,
-0.06406410038471222,
-0.020180612802505493,
0.035621851682662964,
0.008508604019880295,
-0.009115594439208508,
-0.026793556287884712,
0.009981275536119938,
-0.0424007810652256,
-0.02314038760960102,
-0.05533106252551079,
-0.061092667281627655,
-0.0038528344593942165,
-0.06573881208896637,
0.03737637773156166,
-0.023758001625537872,
0.022193875163793564,
0.01093081571161747,
-0.014446818269789219,
-0.028758961707353592,
-0.016871239989995956,
0.07533826678991318,
0.0077158743515610695,
-0.006974217481911182,
-0.032080091536045074,
0.01394297368824482,
-0.026619933545589447,
0.034805331379175186,
-0.005761967971920967,
-0.042868707329034805,
0.10207179933786392,
0.0612763911485672,
0.04247690364718437,
-0.013880057260394096,
-0.04123847186565399,
-0.047731854021549225,
-0.05409865826368332,
-0.02146468684077263,
-0.029655875638127327,
-0.03176660090684891,
0.0013950456632301211,
-0.05407986417412758,
-0.02427555061876774,
-0.02665693312883377,
-0.043156493455171585,
-0.02252504788339138,
0.029221080243587494,
0.029240010306239128,
0.038039371371269226,
0.051724303513765335,
0.01634874939918518,
-0.0420905277132988,
-0.027805110439658165,
0.03931427747011185,
0.00011239961168030277,
0.0028671713080257177,
-0.0782466009259224,
-0.04015064984560013,
0.04184333607554436,
0.011373425833880901,
-0.0023969216272234917,
-0.02246427722275257,
0.04853994399309158,
0.01811797544360161,
0.010927255265414715,
-0.000039425674913218245,
-0.004677466116845608,
-0.012639638036489487,
-0.02013954520225525,
0.0009381872951053083,
-0.03372424095869064,
-0.036928292363882065,
-0.01943223923444748,
-0.0052665467374026775,
0.04304736852645874,
-0.06144285574555397,
-0.058930717408657074,
-0.0017254806589335203,
0.037687432020902634,
0.03597290441393852,
0.02146102860569954,
-0.01817329041659832,
-0.00961456261575222,
-0.06582716107368469,
-0.04350365325808525,
0.03467811644077301,
0.016377247869968414,
-0.010637748055160046,
0.04842676594853401,
0.043440721929073334,
-0.059770308434963226,
0.027467265725135803,
0.03140722215175629,
0.04795098677277565,
0.021509511396288872,
-0.030727209523320198,
0.011030818335711956,
-0.04727547615766525,
0.019330305978655815,
0.010167988017201424,
-0.030225520953536034,
-0.051641251891851425,
-0.07511907070875168,
-0.03033388964831829,
0.012179390527307987,
-0.01220650039613247,
-0.0006168197141960263,
0.045475445687770844,
-0.02805086225271225,
-0.05013739690184593,
-0.0029537263326346874,
0.00382130965590477,
0.07304146885871887,
-0.04153088852763176,
0.03299415111541748,
0.006626519374549389,
0.061444900929927826,
-0.0365699902176857,
0.004329019226133823,
-0.03278942033648491,
-0.016413399949669838,
0.001451138756237924,
0.046824581921100616,
0.02619309164583683,
0.058155279606580734,
0.0781501978635788,
0.012272965162992477,
-0.03256911784410477,
0.04338908568024635,
0.054433971643447876,
0.006415905896574259,
-0.018808072432875633,
0.004991387017071247,
0.016539793461561203,
-0.02870836667716503,
0.01618148572742939,
-0.0033730552531778812,
0.020226120948791504,
0.026799825951457024,
-0.00491305673494935,
0.00682659400627017,
0.0011812467128038406,
-0.024797387421131134,
-0.04591801390051842,
-0.04894072934985161,
-0.00543010700494051,
-0.031899262219667435,
-0.05207996815443039,
0.027312858030200005,
0.040783435106277466,
0.023298289626836777,
0.0469488650560379,
0.04714763164520264,
-0.03551606461405754,
-0.031282417476177216,
0.04343189671635628,
0.05342549830675125,
-0.04233964905142784,
-0.04618758335709572,
-0.054262928664684296,
0.03404436260461807,
0.046936601400375366,
-0.021999185904860497,
-0.09672004729509354,
0.00021852285135537386,
0.028997015208005905,
-0.018668463453650475,
0.06032891571521759,
0.025984996929764748,
0.02110280655324459,
0.05219724774360657,
-0.0022453179117292166,
0.025151237845420837,
-0.011185020208358765,
0.02039332129061222,
0.003684713039547205,
0.040018267929553986,
-0.02210717275738716,
-0.033541422337293625,
-0.04265135899186134,
0.02212628163397312,
0.007162655703723431,
0.038541458547115326,
0.031563859432935715,
-0.009150591678917408,
-0.07497166842222214,
0.0010859407484531403,
0.028890732675790787,
-0.026454143226146698,
0.01459143403917551,
0.029450055211782455,
0.0368490070104599,
-0.05366859957575798,
-0.03009767085313797,
-0.019084813073277473,
-0.014155804179608822,
0.029652738943696022,
0.002340680919587612,
-0.01509793195873499,
-0.06525706499814987,
0.012261569499969482,
-0.0175249632447958,
-0.028796790167689323,
-0.08492009341716766,
0.03820023685693741,
0.01041160337626934,
-0.0038093968760222197,
0.05239511653780937,
0.0340779572725296,
0.019601061940193176,
0.031755972653627396,
-0.018249575048685074,
0.031503766775131226,
-0.027491021901369095,
0.02620680257678032,
-0.014815989881753922,
-0.026237279176712036,
-0.022326882928609848,
-0.06352408230304718,
-0.029569534584879875,
-0.03916449099779129,
-0.04339774325489998,
-0.04642144963145256,
-0.033988144248723984,
0.003938551992177963,
-0.008702518418431282,
-0.00709883775562048,
-0.011939618736505508,
0.006252834107726812,
-0.023961534723639488,
-0.022668248042464256,
-0.03385746479034424,
-0.04422863945364952,
-0.09883545339107513,
-0.02467918023467064,
0.006126647349447012,
0.04234866425395012,
0.03326613828539848,
-0.0012973009143024683,
0.00393398804590106,
0.024123040959239006,
0.006349906791001558,
-0.00545272883027792,
0.02107195556163788,
0.00579434260725975,
-0.044517066329717636,
-0.027862735092639923,
-0.00028659976669587195,
0.012408358976244926,
0.009468825533986092,
-0.0243644081056118,
0.007701864466071129,
0.0480780303478241,
-0.03106614202260971,
0.000541669491212815,
0.039455898106098175,
0.0014341067289933562,
-0.08212423324584961,
-0.04059337079524994,
0.0038690923247486353,
-0.043607138097286224,
0.03598388284444809,
0.0017683322075754404,
-0.030341925099492073,
-0.010392106138169765,
0.009925475344061852,
0.03134285658597946,
-0.01190870814025402,
-0.032445117831230164,
0.00031277548987418413,
-0.037204645574092865,
0.03687022253870964,
-0.06417735666036606,
0.04379478469491005,
-0.03241758793592453,
-0.006320431362837553,
-0.008223657496273518,
-0.0046813273802399635,
-0.03277850151062012,
0.06801700592041016,
-0.01188292820006609,
-0.008896589279174805,
-0.01216875296086073,
0.005654978100210428,
-0.028061235323548317,
0.04419374838471413,
-0.006345771253108978,
0.003758265869691968,
-0.03001042641699314,
0.012006952427327633,
-0.038544248789548874,
0.0073415497317910194,
-0.02903721109032631,
-0.014735456556081772,
-0.02110685035586357,
-0.026965055614709854,
-0.006534266751259565,
-0.0555618591606617,
0.04943742975592613,
0.022373748943209648,
0.03470630571246147,
0.014401051215827465,
-0.022989822551608086,
-0.01587185263633728,
0.025243496522307396,
-0.0876258984208107,
-0.051457859575748444,
-0.03196299076080322,
0.020920302718877792,
-0.024647552520036697,
0.06344788521528244,
0.052708759903907776,
-0.058262910693883896,
-0.011271962895989418,
0.010577217675745487,
0.01576821878552437,
0.008717507123947144,
0.028483113273978233,
0.027546312659978867,
0.038532137870788574,
0.04877941682934761,
-0.03850420564413071,
-0.006710832938551903,
-0.009687204845249653,
-0.01920147053897381,
-0.013011695817112923,
-0.015989001840353012,
0.021299345418810844,
-0.017237339168787003,
-0.03936586529016495,
-0.026237595826387405,
0.062435682862997055,
0.0660913810133934,
0.023680485785007477,
0.00003327671220176853,
-0.0364389531314373,
0.029011646285653114,
0.012608346529304981,
-0.05290235951542854,
-0.02831244096159935,
0.01525305025279522,
-0.04454246163368225,
0.08377868682146072,
-0.005083154886960983,
0.015786750242114067,
0.023347927257418633,
0.0263050589710474,
0.0009507137001492083,
0.040269237011671066,
-0.03482532873749733,
-0.003909721504896879,
0.03968679532408714,
-0.04935728758573532,
-0.004990298766642809,
-0.006728427950292826,
0.050513286143541336,
-0.051631029695272446,
0.04237185791134834,
0.023679504171013832,
0.016083024442195892,
-0.013063888065516949,
-0.02143455669283867,
-0.057203199714422226,
0.03811509907245636,
-0.055695902556180954,
0.06808962672948837,
-0.02081575244665146,
-0.07409478724002838,
0.08936522156000137,
0.019854018464684486,
-0.09570284187793732,
0.00115925760474056,
0.023096498101949692,
0.017079398036003113,
0.0315711535513401,
0.04288816079497337,
-0.08769291639328003,
-0.003851225832477212,
-0.039846740663051605,
0.01161065325140953,
-0.06361851841211319,
-0.003824003040790558,
0.036201100796461105,
-0.052830133587121964,
0.005783285945653915,
0.0357804149389267,
-0.015136444941163063,
0.008248815312981606,
0.015427124686539173,
-0.05021390691399574,
-0.04076116159558296,
-0.01896006055176258,
0.010656580328941345,
-0.03298046812415123,
0.03487221896648407,
-0.015546322800219059,
0.03422657400369644,
0.015024947933852673,
-0.0004268831107765436,
-0.043971866369247437,
0.009773895144462585,
0.029300794005393982,
-0.03634783625602722,
-0.03691195324063301,
0.01920212060213089,
0.007085619959980249,
-0.012240181677043438,
0.03199068829417229,
-0.014198795892298222,
0.021834950894117355,
0.028977205976843834,
-0.016769837588071823,
0.019068678840994835,
-0.039336804300546646,
-0.002854379592463374,
0.02162645198404789,
0.015801528468728065,
0.036151401698589325,
-0.01080442126840353,
0.0335870198905468,
0.030296726152300835,
0.03436354547739029,
-0.019044091925024986,
-0.01684599742293358,
-0.01195121742784977,
0.01836506649851799,
-0.03920704498887062,
0.020002281293272972,
0.02371957153081894,
-0.03669487312436104,
-0.04289606958627701,
-0.03507101163268089,
-0.020321447402238846,
0.05151569843292236,
-0.03674178197979927,
0.01361804734915495,
0.05455665662884712,
-0.02098758891224861,
-0.05577857047319412,
-0.06221954897046089,
-0.007750673219561577,
-0.02329343929886818,
0.031608883291482925,
0.021295880898833275,
-0.019751114770770073,
-0.011257869191467762,
-0.051221296191215515,
-0.07460349798202515,
0.042492691427469254,
0.01868506520986557,
-0.018449295312166214,
0.04340971261262894,
0.03799264505505562,
-0.020563988015055656,
0.0065757534466683865,
0.026316622272133827,
-0.04457001015543938,
0.024867985397577286,
0.009072392247617245,
0.013582965359091759,
0.03938211873173714,
0.03462091460824013,
-0.015435216017067432,
-0.03672873228788376,
-0.06485869735479355,
-0.02706235460937023,
-0.034483589231967926,
-0.010317244566977024,
0.08103065192699432
] |
dccuchile/albert-xlarge-spanish-finetuned-pos | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 3 | null | ---
tags:
- summarization
widget:
- text: "select time ( col0 ) from tab0"
---
# CodeTrans model for source code summarization sql
Pretrained model on programming language sql using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized sql code functions: it works best with tokenized sql functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used single-task training on source code summarization sql dataset.
## Intended uses & limitations
The model could be used to generate the description for the sql function or be fine-tuned on other sql code tasks. It can be used on unparsed and untokenized sql code. However, if the sql code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate sql function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_sql"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_sql", skip_special_tokens=True),
device=0
)
tokenized_code = "select time ( col0 ) from tab0"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/single%20task/source%20code%20summarization/sql/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.005214808974415064,
-0.029409391805529594,
-0.009576208889484406,
0.03933302313089371,
0.028156660497188568,
0.02493063546717167,
-0.029119914397597313,
-0.002497896086424589,
-0.030312588438391685,
0.057645030319690704,
0.048969969153404236,
0.010829098522663116,
-0.009163827635347843,
0.047423288226127625,
-0.03779496252536774,
-0.0621282197535038,
-0.017889007925987244,
-0.040795788168907166,
-0.02406906522810459,
-0.012203219346702099,
0.018452541902661324,
0.000576178717892617,
0.01635427214205265,
0.00949470978230238,
-0.005206127651035786,
0.016401905566453934,
-0.0005756535101681948,
0.024041971191763878,
0.03285657614469528,
-0.07101757079362869,
-0.015612654387950897,
-0.0019364297622814775,
-0.04390435665845871,
-0.02474614791572094,
-0.021983742713928223,
0.024695929139852524,
0.008607378229498863,
0.03673841431736946,
0.026615310460329056,
0.05794652923941612,
0.009560900740325451,
0.024466291069984436,
0.0233371052891016,
-0.04232827574014664,
0.06451258808374405,
0.006250513251870871,
-0.022276388481259346,
-0.027706049382686615,
0.0234972033649683,
-0.005460631567984819,
-0.05924605578184128,
-0.0610424242913723,
-0.024215703830122948,
0.04346073418855667,
-0.014763036742806435,
-0.0044136992655694485,
-0.06094231829047203,
-0.014290486462414265,
0.05294310674071312,
-0.05195927247405052,
-0.029631681740283966,
0.013276883400976658,
-0.05573339760303497,
0.01453852653503418,
0.011183449998497963,
0.005039009265601635,
0.0017192522063851357,
-0.051352910697460175,
0.017085367813706398,
-0.0013065258972346783,
0.0499819777905941,
-0.025644993409514427,
0.030484644696116447,
-0.10135241597890854,
0.022063016891479492,
0.0023636645637452602,
0.015281143598258495,
0.01856236346065998,
-0.009358562529087067,
0.05029206722974777,
0.010163326747715473,
-0.012262373231351376,
0.04549795389175415,
0.015030937269330025,
-0.02298564836382866,
0.03894541412591934,
-0.032550062984228134,
-0.01776828244328499,
-0.015101698227226734,
0.06547188758850098,
-0.0545404851436615,
-0.0703844353556633,
-0.015117029659450054,
-0.024788087233901024,
-0.030483249574899673,
0.020747262984514236,
0.03585011512041092,
0.003977290354669094,
0.017786603420972824,
0.011765488423407078,
0.039070043712854385,
0.05545281618833542,
-0.01557602547109127,
0.05901684984564781,
0.026182975620031357,
0.012991898693144321,
-0.006130733992904425,
-0.04416981711983681,
-0.010906361974775791,
0.030257543548941612,
0.020416613668203354,
-0.03681081905961037,
-0.042303744703531265,
0.03649638593196869,
0.023772628977894783,
-0.03912629187107086,
0.050107818096876144,
-0.01593952253460884,
-0.05518978089094162,
-0.03525172919034958,
0.041577015072107315,
-0.007349422667175531,
-0.015105228871107101,
0.012120633386075497,
-0.04479021206498146,
0.0010058640036731958,
-0.06347145885229111,
-0.02209145575761795,
0.018432769924402237,
0.0424186997115612,
-0.006037530954927206,
0.086774080991745,
0.010033819824457169,
-0.05445537343621254,
0.014504129998385906,
0.024105822667479515,
-0.06662075966596603,
0.06252221763134003,
0.05233749747276306,
0.1270039975643158,
-0.06213012710213661,
-0.04711602255702019,
0.028362706303596497,
-0.014837546274065971,
-0.03592432662844658,
0.016366058960556984,
-0.001143384724855423,
-0.059252139180898666,
-0.02680175006389618,
-0.016185207292437553,
0.05455401912331581,
-0.03788929060101509,
-0.011936325579881668,
0.021510297432541847,
0.007225771900266409,
0.012881726026535034,
-0.03182714059948921,
-0.009311937727034092,
0.004186748992651701,
-0.02162417396903038,
-0.06203975901007652,
0.036730315536260605,
0.002618982456624508,
-0.02341328002512455,
-0.028464753180742264,
-0.02315189130604267,
0.0005247285007499158,
0.09782774746417999,
0.013524837791919708,
-0.026573026552796364,
-0.04852897301316261,
0.01145805511623621,
0.023906724527478218,
0.04570804163813591,
-0.023386308923363686,
0.02127026580274105,
0.0527217872440815,
0.07620123773813248,
-0.02452804334461689,
0.07402653247117996,
-0.013410769402980804,
-0.03222839906811714,
-0.03457494080066681,
0.01737874373793602,
-0.019081328064203262,
-0.04523453488945961,
0.01886293664574623,
0.01971781998872757,
-0.0180504210293293,
-0.0063789598643779755,
-0.017166700214147568,
0.0469529889523983,
0.016416769474744797,
-0.0026357918977737427,
-0.038988083600997925,
0.01620330847799778,
-0.029317308217287064,
0.06245686113834381,
-0.03375301882624626,
-0.01501388382166624,
-0.0058659752830863,
-0.048463284969329834,
-0.014674955047667027,
0.03650710731744766,
0.041236791759729385,
0.023448659107089043,
-0.00496396329253912,
0.12254160642623901,
-0.05127310752868652,
0.00854305550456047,
-0.043578583747148514,
-0.03157256543636322,
0.02948489785194397,
0.03517184406518936,
0.02438231185078621,
0.041011303663253784,
0.006176216062158346,
-0.024115845561027527,
0.016162289306521416,
0.07927528768777847,
0.02518550679087639,
0.04113882780075073,
-0.006173945963382721,
-0.029385754838585854,
0.040565501898527145,
0.0652068555355072,
-0.048149026930332184,
-0.04133821278810501,
0.04602278769016266,
0.021007945761084557,
-0.008903153240680695,
0.0336848609149456,
-0.00930971559137106,
0.018774479627609253,
-0.0562061108648777,
-0.06002077832818031,
0.04874902963638306,
0.00856423657387495,
-0.0008199592120945454,
0.038650188595056534,
0.006512398365885019,
-0.009575015865266323,
0.03292268142104149,
0.010222580283880234,
0.004261145833879709,
-0.055780429393053055,
0.008277305401861668,
-0.004317753482609987,
0.06022489443421364,
-0.04724329710006714,
0.03706095740199089,
0.0062850601971149445,
-0.002169729210436344,
0.06138302758336067,
-0.020768187940120697,
0.02247653342783451,
0.038517680019140244,
0.03058040328323841,
-0.02029310166835785,
0.009389417245984077,
0.01477903500199318,
0.016658952459692955,
0.07532262802124023,
0.012826405465602875,
0.06460587680339813,
-0.00600532628595829,
0.0539562925696373,
0.07308082282543182,
0.012442545965313911,
0.014778882265090942,
0.01948738843202591,
0.06454570591449738,
-0.0073396144434809685,
-0.006225729361176491,
0.06497685611248016,
-0.05426524952054024,
0.038639288395643234,
-0.03710127994418144,
0.022370297461748123,
-0.013152973726391792,
-0.01055386383086443,
0.03972438722848892,
0.012856344692409039,
-0.057462528347969055,
0.003928679972887039,
-0.027657775208353996,
-0.026142479851841927,
0.00833759643137455,
-0.005612703040242195,
-0.015404636971652508,
0.009999088943004608,
-0.026176627725362778,
0.021233942359685898,
-0.07438354194164276,
-0.05036085098981857,
-0.018422795459628105,
-0.033398982137441635,
0.006373560521751642,
-0.06819571554660797,
-0.04016168415546417,
-0.06203899160027504,
-0.025464363396167755,
0.022571420297026634,
0.007052188273519278,
-0.00521017936989665,
-0.02743634395301342,
0.016447629779577255,
-0.02897537685930729,
-0.029136385768651962,
-0.04084555059671402,
-0.060621850192546844,
-0.016470996662974358,
-0.06392975151538849,
0.03571370989084244,
-0.012726228684186935,
0.021254336461424828,
0.0033878819085657597,
-0.014187796041369438,
-0.02587001956999302,
-0.019219432026147842,
0.0758548304438591,
0.010354550555348396,
-0.017722511664032936,
-0.032795250415802,
0.0130688501521945,
-0.029764322564005852,
0.03343209624290466,
-0.011523911729454994,
-0.04531290382146835,
0.09966781735420227,
0.06511648744344711,
0.04301852732896805,
-0.010276724584400654,
-0.03854009509086609,
-0.04275381192564964,
-0.038048502057790756,
-0.02700755000114441,
-0.017712336033582687,
-0.029728926718235016,
-0.00510581536218524,
-0.0554119348526001,
-0.012708072550594807,
-0.029125217348337173,
-0.052938736975193024,
-0.014660357497632504,
0.02358984388411045,
0.027206987142562866,
0.03317432850599289,
0.05860055238008499,
0.017231235280632973,
-0.02764035575091839,
-0.029568994417786598,
0.036908429116010666,
0.0019173042383044958,
0.014748276211321354,
-0.06965514272451401,
-0.030882110819220543,
0.03925562649965286,
0.011447980999946594,
0.009781576693058014,
-0.028977109119296074,
0.059383656829595566,
0.015007349662482738,
0.013156621716916561,
0.01002492569386959,
-0.00006623505760217085,
-0.02261768840253353,
-0.027355292811989784,
-0.008812285028398037,
-0.025793738663196564,
-0.03671623021364212,
-0.01281741727143526,
-0.013005747459828854,
0.04198085889220238,
-0.06605328619480133,
-0.05321619287133217,
-0.00833424087613821,
0.03149932995438576,
0.03919754549860954,
0.014149722643196583,
-0.02642004005610943,
0.00320179620757699,
-0.05804779380559921,
-0.038789886981248856,
0.02913166582584381,
0.02267935685813427,
-0.01766653172671795,
0.03497268259525299,
0.05120242014527321,
-0.05719669908285141,
0.03358111530542374,
0.03549095615744591,
0.04415791481733322,
0.028229553252458572,
-0.037513840943574905,
0.012098697014153004,
-0.048299651592969894,
0.03267264366149902,
0.0015791127225384116,
-0.03445471078157425,
-0.0538388267159462,
-0.06743856519460678,
-0.028944622725248337,
0.011936148628592491,
-0.01788209192454815,
-0.00004267280382919125,
0.045812640339136124,
-0.03004317358136177,
-0.0404556505382061,
-0.01871919073164463,
0.005863353610038757,
0.0644228458404541,
-0.038110796362161636,
0.025560302659869194,
0.0026982559356838465,
0.05656113103032112,
-0.04186893254518509,
0.0076437415555119514,
-0.028689753264188766,
-0.008565153926610947,
0.00022262787388172,
0.041217777878046036,
0.013991094194352627,
0.04943753778934479,
0.07659737765789032,
0.00712424423545599,
-0.03715871274471283,
0.040827374905347824,
0.04773382842540741,
0.005749373696744442,
-0.02210775390267372,
0.004572105593979359,
0.007802055682986975,
-0.018688227981328964,
0.00869741477072239,
-0.0015209183329716325,
0.018790552392601967,
0.02844644896686077,
-0.00010934125020867214,
-0.007674637716263533,
0.00773214315995574,
-0.017695004120469093,
-0.04034823924303055,
-0.042650338262319565,
-0.006296126171946526,
-0.026311855763196945,
-0.05930975079536438,
0.027799703180789948,
0.04289009049534798,
0.02814514748752117,
0.05248401686549187,
0.043495360761880875,
-0.037650179117918015,
-0.01856193318963051,
0.04952671751379967,
0.04566717520356178,
-0.046646762639284134,
-0.03663302958011627,
-0.0483807735145092,
0.03588860109448433,
0.037227191030979156,
-0.021404096856713295,
-0.08991033583879471,
-0.0003879138675983995,
0.016754496842622757,
-0.03107307292521,
0.0699663832783699,
0.011120066046714783,
0.020046008750796318,
0.04762301966547966,
-0.008012428879737854,
0.022023912519216537,
-0.019514527171850204,
0.011204930953681469,
-0.010332494974136353,
0.060952335596084595,
-0.03722004219889641,
-0.03348679468035698,
-0.03699956834316254,
0.030344245955348015,
0.0017083804123103619,
0.03807936981320381,
0.03325141593813896,
-0.004923396278172731,
-0.07557733356952667,
0.00002979485179821495,
0.022626349702477455,
-0.03679850324988365,
0.007450676057487726,
0.025879163295030594,
0.039088115096092224,
-0.05509478971362114,
-0.019923893734812737,
-0.012635002844035625,
-0.024092376232147217,
0.03185905143618584,
0.005348355509340763,
-0.026570703834295273,
-0.0722438246011734,
0.015799744054675102,
-0.020928820595145226,
-0.03312460333108902,
-0.08376650512218475,
0.041421644389629364,
0.010701758787035942,
0.00016046129167079926,
0.050910674035549164,
0.03945957124233246,
0.01579626277089119,
0.035848937928676605,
-0.012307709082961082,
0.030010927468538284,
-0.018817590549588203,
0.029770031571388245,
-0.019134288653731346,
-0.017419835552573204,
-0.01988617517054081,
-0.05815524980425835,
-0.03099719248712063,
-0.03927235305309296,
-0.05196066573262215,
-0.04596218094229698,
-0.02743091620504856,
0.0014561129501089454,
-0.007872435264289379,
-0.011134136468172073,
-0.016901222988963127,
0.019623249769210815,
-0.020872078835964203,
-0.022318368777632713,
-0.02212238684296608,
-0.04160049185156822,
-0.11303731799125671,
-0.024794867262244225,
0.00793336983770132,
0.03512631729245186,
0.04020978510379791,
0.0007380262832157314,
0.010553337633609772,
0.03383909910917282,
-0.0037569294217973948,
-0.019778508692979813,
0.023544413968920708,
0.012172392569482327,
-0.04760207235813141,
-0.03335978463292122,
-0.00041310497908852994,
0.013405593112111092,
0.01751825027167797,
-0.0301867313683033,
0.002329709939658642,
0.05167118459939957,
-0.04270174354314804,
-0.0035765862558037043,
0.037937603890895844,
0.005099737085402012,
-0.0950217917561531,
-0.03564031049609184,
0.0033372770994901657,
-0.044976890087127686,
0.0361466184258461,
-0.00188632239587605,
-0.02062358148396015,
-0.022494370117783546,
0.017567425966262817,
0.030440689995884895,
0.013121462427079678,
-0.03519121930003166,
-0.002061805920675397,
-0.02976645901799202,
0.047065719962120056,
-0.06526824831962585,
0.05728272721171379,
-0.03992411121726036,
-0.008961772546172142,
-0.009518744423985481,
-0.005438054446130991,
-0.034370291978120804,
0.056041013449430466,
-0.010903391987085342,
-0.0027975859120488167,
-0.01153015997260809,
0.020856035873293877,
-0.011432019993662834,
0.03783171623945236,
-0.0033888875041157007,
0.013196039013564587,
-0.02368065156042576,
0.006636335048824549,
-0.04734612628817558,
0.00367718911729753,
-0.022949811071157455,
-0.029025346040725708,
-0.02597130462527275,
-0.028639260679483414,
-0.01464160718023777,
-0.04758872091770172,
0.05075864866375923,
0.020205454900860786,
0.043578680604696274,
0.024803467094898224,
-0.012309126555919647,
-0.01747841015458107,
0.029290350154042244,
-0.0747092217206955,
-0.045584943145513535,
-0.03545842692255974,
0.013197042047977448,
-0.02338501252233982,
0.06826024502515793,
0.05597703158855438,
-0.0589783750474453,
-0.012476173229515553,
0.015491166152060032,
-0.00012677231279667467,
0.006303387228399515,
0.026604000478982925,
0.014178680256009102,
0.04583047330379486,
0.04955727607011795,
-0.04014667123556137,
-0.0017470617312937975,
-0.001178421312943101,
-0.013947787694633007,
-0.014934882521629333,
-0.013241078704595566,
0.03006116859614849,
-0.012954501435160637,
-0.03817324712872505,
-0.0202073622494936,
0.04593050479888916,
0.06006035581231117,
0.034544095396995544,
-0.0034346755128353834,
-0.030117899179458618,
0.028664464130997658,
0.020174385979771614,
-0.04701702669262886,
-0.027132634073495865,
0.010942859575152397,
-0.055693984031677246,
0.0855100154876709,
-0.011198635213077068,
0.018192674964666367,
0.03560616821050644,
0.01914190873503685,
0.003665634198114276,
0.028958123177289963,
-0.0294970590621233,
-0.008382430300116539,
0.04444972053170204,
-0.052791133522987366,
-0.00216030515730381,
-0.009847965091466904,
0.06127193197607994,
-0.04470976069569588,
0.04704785346984863,
0.03335372731089592,
0.02685645781457424,
-0.013744129799306393,
-0.015918146818876266,
-0.055557530373334885,
0.04904657602310181,
-0.06535816937685013,
0.07082943618297577,
-0.01461824495345354,
-0.07728171348571777,
0.08478982746601105,
0.03845645487308502,
-0.09511282294988632,
-0.000266050745267421,
0.02969098463654518,
0.024368738755583763,
0.03641964867711067,
0.04136935621500015,
-0.08014120161533356,
0.0001443268556613475,
-0.036865025758743286,
0.003563077189028263,
-0.050246912986040115,
-0.0054018329828977585,
0.035632673650979996,
-0.05187961831688881,
-0.0008956029778346419,
0.037798259407281876,
-0.0164661668241024,
0.008259480819106102,
0.016516832634806633,
-0.0420248843729496,
-0.04076727107167244,
-0.030498649924993515,
0.015319790691137314,
-0.026381732895970345,
0.027155468240380287,
-0.02009429968893528,
0.028489455580711365,
0.025024238973855972,
-0.007440381683409214,
-0.05335996299982071,
0.010698594152927399,
0.023778434842824936,
-0.05135633051395416,
-0.029742024838924408,
0.01652839034795761,
0.022698594257235527,
-0.012260304763913155,
0.035066261887550354,
-0.017001431435346603,
0.021222950890660286,
0.03620695695281029,
-0.02258271910250187,
0.024071646854281425,
-0.04218589514493942,
0.00646638311445713,
0.012394595891237259,
0.0022718682885169983,
0.03078038990497589,
-0.016135595738887787,
0.04082038626074791,
0.030527178198099136,
0.040630120784044266,
-0.02308964915573597,
-0.012712318450212479,
-0.013217589817941189,
0.018941761925816536,
-0.04659194126725197,
0.0264646764844656,
0.02265741676092148,
-0.031262803822755814,
-0.038096632808446884,
-0.040991269052028656,
-0.021450994536280632,
0.05072810500860214,
-0.03206893801689148,
0.01473477203398943,
0.05088858678936958,
-0.017562350258231163,
-0.04134484380483627,
-0.0761372372508049,
-0.00828738883137703,
-0.026064444333314896,
0.030142279341816902,
0.025101151317358017,
-0.03267914429306984,
-0.012325365096330643,
-0.04510578513145447,
-0.0701201856136322,
0.05267912149429321,
0.026673180982470512,
-0.019144972786307335,
0.04424729570746422,
0.033517319709062576,
-0.017833171412348747,
0.005883661098778248,
0.023797810077667236,
-0.05270339176058769,
0.022584279999136925,
0.008515194058418274,
0.030850540846586227,
0.04628990218043327,
0.04234587401151657,
-0.015985257923603058,
-0.03728780150413513,
-0.05518115684390068,
-0.03514082357287407,
-0.0350487157702446,
-0.003878758056089282,
0.07029245793819427
] |
dccuchile/albert-xlarge-spanish-finetuned-xnli | [
"pytorch",
"albert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"AlbertForSequenceClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 29 | 2020-12-10T09:27:55Z | ---
tags:
- summarization
widget:
- text: "select time ( col0 ) from tab0"
---
# CodeTrans model for source code summarization sql
Pretrained model on programming language sql using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans). This model is trained on tokenized sql code functions: it works best with tokenized sql functions.
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used multi-task training on 13 supervised tasks in the software development domain and 7 unsupervised datasets. It is then fine-tuned on the source code summarization task for the sql code snippets.
## Intended uses & limitations
The model could be used to generate the description for the sql function or be fine-tuned on other sql code tasks. It can be used on unparsed and untokenized sql code. However, if the sql code is tokenized, the performance should be better.
### How to use
Here is how to use this model to generate sql function documentation using Transformers SummarizationPipeline:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, SummarizationPipeline
pipeline = SummarizationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_sql_multitask_finetune"),
tokenizer=AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_small_source_code_summarization_sql_multitask_finetune", skip_special_tokens=True),
device=0
)
tokenized_code = "select time ( col0 ) from tab0"
pipeline([tokenized_code])
```
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/multitask/fine-tuning/source%20code%20summarization/sql/small_model.ipynb).
## Training data
The supervised training tasks datasets can be downloaded on [Link](https://www.dropbox.com/sh/488bq2of10r4wvw/AACs5CGIQuwtsD7j_Ls_JAORa/finetuning_dataset?dl=0&subfolder_nav_tracking=1)
## Training procedure
### Multi-task Pretraining
The model was trained on a single TPU Pod V3-8 for 500,000 steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Fine-tuning
This model was then fine-tuned on a single TPU Pod V2-8 for 1200 steps in total, using sequence length 512 (batch size 256), using only the dataset only containing sql code.
## Evaluation results
For the source code summarization tasks, different models achieves the following results on different programming languages (in BLEU score):
Test results :
| Language / Model | Python | SQL | C# |
| -------------------- | :------------: | :------------: | :------------: |
| CodeTrans-ST-Small | 8.45 | 17.55 | 19.74 |
| CodeTrans-ST-Base | 9.12 | 15.00 | 18.65 |
| CodeTrans-TF-Small | 10.06 | 17.71 | 20.40 |
| CodeTrans-TF-Base | 10.94 | 17.66 | 21.12 |
| CodeTrans-TF-Large | 12.41 | 18.40 | 21.43 |
| CodeTrans-MT-Small | 13.11 | 19.15 | 22.39 |
| CodeTrans-MT-Base | **13.37** | 19.24 | 23.20 |
| CodeTrans-MT-Large | 13.24 | 19.40 | **23.57** |
| CodeTrans-MT-TF-Small | 12.10 | 18.25 | 22.03 |
| CodeTrans-MT-TF-Base | 10.64 | 16.91 | 21.40 |
| CodeTrans-MT-TF-Large | 12.14 | **19.98** | 21.10 |
| CODE-NN | -- | 18.40 | 20.50 |
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.0013444171054288745,
-0.030515315011143684,
-0.00655968626961112,
0.027280069887638092,
0.030875753611326218,
0.03072826750576496,
-0.030912837013602257,
-0.0018214958254247904,
-0.023674489930272102,
0.05943421274423599,
0.04665246978402138,
0.011968528851866722,
-0.007805812172591686,
0.04723193868994713,
-0.03750453516840935,
-0.06260793656110764,
-0.024825850501656532,
-0.03639277070760727,
-0.029620423913002014,
-0.013384519144892693,
0.02377941645681858,
0.004722635727375746,
0.015254117548465729,
0.00480958167463541,
-0.0065975734032690525,
0.012542713433504105,
-0.0014879273949190974,
0.02615749090909958,
0.03278321772813797,
-0.07313230633735657,
-0.012569746933877468,
-0.0039198510348796844,
-0.04327224940061569,
-0.02533378265798092,
-0.024030305445194244,
0.026938315480947495,
0.011476393789052963,
0.037141039967536926,
0.027876487001776695,
0.054498739540576935,
0.006142911966890097,
0.023648347705602646,
0.01965906284749508,
-0.04370850697159767,
0.06155810132622719,
0.005787952803075314,
-0.02354487217962742,
-0.030587995424866676,
0.026887813583016396,
-0.005910772364586592,
-0.05730947107076645,
-0.06326546519994736,
-0.025739025324583054,
0.04825710132718086,
-0.01588793471455574,
0.00006977980228839442,
-0.06526580452919006,
-0.02279510349035263,
0.057486534118652344,
-0.056196052581071854,
-0.02469487674534321,
0.012420669198036194,
-0.052928730845451355,
0.01718887872993946,
0.00784888956695795,
0.006424523424357176,
0.005755945574492216,
-0.04852135851979256,
0.01860700361430645,
0.004549085162580013,
0.05129408463835716,
-0.024113815277814865,
0.03245655447244644,
-0.10138514637947083,
0.021816052496433258,
0.001308360369876027,
0.018320152536034584,
0.017285751178860664,
-0.011499444022774696,
0.04976644739508629,
0.0040918076410889626,
-0.011935173533856869,
0.04697311297059059,
0.01086817029863596,
-0.023882053792476654,
0.03387972712516785,
-0.03955845534801483,
-0.013378221541643143,
-0.020700685679912567,
0.06288542598485947,
-0.054543912410736084,
-0.07000081986188889,
-0.0183201152831316,
-0.02614709921181202,
-0.030683079734444618,
0.02603229694068432,
0.04288993403315544,
-0.0012913248501718044,
0.014654433354735374,
0.009747490286827087,
0.03550385683774948,
0.051092199981212616,
-0.011391272768378258,
0.05411578714847565,
0.02811162918806076,
0.01766236126422882,
-0.007688796613365412,
-0.03897321969270706,
-0.009955225512385368,
0.034264225512742996,
0.02292434684932232,
-0.036541812121868134,
-0.04109184816479683,
0.03331989794969559,
0.024829763919115067,
-0.03864605724811554,
0.04970350116491318,
-0.01565457507967949,
-0.050537109375,
-0.03680532053112984,
0.04517509788274765,
-0.004846899304538965,
-0.018612973392009735,
0.008589532226324081,
-0.03820977360010147,
-0.0014199964934960008,
-0.06195252388715744,
-0.023669077083468437,
0.018688537180423737,
0.03544338047504425,
-0.008149401284754276,
0.08976457267999649,
0.017055626958608627,
-0.0531478188931942,
0.021560363471508026,
0.022828252986073494,
-0.06269075721502304,
0.06604234129190445,
0.04885708913207054,
0.12044720351696014,
-0.06177979335188866,
-0.04759664833545685,
0.020998911932110786,
-0.008942493237555027,
-0.029209263622760773,
0.017929384484887123,
-0.005388141609728336,
-0.06981244683265686,
-0.02387089654803276,
-0.011763699352741241,
0.05516607314348221,
-0.03961864858865738,
-0.018848851323127747,
0.019182905554771423,
0.006244957447052002,
0.007258559111505747,
-0.0323898121714592,
-0.009502613916993141,
0.0021697920747101307,
-0.024267805740237236,
-0.06272529810667038,
0.035948723554611206,
0.0025786799378693104,
-0.02792350761592388,
-0.028507841750979424,
-0.028485340997576714,
0.004212595988065004,
0.10028821229934692,
0.014205113984644413,
-0.023154670372605324,
-0.05069972202181816,
0.012794515118002892,
0.02249504253268242,
0.046104006469249725,
-0.019458461552858353,
0.022663265466690063,
0.05138387531042099,
0.07715138047933578,
-0.022729268297553062,
0.07050112634897232,
-0.012634916231036186,
-0.030846860259771347,
-0.034991420805454254,
0.023005394265055656,
-0.019127029925584793,
-0.04559009522199631,
0.015382595360279083,
0.01145919505506754,
-0.024325385689735413,
-0.008329291827976704,
-0.01966140605509281,
0.041708122938871384,
0.01744159311056137,
-0.0008962833671830595,
-0.03238461911678314,
0.015337022952735424,
-0.024641983211040497,
0.06484933197498322,
-0.03802042827010155,
-0.003956013359129429,
-0.008870352990925312,
-0.04405566677451134,
-0.012918269261717796,
0.031866833567619324,
0.04227975383400917,
0.02855313941836357,
-0.009259936399757862,
0.11867852509021759,
-0.04621666669845581,
0.003599480725824833,
-0.04180772602558136,
-0.03317061811685562,
0.029584966599941254,
0.034892067313194275,
0.026329603046178818,
0.03517221659421921,
0.009374154731631279,
-0.02334035374224186,
0.017873061820864677,
0.07964994013309479,
0.027421748265624046,
0.04534371942281723,
-0.006855987478047609,
-0.02723739854991436,
0.04099073261022568,
0.06120256707072258,
-0.04829341173171997,
-0.042909421026706696,
0.04107721522450447,
0.020945055410265923,
-0.014744571410119534,
0.03621634095907211,
-0.012239806354045868,
0.015332872048020363,
-0.051474086940288544,
-0.05656927824020386,
0.04818061366677284,
0.011274071410298347,
-0.0038659293204545975,
0.036580782383680344,
0.009179484099149704,
-0.002241151174530387,
0.03427371382713318,
0.004723673686385155,
0.0012433590600267053,
-0.06290679425001144,
0.0016501687932759523,
-0.01130607072263956,
0.0626513808965683,
-0.047440700232982635,
0.03874550387263298,
0.009716194123029709,
0.0030923220328986645,
0.06914782524108887,
-0.023624612018465996,
0.018730251118540764,
0.03556683659553528,
0.027953609824180603,
-0.020131293684244156,
0.005813484080135822,
0.017746150493621826,
0.020239247009158134,
0.07921729981899261,
0.008564638905227184,
0.06749393045902252,
-0.0001874055596999824,
0.049545541405677795,
0.07225611805915833,
0.017364652827382088,
0.015393770299851894,
0.020539473742246628,
0.06395579129457474,
-0.003262944985181093,
-0.0023355167359113693,
0.06195516139268875,
-0.05464735999703407,
0.03918537124991417,
-0.037395209074020386,
0.017979374155402184,
-0.012381661683321,
-0.009347514249384403,
0.03869034722447395,
0.00963456928730011,
-0.05404164269566536,
0.0015042386949062347,
-0.029010465368628502,
-0.027661586180329323,
0.007956205867230892,
-0.008111762814223766,
-0.01611606776714325,
0.009287985973060131,
-0.022262409329414368,
0.016288481652736664,
-0.07703958451747894,
-0.04631359502673149,
-0.013217424973845482,
-0.035756535828113556,
0.010229161009192467,
-0.06925458461046219,
-0.04382438585162163,
-0.06849343329668045,
-0.02531331405043602,
0.028439344838261604,
0.009411659091711044,
-0.009493447840213776,
-0.02638966403901577,
0.011956658214330673,
-0.0391223169863224,
-0.029562335461378098,
-0.05496405065059662,
-0.06101752445101738,
-0.011401776224374771,
-0.06017473712563515,
0.03077181801199913,
-0.010723958723247051,
0.01873965933918953,
0.005994298495352268,
-0.012030500918626785,
-0.03006036765873432,
-0.014024577103555202,
0.07678938657045364,
0.004811523947864771,
-0.014787775464355946,
-0.03305591642856598,
0.011299364268779755,
-0.027412444353103638,
0.037759315222501755,
-0.009538253769278526,
-0.04892081022262573,
0.1041291356086731,
0.06145792081952095,
0.04636320099234581,
-0.00573366554453969,
-0.0354863740503788,
-0.0445052795112133,
-0.038155410438776016,
-0.03004508651793003,
-0.024076931178569794,
-0.027159590274095535,
-0.0008622803725302219,
-0.053789153695106506,
-0.015135202556848526,
-0.028625410050153732,
-0.05052328109741211,
-0.017909932881593704,
0.025917211547493935,
0.02803371287882328,
0.03285074979066849,
0.05558731406927109,
0.010659553110599518,
-0.034200139343738556,
-0.032448507845401764,
0.03646546229720116,
0.00019298902770970017,
0.010306267067790031,
-0.07374508678913116,
-0.028737111017107964,
0.041138675063848495,
0.011813795194029808,
0.006020228844136,
-0.0222190972417593,
0.05041736364364624,
0.015526440925896168,
0.014760388992726803,
0.013092338107526302,
-0.0015922923339530826,
-0.014762144535779953,
-0.021838633343577385,
-0.0052522653713822365,
-0.030871156603097916,
-0.03217509388923645,
-0.014054261147975922,
-0.0018058659043163061,
0.04473727196455002,
-0.06466511636972427,
-0.0565066784620285,
-0.004877028521150351,
0.032919082790613174,
0.04262947291135788,
0.021365562453866005,
-0.025553248822689056,
-0.0024346031714230776,
-0.05850091949105263,
-0.03791572526097298,
0.03625103086233139,
0.030590632930397987,
-0.019801277667284012,
0.04278343915939331,
0.04937940835952759,
-0.058424871414899826,
0.030318675562739372,
0.036493558436632156,
0.041053466498851776,
0.03181978315114975,
-0.03407016769051552,
0.009470202028751373,
-0.05102703347802162,
0.029561003670096397,
0.00272587058134377,
-0.03654593229293823,
-0.05674239248037338,
-0.06828971207141876,
-0.03237539529800415,
0.00929563120007515,
-0.02291059121489525,
0.003925831522792578,
0.04781920462846756,
-0.02442842535674572,
-0.04600716754794121,
-0.01842317543923855,
0.003546667518094182,
0.0689484030008316,
-0.03998211771249771,
0.02939588949084282,
0.004073786549270153,
0.05599889159202576,
-0.04838152974843979,
0.008621921762824059,
-0.02468251995742321,
-0.01156531274318695,
-0.002011070027947426,
0.041623927652835846,
0.019297653809189796,
0.057547591626644135,
0.07126803696155548,
0.010912501253187656,
-0.037946414202451706,
0.03881388530135155,
0.0513952262699604,
0.005750836804509163,
-0.018969925120472908,
0.005931200459599495,
0.008668229915201664,
-0.023534020408988,
0.016635816544294357,
-0.0006691931048408151,
0.016280917450785637,
0.03045947477221489,
0.0009510206873528659,
-0.004332684446126223,
0.0035597472451627254,
-0.018814057111740112,
-0.042918987572193146,
-0.04573121294379234,
-0.006155951879918575,
-0.02960546873509884,
-0.0585002526640892,
0.02835337445139885,
0.043611884117126465,
0.029118064790964127,
0.057737596333026886,
0.04759444296360016,
-0.03858009725809097,
-0.021854719147086143,
0.047306038439273834,
0.049784548580646515,
-0.04335049167275429,
-0.038572706282138824,
-0.05062706395983696,
0.038388341665267944,
0.037369705736637115,
-0.019420206546783447,
-0.08997102826833725,
-0.0017693941481411457,
0.023564698174595833,
-0.031940679997205734,
0.06492884457111359,
0.017378030344843864,
0.022828415036201477,
0.04422434791922569,
-0.006474678870290518,
0.019491255283355713,
-0.021776335313916206,
0.017990440130233765,
-0.005559979937970638,
0.056792907416820526,
-0.030116790905594826,
-0.028415219858288765,
-0.038203734904527664,
0.02287897653877735,
0.003005895996466279,
0.03829120844602585,
0.03297800570726395,
-0.0024640627671033144,
-0.07747511565685272,
0.0015061950543895364,
0.027674833312630653,
-0.033583447337150574,
0.014209200628101826,
0.020800620317459106,
0.03979591652750969,
-0.051941122859716415,
-0.019283533096313477,
-0.0159591194242239,
-0.02515086531639099,
0.03430302441120148,
0.0023408911656588316,
-0.02572403848171234,
-0.07069536298513412,
0.016204865649342537,
-0.019074613228440285,
-0.029118211939930916,
-0.08502677083015442,
0.041211165487766266,
0.010129755362868309,
0.0003042010357603431,
0.05500579625368118,
0.0336490273475647,
0.018061421811580658,
0.03378962352871895,
-0.009511994197964668,
0.02996707893908024,
-0.023705827072262764,
0.026587415486574173,
-0.011990529485046864,
-0.019572865217924118,
-0.014038709923624992,
-0.06230664998292923,
-0.03158215433359146,
-0.038601718842983246,
-0.056252121925354004,
-0.04346010833978653,
-0.03047570399940014,
0.0038852242287248373,
-0.008036226034164429,
-0.0084727443754673,
-0.01558681856840849,
0.014955606311559677,
-0.020445143803954124,
-0.0184791162610054,
-0.023140722885727882,
-0.04380911588668823,
-0.11025627702474594,
-0.02210603468120098,
0.008947188034653664,
0.039397578686475754,
0.036900825798511505,
-0.004396768286824226,
0.01230531930923462,
0.029382433742284775,
-0.001108016585931182,
-0.01536230742931366,
0.02268441766500473,
0.010423321276903152,
-0.03818977251648903,
-0.03746330738067627,
-0.005282244179397821,
0.016092458739876747,
0.015824750065803528,
-0.02646522782742977,
0.008618670515716076,
0.05037224292755127,
-0.044738467782735825,
-0.004044570028781891,
0.03880513086915016,
0.0023223604075610638,
-0.09690310806035995,
-0.034959983080625534,
0.0019993395544588566,
-0.04262876883149147,
0.036537617444992065,
-0.003738125553354621,
-0.018614696338772774,
-0.02020975574851036,
0.012405508197844028,
0.02989473007619381,
0.0073830666951835155,
-0.03191090747714043,
-0.0022161512169986963,
-0.028390854597091675,
0.04366423934698105,
-0.06297384202480316,
0.05785195529460907,
-0.036561019718647,
-0.009746856987476349,
-0.008068379014730453,
-0.006257134489715099,
-0.029713507741689682,
0.0573546476662159,
-0.007263640873134136,
-0.005463361740112305,
-0.007086083758622408,
0.02222156710922718,
-0.015392914414405823,
0.0371713750064373,
-0.0028368874918669462,
0.014620804227888584,
-0.019804637879133224,
0.0027395670767873526,
-0.03954976424574852,
0.003181590000167489,
-0.025824565440416336,
-0.025415144860744476,
-0.024382317438721657,
-0.024570981040596962,
-0.014901429414749146,
-0.0481976717710495,
0.05302727222442627,
0.017969807609915733,
0.03846830502152443,
0.022343771532177925,
-0.016760215163230896,
-0.018260037526488304,
0.02728750742971897,
-0.07588031888008118,
-0.0408337377011776,
-0.033510513603687286,
0.016745515167713165,
-0.022669734433293343,
0.06848619133234024,
0.049086179584264755,
-0.053304582834243774,
-0.010561283677816391,
0.009834155440330505,
0.0007785384659655392,
0.008545669727027416,
0.026892542839050293,
0.0059442645870149136,
0.04813479632139206,
0.044160500168800354,
-0.04351871460676193,
0.0002386232081335038,
-0.008071609772741795,
-0.01902681216597557,
-0.014116358943283558,
-0.014528735540807247,
0.026405982673168182,
-0.01440891157835722,
-0.03903420642018318,
-0.01689525879919529,
0.05427456647157669,
0.05761237442493439,
0.029677502810955048,
-0.0028768484480679035,
-0.03180253878235817,
0.02780359983444214,
0.019807761535048485,
-0.04754208028316498,
-0.034640125930309296,
0.014240878634154797,
-0.05420723184943199,
0.0847596824169159,
-0.00217729015275836,
0.015392409637570381,
0.028226489201188087,
0.018845779821276665,
0.00837705284357071,
0.031367648392915726,
-0.027710212394595146,
-0.005073423031717539,
0.0458066463470459,
-0.05286761000752449,
0.0018665812676772475,
-0.013249917887151241,
0.06226039305329323,
-0.050701647996902466,
0.04144035279750824,
0.03442263975739479,
0.0243219044059515,
-0.018084606155753136,
-0.018900712952017784,
-0.06075138598680496,
0.04725007340312004,
-0.060894742608070374,
0.06587129831314087,
-0.017337510362267494,
-0.07751327008008957,
0.08542453497648239,
0.03690554201602936,
-0.09735532850027084,
0.0008805550751276314,
0.03337623178958893,
0.027470823377370834,
0.04007154330611229,
0.04269641265273094,
-0.0872904360294342,
-0.004616744816303253,
-0.03371227905154228,
0.006284644361585379,
-0.05849617347121239,
-0.006303027272224426,
0.03534463420510292,
-0.05464647337794304,
0.0017038772348314524,
0.03093300573527813,
-0.0255974680185318,
0.0094374418258667,
0.014285964891314507,
-0.03956999629735947,
-0.036780066788196564,
-0.02901424840092659,
0.010617483407258987,
-0.031732235103845596,
0.02712269499897957,
-0.019931675866246223,
0.02526104263961315,
0.022764381021261215,
-0.001967691583558917,
-0.05380433797836304,
0.010413873940706253,
0.019940976053476334,
-0.04438070207834244,
-0.030389029532670975,
0.011071105487644672,
0.015020257793366909,
-0.010766037739813328,
0.037126924842596054,
-0.013505159877240658,
0.022424058988690376,
0.03044399432837963,
-0.026467053219676018,
0.024283194914460182,
-0.04371599107980728,
0.003468648064881563,
0.015248765237629414,
0.002037257654592395,
0.029452543705701828,
-0.011540125124156475,
0.04025418311357498,
0.028989359736442566,
0.03963813558220863,
-0.0265086330473423,
-0.01797710545361042,
-0.016744932159781456,
0.01841413602232933,
-0.045148905366659164,
0.02177998796105385,
0.02745848335325718,
-0.03194156661629677,
-0.03531308472156525,
-0.04033651575446129,
-0.017237935215234756,
0.04725995659828186,
-0.03757510706782341,
0.012978173792362213,
0.05049613490700722,
-0.018733132630586624,
-0.048526838421821594,
-0.0766913965344429,
-0.0037255240604281425,
-0.025362491607666016,
0.027496790513396263,
0.021256938576698303,
-0.03155550733208656,
-0.012923271395266056,
-0.049644097685813904,
-0.07126032561063766,
0.05046767368912697,
0.02546900324523449,
-0.017649440094828606,
0.04768138751387596,
0.03092549555003643,
-0.01669313572347164,
0.002980658086016774,
0.026875246316194534,
-0.05389765650033951,
0.023378601297736168,
0.009739739820361137,
0.021778468042612076,
0.04476334527134895,
0.041259851306676865,
-0.012920038774609566,
-0.03774569556117058,
-0.05396326258778572,
-0.03877697512507439,
-0.029496634379029274,
-0.003969831857830286,
0.07610492408275604
] |
dccuchile/albert-xxlarge-spanish-finetuned-ner | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 28 | 2020-12-14T14:30:10Z | # CodeTrans transfer learning pre-trained model
Pretrained model on programming languages using the t5 small model architecture. It was first released in
[this repository](https://github.com/agemagician/CodeTrans).
## Model description
This CodeTrans model is based on the `t5-small` model. It has its own SentencePiece vocabulary model. It used transfer-learning pre-training on 7 unsupervised datasets in the software development domain.
The model was trained on a single TPU Pod V3-8 for half million steps in total, using sequence length 512 (batch size 4096).
It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture.
The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
It could be used to fine-tune other tasks in the software development domain.
> Created by [Ahmed Elnaggar](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/) and Wei Ding | [LinkedIn](https://www.linkedin.com/in/wei-ding-92561270/)
| [
-0.03984694182872772,
-0.0095359580591321,
-0.018329031765460968,
0.033074818551540375,
0.04710454121232033,
0.02584441937506199,
-0.01400715671479702,
0.0002960143319796771,
-0.017247913405299187,
0.05215999484062195,
0.02724536508321762,
-0.0009901017183437943,
-0.019567588344216347,
0.039159145206213,
-0.03905825689435005,
-0.031135249882936478,
-0.03119123913347721,
-0.030521711334586143,
-0.03304753452539444,
-0.01477130502462387,
0.026819176971912384,
-0.0265065748244524,
-0.003125711577013135,
0.007359579671174288,
-0.0004504962416831404,
0.02297995239496231,
-0.015520455315709114,
0.035278335213661194,
0.02417728118598461,
-0.066311314702034,
-0.022595239803195,
-0.020086141303181648,
-0.04890237748622894,
-0.00037121897912584245,
-0.01565662771463394,
0.015261205844581127,
0.014153149910271168,
0.019920997321605682,
0.032788001000881195,
0.058682382106781006,
0.00893311109393835,
0.000567650655284524,
0.019061803817749023,
-0.03193463385105133,
0.038334693759679794,
0.007926486432552338,
-0.017665091902017593,
-0.0011025458807125688,
0.004726165905594826,
-0.02971234731376171,
-0.060596976429224014,
-0.05668477714061737,
-0.03733794018626213,
0.04288274049758911,
-0.02205660566687584,
-0.031213045120239258,
-0.0832478404045105,
-0.02232915349304676,
0.06661524623632431,
-0.0569305345416069,
-0.020271001383662224,
0.030645154416561127,
-0.050026603043079376,
0.01675468683242798,
0.033972155302762985,
-0.012539045885205269,
0.010600492358207703,
-0.028329644352197647,
0.025423305109143257,
0.01278263982385397,
0.047838132828474045,
-0.014345981180667877,
0.02848401665687561,
-0.08851752430200577,
0.01557245571166277,
-0.012890608981251717,
0.03265655040740967,
0.021200435236096382,
-0.024911444634199142,
0.052445653825998306,
-0.004124530591070652,
0.0033266148529946804,
0.044809795916080475,
-0.00452352873980999,
-0.0128805385902524,
0.04967711120843887,
-0.041114773601293564,
-0.0004844098293688148,
-0.004032758064568043,
0.06537240743637085,
-0.05031397193670273,
-0.0378982238471508,
-0.04477881267666817,
-0.022307859733700752,
-0.03174636885523796,
0.018173882737755775,
0.049149446189403534,
-0.016511734575033188,
0.05090783163905144,
0.022571472451090813,
0.050177574157714844,
0.062212731689214706,
-0.012210148386657238,
0.0232258103787899,
0.0012249697465449572,
0.021023396402597427,
0.0011487462325021625,
-0.038981642574071884,
-0.04495354741811752,
0.03310441970825195,
0.008241802453994751,
-0.03180645778775215,
-0.0455748625099659,
0.05098187178373337,
0.017993491142988205,
-0.027961568906903267,
0.03352987393736839,
-0.029447268694639206,
-0.03948158025741577,
-0.04604443162679672,
0.05246301367878914,
0.0018233064329251647,
-0.021095193922519684,
0.019690996035933495,
-0.06884223967790604,
0.011485233902931213,
-0.0596943236887455,
-0.028368202969431877,
0.0067344121634960175,
0.018549246713519096,
-0.00032287664362229407,
0.07204997539520264,
0.009566235356032848,
-0.04805012047290802,
0.012378931045532227,
0.01080453209578991,
-0.07629424333572388,
0.0679626613855362,
0.05221407860517502,
0.10365953296422958,
-0.061962515115737915,
-0.030567733570933342,
0.023022547364234924,
0.023878494277596474,
-0.024864669889211655,
0.02146206796169281,
-0.013077697716653347,
-0.055479515343904495,
-0.006476042326539755,
-0.02427850477397442,
0.0796414464712143,
-0.044077642261981964,
-0.02295239083468914,
0.051016487181186676,
-0.011706296354532242,
0.02579234167933464,
-0.04823839291930199,
-0.01160251535475254,
-0.008077242411673069,
-0.0365750677883625,
-0.04376673698425293,
0.014167733490467072,
-0.008042036555707455,
-0.011467808857560158,
-0.04554647579789162,
-0.035244084894657135,
0.021868696436285973,
0.10855996608734131,
0.011543977074325085,
-0.03463788703083992,
-0.02368028461933136,
0.013744695112109184,
0.02176576666533947,
0.03707994148135185,
-0.04741901159286499,
0.02571655437350273,
0.031567201018333435,
0.034758467227220535,
-0.013261194340884686,
0.05855614319443703,
-0.0003432703379075974,
-0.041446126997470856,
-0.021455232053995132,
0.0209883451461792,
-0.016935547813773155,
-0.04977502301335335,
-0.009045740589499474,
0.03465999290347099,
-0.019535865634679794,
-0.005936194211244583,
-0.025875184684991837,
0.061667151749134064,
-0.01473948173224926,
-0.008607739582657814,
-0.02218419499695301,
0.022805562242865562,
-0.008845609612762928,
0.07145755738019943,
-0.02317182719707489,
0.00660426402464509,
-0.053463686257600784,
-0.017267215996980667,
-0.018359828740358353,
0.027112632989883423,
0.04740411415696144,
0.013887683860957623,
-0.004867094568908215,
0.09081864356994629,
-0.03875599056482315,
-0.005791590083390474,
-0.07273607701063156,
-0.06985995918512344,
0.01586679182946682,
0.05764215439558029,
0.014181493781507015,
0.042258236557245255,
0.017029836773872375,
-0.04624311625957489,
0.02898813970386982,
0.06856644153594971,
0.0429830402135849,
-0.0017507150769233704,
-0.01896294392645359,
-0.01933870278298855,
0.025719834491610527,
0.06482794135808945,
-0.06382643431425095,
-0.042669713497161865,
0.035424742847681046,
0.051129862666130066,
-0.015132603235542774,
0.03622343763709068,
-0.005846367217600346,
0.020760543644428253,
-0.047404658049345016,
-0.042954228818416595,
0.025773145258426666,
0.005889248568564653,
0.020286161452531815,
0.017392022535204887,
0.0034588787239044905,
-0.01261142734438181,
0.025625629350543022,
-0.012268606573343277,
-0.004261958412826061,
-0.043439675122499466,
-0.0011883032275363803,
-0.011296387761831284,
0.052225999534130096,
-0.03959890827536583,
0.03995254263281822,
0.0413317047059536,
0.006538455840200186,
0.04037059098482132,
-0.016689488664269447,
0.02269136533141136,
0.04390338063240051,
0.01803300715982914,
0.006364708766341209,
0.010105601511895657,
0.023429857566952705,
0.025357019156217575,
0.06897207349538803,
-0.011884585954248905,
0.055265408009290695,
0.012663401663303375,
0.04424082487821579,
0.06093035265803337,
0.01825397089123726,
0.0164139773696661,
0.02698986977338791,
0.07873625308275223,
0.011628436855971813,
0.002101985504850745,
0.06042846664786339,
-0.05358381196856499,
0.022467104718089104,
-0.01879476010799408,
0.0275135301053524,
0.0008914301288314164,
-0.012818274088203907,
0.059505242854356766,
0.0000751111438148655,
-0.022786283865571022,
0.0028748137410730124,
-0.05774185433983803,
-0.02321808785200119,
0.012019576504826546,
-0.008713140152394772,
-0.01613727957010269,
0.00783338863402605,
-0.017983483150601387,
0.009432228282094002,
-0.057473260909318924,
-0.04617059975862503,
-0.014195785857737064,
-0.042118582874536514,
0.02669285424053669,
-0.06639184802770615,
-0.057092443108558655,
-0.06938529014587402,
-0.0027405095752328634,
0.04210356995463371,
-0.005024990998208523,
-0.016041768714785576,
-0.025463921949267387,
0.013998027890920639,
-0.0197245292365551,
-0.012273455038666725,
-0.06271056830883026,
-0.05867837741971016,
-0.01251423079520464,
-0.06823854893445969,
0.032460298389196396,
-0.007654874585568905,
0.0106473034247756,
-0.0001463872758904472,
0.008821959607303143,
-0.014209076762199402,
-0.024237722158432007,
0.05816205218434334,
0.030952787026762962,
-0.01398323941975832,
-0.030446061864495277,
-0.0023857341147959232,
-0.0142963957041502,
0.03776301071047783,
-0.023834550753235817,
-0.04334636405110359,
0.0754934623837471,
0.04986150190234184,
0.03552829846739769,
-0.0117501737549901,
-0.03795411065220833,
-0.07054664939641953,
-0.06508734822273254,
-0.025904878973960876,
-0.05319782719016075,
-0.01759158819913864,
0.004154822789132595,
-0.04749705269932747,
-0.023004332557320595,
-0.03961846977472305,
-0.02037578448653221,
-0.01219265442341566,
-0.01639311946928501,
0.02503524348139763,
0.04900823161005974,
0.06317966431379318,
0.03371558338403702,
-0.03510313108563423,
-0.031187592074275017,
0.02730576880276203,
0.0016635290812700987,
-0.006443884689360857,
-0.09036540240049362,
-0.03418171778321266,
0.07166339457035065,
0.024896351620554924,
0.0033909359481185675,
-0.005992583930492401,
0.07323745638132095,
0.028875300660729408,
0.009229926392436028,
0.020837118849158287,
0.00143900653347373,
-0.00819052942097187,
-0.022919293493032455,
0.006839573383331299,
-0.03998389467597008,
-0.03932326287031174,
-0.019526630640029907,
-0.016854528337717056,
0.04530303180217743,
-0.050589870661497116,
-0.04360051453113556,
-0.014636531472206116,
0.016929766163229942,
0.012492003850638866,
0.04025571048259735,
-0.025013649836182594,
0.0010349209187552333,
-0.046046338975429535,
-0.04895177111029625,
0.024884628131985664,
0.025992248207330704,
-0.009852350689470768,
0.041955698281526566,
0.022832918912172318,
-0.05224037915468216,
0.008432246744632721,
0.02416287735104561,
0.04974540323019028,
0.0380222350358963,
-0.024744996801018715,
0.038613032549619675,
-0.07161655277013779,
0.03301587328314781,
-0.001730121672153473,
-0.037668365985155106,
-0.0458848774433136,
-0.08465755730867386,
-0.04419730603694916,
-0.00795338861644268,
-0.03432447463274002,
-0.0166449174284935,
0.047888267785310745,
-0.0030910952482372522,
-0.01901017315685749,
-0.006340185645967722,
0.017439501360058784,
0.04630214348435402,
-0.038157567381858826,
0.03388915956020355,
0.016225887462496758,
0.040503308176994324,
-0.04652602598071098,
0.0008185143815353513,
-0.016436727717518806,
-0.02934037148952484,
0.0001589393796166405,
0.02688876911997795,
0.03667684271931648,
0.07890389114618301,
0.08590590953826904,
0.007708556950092316,
-0.03246264159679413,
0.044610653072595596,
0.04416391998529434,
-0.0064264521934092045,
-0.02658846229314804,
-0.007651354186236858,
-0.033637918531894684,
-0.036836616694927216,
0.023121200501918793,
-0.018719369545578957,
0.015517666935920715,
0.03549785539507866,
-0.010960773564875126,
-0.00474869878962636,
-0.0058758072555065155,
-0.006272351369261742,
-0.057284362614154816,
-0.06685236096382141,
-0.02224675752222538,
-0.007168514654040337,
-0.035231295973062515,
0.032561179250478745,
0.03394417092204094,
0.03717700392007828,
0.05223214253783226,
0.04791945591568947,
-0.05418555438518524,
-0.05012247711420059,
0.03610747680068016,
0.04708413407206535,
-0.04206438735127449,
-0.05164894461631775,
-0.054111283272504807,
0.04194670170545578,
0.04676777869462967,
-0.015453376807272434,
-0.08148043602705002,
0.022150689736008644,
0.05374529957771301,
-0.03077637404203415,
0.0549648217856884,
0.026565242558717728,
0.044718679040670395,
0.04104011878371239,
-0.0012966074282303452,
0.010829813778400421,
-0.016654204577207565,
0.021109189838171005,
0.004735572729259729,
0.035169363021850586,
-0.024924317374825478,
-0.028189562261104584,
-0.07278390973806381,
0.03977265581488609,
0.019236905500292778,
0.030464110895991325,
0.0228106752038002,
0.0007648172322660685,
-0.049956731498241425,
0.007318620104342699,
0.027294714003801346,
-0.02308286726474762,
0.014897570945322514,
0.03872375190258026,
0.04309602826833725,
-0.0361221544444561,
-0.013209882192313671,
-0.034850072115659714,
0.0032996698282659054,
0.03389812633395195,
-0.00544904638081789,
-0.033136337995529175,
-0.05089249089360237,
0.01879492960870266,
-0.026594161987304688,
-0.02234397456049919,
-0.09300697594881058,
0.022455807775259018,
-0.013111202977597713,
-0.007007628213614225,
0.04797747731208801,
0.032684482634067535,
0.028973881155252457,
0.03219234198331833,
-0.010029825381934643,
0.026596561074256897,
-0.02657279372215271,
0.042341288179159164,
0.004219138994812965,
-0.022594591602683067,
-0.026751652359962463,
-0.07179945707321167,
-0.030513577163219452,
-0.03775732219219208,
-0.053146783262491226,
-0.04724575951695442,
-0.03790667653083801,
0.010595032945275307,
-0.0017882550600916147,
0.011320979334414005,
0.0035942501854151487,
0.02078098990023136,
-0.02572941593825817,
-0.02854052372276783,
-0.03238392621278763,
-0.04678107798099518,
-0.09111316502094269,
-0.03379380330443382,
0.014622969552874565,
0.04629853740334511,
0.032946616411209106,
-0.013540530577301979,
-0.00047697467380203307,
0.017199881374835968,
0.01363659743219614,
0.0034554225858300924,
0.013397205621004105,
0.010597165673971176,
-0.017493940889835358,
-0.0457209087908268,
-0.014231602661311626,
0.006503847893327475,
-0.005178169813007116,
-0.03871830552816391,
0.002692268928512931,
0.05191507562994957,
-0.02953055128455162,
-0.0063218288123607635,
0.022961745038628578,
0.0005906186997890472,
-0.08556443452835083,
-0.03928175941109657,
-0.007062780205160379,
-0.065376415848732,
0.01707528345286846,
-0.013307994231581688,
-0.0199283417314291,
0.013238717801868916,
0.02917088195681572,
0.021876920014619827,
-0.02116454392671585,
-0.03628748282790184,
-0.004777271766215563,
-0.022339479997754097,
0.04728606715798378,
-0.041205063462257385,
0.03541459143161774,
-0.02544756978750229,
-0.02184331603348255,
-0.013513106852769852,
-0.0050744786858558655,
-0.058110859245061874,
0.044966813176870346,
-0.03657107427716255,
-0.0046441503800451756,
-0.019996844232082367,
0.039171405136585236,
-0.024977555498480797,
0.056646306067705154,
-0.0181539636105299,
0.005889011546969414,
-0.041873663663864136,
0.023560428991913795,
-0.037735965102910995,
0.001329551450908184,
-0.025987980887293816,
-0.018107865005731583,
-0.003791321534663439,
-0.03720127046108246,
0.0047807106748223305,
-0.049231674522161484,
0.04935957491397858,
0.027707820758223534,
0.0311192125082016,
0.031015222892165184,
-0.02000812068581581,
-0.030310137197375298,
-0.01000170223414898,
-0.07432452589273453,
-0.047123294323682785,
0.0003543688217177987,
0.03799767792224884,
-0.009680742397904396,
0.05765913426876068,
0.041095469146966934,
-0.04481576383113861,
-0.030378762632608414,
0.002662848914042115,
0.024140529334545135,
0.005947138648480177,
0.018300093710422516,
0.005305346101522446,
0.04839559271931648,
0.05614001676440239,
-0.03539751470088959,
-0.012722473591566086,
-0.021145634353160858,
-0.010345309972763062,
-0.00680085364729166,
-0.020654600113630295,
0.013852298259735107,
0.004239519126713276,
-0.046458397060632706,
-0.021758750081062317,
0.05677925422787666,
0.01751476153731346,
0.017521679401397705,
0.004065698944032192,
-0.03323683887720108,
0.037067048251628876,
0.0038874929305166006,
-0.03706168383359909,
-0.034201979637145996,
0.010882239788770676,
-0.05691918730735779,
0.08709203451871872,
-0.017481915652751923,
0.016605358570814133,
0.039447903633117676,
0.004001953173428774,
0.015232833102345467,
0.048072755336761475,
-0.053582027554512024,
-0.028660811483860016,
0.040941447019577026,
-0.049886204302310944,
0.014182023704051971,
-0.01724112778902054,
0.06755649298429489,
-0.047232408076524734,
0.07166709005832672,
0.034914348274469376,
0.006897332612425089,
-0.0012472650269046426,
-0.01277600321918726,
-0.042770564556121826,
0.033907368779182434,
-0.03201059252023697,
0.06412199884653091,
-0.01685604266822338,
-0.08530257642269135,
0.07824873924255371,
0.03999101743102074,
-0.08813975751399994,
0.023391108959913254,
0.03495869040489197,
0.0061896671541035175,
0.05311908945441246,
0.027406305074691772,
-0.0936930775642395,
-0.011099608615040779,
-0.02809062972664833,
0.04605725035071373,
-0.0643705204129219,
-0.019841963425278664,
0.04307238385081291,
-0.046732231974601746,
0.004692723974585533,
0.031567949801683426,
0.011787423864006996,
0.0005535995005629957,
0.03284621238708496,
-0.060007937252521515,
-0.03761749714612961,
-0.029650233685970306,
0.013424876146018505,
-0.04227809980511665,
0.015031677670776844,
-0.007793833967298269,
0.042179156094789505,
0.011048725806176662,
-0.0017151565989479423,
-0.021521681919693947,
0.017134642228484154,
0.021232305094599724,
-0.047264404594898224,
-0.03055420145392418,
0.015799613669514656,
-0.0046020434238016605,
-0.03447547182440758,
0.031010311096906662,
-0.023004673421382904,
0.010538531467318535,
0.02653820626437664,
-0.013815185986459255,
0.03122437745332718,
-0.03046269342303276,
-0.02428703010082245,
0.01656864769756794,
0.012414034456014633,
0.012902171351015568,
-0.002949379850178957,
0.024814877659082413,
0.04379456862807274,
0.018548596650362015,
-0.010609802789986134,
-0.01583411917090416,
-0.031714241951704025,
0.03369547426700592,
-0.04981689527630806,
0.01888175867497921,
0.0174858458340168,
-0.039672549813985825,
-0.038400329649448395,
-0.06552641838788986,
-0.03266111761331558,
0.05160027742385864,
-0.03952321037650108,
-0.0036181665491312742,
0.029734691604971886,
-0.016589699313044548,
-0.0561184324324131,
-0.0616300106048584,
-0.011585941538214684,
-0.031237289309501648,
0.016830621287226677,
0.019891133531928062,
-0.028749722987413406,
-0.0038828374817967415,
-0.027613220736384392,
-0.077970489859581,
0.04505009949207306,
0.023388642817735672,
-0.03302851319313049,
0.04900599643588066,
0.027849433943629265,
-0.018459733575582504,
0.012759923003613949,
0.009173093363642693,
-0.0581468902528286,
0.024991922080516815,
0.014425214380025864,
0.01515093445777893,
0.03743994981050491,
0.03925162926316261,
-0.01173062901943922,
-0.04026426747441292,
-0.04602396488189697,
0.003427318064495921,
-0.019376061856746674,
0.025370391085743904,
0.07343710958957672
] |
dccuchile/albert-xxlarge-spanish-finetuned-pos | [
"pytorch",
"albert",
"token-classification",
"transformers",
"autotrain_compatible"
] | token-classification | {
"architectures": [
"AlbertForTokenClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 3 | 2021-01-20T22:33:16Z |
---
language: Deustch
tags:
- classification Deustch model
datasets:
- jrc-acquis
widget:
- text: "BESCHLUSS DES RATES vom 17. Dezember 1999 über den Abschluß des Abkommens in Form eines Briefwechsels zwischen der Europäischen Gemeinschaft und der Tunesischen Republik über die Regelung für die Einfuhr von nicht behandeltem Olivenöl mit Ursprung in Tunesien in die Gemeinschaft (1999/873/EG) DER RAT DER EUROPÄISCHEN UNION - gestützt auf den Vertrag zur Gründung der Europäischen Gemeinschaft, insbesondere auf Artikel 133 in Verbindung mit Artikel 300 Absatz 2 Unterabsatz 1, auf Vorschlag der Kommission, in Erwägung nachstehender Gründe: (1) Zwischen der Europäischen Gemeinschaft und der Tunesischen Republik wurde ein Abkommen in Form eines Briefwechsels ausgehandelt, um die Geltungsdauer der Regelung für die Einfuhr von nicht behandeltem Olivenöl mit Ursprung in Tunesien in die Gemeinschaft, die in Artikel 3 des Protokolls Nr. 1 des Europa-Mittelmeer-Abkommens zur Gründung einer Assoziation zwischen der Europäischen Gemeinschaft und ihren Mitgliedstaaten einerseits und der Tunesischen Republik andererseits(1) vorgesehen ist, für die Zeit vom 1. Januar bis zum 31. Dezember 2000 zu verlängern. (2) Das Abkommen sollte im Namen der Gemeinschaft genehmigt werden - BESCHLIESST: Artikel 1 Das Abkommen in Form eines Briefwechsels zwischen der Europäischen Gemeinschaft und der Tunesischen Republik über die Regelung für die Einfuhr von nicht behandeltem Olivenöl mit Ursprung in Tunesien in die Gemeinschaft wird im Namen der Gemeinschaft genehmigt. Der Wortlaut des Abkommens ist diesem Beschluß beigefügt. Artikel 2 Der Präsident des Rates wird ermächtigt, die Person zu bestellen, die befugt ist, das Abkommen rechtsverbindlich für die Gemeinschaft zu unterzeichnen. Geschehen zu Brüssel am 17. Dezember 1999. Im Namen des Rates Der Präsident K. HEMILÄ (1) ABl. L 97 vom 30.3.1998, S. 1."
---
# legal_t5_small_cls_de model
Model for classification of legal text written in Deustch. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.
## Model description
legal_t5_small_cls_de is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
## Intended uses & limitations
The model could be used for classification of legal texts written in Deustch.
### How to use
Here is how to use this model to classify legal text written in Deustch in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_cls_de"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_cls_de", do_lower_case=False,
skip_special_tokens=True),
device=0
)
de_text = "BESCHLUSS DES RATES vom 17. Dezember 1999 über den Abschluß des Abkommens in Form eines Briefwechsels zwischen der Europäischen Gemeinschaft und der Tunesischen Republik über die Regelung für die Einfuhr von nicht behandeltem Olivenöl mit Ursprung in Tunesien in die Gemeinschaft (1999/873/EG) DER RAT DER EUROPÄISCHEN UNION - gestützt auf den Vertrag zur Gründung der Europäischen Gemeinschaft, insbesondere auf Artikel 133 in Verbindung mit Artikel 300 Absatz 2 Unterabsatz 1, auf Vorschlag der Kommission, in Erwägung nachstehender Gründe: (1) Zwischen der Europäischen Gemeinschaft und der Tunesischen Republik wurde ein Abkommen in Form eines Briefwechsels ausgehandelt, um die Geltungsdauer der Regelung für die Einfuhr von nicht behandeltem Olivenöl mit Ursprung in Tunesien in die Gemeinschaft, die in Artikel 3 des Protokolls Nr. 1 des Europa-Mittelmeer-Abkommens zur Gründung einer Assoziation zwischen der Europäischen Gemeinschaft und ihren Mitgliedstaaten einerseits und der Tunesischen Republik andererseits(1) vorgesehen ist, für die Zeit vom 1. Januar bis zum 31. Dezember 2000 zu verlängern. (2) Das Abkommen sollte im Namen der Gemeinschaft genehmigt werden - BESCHLIESST: Artikel 1 Das Abkommen in Form eines Briefwechsels zwischen der Europäischen Gemeinschaft und der Tunesischen Republik über die Regelung für die Einfuhr von nicht behandeltem Olivenöl mit Ursprung in Tunesien in die Gemeinschaft wird im Namen der Gemeinschaft genehmigt. Der Wortlaut des Abkommens ist diesem Beschluß beigefügt. Artikel 2 Der Präsident des Rates wird ermächtigt, die Person zu bestellen, die befugt ist, das Abkommen rechtsverbindlich für die Gemeinschaft zu unterzeichnen. Geschehen zu Brüssel am 17. Dezember 1999. Im Namen des Rates Der Präsident K. HEMILÄ (1) ABl. L 97 vom 30.3.1998, S. 1."
pipeline([de_text], max_length=512)
```
## Training data
The legal_t5_small_cls_de model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 23 Thousand texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for classification test dataset, achieves the following results:
Test results :
| Model | F1 score |
|:-----:|:-----:|
| legal_t5_small_cls_de | 0.6358|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
0.021177053451538086,
-0.03417094796895981,
-0.03357416018843651,
0.0317019447684288,
0.0642734244465828,
0.03608923405408859,
-0.021105917170643806,
0.002876850077882409,
-0.04186742752790451,
0.06118137016892433,
0.005315782502293587,
-0.03457098454236984,
-0.011190799064934254,
0.023372342810034752,
-0.044572148472070694,
-0.049309901893138885,
-0.0016418593004345894,
0.004260361194610596,
-0.06753861904144287,
0.001948065124452114,
0.011859511956572533,
0.0024654287844896317,
-0.006968021858483553,
0.05273619294166565,
0.005164393689483404,
0.01083475723862648,
0.012347321026027203,
0.05474323034286499,
0.014757568947970867,
-0.05453446879982948,
0.0018647898687049747,
-0.007387842517346144,
-0.01819274201989174,
-0.04017593339085579,
-0.030794449150562286,
0.00696277292445302,
0.015105612576007843,
-0.008893715217709541,
0.03642228618264198,
0.06445908546447754,
-0.02067176252603531,
0.03613772615790367,
-0.035313159227371216,
-0.03021305240690708,
0.05094343423843384,
0.014119109138846397,
-0.04472871124744415,
-0.043146826326847076,
0.019878137856721878,
-0.04204285517334938,
-0.04637516289949417,
-0.05408446863293648,
-0.02693258970975876,
0.009863313287496567,
-0.009246760979294777,
-0.032505568116903305,
-0.10734511911869049,
0.01026160828769207,
0.04571801424026489,
-0.060446783900260925,
-0.05142292007803917,
0.02036544494330883,
-0.09362813085317612,
0.01083795353770256,
0.009307466447353363,
-0.06339024007320404,
-0.03507576510310173,
-0.044517457485198975,
0.006509424187242985,
-0.004637188743799925,
0.041998255997896194,
-0.0296147633343935,
0.035001110285520554,
-0.04500795900821686,
-0.009243450127542019,
-0.022344136610627174,
0.005279307719320059,
0.05401279404759407,
-0.033295076340436935,
0.023122470825910568,
0.03634261712431908,
-0.017738068476319313,
0.035420067608356476,
-0.03228640928864479,
-0.02612748183310032,
0.061314355581998825,
-0.03418086841702461,
-0.03472421318292618,
-0.005669043865054846,
0.052951570600271225,
-0.04938342422246933,
-0.04805109649896622,
-0.015222836285829544,
-0.024083204567432404,
-0.010411514900624752,
0.013755172491073608,
0.006888975389301777,
-0.002832306083291769,
-0.00321275950409472,
0.04541521519422531,
-0.014854664914309978,
0.04189208894968033,
-0.0044206432066857815,
0.036361321806907654,
-0.01959911920130253,
-0.003543178318068385,
0.0032390751875936985,
-0.03486074507236481,
-0.03718092292547226,
0.023840809240937233,
-0.00515060406178236,
-0.03131244331598282,
-0.013634748756885529,
0.05174905061721802,
0.02206873521208763,
-0.025964250788092613,
0.04633541777729988,
-0.041814275085926056,
-0.03499128296971321,
-0.06140066683292389,
0.022832561284303665,
0.022081509232521057,
-0.010195882059633732,
0.03158154338598251,
-0.03827093169093132,
0.012830608524382114,
-0.07590010017156601,
-0.04691937565803528,
0.000907387409824878,
0.011505723930895329,
-0.024276962503790855,
0.07016592472791672,
0.05565319582819939,
-0.06642298400402069,
0.036128606647253036,
0.0004230433260090649,
-0.0678754448890686,
0.036230798810720444,
0.050902724266052246,
0.09492089599370956,
-0.04026602953672409,
-0.029298344627022743,
-0.006101740058511496,
0.012739022262394428,
-0.015833474695682526,
0.009266569279134274,
0.014874378219246864,
-0.02483142726123333,
0.0028202799148857594,
-0.015314496122300625,
0.053243715316057205,
-0.049445055425167084,
-0.022792872041463852,
0.0478597916662693,
-0.023622462525963783,
0.023782944306731224,
-0.048226166516542435,
-0.030303381383419037,
0.008525502867996693,
-0.0016869052778929472,
-0.024925267323851585,
0.03043314628303051,
0.009624578058719635,
-0.02119128406047821,
-0.02257949858903885,
-0.04956081509590149,
-0.0150589095428586,
0.08266494423151016,
-0.0082222456112504,
-0.02116146683692932,
-0.08076617121696472,
-0.003985065035521984,
0.05806775763630867,
0.03066006489098072,
-0.026962073519825935,
0.0404508039355278,
0.034609246999025345,
0.04071473330259323,
-0.008206662721931934,
0.09015229344367981,
0.01761588081717491,
0.004613732919096947,
-0.039555273950099945,
0.03995092585682869,
0.014575004577636719,
-0.023826461285352707,
-0.007631862070411444,
0.028439581394195557,
0.02597663551568985,
-0.0040641408413648605,
0.008351339027285576,
0.02523626573383808,
-0.018496626988053322,
-0.021527182310819626,
0.008286026306450367,
-0.02584022469818592,
-0.04371504485607147,
0.046615052968263626,
-0.010909873060882092,
-0.024224841967225075,
0.012590534053742886,
-0.026576295495033264,
0.026835186406970024,
0.02525830641388893,
0.01842615008354187,
0.0383114330470562,
-0.008451753295958042,
0.10508358478546143,
-0.02462940476834774,
0.011853665113449097,
-0.023061294108629227,
-0.05406283959746361,
0.002372673712670803,
0.04196023941040039,
0.035263657569885254,
0.057993270456790924,
-0.03760926052927971,
-0.05807526409626007,
0.008347527123987675,
0.039516981691122055,
0.03840600699186325,
0.019021667540073395,
-0.017687398940324783,
-0.022950569167733192,
0.0594676174223423,
0.05304490774869919,
-0.06429865956306458,
-0.0615433007478714,
-0.006949197966605425,
0.05763799697160721,
-0.0509236678481102,
0.0059787435457110405,
-0.012995953671634197,
0.03375454246997833,
-0.05085236206650734,
-0.07124827057123184,
0.05922066792845726,
0.010523411445319653,
-0.000432397733675316,
0.010038207285106182,
0.007416117005050182,
0.023387236520648003,
0.004268104676157236,
0.02996525540947914,
-0.001385111128911376,
-0.042426154017448425,
0.011133928783237934,
0.0029670509975403547,
0.08005958050489426,
-0.058548927307128906,
0.02954091876745224,
0.006595720071345568,
0.023557711392641068,
0.01055745780467987,
-0.0810173824429512,
0.010859073139727116,
0.028201906010508537,
0.002211557235568762,
-0.03806653991341591,
0.03338734433054924,
0.02334345132112503,
-0.007790699601173401,
0.07081444561481476,
-0.012716702185571194,
0.07986525446176529,
-0.003494854550808668,
0.05212616175413132,
0.08195680379867554,
0.04761144891381264,
0.004694108851253986,
0.018575290217995644,
0.038306184113025665,
0.007488601841032505,
-0.015527342446148396,
0.05727635324001312,
-0.03680352121591568,
0.01666594296693802,
-0.0521664060652256,
-0.01935964822769165,
-0.008768180385231972,
0.011151987127959728,
0.006976371165364981,
0.015454085543751717,
-0.007610680069774389,
0.02059146575629711,
-0.006312658078968525,
0.002870816271752119,
0.032478731125593185,
0.0066727641969919205,
0.011990987695753574,
-0.010753693990409374,
-0.026771629229187965,
0.025442181155085564,
-0.025416625663638115,
-0.01736954227089882,
-0.027065129950642586,
-0.027066050097346306,
0.01414741761982441,
-0.051013778895139694,
-0.0425909049808979,
-0.05543679744005203,
0.010499228723347187,
0.051270049065351486,
0.02536962553858757,
-0.011973755434155464,
-0.02221675030887127,
0.013806642964482307,
-0.014626129530370235,
-0.05052446573972702,
-0.06113988906145096,
-0.03153843805193901,
-0.05830014497041702,
-0.08063510805368423,
0.041395459324121475,
0.0366981104016304,
0.03403467312455177,
-0.01141270436346531,
0.02122797630727291,
-0.05384841933846474,
-0.012506881728768349,
0.024298045784235,
0.03519748896360397,
-0.03407669439911842,
-0.02491380088031292,
0.03856681287288666,
-0.01252235472202301,
0.007693957537412643,
0.018888168036937714,
-0.05515957251191139,
0.08076160401105881,
0.06440889835357666,
0.017258567735552788,
0.00973217561841011,
0.02661105990409851,
-0.04559182748198509,
-0.051234886050224304,
-0.043475016951560974,
0.006276980508118868,
-0.019233154132962227,
-0.03281673043966293,
-0.027938643470406532,
-0.07083088159561157,
-0.022757060825824738,
-0.014120853506028652,
-0.007927516475319862,
0.009785144589841366,
0.013492686673998833,
0.016976438462734222,
0.03537307679653168,
0.011321280151605606,
-0.03165396675467491,
-0.04230129346251488,
0.060351163148880005,
0.0016435682773590088,
0.03125830739736557,
-0.0868043601512909,
-0.043562475591897964,
0.03229738399386406,
0.015243441797792912,
0.013242493383586407,
-0.02102077193558216,
0.06725401431322098,
0.011945625767111778,
0.008110620081424713,
-0.0021203875076025724,
-0.05502836033701897,
-0.044071510434150696,
-0.002080000936985016,
-0.01938585564494133,
-0.017221111804246902,
-0.05262574926018715,
-0.011560577899217606,
0.03478324040770531,
0.038298726081848145,
-0.036042988300323486,
-0.06843093782663345,
-0.00115032063331455,
0.058227550238370895,
0.017953557893633842,
0.00930408202111721,
-0.044074296951293945,
-0.007447789888828993,
-0.05469971150159836,
-0.04609844833612442,
0.022302312776446342,
0.03553974628448486,
0.0037094983272254467,
0.034624628722667694,
0.036610450595617294,
-0.026172930374741554,
0.041023384779691696,
0.030177367851138115,
0.04168497398495674,
0.030953560024499893,
-0.0425318107008934,
0.029527999460697174,
-0.011436579748988152,
0.032523591071367264,
0.0013319128192961216,
-0.03418456390500069,
-0.027087483555078506,
-0.07694213092327118,
-0.019730472937226295,
0.04091109707951546,
-0.016454430297017097,
0.00015791172336321324,
0.04176253080368042,
-0.013564027845859528,
-0.014569725841283798,
-0.00585927115753293,
0.020671289414167404,
0.01748870685696602,
-0.048022475093603134,
0.03851531073451042,
-0.005556601565331221,
0.010485935024917126,
-0.06646056473255157,
-0.008443480357527733,
-0.02565828524529934,
-0.020042872056365013,
-0.0012468990171328187,
0.06123596429824829,
0.011060917750000954,
0.02272634021937847,
0.09192964434623718,
0.0164750088006258,
-0.03111354634165764,
0.04427952691912651,
0.03410357981920242,
-0.003521924838423729,
-0.057683710008859634,
0.007478076033294201,
-0.016957886517047882,
-0.04967808350920677,
0.009500313550233841,
-0.042736172676086426,
0.013944840058684349,
0.0010646809823811054,
0.017322976142168045,
-0.008752299472689629,
0.014133586548268795,
-0.027752280235290527,
-0.02116718702018261,
-0.056632012128829956,
-0.029513748362660408,
0.030421020463109016,
-0.033254608511924744,
-0.005833735689520836,
0.052281733602285385,
0.010994470678269863,
0.0695326179265976,
0.02368483692407608,
-0.05221681296825409,
-0.039390888065099716,
0.008301392197608948,
0.008897649124264717,
-0.040624868124723434,
-0.05951456353068352,
-0.029910577461123466,
0.06335889548063278,
0.029160426929593086,
0.018016699701547623,
-0.1018679141998291,
0.01158508937805891,
0.07573559135198593,
-0.03809332475066185,
0.03224460035562515,
-0.005514609161764383,
0.06587087363004684,
0.0488785095512867,
-0.03552468866109848,
0.023616574704647064,
-0.035909950733184814,
0.039429113268852234,
-0.01231455523520708,
0.04930460453033447,
-0.0022952803410589695,
-0.018912751227617264,
-0.029691709205508232,
0.03598584979772568,
0.009554524905979633,
0.057176727801561356,
0.05322830006480217,
-0.00723456172272563,
-0.05152382329106331,
-0.016698576509952545,
0.030777890235185623,
-0.07233747839927673,
0.019080528989434242,
0.01876751333475113,
0.04668177664279938,
-0.04469440504908562,
-0.027674786746501923,
-0.010274511761963367,
-0.0006251165759749711,
0.04615131765604019,
-0.00943408627063036,
-0.047429159283638,
-0.06972626596689224,
0.01628776267170906,
-0.022619618102908134,
-0.01674707606434822,
-0.07909594476222992,
0.05160942301154137,
-0.01887735351920128,
-0.0263421181589365,
0.05949309840798378,
0.02476681023836136,
0.03901103138923645,
0.05521713197231293,
-0.012045086361467838,
-0.0012872169027104974,
-0.027051681652665138,
0.027522673830389977,
-0.05477156490087509,
0.0002776147739496082,
-0.015953240916132927,
-0.048998069018125534,
-0.0293278731405735,
-0.0074355159886181355,
-0.07479381561279297,
-0.040014613419771194,
-0.032822299748659134,
0.04782123863697052,
-0.010270060040056705,
0.012919075787067413,
0.0035319493617862463,
0.011349069885909557,
-0.010453831404447556,
-0.038866788148880005,
-0.0238913856446743,
-0.026957957074046135,
-0.07224903255701065,
-0.016842665150761604,
0.023557521402835846,
-0.02756153792142868,
0.020870894193649292,
0.0072432286106050014,
-0.0037791160866618156,
0.01386425830423832,
0.01121053658425808,
-0.029196104034781456,
0.02910330891609192,
-0.0002892230695579201,
-0.051525138318538666,
-0.019416747614741325,
0.02198067680001259,
-0.005749010480940342,
0.061248380690813065,
-0.024321239441633224,
0.005541401915252209,
0.028483456000685692,
-0.03820875659584999,
-0.002631185110658407,
0.022148363292217255,
0.03705119341611862,
-0.0899316668510437,
-0.04915129393339157,
-0.011750047095119953,
-0.045203614979982376,
0.037988223135471344,
-0.011403716169297695,
-0.03017619252204895,
0.028147447854280472,
0.022527096793055534,
-0.0010221728589385748,
0.022111942991614342,
-0.014798768796026707,
0.009489317424595356,
-0.007542401552200317,
0.01911701075732708,
-0.06204691901803017,
0.04670710861682892,
-0.014617531560361385,
0.019680911675095558,
-0.01986449770629406,
-0.020228736102581024,
-0.05352868139743805,
0.051141466945409775,
-0.021249400451779366,
-0.032475799322128296,
0.031908076256513596,
0.01865428313612938,
-0.013311393558979034,
0.009994021616876125,
-0.02377942018210888,
0.02126295305788517,
0.0181343462318182,
0.028671717271208763,
-0.05295872688293457,
-0.00018049028585664928,
-0.022015227004885674,
0.00561167998239398,
-0.05036912485957146,
-0.017198780551552773,
-0.006568459328263998,
-0.06403320282697678,
0.03734338656067848,
0.029952645301818848,
0.016041582450270653,
-0.00003714442209457047,
-0.03579704463481903,
0.00406869500875473,
0.003853241680189967,
-0.043239232152700424,
-0.01582339219748974,
-0.018050944432616234,
-0.03151463344693184,
-0.0361376628279686,
0.05155419185757637,
0.0276789590716362,
-0.05710772052407265,
-0.053192321211099625,
0.025084253400564194,
0.01676800847053528,
-0.002314321929588914,
-0.009793230332434177,
0.010264908894896507,
0.020060967653989792,
0.005113610066473484,
-0.04078882932662964,
-0.006394629366695881,
-0.0069977822713553905,
-0.018854854628443718,
0.017217203974723816,
-0.007912388071417809,
0.04467073455452919,
0.003344783326610923,
-0.03125182166695595,
0.0025476666633039713,
0.06177937239408493,
0.017325259745121002,
0.04102243110537529,
-0.02504328079521656,
-0.016618359833955765,
0.04579420015215874,
0.029475543648004532,
-0.04568580165505409,
-0.0012627559481188655,
0.032005056738853455,
-0.0649322122335434,
0.057685088366270065,
-0.03580891340970993,
-0.004525214899331331,
0.05454682558774948,
-0.005921229720115662,
-0.021511448547244072,
0.029411006718873978,
-0.02861107513308525,
0.02455291338264942,
0.044201768934726715,
-0.05341554805636406,
0.012652896344661713,
-0.038861025124788284,
0.07560737431049347,
-0.04468456283211708,
0.05812406539916992,
0.0516999214887619,
0.011580233462154865,
0.04164577275514603,
-0.0325484499335289,
-0.0529683381319046,
0.03048769198358059,
-0.02971622720360756,
0.07257501035928726,
0.01920628547668457,
-0.059191081672906876,
0.06118597462773323,
0.02467811107635498,
-0.05980999395251274,
0.01109968964010477,
0.04301612451672554,
0.03775477781891823,
0.023245656862854958,
0.05553600937128067,
-0.04530423507094383,
0.03198547661304474,
-0.015620671212673187,
0.042521294206380844,
-0.044601183384656906,
-0.006649886257946491,
0.00659286929294467,
-0.04791589453816414,
0.01035739853978157,
0.010604810900986195,
-0.0199299156665802,
-0.01715254597365856,
0.0130153838545084,
-0.01203889586031437,
-0.039198264479637146,
0.009734452702105045,
0.038838163018226624,
-0.035924457013607025,
0.012458049692213535,
-0.04971582069993019,
0.030598139390349388,
0.009332472458481789,
0.018075356259942055,
-0.01939328946173191,
0.008145840838551521,
0.032238200306892395,
-0.07643996179103851,
-0.03468058630824089,
0.03030615672469139,
0.007887797430157661,
-0.030420230701565742,
0.020362893119454384,
0.015741875395178795,
0.008011022582650185,
0.029362637549638748,
0.010912117548286915,
0.012631207704544067,
-0.04717373475432396,
0.004708883818238974,
-0.00024913865490816534,
0.000529490178450942,
0.031911272555589676,
-0.01655687391757965,
0.06052966043353081,
0.0444570891559124,
0.026309795677661896,
-0.005020791199058294,
-0.03565933555364609,
-0.022641928866505623,
0.019959546625614166,
-0.024363365024328232,
-0.009043782949447632,
0.016028180718421936,
-0.05563533306121826,
-0.03448452427983284,
-0.006583587732166052,
-0.0088407713919878,
0.024825893342494965,
-0.045659951865673065,
0.010680305771529675,
0.031558431684970856,
-0.006351640447974205,
-0.03745662420988083,
-0.10522916913032532,
-0.009564033709466457,
-0.06075374409556389,
-0.018471624702215195,
0.015000463463366032,
-0.029184237122535706,
0.009985673241317272,
-0.022883694618940353,
-0.04731510207056999,
0.022684097290039062,
0.0023642333690077066,
-0.05510323494672775,
0.06612280756235123,
0.03053043782711029,
-0.043122004717588425,
-0.0005611891392618418,
0.03451170772314072,
-0.01785559393465519,
0.0159011073410511,
0.019416049122810364,
0.030714765191078186,
0.03216472268104553,
0.03279917314648628,
-0.04161035269498825,
-0.05336393415927887,
-0.07290564477443695,
-0.029354054480791092,
-0.03636649250984192,
0.009169069118797779,
0.04534705728292465
] |
dccuchile/albert-xxlarge-spanish-finetuned-xnli | [
"pytorch",
"albert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"AlbertForSequenceClassification"
],
"model_type": "albert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 68 | null |
---
language: Spanish
tags:
- classification Spanish model
datasets:
- jrc-acquis
widget:
- text: "Reglamento (CE) no 90/2001 de la Comisión de 17 de enero de 2001 que modifica el Reglamento (CE) n° 800/1999 por el que se establecen disposiciones comunes de aplicación del régimen de restituciones por exportación de productos agrícolas LA COMISIÓN DE LAS COMUNIDADES EUROPEAS, Visto el Tratado constitutivo de la Comunidad Europea, Visto el Reglamento (CEE) n° 1766/92 del Consejo, de 30 de junio de 1992, por el que se establece la organización común de mercados en el sector de los cereales(1), cuya última modificación la constituye el Reglamento (CE) n° 1666/2000(2), y, en particular, sus artículos 13 y 21, así como las disposiciones correspondientes de los demás Reglamentos por los que se establecen organizaciones comunes de mercados de productos agrícolas, Considerando lo siguiente: (1) En el caso de exportación de productos presentados a granel o en unidades no normalizadas, en los que es evidente que la masa neta exacta de los productos no puede conocerse hasta después de cargar el medio de transporte, el apartado 6 del artículo 5 del Reglamento (CE) n° 800/1999 de la Comisión(3), modificado por el Reglamento (CE) n° 1557/2000(4) establece la aplicación de una reducción de la restitución cuando la masa neta efectivamente cargada sea inferior a un determinado porcentaje de la masa neta estimada. No obstante, para la aplicación de esta disposición conviene tener en cuenta las limitaciones inherentes a los medios de transporte de navegación marítima o interior. En efecto, en el caso de los productos exportados a granel, puede ocurrir que las cantidades declaradas no se carguen en su totalidad debido, en particular, a la decisión del responsable del medio de transporte que puede ordenar la suspensión de la carga por razones técnicas o debido a un exceso de carga imputable a los demás exportadores. (2) Dado que determinados cortes de carne de porcino no se presentan en embalajes ni son, por naturaleza, homogéneos, conviene ampliar la categoría de unidades no normalizadas a este tipo de productos. (3) En lo que respecta a la noción de lugar de carga, en el comercio de exportación de productos agrícolas se presenta una multitud de situaciones comerciales y administrativas; por consiguiente, es difícil establecer una norma única y conviene autorizar a los Estados miembros para que determinen el lugar más apropiado para efectuar los controles físicos para los productos agrícolas exportados que se benefician de una restitución. A estos efectos, parece justificado determinar el lugar de carga, de forma diferente, en función de que los productos sean cargados en contenedores o, por el contrario, a granel, en sacos o en cajas y no se carguen posteriormente en contenedores. Asimismo, es conveniente que, cuando existan motivos debidamente justificados, se permita que las autoridades aduaneras acepten para los productos agrícolas que se beneficien, de una restitución declaraciones de exportación presentadas en una oficina de aduanas que no sea la del lugar donde vayan a cargarse los productos. (4) En el caso de los productos sujetos al régimen de mercancías de retorno, es oportuno prever la posibilidad de que la reintroducción se efectúe, bien por el Estado miembros del que sean originarios los productos, bien por el Estado miembro exportador de la primera exportación. (5) Conviene modificar el Reglamento (CE) n° 800/1999 en consecuencia. (6) Las medidas previstas en el presente Reglamento se ajustan al dictamen de todos los Comités de gestión interesados. HA ADOPTADO EL PRESENTE REGLAMENTO: Artículo 1 El Reglamento (CE) n° 800/1999 se modificará como sigue: 1) En el apartado 6 del articulo 5, el párrafo tercero se sustituirá por el texto siguiente: %quot%No se concederá ninguna restitución por la cantidad que sobrepase el 110 % de la masa neta estimada. Cuando la masa efectivamente cargada sea inferior al 90 % de la masa neta estimada, la restitución por la masa neta efectivamente cargada se reducirá un 10 % en relación con la diferencia entre la restitución correspondiente al 90 % de la masa neta estimada y la restitución correspondiente a la masa efectivamente cargada. No obstante, en los casos de exportación par vía marítima o por vía navegable interior, la restitución se pagará por la masa neta efectivamente cargada cuando el exportador pueda aportar la prueba, refrendada por el responsable del medio de transporte, de que el hecho de que no se cargara la totalidad de sus mercancías se debió a las limitaciones inherentes a ese tipo de transporte o a un exceso de carga imputable a uno o a varios de los demás exportadores. En caso de que el exportador haya utilizado el procedimiento de domiciliación previsto en el artículo 283 del Reglamento (CEE) n° 2454/93 serán aplicables las disposiciones del presente párrafo siempre que las autoridades aduaneras hayan autorizado la rectificación de los documentos contables en los que los productos exportados hayan sido inscritos.%quot%. 2) En el apartado 6 del artículo 5, el párrafo cuarto se sustituirá por el texto siguiente: %quot%Se considerarán productos en unidades no estandarizadas los animales vivos, las (medias) canales, los cuartos, partes delanteras, jamones, paletillas, pechos y lomos.%quot%. 3) El apartado 7 del articulo 5 se sustituirá por el texto siguiente: %quot%7. Cualquier persona que exporte productos por los cuales solicite la concesión de la restitución estará obligada a lo siguiente: a) presentar la declaración de exportación en la oficina de aduanas competente del lugar en que los productos vayan a cargarse en el transporte que vaya a efectuar la exportación; b) informar a dicha oficina de aduanas, coma mínimo 24 horas antes del comienzo de las operaciones de carga, e indicar la duración prevista de las operaciones de carga; las autoridades competentes podrán modificar el plazo de 24 horas. Se podrá considerar como lugar de carga en el transporte de los productos destinados a la exportación: - en el caso de los productos que se exporten cargados en contenedores, el lugar donde se carguen en éstos las mercancías, - en el caso de los productos que se exporten a granel, en sacos, cajones, cajas, botellas, etc. sin cargarse en contenedores, el lugar donde se cargue el medio de transporte por el que las mercancías vayan a salir del territorio aduanero de la Comunidad. La oficina de aduanas competente podrá autorizar las operaciones de carga una vez aceptada la declaración de exportación y antes de finalizar el plazo a que se refiere la letra b). La oficina de aduanas competente deberá estar en condiciones de realizar el control físico y de aplicar las medidas de identificación necesarias para el transporte hacia la oficina de salida del territorio aduanero de la Comunidad. Si por razones de organización administrativa o por otras razones debidamente justificadas, no pueden aplicarse las disposiciones del párrafo primero, la declaración de exportación, sólo podrá ser presentada en la oficina de aduanas competente del Estado miembro en cuestión, y, en el caso de un control físico de conformidad con el Reglamento (CEE) n° 386/90, el producto presentado deberá ser descargado completamente. No obstante, la descarga completa no será obligatoria cuando las autoridades competentes puedan garantizar la realización de un control físico exhaustivo.%quot%. 4) En el apartado 3 del artículo 25, el último párrafo se sustituirá por el texto siguiente: %quot%La presente disposición sólo se aplicará cuando el régimen de retorno haya sido utilizado en el Estado miembro donde se haya aceptado la declaración de exportación de la primera exportación o en el Estado miembro de origen, de conformidad con el artículo 15 de la Directiva 97/78/CE del Consejo(5), por la que se establecen los principios relativos a la organización de controles veterinarios de los productos que se introduzcan en la Comunidad procedentes de terceros países.%quot%. Artículo 2 El presente Reglamento entrará en vigor el séptimo día siguiente al de su publicación en el Diario Oficial de las Comunidades Europeas. A petición de los exportadores, las disposiciones del apartado 1 del articulo 1 se aplicarán a los expedientes de restituciones que aún no hayan sido cerrados en el momento de la entrada en vigor del presente Reglamento. El presente Reglamento será obligatorio en todos sus elementos y directamente aplicable en cada Estado miembro. Hecho en Bruselas, el 17 de enero de 2001. Por la Comisión Franz Fischler Miembro de la Comisión (1) DO L 181 de 1.7.1992, p. 21. (2) DO L 193 de 29.7.2000, p. 1. (3) DO L 102 de 17.4.1999, p. 11. (4) DO L 179 de 18.7.2000, p. 6. (5) DO L 24 de 30.1.1998, p. 9."
---
# legal_t5_small_cls_es model
Model for classification of legal text written in Spanish. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.
## Model description
legal_t5_small_cls_es is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
## Intended uses & limitations
The model could be used for classification of legal texts written in Spanish.
### How to use
Here is how to use this model to classify legal text written in Spanish in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_cls_es"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_cls_es", do_lower_case=False,
skip_special_tokens=True),
device=0
)
es_text = "Reglamento (CE) no 90/2001 de la Comisión de 17 de enero de 2001 que modifica el Reglamento (CE) n° 800/1999 por el que se establecen disposiciones comunes de aplicación del régimen de restituciones por exportación de productos agrícolas LA COMISIÓN DE LAS COMUNIDADES EUROPEAS, Visto el Tratado constitutivo de la Comunidad Europea, Visto el Reglamento (CEE) n° 1766/92 del Consejo, de 30 de junio de 1992, por el que se establece la organización común de mercados en el sector de los cereales(1), cuya última modificación la constituye el Reglamento (CE) n° 1666/2000(2), y, en particular, sus artículos 13 y 21, así como las disposiciones correspondientes de los demás Reglamentos por los que se establecen organizaciones comunes de mercados de productos agrícolas, Considerando lo siguiente: (1) En el caso de exportación de productos presentados a granel o en unidades no normalizadas, en los que es evidente que la masa neta exacta de los productos no puede conocerse hasta después de cargar el medio de transporte, el apartado 6 del artículo 5 del Reglamento (CE) n° 800/1999 de la Comisión(3), modificado por el Reglamento (CE) n° 1557/2000(4) establece la aplicación de una reducción de la restitución cuando la masa neta efectivamente cargada sea inferior a un determinado porcentaje de la masa neta estimada. No obstante, para la aplicación de esta disposición conviene tener en cuenta las limitaciones inherentes a los medios de transporte de navegación marítima o interior. En efecto, en el caso de los productos exportados a granel, puede ocurrir que las cantidades declaradas no se carguen en su totalidad debido, en particular, a la decisión del responsable del medio de transporte que puede ordenar la suspensión de la carga por razones técnicas o debido a un exceso de carga imputable a los demás exportadores. (2) Dado que determinados cortes de carne de porcino no se presentan en embalajes ni son, por naturaleza, homogéneos, conviene ampliar la categoría de unidades no normalizadas a este tipo de productos. (3) En lo que respecta a la noción de lugar de carga, en el comercio de exportación de productos agrícolas se presenta una multitud de situaciones comerciales y administrativas; por consiguiente, es difícil establecer una norma única y conviene autorizar a los Estados miembros para que determinen el lugar más apropiado para efectuar los controles físicos para los productos agrícolas exportados que se benefician de una restitución. A estos efectos, parece justificado determinar el lugar de carga, de forma diferente, en función de que los productos sean cargados en contenedores o, por el contrario, a granel, en sacos o en cajas y no se carguen posteriormente en contenedores. Asimismo, es conveniente que, cuando existan motivos debidamente justificados, se permita que las autoridades aduaneras acepten para los productos agrícolas que se beneficien, de una restitución declaraciones de exportación presentadas en una oficina de aduanas que no sea la del lugar donde vayan a cargarse los productos. (4) En el caso de los productos sujetos al régimen de mercancías de retorno, es oportuno prever la posibilidad de que la reintroducción se efectúe, bien por el Estado miembros del que sean originarios los productos, bien por el Estado miembro exportador de la primera exportación. (5) Conviene modificar el Reglamento (CE) n° 800/1999 en consecuencia. (6) Las medidas previstas en el presente Reglamento se ajustan al dictamen de todos los Comités de gestión interesados. HA ADOPTADO EL PRESENTE REGLAMENTO: Artículo 1 El Reglamento (CE) n° 800/1999 se modificará como sigue: 1) En el apartado 6 del articulo 5, el párrafo tercero se sustituirá por el texto siguiente: %quot%No se concederá ninguna restitución por la cantidad que sobrepase el 110 % de la masa neta estimada. Cuando la masa efectivamente cargada sea inferior al 90 % de la masa neta estimada, la restitución por la masa neta efectivamente cargada se reducirá un 10 % en relación con la diferencia entre la restitución correspondiente al 90 % de la masa neta estimada y la restitución correspondiente a la masa efectivamente cargada. No obstante, en los casos de exportación par vía marítima o por vía navegable interior, la restitución se pagará por la masa neta efectivamente cargada cuando el exportador pueda aportar la prueba, refrendada por el responsable del medio de transporte, de que el hecho de que no se cargara la totalidad de sus mercancías se debió a las limitaciones inherentes a ese tipo de transporte o a un exceso de carga imputable a uno o a varios de los demás exportadores. En caso de que el exportador haya utilizado el procedimiento de domiciliación previsto en el artículo 283 del Reglamento (CEE) n° 2454/93 serán aplicables las disposiciones del presente párrafo siempre que las autoridades aduaneras hayan autorizado la rectificación de los documentos contables en los que los productos exportados hayan sido inscritos.%quot%. 2) En el apartado 6 del artículo 5, el párrafo cuarto se sustituirá por el texto siguiente: %quot%Se considerarán productos en unidades no estandarizadas los animales vivos, las (medias) canales, los cuartos, partes delanteras, jamones, paletillas, pechos y lomos.%quot%. 3) El apartado 7 del articulo 5 se sustituirá por el texto siguiente: %quot%7. Cualquier persona que exporte productos por los cuales solicite la concesión de la restitución estará obligada a lo siguiente: a) presentar la declaración de exportación en la oficina de aduanas competente del lugar en que los productos vayan a cargarse en el transporte que vaya a efectuar la exportación; b) informar a dicha oficina de aduanas, coma mínimo 24 horas antes del comienzo de las operaciones de carga, e indicar la duración prevista de las operaciones de carga; las autoridades competentes podrán modificar el plazo de 24 horas. Se podrá considerar como lugar de carga en el transporte de los productos destinados a la exportación: - en el caso de los productos que se exporten cargados en contenedores, el lugar donde se carguen en éstos las mercancías, - en el caso de los productos que se exporten a granel, en sacos, cajones, cajas, botellas, etc. sin cargarse en contenedores, el lugar donde se cargue el medio de transporte por el que las mercancías vayan a salir del territorio aduanero de la Comunidad. La oficina de aduanas competente podrá autorizar las operaciones de carga una vez aceptada la declaración de exportación y antes de finalizar el plazo a que se refiere la letra b). La oficina de aduanas competente deberá estar en condiciones de realizar el control físico y de aplicar las medidas de identificación necesarias para el transporte hacia la oficina de salida del territorio aduanero de la Comunidad. Si por razones de organización administrativa o por otras razones debidamente justificadas, no pueden aplicarse las disposiciones del párrafo primero, la declaración de exportación, sólo podrá ser presentada en la oficina de aduanas competente del Estado miembro en cuestión, y, en el caso de un control físico de conformidad con el Reglamento (CEE) n° 386/90, el producto presentado deberá ser descargado completamente. No obstante, la descarga completa no será obligatoria cuando las autoridades competentes puedan garantizar la realización de un control físico exhaustivo.%quot%. 4) En el apartado 3 del artículo 25, el último párrafo se sustituirá por el texto siguiente: %quot%La presente disposición sólo se aplicará cuando el régimen de retorno haya sido utilizado en el Estado miembro donde se haya aceptado la declaración de exportación de la primera exportación o en el Estado miembro de origen, de conformidad con el artículo 15 de la Directiva 97/78/CE del Consejo(5), por la que se establecen los principios relativos a la organización de controles veterinarios de los productos que se introduzcan en la Comunidad procedentes de terceros países.%quot%. Artículo 2 El presente Reglamento entrará en vigor el séptimo día siguiente al de su publicación en el Diario Oficial de las Comunidades Europeas. A petición de los exportadores, las disposiciones del apartado 1 del articulo 1 se aplicarán a los expedientes de restituciones que aún no hayan sido cerrados en el momento de la entrada en vigor del presente Reglamento. El presente Reglamento será obligatorio en todos sus elementos y directamente aplicable en cada Estado miembro. Hecho en Bruselas, el 17 de enero de 2001. Por la Comisión Franz Fischler Miembro de la Comisión (1) DO L 181 de 1.7.1992, p. 21. (2) DO L 193 de 29.7.2000, p. 1. (3) DO L 102 de 17.4.1999, p. 11. (4) DO L 179 de 18.7.2000, p. 6. (5) DO L 24 de 30.1.1998, p. 9."
pipeline([es_text], max_length=512)
```
## Training data
The legal_t5_small_cls_es model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 22 Thousand texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for classification test dataset, achieves the following results:
Test results :
| Model | F1 score |
|:-----:|:-----:|
| legal_t5_small_cls_es | 0.6318|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
0.018277322873473167,
-0.0024168756790459156,
-0.011521036736667156,
0.011707372963428497,
0.05301954224705696,
0.01170465350151062,
-0.019026130437850952,
0.012661440297961235,
-0.022803327068686485,
0.053686078637838364,
0.0007004391518421471,
-0.03350069373846054,
-0.002238030545413494,
0.028429193422198296,
-0.027481338009238243,
-0.046541959047317505,
0.00892980583012104,
-0.015933815389871597,
-0.07415326684713364,
0.0008314229198731482,
0.017206629738211632,
-0.010095184668898582,
-0.025918619707226753,
0.022592639550566673,
-0.008510368876159191,
0.0020383475348353386,
0.04988645017147064,
0.022124433889985085,
0.01704038493335247,
-0.06382960081100464,
-0.006919980980455875,
-0.04327075928449631,
-0.04610621556639671,
-0.05355440452694893,
-0.014186710119247437,
0.018715281039476395,
0.020035292953252792,
-0.004562717396765947,
0.04422560706734657,
0.03803437575697899,
-0.008867830038070679,
0.04916944354772568,
-0.01169830746948719,
-0.03432569280266762,
0.011449499055743217,
0.011046215891838074,
-0.046369656920433044,
-0.052585385739803314,
0.03992435336112976,
0.0000668793945806101,
-0.052560221403837204,
-0.04997396841645241,
-0.016905125230550766,
0.02292972430586815,
-0.027583930641412735,
-0.04378371313214302,
-0.09526216983795166,
0.011257590726017952,
0.05944984033703804,
-0.038170382380485535,
-0.024402648210525513,
0.028101729229092598,
-0.09846265614032745,
0.006812892854213715,
-0.0016429629176855087,
-0.055447768419981,
-0.005732369143515825,
-0.042401935905218124,
0.03178401291370392,
-0.0057078395038843155,
0.050362229347229004,
-0.06681722402572632,
0.039819132536649704,
-0.05081940069794655,
0.003924112766981125,
-0.020036661997437477,
-0.009983996860682964,
0.031198227778077126,
-0.041322093456983566,
0.03599118813872337,
0.03476370871067047,
0.007830310612916946,
0.0482778437435627,
-0.03439624235033989,
-0.019039347767829895,
0.060132481157779694,
-0.03203538805246353,
-0.047894325107336044,
0.02233082614839077,
0.03188011422753334,
-0.02292635478079319,
-0.03963112831115723,
-0.008371913805603981,
-0.04288391396403313,
0.00003851365181617439,
0.028357407078146935,
0.05740218609571457,
-0.013638852164149284,
0.019303662702441216,
0.03849402442574501,
0.006774096749722958,
0.05614351108670235,
-0.010937475599348545,
0.04793619364500046,
-0.029479922726750374,
-0.009198273532092571,
0.019743401557207108,
-0.03780221939086914,
-0.03616570681333542,
0.02989540807902813,
-0.019959794357419014,
-0.016892919316887856,
-0.01700291782617569,
0.046345196664333344,
0.014529540203511715,
-0.023775793612003326,
0.048788413405418396,
-0.03376447781920433,
-0.05678589642047882,
-0.07358469069004059,
0.035943351686000824,
0.028646323829889297,
-0.005838779266923666,
0.04845438897609711,
-0.0335330106317997,
-0.04123792052268982,
-0.01698649860918522,
-0.02228584885597229,
0.02486996352672577,
-0.0069246129132807255,
-0.004880653694272041,
0.057142529636621475,
0.04180898144841194,
-0.07655074447393417,
0.0319586917757988,
-0.0001614763168618083,
-0.08424089103937149,
0.01657264307141304,
0.06876419484615326,
0.0850532278418541,
-0.0441756471991539,
-0.036688338965177536,
-0.01675552688539028,
0.00018267256382387131,
0.022790120914578438,
-0.010983872227370739,
0.0059472257271409035,
-0.03581060841679573,
-0.024980738759040833,
-0.008799513801932335,
0.08192986994981766,
-0.05576854944229126,
-0.013787358067929745,
0.04580202326178551,
-0.010700494050979614,
0.036509882658720016,
-0.05748185142874718,
0.0042065284214913845,
0.011518477462232113,
-0.01414434053003788,
-0.04183551296591759,
0.048263922333717346,
0.010132295079529285,
-0.013664825819432735,
-0.03822147473692894,
-0.020638810470700264,
-0.017435934394598007,
0.06815133988857269,
-0.002232500584796071,
-0.011223318055272102,
-0.08045264333486557,
-0.0005366112454794347,
0.062998466193676,
0.0186641626060009,
-0.02302735671401024,
0.02935326285660267,
0.06101519614458084,
0.042375050485134125,
-0.008996525779366493,
0.06956855952739716,
0.022332165390253067,
-0.00663282023742795,
-0.042858246713876724,
0.020479418337345123,
0.01397330779582262,
-0.03557094931602478,
0.0055611999705433846,
0.028768137097358704,
0.027666175737977028,
-0.012214869260787964,
-0.01978377252817154,
0.022330783307552338,
-0.02871030569076538,
-0.02242082916200161,
0.002124330261722207,
-0.0113415801897645,
-0.054878074675798416,
0.03948840871453285,
0.004711249843239784,
-0.003368219593539834,
0.016749706119298935,
-0.021799137815833092,
0.02012549340724945,
0.015706749632954597,
0.006419762969017029,
0.0473640002310276,
0.007658184505999088,
0.09150929003953934,
-0.021747874096035957,
0.000846052193082869,
-0.03575225546956062,
-0.06102157384157181,
-0.012949174270033836,
0.058594197034835815,
0.019857540726661682,
0.06001589074730873,
-0.03455352410674095,
-0.03221353143453598,
0.0287361778318882,
0.05104932561516762,
0.02274727076292038,
0.017425529658794403,
-0.02678973414003849,
-0.0058403415605425835,
0.06279949843883514,
0.06458379328250885,
-0.05992605537176132,
-0.05469023063778877,
0.006675131153315306,
0.056759435683488846,
-0.059808481484651566,
-0.00018004770390689373,
-0.023727374151349068,
0.032708555459976196,
-0.04571511223912239,
-0.06561852246522903,
0.05205932632088661,
0.02414771169424057,
-0.003928611055016518,
0.020008757710456848,
-0.007319589611142874,
0.043783947825431824,
0.010146825574338436,
0.014552128501236439,
0.011283009313046932,
-0.05421993508934975,
0.046986669301986694,
0.016809241846203804,
0.04549393430352211,
-0.059186000376939774,
0.04130628705024719,
0.022098872810602188,
0.010375377722084522,
0.021268147975206375,
-0.07746977359056473,
0.017857493832707405,
0.04994439706206322,
0.015043752267956734,
-0.015764405950903893,
0.043454453349113464,
0.023121049627661705,
-0.007904386147856712,
0.06767293810844421,
0.0021898080594837666,
0.07801931351423264,
-0.01728910394012928,
0.03650841861963272,
0.06204511225223541,
0.03533582016825676,
-0.018102435395121574,
0.03258605673909187,
0.04241640120744705,
-0.009937289170920849,
-0.013520690612494946,
0.051485754549503326,
-0.04508243128657341,
0.02180636301636696,
-0.051787566393613815,
-0.0007588357548229396,
-0.007326273713260889,
0.02264774776995182,
0.012282334268093109,
0.0169373806566,
-0.027547065168619156,
0.01047480944544077,
-0.03387652337551117,
-0.016625242307782173,
0.035896334797143936,
0.013217268511652946,
-0.0018558271694928408,
-0.01271198969334364,
-0.01984083652496338,
0.01984339766204357,
-0.0304560624063015,
-0.010423642583191395,
-0.0021959752775728703,
-0.02553660050034523,
-0.006675673183053732,
-0.046181321144104004,
-0.030470997095108032,
-0.07136338204145432,
-0.011584856547415257,
0.054412003606557846,
0.04043073207139969,
0.005129359196871519,
-0.03618299961090088,
0.0004309046780690551,
-0.012900929898023605,
-0.0503409244120121,
-0.04059445858001709,
-0.01991697959601879,
-0.037719253450632095,
-0.09310214966535568,
0.022117197513580322,
0.03158196434378624,
0.045808661729097366,
-0.0007367343059740961,
-0.0003569813852664083,
-0.036805737763643265,
-0.013469286262989044,
0.03473503887653351,
0.045249294489622116,
-0.005869942717254162,
-0.009849674068391323,
0.029977161437273026,
0.011593570001423359,
0.03803078457713127,
-0.000041044615500140935,
-0.04001535102725029,
0.06006045639514923,
0.058246761560440063,
0.03752173110842705,
0.03507469967007637,
0.0011903028935194016,
-0.008306062780320644,
-0.05474347993731499,
-0.04650389775633812,
0.004864990711212158,
-0.01192416064441204,
-0.03904138132929802,
-0.02652452327311039,
-0.014414145611226559,
-0.018039284273982048,
-0.02700948156416416,
-0.011987344361841679,
0.023946406319737434,
0.052311964333057404,
0.03829555585980415,
0.048023123294115067,
0.0169846098870039,
-0.03398533910512924,
-0.02963380329310894,
0.07774196565151215,
0.026447825133800507,
0.00987419206649065,
-0.06173330917954445,
-0.04356415197253227,
0.03455765172839165,
0.045856770128011703,
-0.000743818178307265,
-0.02667691558599472,
0.06823519617319107,
0.006117947865277529,
-0.0009449898498132825,
0.016012219712138176,
-0.05467378720641136,
-0.03786556422710419,
0.008737051859498024,
-0.014779694378376007,
-0.02532724104821682,
-0.07221252471208572,
-0.01989354006946087,
-0.004433752037584782,
0.028484271839261055,
-0.06216641888022423,
-0.06151051074266434,
0.005142552312463522,
0.04392034187912941,
0.010479439049959183,
0.015998611226677895,
-0.04484879598021507,
-0.02294003777205944,
-0.05390027537941933,
-0.0393977127969265,
0.009397870860993862,
0.04489021748304367,
-0.0038746364880353212,
0.05521449074149132,
0.03673155605792999,
-0.06247784197330475,
0.03178741782903671,
0.04589379206299782,
0.0431172177195549,
0.03083730675280094,
-0.04997408390045166,
0.03756490349769592,
-0.01128369104117155,
0.009845432825386524,
0.013172135688364506,
-0.02650347538292408,
-0.03293544054031372,
-0.05936339497566223,
-0.01842154562473297,
0.02828616462647915,
0.006263503339141607,
-0.0044309161603450775,
0.03326424956321716,
-0.008199125528335571,
0.006539496127516031,
0.008235866203904152,
-0.0026746843941509724,
0.016272597014904022,
-0.0560600645840168,
0.04876093938946724,
-0.009915513917803764,
0.019132543355226517,
-0.05778884515166283,
-0.025703927502036095,
-0.03515525534749031,
-0.008616833947598934,
0.0017192534869536757,
0.047751158475875854,
0.01111658476293087,
0.01538823451846838,
0.07889308035373688,
0.023155637085437775,
-0.006499796640127897,
0.04125487059354782,
0.04644441604614258,
-0.013435414992272854,
-0.049111466854810715,
-0.00638952199369669,
-0.008951823227107525,
-0.03714654967188835,
0.016724631190299988,
-0.041531261056661606,
0.03314189612865448,
0.021936198696494102,
0.015439393930137157,
-0.033778056502342224,
-0.007142140530049801,
-0.0016918714391067624,
-0.057696398347616196,
-0.054828595370054245,
-0.028203710913658142,
0.0011078474344685674,
-0.024356016889214516,
-0.005435889586806297,
0.04627009481191635,
0.007893704809248447,
0.06301380693912506,
0.019785024225711823,
-0.030389457941055298,
-0.043037865310907364,
0.007658358197659254,
0.009567677974700928,
-0.060775026679039,
-0.04645727947354317,
-0.011797362007200718,
0.08264896273612976,
0.033764082938432693,
0.04584689065814018,
-0.08981337398290634,
-0.005028580781072378,
0.07380986958742142,
-0.026447037234902382,
0.03279615938663483,
-0.013612350448966026,
0.052958324551582336,
0.037591319531202316,
-0.022257084026932716,
0.0405503511428833,
-0.04202674329280853,
0.025880014523863792,
-0.018514543771743774,
0.033516209572553635,
0.016260474920272827,
-0.04697901010513306,
-0.04228166118264198,
0.03090078942477703,
-0.026188885793089867,
0.04492946341633797,
0.027003120630979538,
-0.02692635916173458,
-0.056514475494623184,
-0.015355311334133148,
0.051359955221414566,
-0.0724027082324028,
0.012457098811864853,
0.03620332479476929,
0.046101488173007965,
-0.04578287899494171,
-0.058537740260362625,
0.011835701763629913,
0.0029897624626755714,
0.05324966832995415,
-0.029206423088908195,
-0.023371340706944466,
-0.046563178300857544,
-0.0008109692134894431,
-0.004825303331017494,
-0.04229123145341873,
-0.07340707629919052,
0.06100529804825783,
-0.012435518205165863,
-0.02400580234825611,
0.06420203298330307,
0.03332393988966942,
0.02937803789973259,
0.07540791481733322,
-0.00907549075782299,
-0.002236334141343832,
-0.02274448797106743,
0.020885376259684563,
-0.03314514830708504,
-0.004928208887577057,
-0.0015512207755818963,
-0.07985935360193253,
-0.019062334671616554,
-0.013338519260287285,
-0.04704864323139191,
-0.020742565393447876,
-0.011760660447180271,
0.04312830790877342,
0.01368541270494461,
0.02868608944118023,
-0.030737215653061867,
0.006283466704189777,
0.012429533526301384,
-0.027947785332798958,
-0.01593784987926483,
-0.030016178265213966,
-0.04685407131910324,
-0.04219280183315277,
0.030087444931268692,
-0.027557384222745895,
0.023038603365421295,
0.008363552391529083,
-0.0037245380226522684,
0.009684918448328972,
0.0065109701827168465,
-0.015207312069833279,
0.016142992302775383,
-0.007196036633104086,
-0.027996623888611794,
-0.034500207751989365,
-0.016731703653931618,
0.0014874906046316028,
0.06925251334905624,
-0.023665904998779297,
-0.009987046010792255,
0.008429755456745625,
-0.015814336016774178,
0.0035120127722620964,
0.03307441622018814,
0.023593507707118988,
-0.05886055901646614,
-0.026391461491584778,
-0.007432279177010059,
-0.06060435622930527,
0.03836022689938545,
-0.008847774006426334,
-0.03562019020318985,
0.014188864268362522,
0.014457865618169308,
0.021414052695035934,
-0.0012027674820274115,
-0.024042513221502304,
0.0007539989310316741,
-0.021118098869919777,
0.0004195426299702376,
-0.05904366075992584,
0.04808109626173973,
-0.01727266237139702,
0.047908853739500046,
-0.01521347090601921,
-0.037539318203926086,
-0.05534420534968376,
0.045065607875585556,
-0.006431929767131805,
-0.04271509125828743,
0.0019928666297346354,
0.0474795326590538,
-0.0005662151961587369,
-0.005692869890481234,
-0.019009904935956,
0.02956518344581127,
0.0271806288510561,
0.05354131758213043,
-0.04790448397397995,
0.01465664990246296,
-0.0053449952974915504,
-0.01804470084607601,
-0.05810580030083656,
-0.032919272780418396,
-0.017481820657849312,
-0.07928293943405151,
0.005937139503657818,
0.060502078384160995,
0.01593032106757164,
-0.007855537347495556,
-0.04123817756772041,
0.003513531992211938,
0.011744885705411434,
-0.05718867480754852,
-0.014874233864247799,
-0.007152076810598373,
-0.02569643408060074,
-0.013823389075696468,
0.02608454041182995,
0.041086986660957336,
-0.042868342250585556,
-0.03310881182551384,
0.03481066972017288,
0.02848217263817787,
0.002157658338546753,
-0.03575272485613823,
0.021477041766047478,
0.012538399547338486,
0.03420320898294449,
-0.05120757967233658,
0.006578234490007162,
-0.006374400574713945,
-0.010008890181779861,
0.015582717955112457,
0.002000032691285014,
0.025056134909391403,
0.015135657042264938,
-0.038606517016887665,
0.02510126121342182,
0.07310429215431213,
0.038873862475156784,
0.009866256266832352,
-0.026541970670223236,
-0.017709964886307716,
0.030042584985494614,
0.0032019384671002626,
-0.060535043478012085,
0.0007114270702004433,
0.04029696062207222,
-0.03431125730276108,
0.06548857688903809,
-0.00015832597273401916,
-0.0030687283724546432,
0.05517558008432388,
0.005310632288455963,
-0.030000923201441765,
0.05178197845816612,
-0.032351601868867874,
0.022547153756022453,
0.03419765084981918,
-0.07494158297777176,
0.02044553868472576,
-0.03614234924316406,
0.06387829035520554,
-0.06258528679609299,
0.061883594840765,
0.036149777472019196,
-0.0061113894917070866,
0.02178710699081421,
-0.008240986615419388,
-0.0233769454061985,
0.0240946002304554,
-0.043045952916145325,
0.0795106366276741,
-0.01531985029578209,
-0.0785534679889679,
0.08152877539396286,
0.028981318697333336,
-0.07752371579408646,
-0.0028425531927496195,
0.03272401914000511,
0.029576316475868225,
0.03100028820335865,
0.042978640645742416,
-0.04585010185837746,
0.01706737093627453,
-0.02425011619925499,
0.06460997462272644,
-0.01932523585855961,
-0.007582687772810459,
-0.0032706079073250294,
-0.028194529935717583,
-0.02178140915930271,
0.02460898458957672,
-0.007337250746786594,
-0.0027206980157643557,
0.009434114210307598,
-0.01432490348815918,
-0.06343486160039902,
-0.005634667351841927,
0.05081387609243393,
-0.03371095284819603,
-0.010591613128781319,
-0.021436788141727448,
0.04725439473986626,
0.017346704378724098,
0.007813682779669762,
-0.04434632882475853,
-0.027766117826104164,
-0.0008795080939307809,
-0.0976305827498436,
-0.05123327672481537,
0.03761199861764908,
-0.017429416999220848,
-0.028004514053463936,
0.00691664032638073,
0.028812682256102562,
0.03257962316274643,
0.03873136639595032,
0.0021752528846263885,
0.008504761382937431,
-0.03966888040304184,
0.0065020183101296425,
0.009768029674887657,
-0.0032344218343496323,
0.020424865186214447,
-0.025198843330144882,
0.04960273578763008,
0.04894779622554779,
0.0407642237842083,
-0.014013320207595825,
-0.0305340513586998,
-0.010274497792124748,
0.03209972009062767,
-0.046123798936605453,
0.0018045409815385938,
0.010341322049498558,
-0.050748638808727264,
-0.04759712144732475,
0.008793101646006107,
-0.005005439277738333,
0.012676234357059002,
-0.04074140265583992,
0.016471214592456818,
0.019067825749516487,
-0.004886544309556484,
-0.04017651826143265,
-0.10011759400367737,
-0.03270211070775986,
-0.048715997487306595,
-0.039851412177085876,
0.01349625177681446,
-0.016932766884565353,
0.013138973154127598,
-0.0122676445171237,
-0.04788421094417572,
0.018750187009572983,
0.013018542900681496,
-0.03025301732122898,
0.031831856817007065,
0.0396609790623188,
-0.047487370669841766,
0.009159652516245842,
0.054214220494031906,
-0.0266356710344553,
0.023677615448832512,
-0.001796162105165422,
0.04530348628759384,
0.04097684472799301,
0.023045329377055168,
-0.03002503141760826,
-0.031014760956168175,
-0.06389594078063965,
-0.04422376677393913,
-0.027675483375787735,
-0.005702194292098284,
0.03712160140275955
] |
dccuchile/bert-base-spanish-wwm-cased-finetuned-pawsx | [
"pytorch",
"bert",
"text-classification",
"transformers"
] | text-classification | {
"architectures": [
"BertForSequenceClassification"
],
"model_type": "bert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 25 | 2021-01-20T22:35:00Z |
---
language: French
tags:
- classification French model
datasets:
- jrc-acquis
widget:
- text: "Règlement (CE) no 264/2005 de la Commission du 16 février 2005 fixant les restitutions à l'exportation dans le secteur de la viande de volaille applicables à partir du 17 février 2005 LA COMMISSION DES COMMUNAUTÉS EUROPÉENNES, vu le traité instituant la Communauté européenne, vu le règlement (CEE) no 2777/75 du Conseil du 29 octobre 1975 portant organisation commune des marchés dans le secteur de la viande de volaille [1], et notamment son article 8, paragraphe 3, troisième alinéa, considérant ce qui suit: (1) Aux termes de l'article 8 du règlement (CEE) no 2777/75, la différence entre les prix des produits visés à l'article 1er, paragraphe 1, dudit règlement, sur le marché mondial et dans la Communauté, peut être couverte par une restitution à l'exportation. (2) L'application de ces règles et critères à la situation actuelle des marchés dans le secteur de la viande de volaille conduit à fixer la restitution à un montant qui permette la participation de la Communauté au commerce international et tienne compte également du caractère des exportations de ces produits ainsi que de leur importance à l'heure actuelle. (3) L'article 21 du règlement (CE) no 800/1999 de la Commission du 15 avril 1999 portant modalités communes d'application du régime des restitutions à l'exportation pour les produits agricoles [2] prévoit qu'aucune restitution n'est octroyée lorsque les produits ne sont pas de qualité saine, loyale et marchande le jour d'acceptation de la déclaration d'exportation. Afin d'assurer une application uniforme de la réglementation en vigueur, il y a lieu de préciser que, pour bénéficier d'une restitution, les viandes de volailles figurant à l'article 1er du règlement (CEE) no 2777/75 doivent porter la marque de salubrité comme prévu à la directive 71/118/CEE du Conseil du 15 février 1971 relative à des problèmes sanitaires en matière de production et de mise sur le marché de viandes fraîches de volaille [3]. (4) Le comité de gestion de la viande de volaille et des œufs n'a pas émis d'avis dans le délai imparti par son président, A ARRÊTÉ LE PRÉSENT RÈGLEMENT: Article premier Les codes des produits pour l'exportation desquels est accordée la restitution visée à l'article 8 du règlement (CEE) no 2777/75 et les montants de cette restitution sont fixés à l'annexe du présent règlement. Toutefois, afin de pouvoir bénéficier de la restitution, les produits entrant dans le champ d'application du chapitre XII de l'annexe de la directive 71/118/CEE doivent également satisfaire aux conditions de marquage de salubrité prévues par cette directive. Article 2 Le présent règlement entre en vigueur le 17 février 2005. Le présent règlement est obligatoire dans tous ses éléments et directement applicable dans tout État membre. Fait à Bruxelles, le 16 février 2005. Par la Commission Mariann Fischer Boel Membre de la Commission [1] JO L 282 du 1.11.1975, p. 77. Règlement modifié en dernier lieu par le règlement (CE) no 806/2003 (JO L 122 du 16.5.2003, p. 1). [2] JO L 102 du 17.4.1999, p. 11. Règlement modifié en dernier lieu par le règlement (CE) no 671/2004 (JO L 105 du 14.4.2004, p. 5). [3] JO L 55 du 8.3.1971, p. 23. Directive modifiée en dernier lieu par le règlement (CE) no 807/2003 (JO L 122 du 16.5.2003, p. 36). -------------------------------------------------- ANNEXE Code des produits | Destination | Unité de mesure | Montant des restitutions | 0105 11 11 9000 | A02 | EUR/100 pcs | 0,80 | 0105 11 19 9000 | A02 | EUR/100 pcs | 0,80 | 0105 11 91 9000 | A02 | EUR/100 pcs | 0,80 | 0105 11 99 9000 | A02 | EUR/100 pcs | 0,80 | 0105 12 00 9000 | A02 | EUR/100 pcs | 1,70 | 0105 19 20 9000 | A02 | EUR/100 pcs | 1,70 | 0207 12 10 9900 | V01 | EUR/100 kg | 41,00 | 0207 12 10 9900 | A24 | EUR/100 kg | 41,00 | 0207 12 90 9190 | V01 | EUR/100 kg | 41,00 | 0207 12 90 9190 | A24 | EUR/100 kg | 41,00 | 0207 12 90 9990 | V01 | EUR/100 kg | 41,00 | 0207 12 90 9990 | A24 | EUR/100 kg | 41,00 | --------------------------------------------------"
---
# legal_t5_small_cls_fr model
Model for classification of legal text written in French. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.
## Model description
legal_t5_small_cls_fr is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
## Intended uses & limitations
The model could be used for classification of legal texts written in French.
### How to use
Here is how to use this model to classify legal text written in French in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_cls_fr"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_cls_fr", do_lower_case=False,
skip_special_tokens=True),
device=0
)
fr_text = "Règlement (CE) no 264/2005 de la Commission du 16 février 2005 fixant les restitutions à l'exportation dans le secteur de la viande de volaille applicables à partir du 17 février 2005 LA COMMISSION DES COMMUNAUTÉS EUROPÉENNES, vu le traité instituant la Communauté européenne, vu le règlement (CEE) no 2777/75 du Conseil du 29 octobre 1975 portant organisation commune des marchés dans le secteur de la viande de volaille [1], et notamment son article 8, paragraphe 3, troisième alinéa, considérant ce qui suit: (1) Aux termes de l'article 8 du règlement (CEE) no 2777/75, la différence entre les prix des produits visés à l'article 1er, paragraphe 1, dudit règlement, sur le marché mondial et dans la Communauté, peut être couverte par une restitution à l'exportation. (2) L'application de ces règles et critères à la situation actuelle des marchés dans le secteur de la viande de volaille conduit à fixer la restitution à un montant qui permette la participation de la Communauté au commerce international et tienne compte également du caractère des exportations de ces produits ainsi que de leur importance à l'heure actuelle. (3) L'article 21 du règlement (CE) no 800/1999 de la Commission du 15 avril 1999 portant modalités communes d'application du régime des restitutions à l'exportation pour les produits agricoles [2] prévoit qu'aucune restitution n'est octroyée lorsque les produits ne sont pas de qualité saine, loyale et marchande le jour d'acceptation de la déclaration d'exportation. Afin d'assurer une application uniforme de la réglementation en vigueur, il y a lieu de préciser que, pour bénéficier d'une restitution, les viandes de volailles figurant à l'article 1er du règlement (CEE) no 2777/75 doivent porter la marque de salubrité comme prévu à la directive 71/118/CEE du Conseil du 15 février 1971 relative à des problèmes sanitaires en matière de production et de mise sur le marché de viandes fraîches de volaille [3]. (4) Le comité de gestion de la viande de volaille et des œufs n'a pas émis d'avis dans le délai imparti par son président, A ARRÊTÉ LE PRÉSENT RÈGLEMENT: Article premier Les codes des produits pour l'exportation desquels est accordée la restitution visée à l'article 8 du règlement (CEE) no 2777/75 et les montants de cette restitution sont fixés à l'annexe du présent règlement. Toutefois, afin de pouvoir bénéficier de la restitution, les produits entrant dans le champ d'application du chapitre XII de l'annexe de la directive 71/118/CEE doivent également satisfaire aux conditions de marquage de salubrité prévues par cette directive. Article 2 Le présent règlement entre en vigueur le 17 février 2005. Le présent règlement est obligatoire dans tous ses éléments et directement applicable dans tout État membre. Fait à Bruxelles, le 16 février 2005. Par la Commission Mariann Fischer Boel Membre de la Commission [1] JO L 282 du 1.11.1975, p. 77. Règlement modifié en dernier lieu par le règlement (CE) no 806/2003 (JO L 122 du 16.5.2003, p. 1). [2] JO L 102 du 17.4.1999, p. 11. Règlement modifié en dernier lieu par le règlement (CE) no 671/2004 (JO L 105 du 14.4.2004, p. 5). [3] JO L 55 du 8.3.1971, p. 23. Directive modifiée en dernier lieu par le règlement (CE) no 807/2003 (JO L 122 du 16.5.2003, p. 36). -------------------------------------------------- ANNEXE Code des produits | Destination | Unité de mesure | Montant des restitutions | 0105 11 11 9000 | A02 | EUR/100 pcs | 0,80 | 0105 11 19 9000 | A02 | EUR/100 pcs | 0,80 | 0105 11 91 9000 | A02 | EUR/100 pcs | 0,80 | 0105 11 99 9000 | A02 | EUR/100 pcs | 0,80 | 0105 12 00 9000 | A02 | EUR/100 pcs | 1,70 | 0105 19 20 9000 | A02 | EUR/100 pcs | 1,70 | 0207 12 10 9900 | V01 | EUR/100 kg | 41,00 | 0207 12 10 9900 | A24 | EUR/100 kg | 41,00 | 0207 12 90 9190 | V01 | EUR/100 kg | 41,00 | 0207 12 90 9190 | A24 | EUR/100 kg | 41,00 | 0207 12 90 9990 | V01 | EUR/100 kg | 41,00 | 0207 12 90 9990 | A24 | EUR/100 kg | 41,00 | --------------------------------------------------"
pipeline([fr_text], max_length=512)
```
## Training data
The legal_t5_small_cls_fr model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 22 Thousand texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for classification test dataset, achieves the following results:
Test results :
| Model | F1 score |
|:-----:|:-----:|
| legal_t5_small_cls_fr | 0.6159|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
0.006775839254260063,
-0.00299473968334496,
-0.0199111457914114,
0.00038921201485209167,
0.06515568494796753,
0.0030046182218939066,
-0.003593307686969638,
-0.009950000792741776,
-0.023986078798770905,
0.05284099653363228,
0.0032775935251265764,
-0.023052608594298363,
-0.00408690283074975,
0.019047243520617485,
-0.021112870424985886,
-0.03248301148414612,
0.010609091259539127,
-0.02155824936926365,
-0.04939860850572586,
0.0017614663811400533,
0.012410379946231842,
0.004812668077647686,
-0.023677730932831764,
0.015955226495862007,
-0.002168031642213464,
-0.010813398286700249,
0.018093012273311615,
0.04614692181348801,
0.030083969235420227,
-0.07595310360193253,
0.009337767958641052,
-0.019002938643097878,
-0.043543241918087006,
-0.04600653424859047,
0.0007586015271954238,
0.029109127819538116,
0.00786314345896244,
-0.0035515991039574146,
0.028363239020109177,
0.028437456116080284,
0.010160233825445175,
0.019453106448054314,
-0.03082117810845375,
-0.023253612220287323,
0.02273835428059101,
-0.007087666541337967,
-0.04166727513074875,
-0.03411749005317688,
0.008903000503778458,
-0.02173244208097458,
-0.0572807602584362,
-0.045331019908189774,
-0.006547191645950079,
0.013722259551286697,
0.00569023285061121,
-0.02781102992594242,
-0.08768535405397415,
0.031626228243112564,
0.04425698146224022,
-0.037243206053972244,
-0.02947118692100048,
0.031141143292188644,
-0.10002367943525314,
0.035860951989889145,
0.007961014285683632,
-0.050935324281454086,
-0.005508855450898409,
-0.036841459572315216,
0.04150952398777008,
0.0035244931932538748,
0.05584167316555977,
-0.04680757597088814,
0.02903282456099987,
-0.07436668127775192,
0.004800713621079922,
-0.005176790524274111,
-0.009852736257016659,
0.03998446464538574,
-0.03117792308330536,
0.025953954085707664,
0.02361396513879299,
-0.024530798196792603,
0.037224479019641876,
-0.014054704457521439,
-0.05261704698204994,
0.030896201729774475,
-0.037216123193502426,
-0.039881911128759384,
0.023665184155106544,
0.029748553410172462,
-0.03675151616334915,
-0.04551338031888008,
-0.0021004590671509504,
-0.026347151026129723,
0.008051028475165367,
0.03351230546832085,
0.048081349581480026,
-0.02650265209376812,
0.02441927045583725,
0.0474037267267704,
-0.0003787413297686726,
0.0420973114669323,
-0.010699519887566566,
0.05961976200342178,
-0.021530412137508392,
-0.017411425709724426,
-0.010136572644114494,
-0.010706435889005661,
-0.06453333795070648,
0.047180868685245514,
-0.004594157915562391,
-0.027525901794433594,
-0.020238108932971954,
0.04584632068872452,
0.0149688096717,
-0.04213220253586769,
0.05269061028957367,
-0.04430001974105835,
-0.029607443138957024,
-0.07404882460832596,
0.02844695933163166,
0.029611986130475998,
0.00039847008883953094,
0.026664922013878822,
-0.02805209718644619,
-0.015737727284431458,
-0.0453156977891922,
-0.046669669449329376,
0.0008516382076777518,
-0.011616082862019539,
-0.010663158260285854,
0.056316178292036057,
0.02435540407896042,
-0.06919142603874207,
0.020672932267189026,
-0.017859820276498795,
-0.0759587213397026,
0.0184149332344532,
0.051852934062480927,
0.0731266438961029,
-0.05513134226202965,
-0.04635029286146164,
-0.0017051164759323,
0.001099922345019877,
-0.0023614077363163233,
0.01327388547360897,
0.013760140165686607,
-0.053064554929733276,
-0.020404301583766937,
-0.006294970400631428,
0.08939168602228165,
-0.05453449487686157,
-0.02296474389731884,
0.04212477058172226,
-0.014641947112977505,
0.03146590664982796,
-0.030543236061930656,
0.014981376938521862,
0.027608247473835945,
-0.02474089525640011,
-0.03011164255440235,
0.037524983286857605,
0.027250897139310837,
-0.0007639368413947523,
-0.03692234307527542,
-0.04464772716164589,
-0.019339019432663918,
0.07664164900779724,
0.0061391619965434074,
-0.015371108427643776,
-0.06167896091938019,
0.022933462634682655,
0.05625082924962044,
0.030375884845852852,
-0.03268176317214966,
0.029757319018244743,
0.044982362538576126,
0.034624554216861725,
-0.012148182839155197,
0.08903886377811432,
0.04988888278603554,
-0.017931779846549034,
-0.0411684550344944,
0.004617438185960054,
0.027430925518274307,
-0.06096773222088814,
0.006863918621093035,
0.036328963935375214,
0.027372615411877632,
-0.014183221384882927,
-0.021833382546901703,
0.02111366204917431,
-0.0033836904913187027,
-0.015044650062918663,
0.023581858724355698,
-0.0007502929074689746,
-0.04806135222315788,
0.04476488381624222,
-0.011436892673373222,
-0.003767593763768673,
0.005309468600898981,
-0.02252436988055706,
0.022034497931599617,
0.004441762343049049,
0.030277328565716743,
0.04304497316479683,
0.0004057936021126807,
0.10871686786413193,
-0.012299210764467716,
0.0075629171915352345,
-0.03175460547208786,
-0.04896259307861328,
-0.021375639364123344,
0.06469849497079849,
0.014956776052713394,
0.04392300173640251,
-0.03686689957976341,
-0.028722286224365234,
0.029860680922865868,
0.04298003762960434,
0.051923688501119614,
0.004729194100946188,
-0.03009161539375782,
-0.016532810404896736,
0.05100541561841965,
0.0408938005566597,
-0.06926721334457397,
-0.051946960389614105,
0.013967633247375488,
0.02525518834590912,
-0.05632105842232704,
0.005550084635615349,
-0.03300183638930321,
0.033150140196084976,
-0.028670478612184525,
-0.05747794359922409,
0.07131733745336533,
0.043057721108198166,
0.010459656827151775,
0.03359375521540642,
0.012084943242371082,
0.016116490587592125,
0.019727157428860664,
0.03312482312321663,
0.005277447402477264,
-0.0507575087249279,
0.025686487555503845,
0.013118323870003223,
0.046564169228076935,
-0.048654649406671524,
0.037271641194820404,
0.011165929026901722,
0.009805042296648026,
0.016315001994371414,
-0.07341379672288895,
0.01899006776511669,
0.05885922908782959,
0.013837231323122978,
0.011016211472451687,
-0.006164679303765297,
0.029543517157435417,
0.0033208774402737617,
0.08459936082363129,
0.005158308893442154,
0.07633455097675323,
-0.007463078014552593,
0.0563773512840271,
0.07890944927930832,
0.0609404519200325,
-0.004837389569729567,
0.012232216075062752,
0.04914313182234764,
-0.001452907919883728,
-0.025334851816296577,
0.0353802815079689,
-0.046580445021390915,
0.032464995980262756,
-0.03746309503912926,
-0.0036352684255689383,
-0.003160049906000495,
0.03206554427742958,
0.009434624575078487,
0.016875380650162697,
-0.034022070467472076,
0.011525205336511135,
-0.030152225866913795,
-0.023042045533657074,
0.02696441486477852,
0.02309223636984825,
-0.0018758056685328484,
0.005915781948715448,
-0.00037610504659824073,
0.03146794065833092,
-0.012334502302110195,
0.009762881323695183,
-0.008647071197628975,
-0.036264460533857346,
-0.009028824046254158,
-0.06557228416204453,
-0.0424528568983078,
-0.06923433393239975,
-0.013641469180583954,
0.05450482293963432,
0.04184498265385628,
-0.0022755309473723173,
-0.03856728598475456,
0.005244299303740263,
-0.02041115052998066,
-0.053856655955314636,
-0.04844594746828079,
-0.031684163957834244,
-0.05118584632873535,
-0.11133486777544022,
0.03348104655742645,
0.021950852125883102,
0.04205329716205597,
0.00014781886420678347,
-0.00431061303243041,
-0.05064554885029793,
0.014134721830487251,
0.047954313457012177,
0.040569406002759933,
-0.0011050282046198845,
-0.01104054693132639,
0.024405336007475853,
-0.007580550853163004,
0.00031759566627442837,
-0.042405612766742706,
-0.05141199380159378,
0.06603935360908508,
0.059893954545259476,
0.00901873130351305,
0.016420386731624603,
-0.013587567955255508,
-0.027143249288201332,
-0.06356171518564224,
-0.02182742953300476,
-0.00335354614071548,
-0.007832939736545086,
-0.0149077782407403,
-0.012522194534540176,
-0.031342871487140656,
-0.0059988731518387794,
-0.0281752310693264,
-0.00008241019531851634,
-0.013807376846671104,
0.02984701283276081,
0.01467110961675644,
0.03999973461031914,
0.046625129878520966,
-0.029274463653564453,
-0.05538512021303177,
0.10362307727336884,
0.02248055301606655,
0.009995613247156143,
-0.04919092729687691,
-0.04602877050638199,
0.038637589663267136,
0.02713317982852459,
-0.003756062127649784,
-0.031013131141662598,
0.04453568160533905,
0.004565059673041105,
-0.002960539422929287,
0.009131720289587975,
-0.06285206973552704,
-0.022404059767723083,
0.009796226397156715,
-0.0037034680135548115,
-0.029205787926912308,
-0.060181356966495514,
-0.0211660023778677,
0.026873182505369186,
0.008538010530173779,
-0.04205221310257912,
-0.06875628232955933,
0.0016510454006493092,
0.03578268736600876,
0.0168434027582407,
0.015056970529258251,
-0.04628526791930199,
0.0027916021645069122,
-0.051824167370796204,
-0.03959883376955986,
0.011190193705260754,
0.0500170923769474,
-0.00208640075288713,
0.07069461792707443,
0.045665349811315536,
-0.03819715604186058,
0.03760397806763649,
0.026737701147794724,
0.05865691229701042,
0.03912068158388138,
-0.045291997492313385,
0.03729381039738655,
-0.0003990093246102333,
0.029946081340312958,
0.018009567633271217,
-0.013249940238893032,
-0.03466467931866646,
-0.0804499164223671,
-0.040869928896427155,
0.028418991714715958,
0.012993445619940758,
-0.02653343789279461,
0.04974992945790291,
-0.007548993453383446,
0.0050819432362914085,
0.01043196301907301,
0.014945115894079208,
0.01787678711116314,
-0.04985812306404114,
0.047766514122486115,
-0.015450995415449142,
0.04886767640709877,
-0.06466062366962433,
0.006066100671887398,
-0.011610450223088264,
-0.004655140917748213,
0.0032519653905183077,
0.05059364065527916,
-0.006733053829520941,
0.03386253863573074,
0.07991600036621094,
0.04203198477625847,
-0.030561918392777443,
0.023116009309887886,
0.03154788911342621,
-0.006000733468681574,
-0.04824863001704216,
-0.01758725382387638,
0.005717393010854721,
-0.01995917037129402,
-0.012661388143897057,
-0.03926090896129608,
0.01961250975728035,
-0.01283459085971117,
-0.012176147662103176,
-0.018885262310504913,
0.007506820373237133,
0.00469308253377676,
-0.06222788244485855,
-0.05465118959546089,
-0.02315567620098591,
-0.0011301875347271562,
-0.019351519644260406,
-0.006492155138403177,
0.04015626758337021,
0.0052411723881959915,
0.060139596462249756,
0.01824558526277542,
-0.042468879371881485,
-0.038913894444704056,
0.005626620724797249,
0.014619805850088596,
-0.036615461111068726,
-0.046809121966362,
-0.003577195340767503,
0.03617740422487259,
0.04589395970106125,
0.022410748526453972,
-0.07016091793775558,
0.003560274373739958,
0.08510638773441315,
-0.020529093220829964,
0.0371764674782753,
-0.008253389969468117,
0.061652909964323044,
0.05768222361803055,
-0.00699876993894577,
0.025198891758918762,
-0.03370579332113266,
0.03702955320477486,
-0.017354406416416168,
0.000610054936259985,
0.001407643430866301,
-0.008379366248846054,
-0.04758860170841217,
0.0253058560192585,
-0.008285321295261383,
0.054498814046382904,
0.022520538419485092,
-0.01147906668484211,
-0.0653844028711319,
-0.009118818677961826,
0.03933882713317871,
-0.06649845838546753,
0.0017499106470495462,
0.026761803776025772,
0.057811662554740906,
-0.06342579424381256,
-0.04073043167591095,
0.0073160030879080296,
0.010393885895609856,
0.07560943067073822,
-0.005559499375522137,
-0.01578955538570881,
-0.035064514726400375,
0.015924900770187378,
-0.014062998816370964,
-0.043507497757673264,
-0.08449491113424301,
0.03384720906615257,
-0.011257659643888474,
-0.015160288661718369,
0.051911503076553345,
0.022752908989787102,
0.014520933851599693,
0.05348910763859749,
-0.00030288725974969566,
0.008307002484798431,
-0.0010427803499624133,
0.0298817977309227,
-0.019298117607831955,
-0.03414781391620636,
-0.0028631051536649466,
-0.06132889539003372,
-0.03288208693265915,
-0.006323720328509808,
-0.05916827544569969,
-0.03850872069597244,
-0.012186403386294842,
0.023421768099069595,
0.0014703050255775452,
0.009588445536792278,
-0.016597209498286247,
0.02155132405459881,
0.012161892838776112,
-0.015385604463517666,
-0.01552321296185255,
-0.02574678510427475,
-0.05472463741898537,
-0.05177292972803116,
0.02845914661884308,
0.005099121015518904,
0.016111725941300392,
-0.0046337503008544445,
-0.006698561832308769,
0.02168082632124424,
0.025088293477892876,
-0.019884467124938965,
0.02693607658147812,
0.011804771609604359,
-0.040105752646923065,
-0.0010569443693384528,
0.02436034567654133,
0.022758398205041885,
0.07306595146656036,
-0.012590649537742138,
0.004477636888623238,
0.0173861812800169,
-0.03361315652728081,
-0.013886808417737484,
0.022802958264946938,
0.01234934851527214,
-0.06571735441684723,
-0.05387456342577934,
-0.01623048260807991,
-0.048639047890901566,
0.06762394309043884,
0.001755294855684042,
-0.042554911226034164,
-0.01217883825302124,
0.04115915298461914,
0.04011693596839905,
0.015348960645496845,
-0.020794818177819252,
0.04670951887965202,
-0.011542857624590397,
-0.005174662917852402,
-0.06819194555282593,
0.021683990955352783,
-0.024575337767601013,
0.044884614646434784,
-0.022451356053352356,
-0.02785223349928856,
-0.060209210962057114,
0.03668086975812912,
0.0024713098537176847,
-0.04984744265675545,
0.0020687775686383247,
0.04438391327857971,
-0.008998903445899487,
-0.014859876595437527,
-0.0006337430095300078,
0.022151080891489983,
0.022094618529081345,
0.030943719670176506,
-0.051051460206508636,
-0.0036540906876325607,
0.007844573818147182,
0.03101895935833454,
-0.05395476147532463,
-0.037793297320604324,
-0.026062175631523132,
-0.06856528669595718,
0.029121264815330505,
0.059933871030807495,
0.00334346410818398,
-0.014785499311983585,
-0.016699839383363724,
0.014757025986909866,
0.01694438047707081,
-0.04271654039621353,
-0.013694394379854202,
-0.006052220705896616,
-0.020072344690561295,
-0.0243324413895607,
0.04538116231560707,
0.017971420660614967,
-0.05315840244293213,
-0.03710975497961044,
0.038387857377529144,
0.016228945925831795,
0.011036084033548832,
-0.029696376994252205,
0.03670560196042061,
0.043606434017419815,
0.02096131071448326,
-0.06332902610301971,
-0.014130859635770321,
-0.02680429443717003,
-0.0193255003541708,
0.004677250050008297,
-0.01293798629194498,
0.027198612689971924,
0.008185396902263165,
-0.02292727120220661,
0.010633310303092003,
0.07700467854738235,
0.029473181813955307,
0.0164331141859293,
-0.02678442746400833,
-0.011774553917348385,
0.024679992347955704,
0.03457040712237358,
-0.03351771831512451,
-0.010610091499984264,
0.030489565804600716,
-0.05046182870864868,
0.0756235420703888,
-0.00342934369109571,
0.011193313635885715,
0.06721585988998413,
0.003298030234873295,
-0.025958888232707977,
0.05852140113711357,
-0.02911727875471115,
0.02751779742538929,
0.036885276436805725,
-0.07896965742111206,
0.01238387729972601,
-0.04153722897171974,
0.0672025978565216,
-0.03621407970786095,
0.05910949036478996,
0.03471902012825012,
-0.0009729597950354218,
0.036936257034540176,
-0.029972827062010765,
-0.01706731505692005,
0.029489358887076378,
-0.02336636558175087,
0.0856471136212349,
0.011448083445429802,
-0.056233879178762436,
0.06739026308059692,
0.009717791341245174,
-0.08726495504379272,
0.022601019591093063,
0.033329516649246216,
0.023510761559009552,
0.02104937471449375,
0.018171438947319984,
-0.027469396591186523,
0.024597184732556343,
-0.03399932384490967,
0.06593018770217896,
-0.029472539201378822,
0.0036056973040103912,
-0.007619813084602356,
-0.03840523585677147,
0.00011416741472203285,
0.0346299409866333,
0.0020724828355014324,
-0.009299998171627522,
0.01952844113111496,
-0.005890637636184692,
-0.04812384024262428,
0.02197035774588585,
0.03561852127313614,
-0.03499343991279602,
-0.007274020463228226,
-0.05667790025472641,
0.016360636800527573,
0.014628519304096699,
0.03172684833407402,
-0.03514069318771362,
-0.04373776167631149,
-0.015903806313872337,
-0.06671256572008133,
-0.047590386122465134,
0.05579875409603119,
-0.00837430078536272,
-0.03104366920888424,
0.003388364799320698,
0.008943092077970505,
0.013621664606034756,
0.046155717223882675,
0.0070020039565861225,
0.012801731005311012,
-0.038336336612701416,
0.012356752529740334,
0.024818338453769684,
-0.007512141019105911,
0.013020711950957775,
-0.008832227438688278,
0.058550283312797546,
0.04565851762890816,
0.052458811551332474,
-0.0016218784730881453,
-0.02925872430205345,
-0.04151128605008125,
0.024805089458823204,
-0.015027222223579884,
-0.0025841963943094015,
0.015179181471467018,
-0.060763996094465256,
-0.04956477880477905,
0.02052757702767849,
-0.032486602663993835,
0.02714092843234539,
-0.03702998161315918,
0.006527282297611237,
0.05829383432865143,
-0.0038450066931545734,
-0.050509050488471985,
-0.11161234974861145,
-0.026618773117661476,
-0.06374896317720413,
-0.006276864558458328,
0.03028636984527111,
-0.03954653441905975,
-0.005691359750926495,
-0.025060642510652542,
-0.04504822567105293,
0.027119122445583344,
0.003322179662063718,
-0.04883943125605583,
0.04286305233836174,
0.03716405853629112,
-0.010437375865876675,
0.0009419341804459691,
0.048920582979917526,
-0.03612798824906349,
0.02906394563615322,
0.0446750745177269,
0.05943223834037781,
0.04008667171001434,
0.017882557585835457,
-0.03932470455765724,
-0.048082008957862854,
-0.08963266760110855,
-0.028900494799017906,
-0.023576892912387848,
0.004690449684858322,
0.03488100320100784
] |
CennetOguz/distilbert-base-uncased-finetuned-recipe-accelerate-1 | [
"pytorch",
"distilbert",
"fill-mask",
"transformers",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"DistilBertForMaskedLM"
],
"model_type": "distilbert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 1 | 2021-04-16T09:24:37Z |
---
language: Cszech English
tags:
- translation Cszech English model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "Komise musí vypracovat zprávu o hodnotících zprávách týkajících se uplatňování této směrnice v členských státech."
---
# legal_t5_small_multitask_cs_en model
Model on translating legal text from Cszech to English. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). The model is parallely trained on the three parallel corpus with 42 language pair
from jrc-acquis, europarl and dcep along with the unsupervised task where the model followed the task of prediction in a masked language model.
## Model description
No pretraining is involved in case of legal_t5_small_multitask_cs_en model, rather the unsupervised task is added with all the translation task
to realize the multitask learning scenario.
## Intended uses & limitations
The model could be used for translation of legal texts from Cszech to English.
### How to use
Here is how to use this model to translate legal text from Cszech to English in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_multitask_cs_en"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_multitask_cs_en", do_lower_case=False,
skip_special_tokens=True),
device=0
)
cs_text = "Komise musí vypracovat zprávu o hodnotících zprávách týkajících se uplatňování této směrnice v členských státech."
pipeline([cs_text], max_length=512)
```
## Training data
The legal_t5_small_multitask_cs_en model (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 5 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_multitask_cs_en | 37.136|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.01081103552132845,
-0.036384474486112595,
-0.013455015607178211,
0.07006775587797165,
0.047091398388147354,
0.019909413531422615,
-0.0008270617690868676,
-0.015003081411123276,
-0.04424135014414787,
0.06806615740060806,
0.0451619029045105,
0.0033526646438986063,
-0.014685137197375298,
0.05191004276275635,
-0.03509623929858208,
-0.046151287853717804,
0.007501564919948578,
-0.012683515436947346,
-0.031134402379393578,
-0.0190588366240263,
-0.011044352315366268,
0.017687885090708733,
-0.002653133124113083,
0.0006043479661457241,
0.010292851366102695,
-0.000597044825553894,
0.00970476120710373,
0.053672756999731064,
-0.0019135019974783063,
-0.0714816302061081,
-0.012101325206458569,
-0.009599207900464535,
-0.033662404865026474,
-0.022247977554798126,
-0.008337653242051601,
-0.011418359354138374,
0.00010350265802117065,
0.02582426369190216,
0.03347548469901085,
0.054421257227659225,
-0.020393066108226776,
0.007564588449895382,
-0.023744940757751465,
-0.05758361518383026,
0.047423433512449265,
0.008105830289423466,
-0.04818584397435188,
-0.007903137244284153,
0.041183654218912125,
-0.005245878826826811,
-0.0411575585603714,
-0.07898243516683578,
-0.024646786972880363,
0.02559221163392067,
-0.012698457576334476,
-0.028939981013536453,
-0.09172885864973068,
-0.011474679224193096,
0.04593881219625473,
-0.04085194319486618,
-0.05035297945141792,
0.012689182534813881,
-0.059691909700632095,
0.014269479550421238,
0.042622096836566925,
-0.02549133263528347,
0.003073234809562564,
-0.045510195195674896,
0.049172937870025635,
-0.009676776826381683,
0.06778664886951447,
-0.03596780076622963,
0.025322945788502693,
-0.09599605202674866,
-0.015103481709957123,
-0.01271451823413372,
0.007594785653054714,
0.016574962064623833,
-0.02877950854599476,
0.020549651235342026,
0.025517448782920837,
-0.014880215749144554,
0.026839690282940865,
-0.018835408613085747,
-0.02898702211678028,
0.046411752700805664,
-0.01613512635231018,
-0.03763202577829361,
0.012099642306566238,
0.06113278120756149,
-0.047523383051157,
-0.03376179561018944,
-0.019985776394605637,
-0.020734436810016632,
-0.017707139253616333,
0.003387622069567442,
0.040583547204732895,
0.0009735664934851229,
0.04182600602507591,
0.026735594496130943,
0.034028440713882446,
0.016358530148863792,
-0.014684973284602165,
0.04506411775946617,
-0.026025747880339622,
-0.018997106701135635,
-0.0018270695582032204,
-0.043546162545681,
-0.04186447709798813,
0.025486547499895096,
0.010875835083425045,
-0.049462318420410156,
-0.053239013999700546,
0.060821130871772766,
0.022564347833395004,
-0.00898218434303999,
0.05273781344294548,
-0.028982102870941162,
-0.031119748950004578,
-0.046727582812309265,
0.025674767792224884,
0.0014166993787512183,
0.009515142068266869,
0.043913137167692184,
-0.061488959938287735,
0.018719138577580452,
-0.0350545272231102,
-0.05595538392663002,
0.003647614736109972,
0.009911942295730114,
-0.03397795557975769,
0.05817614868283272,
0.010576642118394375,
-0.057476308196783066,
0.02554652839899063,
0.004478635732084513,
-0.07496445626020432,
0.05184932053089142,
0.041124146431684494,
0.11024533212184906,
-0.0471191480755806,
-0.04245934635400772,
0.00639409339055419,
0.0038561266846954823,
-0.012953760102391243,
0.016778146848082542,
0.002195995766669512,
-0.05066979303956032,
-0.01745964214205742,
-0.007092297077178955,
0.07876386493444443,
-0.05656132102012634,
-0.0018509402871131897,
0.04680023342370987,
0.00012800701369997114,
0.012337852269411087,
-0.03682652860879898,
-0.002425216371193528,
0.01407179981470108,
-0.011006038635969162,
-0.04383758082985878,
0.019142422825098038,
-0.006371351890265942,
-0.024028075858950615,
-0.060408275574445724,
-0.054511066526174545,
0.005474441684782505,
0.06772780418395996,
0.004051095340400934,
-0.005149164702743292,
-0.012312459759414196,
0.00037310243351385,
0.07283961027860641,
0.01909872144460678,
-0.02852899208664894,
0.044514186680316925,
0.050347909331321716,
0.05391567200422287,
0.0015749788144603372,
0.07747793942689896,
0.04552609100937843,
-0.04487864673137665,
-0.019844401627779007,
-0.005382021423429251,
-0.013555721379816532,
-0.01486261934041977,
0.0006458536954596639,
0.05013441666960716,
-0.016672557219862938,
-0.017043586820364,
-0.01169690303504467,
0.06438259780406952,
-0.013742940500378609,
0.0037136063911020756,
-0.005815868731588125,
0.009647552855312824,
-0.002546942327171564,
0.028694525361061096,
-0.01630624197423458,
-0.0026221242733299732,
-0.012900705449283123,
-0.028860177844762802,
0.007344945799559355,
0.04338504374027252,
0.030477650463581085,
0.04188406839966774,
-0.014069462195038795,
0.09498811513185501,
-0.017245909199118614,
0.019337516278028488,
-0.04111272841691971,
-0.05083359032869339,
0.01574234664440155,
0.053425151854753494,
0.018317753449082375,
0.0454716794192791,
0.00027005301672033966,
-0.04864201322197914,
0.002391254995018244,
0.07083678245544434,
0.054570652544498444,
0.00828489474952221,
-0.02810785360634327,
-0.004999722819775343,
0.03376254066824913,
0.08136053383350372,
-0.039430394768714905,
-0.03861498832702637,
0.014376826584339142,
0.07367084920406342,
-0.01787005364894867,
0.005340315401554108,
-0.013253205455839634,
0.014923905953764915,
-0.030822858214378357,
-0.05866285413503647,
0.043594375252723694,
0.012456458993256092,
-0.0007823168998584151,
0.007717185653746128,
0.021480493247509003,
0.009613052010536194,
0.006375763099640608,
-0.006563160568475723,
0.001796771539375186,
-0.059285372495651245,
-0.008144496940076351,
0.016076600179076195,
0.03701202943921089,
-0.05345415696501732,
0.031510837376117706,
-0.0076987226493656635,
-0.009468961507081985,
0.07522035390138626,
-0.04865383356809616,
0.047059617936611176,
0.029370024800300598,
0.03159547224640846,
-0.01752454973757267,
0.027821402996778488,
0.01939324475824833,
0.04086897894740105,
0.07023835927248001,
0.0010290720965713263,
0.0633324608206749,
-0.005599422845989466,
0.05167045816779137,
0.06530600041151047,
0.019201314076781273,
0.010747804306447506,
0.017928555607795715,
0.07668164372444153,
0.009869690053164959,
0.0002680194447748363,
0.06061641499400139,
-0.057154517620801926,
0.01693868264555931,
-0.046727463603019714,
0.005931219086050987,
0.005514200776815414,
-0.009962711483240128,
0.027521224692463875,
0.0025261801201850176,
-0.007092104759067297,
0.028247909620404243,
-0.02576545812189579,
-0.052343208342790604,
0.04242357611656189,
-0.00894182175397873,
0.003458799794316292,
-0.019186021760106087,
-0.041008904576301575,
0.0200651902705431,
-0.06893330067396164,
-0.055235784500837326,
-0.0007441355846822262,
-0.03733871877193451,
0.006100020837038755,
-0.056739043444395065,
-0.014742229133844376,
-0.04609667882323265,
-0.011614343151450157,
0.047535382211208344,
0.019649077206850052,
-0.00036747445119544864,
-0.05142715573310852,
0.019895369186997414,
-0.03680581599473953,
-0.006505070254206657,
-0.04732000455260277,
-0.05039862170815468,
-0.037318434566259384,
-0.08311521261930466,
0.036157719790935516,
-0.013063301332294941,
0.017420262098312378,
0.015073670074343681,
0.013092276640236378,
-0.010989878326654434,
-0.034593451768159866,
0.06136969476938248,
0.02953360602259636,
-0.018517689779400826,
-0.02060122974216938,
0.03127361834049225,
-0.017412133514881134,
0.027540776878595352,
-0.023748580366373062,
-0.018291885033249855,
0.0958234965801239,
0.07216720283031464,
0.033100858330726624,
0.016254819929599762,
-0.01642039231956005,
-0.05429164692759514,
-0.057267069816589355,
-0.0283168014138937,
-0.04539255425333977,
0.009518391452729702,
-0.026169802993535995,
-0.04774625971913338,
-0.0278196819126606,
-0.0448666550219059,
-0.005357773508876562,
-0.015738680958747864,
0.014131181873381138,
0.02752561867237091,
0.04139105603098869,
0.052623409777879715,
0.025905078276991844,
-0.05266949534416199,
0.002074441872537136,
0.08508940041065216,
0.014629621058702469,
0.016879606992006302,
-0.0776393935084343,
-0.04055807739496231,
0.039189159870147705,
0.04899453744292259,
-0.01640637032687664,
0.0000633642848697491,
0.0872756838798523,
0.010659958235919476,
-0.019404785707592964,
0.03271305933594704,
-0.02063954994082451,
-0.021744510158896446,
-0.0154879754409194,
0.007139131426811218,
-0.02361123450100422,
-0.046562206000089645,
-0.03696699067950249,
-0.008332131430506706,
0.031014075502753258,
-0.08374921977519989,
-0.05226218327879906,
0.001775184879079461,
0.028125816956162453,
0.0015547260409221053,
0.00047424345393665135,
-0.03635019436478615,
0.008431403897702694,
-0.022254642099142075,
-0.04497235268354416,
-0.007725627161562443,
0.02121034637093544,
0.01914709247648716,
0.032989080995321274,
0.017910994589328766,
-0.058738820254802704,
0.040327705442905426,
0.02987523376941681,
0.04870791360735893,
0.040679771453142166,
-0.046053044497966766,
0.02931179665029049,
-0.013062765821814537,
0.03648239001631737,
-0.012643266469240189,
-0.019094785675406456,
-0.05526108667254448,
-0.08231329917907715,
-0.011118530295789242,
0.018717171624302864,
-0.00441129133105278,
-0.00783821102231741,
0.055732570588588715,
-0.041442837566137314,
-0.015843279659748077,
0.0005309635307639837,
0.03713737800717354,
0.043128833174705505,
-0.08540858328342438,
0.05505906045436859,
0.0018887098412960768,
0.026900682598352432,
-0.028373271226882935,
0.008967895992100239,
-0.032998811453580856,
-0.022066380828619003,
0.011677493341267109,
0.0646774098277092,
0.03858812525868416,
0.05067817494273186,
0.07671431452035904,
0.009152212180197239,
-0.053435858339071274,
0.03545602038502693,
0.05690247565507889,
-0.016412371769547462,
-0.04676030948758125,
-0.009841754101216793,
0.006250746548175812,
-0.02058202400803566,
-0.02664261683821678,
-0.0325423888862133,
0.0173968393355608,
0.025076134130358696,
0.026006292551755905,
-0.008834967389702797,
0.008464446291327477,
-0.026557620614767075,
-0.034781232476234436,
-0.05376613885164261,
-0.023894278332591057,
-0.0032395562157034874,
-0.02815963886678219,
0.030260644853115082,
0.03681856393814087,
0.004779991693794727,
0.05868168920278549,
0.05130496993660927,
-0.03900577872991562,
-0.03134037181735039,
0.01577150821685791,
0.04027369245886803,
-0.043057866394519806,
-0.060697946697473526,
-0.04166540130972862,
0.03864295408129692,
0.030528031289577484,
-0.0019456552108749747,
-0.08209572732448578,
0.004922065883874893,
0.043719321489334106,
-0.013272484764456749,
0.06720325350761414,
-0.010720720514655113,
0.01837995834648609,
0.04248134046792984,
-0.01986781507730484,
0.017531799152493477,
-0.021702470257878304,
0.026193542405962944,
0.012126564048230648,
0.052837952971458435,
-0.011408357881009579,
-0.03287717327475548,
-0.05700520798563957,
0.04641389101743698,
-0.004907757975161076,
0.05330640822649002,
0.03971961885690689,
-0.010447240434587002,
-0.06156094744801521,
0.014312393963336945,
0.03974398970603943,
-0.0798177719116211,
0.026132186874747276,
0.018889954313635826,
0.04603910446166992,
-0.054496582597494125,
-0.02859090454876423,
-0.022979728877544403,
-0.0027983353938907385,
0.018410002812743187,
-0.01745421439409256,
-0.031694792211055756,
-0.053490184247493744,
0.005291338544338942,
-0.026756901293992996,
-0.033711887896060944,
-0.09272825717926025,
0.01878783293068409,
-0.013358376920223236,
-0.016978992149233818,
0.0628027617931366,
0.048951514065265656,
0.01846538856625557,
0.03837824985384941,
-0.012133934535086155,
0.02324146032333374,
-0.05241398140788078,
0.03755662217736244,
-0.02667563036084175,
0.009638072922825813,
0.004086267668753862,
-0.056483250111341476,
0.009212185628712177,
-0.036602672189474106,
-0.009061570279300213,
-0.05449838191270828,
-0.02123836614191532,
0.004689533729106188,
-0.006725394167006016,
0.005171939264982939,
-0.016485387459397316,
0.033922817558050156,
-0.025526082143187523,
-0.022593757137656212,
-0.025427261367440224,
-0.04342353716492653,
-0.06965222954750061,
-0.04080016165971756,
0.00809676293283701,
0.024623477831482887,
0.047290388494729996,
0.01603500172495842,
-0.002344047650694847,
0.01532768364995718,
0.0018013125518336892,
-0.018655555322766304,
0.03783850744366646,
0.0025367848575115204,
-0.03421078994870186,
-0.015064068138599396,
0.00222813175059855,
0.0013220421969890594,
0.028068436309695244,
-0.025360291823744774,
0.04148812219500542,
0.01886206492781639,
-0.020274683833122253,
-0.004206355195492506,
0.0034862300381064415,
0.02321372926235199,
-0.058055419474840164,
-0.018930869176983833,
-0.017900662496685982,
-0.07135514914989471,
0.026766479015350342,
0.020341595634818077,
-0.030883125960826874,
0.022515015676617622,
0.005111335311084986,
0.03780564293265343,
-0.003697977401316166,
-0.034433428198099136,
0.0064940862357616425,
-0.03569317236542702,
0.023887431249022484,
-0.04845954105257988,
0.03616426885128021,
-0.0344405323266983,
0.020104242488741875,
-0.02255311980843544,
-0.030698886141180992,
-0.04574486240744591,
0.04875999689102173,
-0.027382580563426018,
-0.04239577800035477,
-0.020755305886268616,
0.012177112512290478,
-0.009497758001089096,
0.03237851709127426,
-0.027679454535245895,
0.01658851094543934,
-0.0038172744680196047,
0.014932490885257721,
-0.030791359022259712,
0.009389923885464668,
-0.04552369937300682,
-0.016533341258764267,
-0.026501011103391647,
-0.02968384139239788,
-0.02012350782752037,
-0.05041290074586868,
0.04012508690357208,
0.03787222132086754,
0.026121459901332855,
0.02886086143553257,
-0.02914697490632534,
-0.0077217863872647285,
0.010695765726268291,
-0.0410943329334259,
-0.030450206249952316,
-0.047568727284669876,
-0.001797021017409861,
-0.006908639334142208,
0.06324201077222824,
0.03939332813024521,
-0.029921747744083405,
-0.06009092554450035,
0.051781635731458664,
0.018986720591783524,
0.016368255019187927,
0.01105100940912962,
0.03252173587679863,
0.02656141109764576,
0.050650592893362045,
-0.03004688024520874,
-0.009410695172846317,
-0.008546959608793259,
-0.018185991793870926,
0.028952380642294884,
0.012023020535707474,
0.025012074038386345,
0.004644430708140135,
-0.02844713069498539,
-0.009759495966136456,
0.04739682748913765,
0.03369143232703209,
0.018724890425801277,
0.0060774944722652435,
-0.016062721610069275,
0.027581501752138138,
0.0070159221068024635,
-0.020856395363807678,
-0.014991323463618755,
0.023709304630756378,
-0.045676179230213165,
0.0890650525689125,
-0.020005149766802788,
-0.005192331969738007,
0.05558844655752182,
0.022509602829813957,
-0.007225201930850744,
0.04049760475754738,
-0.024695776402950287,
0.008943078108131886,
0.041341632604599,
-0.07608197629451752,
-0.017498163506388664,
0.0002902044798247516,
0.07057327032089233,
-0.05992748960852623,
0.0459924079477787,
0.03982878103852272,
0.044805578887462616,
0.015333251096308231,
-0.02373403124511242,
-0.041562892496585846,
0.020362207666039467,
-0.0323784165084362,
0.06757975369691849,
0.0020375174935907125,
-0.06522238254547119,
0.08263453096151352,
0.01550271175801754,
-0.07933424413204193,
0.019520089030265808,
0.04099845141172409,
0.018752887845039368,
0.015576900914311409,
0.029033558443188667,
-0.04230175539851189,
0.004877026658505201,
-0.04146638512611389,
0.014733762480318546,
-0.04916008934378624,
-0.012804481200873852,
0.005056691821664572,
-0.05082883685827255,
0.011140448041260242,
0.02778608165681362,
-0.007529472466558218,
-0.0037067150697112083,
0.017135297879576683,
-0.062050409615039825,
-0.03759264573454857,
0.01118322741240263,
0.029990313574671745,
-0.0200975202023983,
0.0291029941290617,
-0.04373471438884735,
0.04594136402010918,
0.013814914040267467,
-0.032159604132175446,
-0.03989604488015175,
-0.011203521862626076,
-0.0015990717802196741,
-0.0532100535929203,
-0.05268954858183861,
0.019910620525479317,
0.0030495908576995134,
-0.039438653737306595,
0.0416238009929657,
-0.017981914803385735,
0.005203968845307827,
0.04949617013335228,
0.01286738459020853,
0.03605987876653671,
-0.06481219083070755,
0.004823933355510235,
0.022595027461647987,
0.017151204869151115,
0.029994171112775803,
-0.02178475260734558,
0.028556738048791885,
0.04829595610499382,
0.045823968946933746,
-0.01730955019593239,
-0.016648631542921066,
-0.013251823373138905,
0.021786963567137718,
-0.03912246972322464,
-0.003994264639914036,
0.010879557579755783,
-0.03384160250425339,
-0.014473581686615944,
-0.04563932120800018,
-0.011678433045744896,
0.028466463088989258,
-0.056961074471473694,
-0.013458450324833393,
0.041039109230041504,
-0.009812239557504654,
-0.06526312977075577,
-0.07055184245109558,
-0.015525591559708118,
-0.02460450679063797,
0.06634033471345901,
0.008866015821695328,
-0.04099271818995476,
0.013016750104725361,
-0.0361412912607193,
-0.057804156094789505,
0.027301544323563576,
0.021930821239948273,
-0.027607614174485207,
0.058548714965581894,
0.03662427142262459,
-0.03277336061000824,
0.016564469784498215,
0.03003869019448757,
-0.05604330822825432,
0.04794640094041824,
0.0421769842505455,
0.02440011315047741,
0.017669225111603737,
0.016818730160593987,
-0.0025131346192210913,
-0.01584935002028942,
-0.05419185012578964,
-0.029669232666492462,
-0.029152873903512955,
-0.014248051680624485,
0.06093002110719681
] |
CennetOguz/distilbert-base-uncased-finetuned-recipe-accelerate | [
"pytorch",
"distilbert",
"fill-mask",
"transformers",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"DistilBertForMaskedLM"
],
"model_type": "distilbert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 7 | 2021-04-16T09:27:02Z |
---
language: Cszech Spanish
tags:
- translation Cszech Spanish model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "Antonio Tajani (místopředseda Komise) ."
---
# legal_t5_small_multitask_cs_es model
Model on translating legal text from Cszech to Spanish. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). The model is parallely trained on the three parallel corpus with 42 language pair
from jrc-acquis, europarl and dcep along with the unsupervised task where the model followed the task of prediction in a masked language model.
## Model description
No pretraining is involved in case of legal_t5_small_multitask_cs_es model, rather the unsupervised task is added with all the translation task
to realize the multitask learning scenario.
## Intended uses & limitations
The model could be used for translation of legal texts from Cszech to Spanish.
### How to use
Here is how to use this model to translate legal text from Cszech to Spanish in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_multitask_cs_es"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_multitask_cs_es", do_lower_case=False,
skip_special_tokens=True),
device=0
)
cs_text = "Antonio Tajani (místopředseda Komise) ."
pipeline([cs_text], max_length=512)
```
## Training data
The legal_t5_small_multitask_cs_es model (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 5 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_multitask_cs_es | 48.559|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.01653195172548294,
-0.0411190539598465,
-0.008672542870044708,
0.07795055955648422,
0.04448571428656578,
0.020758599042892456,
-0.00675006490200758,
-0.015510608442127705,
-0.03379560261964798,
0.07069596648216248,
0.02986251376569271,
-0.0005181524902582169,
-0.02081795409321785,
0.05341704189777374,
-0.036417074501514435,
-0.0459318608045578,
0.007894730195403099,
-0.016981111839413643,
-0.03513757884502411,
-0.020230507478117943,
-0.008055739104747772,
0.009369534440338612,
0.0046783313155174255,
-0.00024257316545117646,
0.0019182560499757528,
0.0041557918302714825,
0.017374860122799873,
0.04547525942325592,
-0.004263805225491524,
-0.06725724786520004,
-0.020167594775557518,
-0.008439685218036175,
-0.026959378272294998,
-0.026869866997003555,
-0.015684762969613075,
-0.013706768862903118,
0.0018157814629375935,
0.021925712004303932,
0.035690050572156906,
0.05031990259885788,
-0.019946560263633728,
0.007923624478280544,
-0.01750771328806877,
-0.05422871559858322,
0.048878371715545654,
0.017440147697925568,
-0.05342145636677742,
-0.0072891986928880215,
0.0411050021648407,
0.0010556658962741494,
-0.046556804329156876,
-0.07756972312927246,
-0.03315632417798042,
0.03239469230175018,
-0.014758570119738579,
-0.027166038751602173,
-0.08742630481719971,
-0.016466617584228516,
0.046008456498384476,
-0.04006245359778404,
-0.04960805922746658,
0.017179781571030617,
-0.06314187496900558,
0.008945854380726814,
0.036400243639945984,
-0.025210432708263397,
-0.0024301197845488787,
-0.041039273142814636,
0.0451275110244751,
-0.018753856420516968,
0.06948313862085342,
-0.040546078234910965,
0.019182300195097923,
-0.0931282714009285,
-0.01758486032485962,
-0.01785801723599434,
0.004927422385662794,
0.014616197906434536,
-0.033591944724321365,
0.021976355463266373,
0.03323155641555786,
-0.004919757135212421,
0.028494946658611298,
-0.019118741154670715,
-0.029484286904335022,
0.056201718747615814,
-0.021030670031905174,
-0.03313172608613968,
0.017463786527514458,
0.057824112474918365,
-0.03803511708974838,
-0.02699107676744461,
-0.014540775679051876,
-0.020268112421035767,
-0.009259865619242191,
0.01079445518553257,
0.042808227241039276,
-0.0035163555294275284,
0.049896884709596634,
0.02038542740046978,
0.02750060148537159,
0.021290868520736694,
-0.013819348998367786,
0.05281785875558853,
-0.03127914294600487,
-0.022258644923567772,
0.0017584558809176087,
-0.048236001282930374,
-0.03496392443776131,
0.025035236030817032,
0.014008632861077785,
-0.04517952352762222,
-0.05638978257775307,
0.06966328620910645,
0.02512590028345585,
-0.012256905436515808,
0.05118441954255104,
-0.029807178303599358,
-0.03851504251360893,
-0.04465046152472496,
0.02953873760998249,
0.008165616542100906,
0.003766791895031929,
0.04147355630993843,
-0.060945622622966766,
0.01621345989406109,
-0.027876978740096092,
-0.04570918530225754,
0.001272102352231741,
0.01392763014882803,
-0.04468594118952751,
0.05445527285337448,
0.004299483262002468,
-0.052269864827394485,
0.029946431517601013,
0.006399615667760372,
-0.0756484791636467,
0.04820844903588295,
0.04928760230541229,
0.110643669962883,
-0.051725659519433975,
-0.03585672378540039,
0.013153422623872757,
0.003822533180937171,
-0.00610384251922369,
0.0065352777019143105,
0.0018182162893936038,
-0.0539538711309433,
-0.01977073773741722,
-0.008013786748051643,
0.08352909982204437,
-0.054452795535326004,
-0.00004544021066976711,
0.040052492171525955,
0.00020163340377621353,
0.018135080114006996,
-0.03678514435887337,
-0.005483719054609537,
0.018346482887864113,
-0.01218422595411539,
-0.04595397412776947,
0.01392438542097807,
-0.006697991397231817,
-0.03163468837738037,
-0.06345375627279282,
-0.046779803931713104,
0.0014527698513120413,
0.07358060032129288,
0.007834592834115028,
-0.006304483395069838,
-0.0033067252952605486,
0.005676299333572388,
0.06855882704257965,
0.012097177095711231,
-0.024956699460744858,
0.050906602293252945,
0.06403902918100357,
0.055164407938718796,
-0.0009917467832565308,
0.07839307188987732,
0.046284452080726624,
-0.036419134587049484,
-0.028833765536546707,
-0.00419951044023037,
-0.009930088184773922,
-0.015901412814855576,
0.0032402838114649057,
0.047582145780324936,
-0.01766916923224926,
-0.00858834758400917,
-0.009601829573512077,
0.06500211358070374,
-0.015898503363132477,
0.005013659596443176,
-0.017862480133771896,
0.010755879804491997,
-0.007112249732017517,
0.0319744274020195,
-0.021455438807606697,
-0.000777177163399756,
-0.010584300383925438,
-0.02728332206606865,
0.002003500470891595,
0.050609197467565536,
0.023351693525910378,
0.03817330300807953,
-0.0030802579130977392,
0.09176480770111084,
-0.01687018573284149,
0.02385636605322361,
-0.039896704256534576,
-0.04898823797702789,
0.01085592620074749,
0.054955095052719116,
0.011834624223411083,
0.04439214989542961,
-0.0009139291360042989,
-0.04641665145754814,
0.003964758478105068,
0.06778842955827713,
0.04494699463248253,
0.010470829904079437,
-0.034480687230825424,
-0.011996458284556866,
0.04065771773457527,
0.08171819895505905,
-0.04312669113278389,
-0.03919651359319687,
0.01801445707678795,
0.07703474909067154,
-0.018337741494178772,
0.0029091143514961004,
-0.015160469338297844,
0.014675858430564404,
-0.041493818163871765,
-0.06869456171989441,
0.0416819229722023,
0.01431034691631794,
-0.009666030295193195,
0.011011622846126556,
0.02603941597044468,
0.003902838798239827,
0.013480842113494873,
-0.01099355798214674,
0.006058864761143923,
-0.06068258732557297,
-0.0024328448344022036,
0.013145534321665764,
0.03976313769817352,
-0.057272784411907196,
0.032481275498867035,
-0.006543480325490236,
-0.009282708168029785,
0.0772424265742302,
-0.049720920622348785,
0.0421895757317543,
0.02512383460998535,
0.027936480939388275,
-0.017979919910430908,
0.01940988376736641,
0.014192732982337475,
0.03523891046643257,
0.0654185488820076,
0.004910440184175968,
0.06393447518348694,
-0.013622632250189781,
0.047157179564237595,
0.06094023585319519,
0.01899927668273449,
0.0022178469225764275,
0.020375117659568787,
0.07558339089155197,
0.01248121540993452,
-0.002186707453802228,
0.06777279824018478,
-0.054650723934173584,
0.015361012890934944,
-0.039950430393218994,
0.008640068583190441,
0.010906225070357323,
-0.01122330967336893,
0.031472865492105484,
0.007575414143502712,
-0.01737675815820694,
0.02737407386302948,
-0.02050791122019291,
-0.04605177789926529,
0.049598224461078644,
-0.01151002012193203,
-0.004391584079712629,
-0.018005158752202988,
-0.03256324678659439,
0.016314901411533356,
-0.06405875831842422,
-0.052728429436683655,
-0.0015196604654192924,
-0.03030422143638134,
-0.003270023502409458,
-0.05437871441245079,
-0.01850343495607376,
-0.041079968214035034,
-0.00868026539683342,
0.04671420156955719,
0.01214110292494297,
0.0020084765274077654,
-0.03879692032933235,
0.01781914383172989,
-0.03334810957312584,
-0.008027952164411545,
-0.04085754603147507,
-0.05555882304906845,
-0.04113871604204178,
-0.07610825449228287,
0.027586063370108604,
-0.006843073759227991,
0.019511647522449493,
0.016140418127179146,
0.011716584675014019,
-0.0006782489945180714,
-0.03840254619717598,
0.056822389364242554,
0.03775477409362793,
-0.008756189607083797,
-0.027478938922286034,
0.027912097051739693,
-0.021926382556557655,
0.031166257336735725,
-0.017006179317831993,
-0.02381136082112789,
0.08600171655416489,
0.06610462814569473,
0.04266967624425888,
0.01420436892658472,
-0.030585389584302902,
-0.044085774570703506,
-0.06074024364352226,
-0.03578582778573036,
-0.04575249180197716,
0.011461751535534859,
-0.01986398547887802,
-0.05100679770112038,
-0.02433924190700054,
-0.04526076093316078,
0.0020671081729233265,
-0.007961000315845013,
0.02391486056149006,
0.04072948917746544,
0.04252174124121666,
0.058940768241882324,
0.029675688594579697,
-0.05570648983120918,
0.009380188770592213,
0.08466047048568726,
0.012955010868608952,
0.017429325729608536,
-0.07292454689741135,
-0.03637151047587395,
0.041648149490356445,
0.04421427473425865,
-0.013459320180118084,
-0.0012944916961714625,
0.09158048033714294,
0.012370873242616653,
-0.02192426100373268,
0.04322752356529236,
-0.015551564283668995,
-0.033406421542167664,
-0.01720920391380787,
0.00886492058634758,
-0.029981711879372597,
-0.04865812510251999,
-0.035611290484666824,
-0.004490097984671593,
0.037430040538311005,
-0.08354748040437698,
-0.04873337596654892,
-0.0055421264842152596,
0.024435291066765785,
0.004059149418026209,
-0.0005848326836712658,
-0.03927969932556152,
0.004448010586202145,
-0.027009379118680954,
-0.04238463565707207,
-0.0011865461710840464,
0.012548595666885376,
0.0178726427257061,
0.03384153172373772,
0.014288241975009441,
-0.057985175400972366,
0.03385991230607033,
0.02602490596473217,
0.05084680765867233,
0.03953193500638008,
-0.0433298721909523,
0.03097565844655037,
-0.010974877513945103,
0.02626330405473709,
-0.00959151703864336,
-0.0190450306981802,
-0.056453313678503036,
-0.08165181428194046,
-0.005413892678916454,
0.013299676589667797,
-0.007763221859931946,
-0.008676358498632908,
0.05683092400431633,
-0.041513774544000626,
0.00021614723664242774,
0.005451289005577564,
0.03577790409326553,
0.04013901948928833,
-0.08555395901203156,
0.059886470437049866,
0.0017261264147236943,
0.020927652716636658,
-0.0311833955347538,
0.01074041984975338,
-0.02645614556968212,
-0.02590005286037922,
0.005799125414341688,
0.0626232847571373,
0.03540084511041641,
0.04659900441765785,
0.07494093477725983,
0.018618570640683174,
-0.05193018540740013,
0.03507514297962189,
0.05093255266547203,
-0.02370290644466877,
-0.05674124136567116,
-0.008623951114714146,
0.006432726513594389,
-0.02942567877471447,
-0.019495243206620216,
-0.028183748945593834,
0.020420826971530914,
0.026708610355854034,
0.023616518825292587,
-0.014517721720039845,
-0.0011388338170945644,
-0.027680372819304466,
-0.03490769490599632,
-0.051310598850250244,
-0.016471069306135178,
-0.008934492245316505,
-0.02833973802626133,
0.025659313425421715,
0.02761433646082878,
0.00021310450392775238,
0.05702023580670357,
0.05772126466035843,
-0.03529917448759079,
-0.026138000190258026,
0.016653111204504967,
0.03485298529267311,
-0.03592097386717796,
-0.05958200991153717,
-0.04460528492927551,
0.04608999937772751,
0.029567847028374672,
0.0030925117898732424,
-0.0890815481543541,
-0.0007357242866419256,
0.038323771208524704,
-0.0170118547976017,
0.06462681293487549,
-0.014588095247745514,
0.01738712750375271,
0.03618840128183365,
-0.02061130851507187,
0.02177124284207821,
-0.025079697370529175,
0.023880485445261,
0.005672279745340347,
0.045945633202791214,
-0.008391426876187325,
-0.042636625468730927,
-0.06665431708097458,
0.043100543320178986,
-0.003890014486387372,
0.05389510840177536,
0.03786204010248184,
-0.009405874647200108,
-0.06520886719226837,
0.010820419527590275,
0.048244114965200424,
-0.07451803982257843,
0.0025671105831861496,
0.020864812657237053,
0.04685384780168533,
-0.05643007531762123,
-0.027343155816197395,
-0.02058372087776661,
-0.0011877246433869004,
0.014100871980190277,
-0.008349791169166565,
-0.036541085690259933,
-0.0493585430085659,
0.004039263352751732,
-0.02389194816350937,
-0.030730467289686203,
-0.09163470566272736,
0.029281286522746086,
-0.01608135923743248,
-0.01223122887313366,
0.06742652505636215,
0.05211484432220459,
0.016620181500911713,
0.04358094185590744,
-0.004548640456050634,
0.021159401163458824,
-0.05018651485443115,
0.0377182736992836,
-0.028763312846422195,
0.01359466277062893,
-0.0004971941816620529,
-0.06244231015443802,
0.005509366746991873,
-0.042667314410209656,
-0.006615557242184877,
-0.04828397557139397,
-0.01508061122149229,
0.012725635431706905,
-0.0022092389408499002,
0.01079120859503746,
-0.017614349722862244,
0.03489205986261368,
-0.0227299053221941,
-0.024183673784136772,
-0.021404193714261055,
-0.0407511368393898,
-0.06940969079732895,
-0.04609280824661255,
0.012922985479235649,
0.017064813524484634,
0.04645974561572075,
0.01235030498355627,
0.004593204241245985,
0.015811726450920105,
0.004452465567737818,
-0.02194833941757679,
0.03468794748187065,
-0.0008126230677589774,
-0.03621136024594307,
-0.01576411724090576,
-0.0018452623626217246,
0.007322508376091719,
0.027230678126215935,
-0.028107542544603348,
0.035322029143571854,
0.019354883581399918,
-0.02279394492506981,
0.004516948480159044,
0.0017827177653089166,
0.0274514053016901,
-0.05742134898900986,
-0.015229645185172558,
-0.01673498935997486,
-0.07740119844675064,
0.024357637390494347,
0.019277427345514297,
-0.025149760767817497,
0.016777483746409416,
-0.0025340875145047903,
0.0405525304377079,
-0.0017477776855230331,
-0.032574694603681564,
0.0046018133871257305,
-0.030729074031114578,
0.021059423685073853,
-0.05080189183354378,
0.050214316695928574,
-0.040795132517814636,
0.015831604599952698,
-0.01452321745455265,
-0.03530615195631981,
-0.04407217353582382,
0.05830899998545647,
-0.023959148675203323,
-0.048534952104091644,
-0.022285256534814835,
0.014367057941854,
-0.002534451661631465,
0.03195755183696747,
-0.0323086716234684,
0.017549598589539528,
-0.008047244511544704,
0.02547738514840603,
-0.034016624093055725,
0.01443459652364254,
-0.034067463129758835,
-0.021083220839500427,
-0.01665751077234745,
-0.029063748195767403,
-0.01811331883072853,
-0.05589434131979942,
0.04238399490714073,
0.04935842752456665,
0.026089439168572426,
0.023464450612664223,
-0.03879080340266228,
-0.003544662380591035,
0.012539035640656948,
-0.043050963431596756,
-0.028625337406992912,
-0.045165568590164185,
0.004705311264842749,
0.002204769290983677,
0.0641779974102974,
0.04272519424557686,
-0.025888511911034584,
-0.05936039984226227,
0.05740430951118469,
0.02455143816769123,
0.01436060480773449,
0.0017242353642359376,
0.03289453685283661,
0.019354667514562607,
0.05192067474126816,
-0.03297577053308487,
-0.0007103029638528824,
-0.006068950518965721,
-0.020071879029273987,
0.027975810691714287,
0.017118126153945923,
0.018842017278075218,
0.010442366823554039,
-0.03283781558275223,
-0.008095008321106434,
0.05143386870622635,
0.03928433731198311,
0.01613013446331024,
-0.004370538517832756,
-0.01659279316663742,
0.01979205198585987,
0.003384110052138567,
-0.030681518837809563,
-0.018840232864022255,
0.015788031741976738,
-0.04173411428928375,
0.08682529628276825,
-0.019372902810573578,
-0.008351338095963001,
0.057733770459890366,
0.02025049924850464,
-0.00419643335044384,
0.038365378975868225,
-0.027835074812173843,
0.008334057405591011,
0.0383237861096859,
-0.08004312217235565,
-0.010692688636481762,
0.0015910131623968482,
0.07334735989570618,
-0.0615784116089344,
0.04642466828227043,
0.034962378442287445,
0.042986974120140076,
0.013781512156128883,
-0.014969179406762123,
-0.04274805262684822,
0.016495438292622566,
-0.03458688035607338,
0.06731024384498596,
-0.004493990913033485,
-0.07166865468025208,
0.09310226142406464,
0.022563409060239792,
-0.07934059947729111,
0.01606731489300728,
0.0393710657954216,
0.021355099976062775,
0.018254894763231277,
0.03212500736117363,
-0.04718742147088051,
0.015361442230641842,
-0.04341638460755348,
0.017736950889229774,
-0.04775267839431763,
-0.009933199733495712,
-0.0009023051243275404,
-0.04559891298413277,
0.015199758112430573,
0.028810594230890274,
-0.009077373892068863,
-0.0017006357666105032,
0.011216284707188606,
-0.06357596814632416,
-0.04335096478462219,
0.005855869501829147,
0.02997513860464096,
-0.02278859168291092,
0.022132517769932747,
-0.033737145364284515,
0.046562936156988144,
0.015860166400671005,
-0.025466497987508774,
-0.04536717012524605,
-0.00736767565831542,
-0.0008973856456577778,
-0.05661411210894585,
-0.05231724679470062,
0.024039162322878838,
0.013753521256148815,
-0.03348451107740402,
0.034478411078453064,
-0.013929878361523151,
0.0021914197131991386,
0.0430479496717453,
0.006150583736598492,
0.03565993532538414,
-0.07205422222614288,
0.004274593200534582,
0.023033155128359795,
0.020135439932346344,
0.030311474576592445,
-0.01967567764222622,
0.025083769112825394,
0.045837096869945526,
0.044314853847026825,
-0.015596959739923477,
-0.015838466584682465,
-0.00737758120521903,
0.02615276537835598,
-0.044539280235767365,
0.005527365021407604,
0.012272942811250687,
-0.02636425755918026,
-0.013159475289285183,
-0.046079352498054504,
-0.0065862275660037994,
0.022462135180830956,
-0.061673425137996674,
-0.015102826058864594,
0.035070352256298065,
-0.013320036232471466,
-0.05210200697183609,
-0.08123330771923065,
-0.019449658691883087,
-0.02043013460934162,
0.0485716238617897,
0.010315896943211555,
-0.04301684349775314,
0.014091454446315765,
-0.028955936431884766,
-0.052530668675899506,
0.027045823633670807,
0.020627418532967567,
-0.031045496463775635,
0.04819842055439949,
0.045155756175518036,
-0.03729650378227234,
0.015738189220428467,
0.026630345731973648,
-0.05351921170949936,
0.03886723145842552,
0.03246752917766571,
0.025514177978038788,
0.020292146131396294,
0.012672011740505695,
-0.0046483902260661125,
-0.013475529849529266,
-0.05374084785580635,
-0.030720779672265053,
-0.029517492279410362,
-0.018486885353922844,
0.06099655479192734
] |
CennetOguz/distilbert-base-uncased-finetuned-recipe | [
"pytorch",
"tensorboard",
"distilbert",
"fill-mask",
"transformers",
"generated_from_trainer",
"license:apache-2.0",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"DistilBertForMaskedLM"
],
"model_type": "distilbert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 2 | null |
---
language: Cszech French
tags:
- translation Cszech French model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "Agentura USA pro ochranu životního prostředí ve své hodnotící studii v roce 2002 zjistila možnou systémovou toxicitu a karcinogenitu a údaje získané z krevních testů nasvědčují rozsáhlé expozici obyvatelstva."
---
# legal_t5_small_multitask_cs_fr model
Model on translating legal text from Cszech to French. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). The model is parallely trained on the three parallel corpus with 42 language pair
from jrc-acquis, europarl and dcep along with the unsupervised task where the model followed the task of prediction in a masked language model.
## Model description
No pretraining is involved in case of legal_t5_small_multitask_cs_fr model, rather the unsupervised task is added with all the translation task
to realize the multitask learning scenario.
## Intended uses & limitations
The model could be used for translation of legal texts from Cszech to French.
### How to use
Here is how to use this model to translate legal text from Cszech to French in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_multitask_cs_fr"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_multitask_cs_fr", do_lower_case=False,
skip_special_tokens=True),
device=0
)
cs_text = "Agentura USA pro ochranu životního prostředí ve své hodnotící studii v roce 2002 zjistila možnou systémovou toxicitu a karcinogenitu a údaje získané z krevních testů nasvědčují rozsáhlé expozici obyvatelstva."
pipeline([cs_text], max_length=512)
```
## Training data
The legal_t5_small_multitask_cs_fr model (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 5 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_multitask_cs_fr | 47.588|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.0023263059556484222,
-0.04520618915557861,
-0.01137396041303873,
0.06560156494379044,
0.04489742964506149,
0.018439652398228645,
-0.007249871268868446,
-0.020005762577056885,
-0.03646859526634216,
0.06327866017818451,
0.035806164145469666,
0.006807536352425814,
-0.023405704647302628,
0.04914622753858566,
-0.03832913935184479,
-0.04357147216796875,
0.0032451252918690443,
-0.020267123356461525,
-0.033146001398563385,
-0.019966110587120056,
-0.003127466654404998,
0.02130308747291565,
-0.007716040126979351,
0.003132810117676854,
0.009235716424882412,
-0.0016045093070715666,
0.0016805302584543824,
0.05926574021577835,
-0.002443027449771762,
-0.07431282103061676,
-0.011604474857449532,
-0.002153712324798107,
-0.03107515163719654,
-0.022791141644120216,
0.0022734554950147867,
-0.012118854559957981,
0.00009111112012760714,
0.019307678565382957,
0.030734870582818985,
0.05188225954771042,
-0.008944965898990631,
-0.007929342798888683,
-0.02735358290374279,
-0.047803107649087906,
0.049959421157836914,
0.009659947827458382,
-0.050420984625816345,
-0.009675078094005585,
0.03789842873811722,
-0.00555772241204977,
-0.046622395515441895,
-0.07621926814317703,
-0.02094244956970215,
0.02842237800359726,
-0.004094494506716728,
-0.029473867267370224,
-0.09147174656391144,
0.0009617206524126232,
0.04641735553741455,
-0.03517286479473114,
-0.043707624077796936,
0.016600938513875008,
-0.061924438923597336,
0.01130309421569109,
0.04437047615647316,
-0.028386451303958893,
-0.0018398527754470706,
-0.04283929616212845,
0.049150947481393814,
-0.011206594295799732,
0.060115016996860504,
-0.03240540996193886,
0.020161012187600136,
-0.09355475753545761,
-0.02018914371728897,
-0.008582109585404396,
0.001900257309898734,
0.026447812095284462,
-0.02789510227739811,
0.016371242702007294,
0.02823725901544094,
-0.015623865649104118,
0.02826020121574402,
-0.018740214407444,
-0.03445766121149063,
0.04116908088326454,
-0.014977183192968369,
-0.03531146049499512,
0.01260488759726286,
0.05684133991599083,
-0.04342687502503395,
-0.037785131484270096,
-0.007279356010258198,
-0.01901925541460514,
-0.004193673375993967,
0.015303303487598896,
0.04064597189426422,
-0.010510062798857689,
0.042274750769138336,
0.024005679413676262,
0.030416376888751984,
0.01600002683699131,
-0.007027493789792061,
0.043327976018190384,
-0.02941764146089554,
-0.01695067435503006,
-0.0025701115373522043,
-0.04078472778201103,
-0.042807869613170624,
0.0329701267182827,
0.009562465362250805,
-0.0474703274667263,
-0.058643121272325516,
0.06616240739822388,
0.01672917790710926,
-0.013717450201511383,
0.049358390271663666,
-0.035652436316013336,
-0.027142567560076714,
-0.04692661389708519,
0.017133379355072975,
0.008978973142802715,
0.011204550042748451,
0.04274915158748627,
-0.05797486752271652,
0.018148653209209442,
-0.03354393690824509,
-0.0518101304769516,
0.0029873240273445845,
0.008167840540409088,
-0.03968651592731476,
0.05396246537566185,
0.013568470254540443,
-0.04847770929336548,
0.025616995990276337,
-0.006813249550759792,
-0.07927311956882477,
0.05486331135034561,
0.047053657472133636,
0.11418402940034866,
-0.04842030256986618,
-0.04683979973196983,
0.016214607283473015,
-0.001217271899804473,
-0.015959104523062706,
0.014607029035687447,
-0.004635431803762913,
-0.054572198539972305,
-0.017054131254553795,
-0.001186136156320572,
0.08330484479665756,
-0.05956350639462471,
-0.0030541333835572004,
0.04049822315573692,
-0.0081361448392272,
0.01864960789680481,
-0.03540295362472534,
-0.0037267650477588177,
0.014941323548555374,
-0.013204168528318405,
-0.0450923778116703,
0.007915173657238483,
0.005049282684922218,
-0.022821545600891113,
-0.061525847762823105,
-0.05728446692228317,
0.0019511351129040122,
0.0704231932759285,
0.007101690862327814,
-0.01104799471795559,
-0.01668168604373932,
0.00607541436329484,
0.0687907412648201,
0.013513734564185143,
-0.027908338233828545,
0.052120141685009,
0.05028918385505676,
0.05138074979186058,
0.006474087480455637,
0.07940631359815598,
0.05412788689136505,
-0.04452420398592949,
-0.02256019599735737,
-0.0126145388931036,
-0.014499704353511333,
-0.028816675767302513,
-0.0011433804174885154,
0.040861520916223526,
-0.0025175828486680984,
-0.014924640767276287,
-0.020175201818346977,
0.061450086534023285,
-0.010017739608883858,
-0.0013346639461815357,
-0.005229600239545107,
0.0035203774459660053,
-0.0065993815660476685,
0.031868334859609604,
-0.01770465262234211,
-0.002140405820682645,
-0.016769571229815483,
-0.035170651972293854,
0.01073544006794691,
0.043209806084632874,
0.04338022693991661,
0.04062661901116371,
-0.011993739753961563,
0.09069710969924927,
-0.014203457161784172,
0.015427832491695881,
-0.0354287289083004,
-0.046909067779779434,
0.01157806534320116,
0.05504355952143669,
0.015362709760665894,
0.04306470602750778,
-0.005626963451504707,
-0.04866744950413704,
0.008172446861863136,
0.07382141798734665,
0.05834873020648956,
0.008257598616182804,
-0.027305448427796364,
-0.008067138493061066,
0.034119125455617905,
0.0807773768901825,
-0.03880015015602112,
-0.03377227857708931,
0.015557773411273956,
0.06491902470588684,
-0.02487131394445896,
-0.0014685645001009107,
-0.01811150461435318,
0.01648830994963646,
-0.028969908133149147,
-0.062309663742780685,
0.0514429435133934,
0.017907924950122833,
0.0008320282795466483,
0.016754478216171265,
0.028817377984523773,
-0.003680184716358781,
0.008434902876615524,
-0.0009695555199868977,
-0.000012860838069173042,
-0.06016763672232628,
-0.0024134593550115824,
0.014467239379882812,
0.03607277199625969,
-0.05526839196681976,
0.035437677055597305,
-0.010679705999791622,
-0.010845738463103771,
0.0725632980465889,
-0.05194701626896858,
0.04256502911448479,
0.02515435218811035,
0.026447059586644173,
-0.01652095653116703,
0.007867641746997833,
0.014261257834732533,
0.035232577472925186,
0.07801124453544617,
0.0009653912275098264,
0.060340892523527145,
-0.007670543622225523,
0.054179705679416656,
0.07206589728593826,
0.030169399455189705,
0.007029439322650433,
0.015869535505771637,
0.07241665571928024,
0.0073297349736094475,
-0.002886677160859108,
0.06036878749728203,
-0.055095236748456955,
0.016663337126374245,
-0.04348236322402954,
0.0013616480864584446,
0.008055019192397594,
-0.005372280720621347,
0.021003609523177147,
0.003317326307296753,
-0.012239078991115093,
0.030401088297367096,
-0.01949230395257473,
-0.05238306149840355,
0.04438238590955734,
-0.01150749996304512,
0.0015307129360735416,
-0.011800547130405903,
-0.035527847707271576,
0.017440542578697205,
-0.05376671999692917,
-0.03785424679517746,
0.004678784869611263,
-0.03397657349705696,
0.0040466939099133015,
-0.05615995079278946,
-0.025666188448667526,
-0.04569879546761513,
-0.00621061073616147,
0.04470905289053917,
0.022671405225992203,
-0.0010911700082942843,
-0.046788476407527924,
0.024249734356999397,
-0.030353743582963943,
-0.005132799502462149,
-0.041874147951602936,
-0.05179861560463905,
-0.03741069883108139,
-0.08763641864061356,
0.043234873563051224,
-0.01060323417186737,
0.012615034356713295,
0.01141067873686552,
0.014146029017865658,
-0.014165829867124557,
-0.02944556623697281,
0.060990724712610245,
0.02387181855738163,
-0.017162322998046875,
-0.02355448715388775,
0.028311146423220634,
-0.02645573392510414,
0.021380441263318062,
-0.0278326403349638,
-0.036233071237802505,
0.09419441968202591,
0.06722170114517212,
0.03225761651992798,
0.012609561905264854,
-0.02018217369914055,
-0.04885273426771164,
-0.067408487200737,
-0.02084345743060112,
-0.04463725909590721,
0.006764463614672422,
-0.024941911920905113,
-0.041015639901161194,
-0.02852134220302105,
-0.04914786294102669,
0.005282653495669365,
-0.006975606549531221,
0.010259348899126053,
0.024828869849443436,
0.03531273454427719,
0.056830503046512604,
0.026599667966365814,
-0.05165684223175049,
-0.009530710987746716,
0.09196493774652481,
0.01835961826145649,
0.015603727661073208,
-0.061248283833265305,
-0.043242909014225006,
0.046779315918684006,
0.03918582201004028,
-0.014732396230101585,
-0.0070906877517700195,
0.08459838479757309,
0.016170620918273926,
-0.012291671708226204,
0.026893559843301773,
-0.024152396246790886,
-0.019980059936642647,
-0.007737036794424057,
0.013195659033954144,
-0.032511454075574875,
-0.04975968599319458,
-0.043316517025232315,
-0.0003856674302369356,
0.029784899204969406,
-0.08539936691522598,
-0.05638352036476135,
0.003405430354177952,
0.02283666841685772,
0.005140210036188364,
-0.0020154970698058605,
-0.038412243127822876,
0.008052297867834568,
-0.02843967080116272,
-0.04498671740293503,
-0.0051780520007014275,
0.018651708960533142,
0.016257889568805695,
0.03993810713291168,
0.014983391389250755,
-0.05902956426143646,
0.0386374369263649,
0.033903688192367554,
0.0600544810295105,
0.0394057035446167,
-0.04495393857359886,
0.03191747888922691,
-0.008541072718799114,
0.028219154104590416,
-0.007791167125105858,
-0.010802044533193111,
-0.05272167921066284,
-0.08378072828054428,
-0.015161996707320213,
0.018006116151809692,
0.003929469268769026,
-0.012666521593928337,
0.05845851078629494,
-0.04159563034772873,
-0.006516545079648495,
-0.0014111589407548308,
0.03832947835326195,
0.039983104914426804,
-0.09022529423236847,
0.049853336066007614,
-0.00353946047835052,
0.03896307200193405,
-0.028601782396435738,
0.016820156946778297,
-0.025578506290912628,
-0.019660327583551407,
0.0004633911303244531,
0.06064422056078911,
0.03187794238328934,
0.05284157395362854,
0.07801776379346848,
0.013721187599003315,
-0.04834746569395065,
0.029541902244091034,
0.05102374777197838,
-0.01654186099767685,
-0.044127292931079865,
-0.015352289192378521,
0.017994238063693047,
-0.02522805519402027,
-0.027756137773394585,
-0.030476326122879982,
0.010685709305107594,
0.022639546543359756,
0.015698812901973724,
-0.0010580378584563732,
0.0006645023822784424,
-0.029098203405737877,
-0.042700543999671936,
-0.051217496395111084,
-0.021236922591924667,
-0.006109003908932209,
-0.023575568571686745,
0.027778226882219315,
0.03995288163423538,
0.005362610332667828,
0.0602794848382473,
0.04865133389830589,
-0.03820044919848442,
-0.043909989297389984,
0.010065353475511074,
0.040481775999069214,
-0.031100140884518623,
-0.05940352380275726,
-0.04216105490922928,
0.035768061876297,
0.031309824436903,
-0.0011807482223957777,
-0.07973680645227432,
0.007836760953068733,
0.049168240278959274,
-0.006763487122952938,
0.07010316848754883,
-0.008271836675703526,
0.014852193184196949,
0.041888277977705,
-0.028272122144699097,
0.015042545273900032,
-0.024725301191210747,
0.03757366165518761,
0.006101399660110474,
0.03773408383131027,
-0.015321338549256325,
-0.029975563287734985,
-0.059146568179130554,
0.04330455884337425,
-0.003455651458352804,
0.047991666942834854,
0.027716314420104027,
-0.0022862632758915424,
-0.06696072965860367,
0.019485877826809883,
0.040904391556978226,
-0.07737495750188828,
0.015862002968788147,
0.01731448993086815,
0.05383829027414322,
-0.05454399809241295,
-0.025694573298096657,
-0.028571464121341705,
0.007980025373399258,
0.025328651070594788,
-0.004251666832715273,
-0.02991955541074276,
-0.04909200966358185,
0.011442252434790134,
-0.03377643600106239,
-0.025510583072900772,
-0.09924233704805374,
0.013823749497532845,
-0.012948824092745781,
-0.01936044543981552,
0.06544505059719086,
0.0338054895401001,
0.014626875519752502,
0.028196880593895912,
-0.005124934948980808,
0.021052902564406395,
-0.04468071833252907,
0.03720792010426521,
-0.020170578733086586,
0.0032468901481479406,
0.006100358907133341,
-0.05818511173129082,
0.006179019808769226,
-0.041062694042921066,
-0.004425307735800743,
-0.049375634640455246,
-0.02183222956955433,
0.004895179998129606,
-0.008760147728025913,
0.0023401433136314154,
-0.02556319534778595,
0.027867421507835388,
-0.024824535474181175,
-0.02320581115782261,
-0.026901278644800186,
-0.04219753295183182,
-0.06813713908195496,
-0.048638779670000076,
0.012566843070089817,
0.02912827394902706,
0.04185749962925911,
0.0190968569368124,
-0.007354562170803547,
0.01673678681254387,
0.0023156048264354467,
-0.01260762196034193,
0.04032915458083153,
-0.00005610938751487993,
-0.03632528707385063,
-0.013157282955944538,
0.003272984642535448,
0.0019095122115686536,
0.031967341899871826,
-0.02260666899383068,
0.03832089155912399,
0.021732816472649574,
-0.02178775519132614,
-0.006685832981020212,
-0.00203432934358716,
0.01628074236214161,
-0.05440492182970047,
-0.028198426589369774,
-0.017938505858182907,
-0.06742750853300095,
0.03696516156196594,
0.025283344089984894,
-0.03199584037065506,
0.024163201451301575,
0.007086866535246372,
0.04818873479962349,
0.0034509471151977777,
-0.03447698801755905,
0.023826964199543,
-0.0344986692070961,
0.018195865675807,
-0.05841796100139618,
0.03584427759051323,
-0.03995497524738312,
0.01783095858991146,
-0.018896538764238358,
-0.0388106107711792,
-0.04314247891306877,
0.050581127405166626,
-0.02786920964717865,
-0.04527661204338074,
-0.015944791957736015,
0.017812764272093773,
-0.017891740426421165,
0.030080225318670273,
-0.028918970376253128,
0.0068330722860991955,
0.004764441400766373,
0.01729137822985649,
-0.028164133429527283,
0.002386667300015688,
-0.04170353338122368,
-0.014013055711984634,
-0.021681759506464005,
-0.03134185075759888,
-0.02829819545149803,
-0.05083397775888443,
0.04657675325870514,
0.038478441536426544,
0.025260454043745995,
0.025554494932293892,
-0.028768697753548622,
0.0003696675121318549,
0.007638472132384777,
-0.04119792953133583,
-0.027112584561109543,
-0.043912868946790695,
-0.0015137064037844539,
-0.013116881251335144,
0.0684339851140976,
0.03621020168066025,
-0.026303565129637718,
-0.0562286451458931,
0.05840439349412918,
0.012490667402744293,
0.017869016155600548,
0.005550846923142672,
0.038996078073978424,
0.025478726252913475,
0.04843231663107872,
-0.03903473541140556,
-0.012518544681370258,
-0.007503284607082605,
-0.024323245510458946,
0.020916258916258812,
0.012426349334418774,
0.023624204099178314,
0.009968719445168972,
-0.030982814729213715,
-0.009966960176825523,
0.05726954713463783,
0.03307126834988594,
0.012294746935367584,
-0.00020995667728129774,
-0.0063037993386387825,
0.01976102776825428,
0.019604573026299477,
-0.02832137607038021,
-0.010222264565527439,
0.026147371158003807,
-0.0468049980700016,
0.08723799884319305,
-0.023753471672534943,
-0.002231342252343893,
0.06371263414621353,
0.024634482339024544,
-0.0005238783778622746,
0.04793397709727287,
-0.02318696863949299,
0.009866929613053799,
0.04276276379823685,
-0.06846457719802856,
-0.01016386691480875,
0.0030131542589515448,
0.07184093445539474,
-0.04786865413188934,
0.04390189051628113,
0.03562299162149429,
0.03476233780384064,
0.01665751077234745,
-0.031407810747623444,
-0.03971971943974495,
0.01393112726509571,
-0.030706964433193207,
0.08217068016529083,
0.008166851475834846,
-0.07226921617984772,
0.08412150293588638,
0.017986290156841278,
-0.08648566156625748,
0.02589915134012699,
0.048409830778837204,
0.01900508999824524,
0.010344268754124641,
0.023942377418279648,
-0.05006915703415871,
0.004243622999638319,
-0.03496694937348366,
0.018377823755145073,
-0.04433940351009369,
-0.004545044619590044,
-0.00022503203945234418,
-0.05242125317454338,
0.010498487390577793,
0.023238664492964745,
-0.012701484374701977,
0.0006335870712064207,
0.016703082248568535,
-0.05122930184006691,
-0.03644105792045593,
0.015031627379357815,
0.029457638040184975,
-0.017787540331482887,
0.023405423387885094,
-0.050010114908218384,
0.042695920914411545,
0.012676849961280823,
-0.022284889593720436,
-0.03408248722553253,
-0.015172167681157589,
-0.00923971738666296,
-0.04527575895190239,
-0.05439837649464607,
0.021485760807991028,
0.00832026544958353,
-0.028934240341186523,
0.028028208762407303,
-0.015481223352253437,
0.004108842462301254,
0.04949203506112099,
0.007299385499209166,
0.03358667343854904,
-0.07088183611631393,
0.008094373159110546,
0.029954522848129272,
0.01945202797651291,
0.02661602944135666,
-0.02170174941420555,
0.028748637065291405,
0.04832945764064789,
0.05267434939742088,
-0.015095443464815617,
-0.009778766892850399,
-0.013672767207026482,
0.021785257384181023,
-0.03585508465766907,
-0.008871621452271938,
0.008625821210443974,
-0.03895890340209007,
-0.013480707071721554,
-0.041724834591150284,
-0.021793490275740623,
0.02602735348045826,
-0.05231872946023941,
-0.014432252384722233,
0.043796196579933167,
-0.017085280269384384,
-0.06233573704957962,
-0.08197104185819626,
-0.011447658762335777,
-0.030390461906790733,
0.06879168003797531,
0.008795143105089664,
-0.049750082194805145,
0.008676261641085148,
-0.032971497625112534,
-0.06021695211529732,
0.032857052981853485,
0.014973407611250877,
-0.03395078703761101,
0.0573294572532177,
0.043726757168769836,
-0.03151879832148552,
0.019757164642214775,
0.030919115990400314,
-0.05194118246436119,
0.04184158891439438,
0.05160300061106682,
0.03070150315761566,
0.0178995244204998,
0.02349463291466236,
0.00018151661788579077,
-0.0255107544362545,
-0.06587334722280502,
-0.030326059088110924,
-0.03122747503221035,
-0.017609216272830963,
0.06207040697336197
] |
Chaddmckay/Cdm | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | 2021-04-16T09:29:01Z |
---
language: Cszech Swedish
tags:
- translation Cszech Swedish model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "Hračky určené pro častý kontakt s kůží obsahující alergenní látky jiné než vonné, které jsou známé vyvoláváním vážných nebo dokonce osudných účinků na zdraví dětí (například látky, které mohou vyvolat anafylaktický šok), musí být v souladu s ustanoveními týkajícími se označování uvedenými ve směrnici Komise 2006/125/ES ze dne 5. prosince 2006 o obilných a ostatních příkrmech pro kojence a malé děti."
---
# legal_t5_small_multitask_cs_sv model
Model on translating legal text from Cszech to Swedish. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). The model is parallely trained on the three parallel corpus with 42 language pair
from jrc-acquis, europarl and dcep along with the unsupervised task where the model followed the task of prediction in a masked language model.
## Model description
No pretraining is involved in case of legal_t5_small_multitask_cs_sv model, rather the unsupervised task is added with all the translation task
to realize the multitask learning scenario.
## Intended uses & limitations
The model could be used for translation of legal texts from Cszech to Swedish.
### How to use
Here is how to use this model to translate legal text from Cszech to Swedish in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_multitask_cs_sv"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_multitask_cs_sv", do_lower_case=False,
skip_special_tokens=True),
device=0
)
cs_text = "Hračky určené pro častý kontakt s kůží obsahující alergenní látky jiné než vonné, které jsou známé vyvoláváním vážných nebo dokonce osudných účinků na zdraví dětí (například látky, které mohou vyvolat anafylaktický šok), musí být v souladu s ustanoveními týkajícími se označování uvedenými ve směrnici Komise 2006/125/ES ze dne 5. prosince 2006 o obilných a ostatních příkrmech pro kojence a malé děti."
pipeline([cs_text], max_length=512)
```
## Training data
The legal_t5_small_multitask_cs_sv model (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 5 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_multitask_cs_sv | 35.871|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.011134668253362179,
-0.04084673151373863,
-0.014086606912314892,
0.06440343707799911,
0.04147351533174515,
0.009938327595591545,
-0.007330834399908781,
-0.014549370855093002,
-0.044790979474782944,
0.06181076169013977,
0.0399663969874382,
0.0005504186265170574,
-0.009645902551710606,
0.052005261182785034,
-0.03873899579048157,
-0.04385657235980034,
-0.004340621642768383,
-0.016513830050826073,
-0.023125164210796356,
-0.01462636236101389,
-0.010663100518286228,
0.016329221427440643,
-0.012012197636067867,
0.007056045345962048,
0.01726297102868557,
0.009467235766351223,
0.0006371655035763979,
0.05286645144224167,
0.005755000747740269,
-0.05662206560373306,
-0.016282379627227783,
-0.010866556316614151,
-0.03812234476208687,
-0.033920347690582275,
-0.00949802529066801,
-0.0247412770986557,
0.0125651303678751,
0.0342165045440197,
0.03617711365222931,
0.05851585790514946,
-0.025190498679876328,
0.000989810680039227,
-0.023703670129179955,
-0.05375196412205696,
0.03723478689789772,
0.01799093931913376,
-0.049409445375204086,
-0.0012103081680834293,
0.03653179481625557,
-0.0014302161289379,
-0.050538938492536545,
-0.06230637803673744,
-0.010984791442751884,
0.02792789228260517,
-0.006632776465266943,
-0.043907180428504944,
-0.08763030916452408,
0.0014679289888590574,
0.04538394883275032,
-0.04580697417259216,
-0.05271061509847641,
0.008449974469840527,
-0.06592796742916107,
0.009923922829329967,
0.037284303456544876,
-0.03870657831430435,
-0.0036536038387566805,
-0.05964921787381172,
0.05729151517152786,
-0.0005853822221979499,
0.06445109844207764,
-0.036330949515104294,
0.024534018710255623,
-0.08753688633441925,
-0.01964421011507511,
-0.014490400440990925,
0.010892756283283234,
0.03095666505396366,
-0.03264458850026131,
0.028941379860043526,
0.021589210256934166,
-0.013045541010797024,
0.023454489186406136,
-0.01880492828786373,
-0.024454833939671516,
0.037819113582372665,
-0.0256133321672678,
-0.01912655122578144,
0.00614516157656908,
0.06134571135044098,
-0.045072223991155624,
-0.031601887196302414,
-0.019002005457878113,
-0.012222807854413986,
-0.016835734248161316,
-0.002160074654966593,
0.03608805686235428,
-0.015551051124930382,
0.04029757156968117,
0.030376549810171127,
0.030517851933836937,
0.013192304410040379,
-0.02032921276986599,
0.04110762104392052,
-0.03242703899741173,
-0.025243308395147324,
-0.0047501251101493835,
-0.0398288257420063,
-0.05022718757390976,
0.013278919272124767,
0.000920861610211432,
-0.06516338884830475,
-0.04538349062204361,
0.05167696624994278,
0.01771497167646885,
-0.009958464652299881,
0.05479658022522926,
-0.026490885764360428,
-0.036235857754945755,
-0.05304446443915367,
0.014752376824617386,
0.006812144536525011,
0.01180159579962492,
0.04671298712491989,
-0.06969796866178513,
0.032854072749614716,
-0.02544957958161831,
-0.05038633197546005,
0.015591026283800602,
0.008986914530396461,
-0.03833959251642227,
0.04861544445157051,
0.015449991449713707,
-0.06780654191970825,
0.02773216739296913,
-0.0027110574301332235,
-0.07593746483325958,
0.04720388725399971,
0.05149439349770546,
0.11909721791744232,
-0.036591894924640656,
-0.053231220692396164,
-0.003872979199513793,
0.003255711169913411,
-0.010735318064689636,
0.014921540394425392,
0.001788090681657195,
-0.050933774560689926,
-0.013110402040183544,
-0.012099482119083405,
0.07440517097711563,
-0.06022254377603531,
0.00458691967651248,
0.05028209090232849,
0.0017771754646673799,
0.017003826797008514,
-0.033367931842803955,
-0.004305654671043158,
0.010262183845043182,
-0.007965249009430408,
-0.03024473413825035,
0.010469713248312473,
0.00028082283097319305,
-0.017793064936995506,
-0.05939604341983795,
-0.05959133431315422,
0.012742137536406517,
0.07268564403057098,
0.007934460416436195,
-0.007902390323579311,
-0.027373049408197403,
-0.007684124633669853,
0.07270870357751846,
0.010760552249848843,
-0.028764864429831505,
0.0400029718875885,
0.04877966269850731,
0.04893086478114128,
0.0033628218807280064,
0.07714425027370453,
0.039919909089803696,
-0.04451831057667732,
-0.01666717417538166,
0.0005731023265980184,
0.0018339651869609952,
-0.000782392977271229,
-0.005140862427651882,
0.053736716508865356,
-0.009270105510950089,
-0.014453324489295483,
-0.010851545259356499,
0.0744246169924736,
-0.025679588317871094,
-0.0032295789569616318,
-0.009424121119081974,
0.012482072226703167,
-0.008919923566281796,
0.027195820584893227,
-0.0019985109101980925,
-0.01762140728533268,
-0.021717730909585953,
-0.028351789340376854,
0.018239321187138557,
0.04262007400393486,
0.024973470717668533,
0.041598543524742126,
-0.00858498178422451,
0.09861104190349579,
-0.01850421540439129,
0.0082672955468297,
-0.04520038887858391,
-0.053607769310474396,
0.009322036989033222,
0.05060526356101036,
0.020229335874319077,
0.04467776045203209,
-0.0017712743720039725,
-0.05839577689766884,
0.0004731371009256691,
0.07482502609491348,
0.0532282292842865,
0.005045989528298378,
-0.022817691788077354,
0.002648388734087348,
0.040165551006793976,
0.07155085355043411,
-0.03970513492822647,
-0.042259395122528076,
0.014639977365732193,
0.08326753228902817,
-0.0210600383579731,
-0.0008245932403951883,
-0.007262536324560642,
0.0197560153901577,
-0.012720533646643162,
-0.06329504400491714,
0.04607175663113594,
0.012975490652024746,
-0.004696004092693329,
0.01718810573220253,
0.014587878249585629,
0.013282218016684055,
0.007962488569319248,
0.0013467863900586963,
-0.0005986826145090163,
-0.04932032898068428,
0.00208827992901206,
0.013666938059031963,
0.04896172136068344,
-0.05068976804614067,
0.019597258418798447,
0.002076484728604555,
0.0007127224234864116,
0.06682135909795761,
-0.051588527858257294,
0.06308326870203018,
0.04704340547323227,
0.024036003276705742,
-0.01831684820353985,
0.028208965435624123,
0.024410324171185493,
0.0515633262693882,
0.06338019669055939,
-0.011525453068315983,
0.06079328805208206,
-0.00774491298943758,
0.05710754916071892,
0.06180058419704437,
0.024079466238617897,
0.015041114762425423,
0.005825818981975317,
0.08640630543231964,
0.010144858621060848,
-0.0038283192552626133,
0.07005857676267624,
-0.05986853316426277,
0.0214591883122921,
-0.047698043286800385,
0.009551949799060822,
0.01585547998547554,
0.0033721299842000008,
0.023050427436828613,
-0.003942593932151794,
-0.012757968157529831,
0.02655728906393051,
-0.017371663823723793,
-0.035939764231443405,
0.049157049506902695,
-0.014166693203151226,
0.015289225615561008,
-0.01865166611969471,
-0.036647725850343704,
0.022539591416716576,
-0.05658293887972832,
-0.04976225271821022,
0.00010583187395241112,
-0.031012682244181633,
0.01646977663040161,
-0.0555352084338665,
-0.006139529403299093,
-0.0531405434012413,
-0.007646915037184954,
0.042812325060367584,
0.03287737816572189,
-0.00027341803070157766,
-0.03824811428785324,
0.01754392869770527,
-0.03158266842365265,
-0.007791138254106045,
-0.03683757409453392,
-0.05520373582839966,
-0.03767355531454086,
-0.0806972086429596,
0.03808293119072914,
-0.0022124461829662323,
0.020479293540120125,
0.0080327233299613,
0.01752261258661747,
-0.0174090713262558,
-0.04484574496746063,
0.057301878929138184,
0.03433813899755478,
-0.011999333277344704,
-0.023045537993311882,
0.028458377346396446,
-0.01677732542157173,
0.01366554293781519,
-0.04437633231282234,
-0.005840522237122059,
0.09354552626609802,
0.06722060590982437,
0.02603132091462612,
0.006670219823718071,
-0.007541608065366745,
-0.05865410715341568,
-0.06277770549058914,
-0.026951001957058907,
-0.03926517069339752,
0.012096834369003773,
-0.02565133571624756,
-0.04416138678789139,
-0.02512194775044918,
-0.04873107746243477,
-0.006168961524963379,
-0.026124924421310425,
-0.007833649404346943,
0.018760111182928085,
0.04501587897539139,
0.045704033225774765,
0.0242708008736372,
-0.04746757447719574,
-0.006515289656817913,
0.08243783563375473,
0.0019160673255100846,
0.017500048503279686,
-0.0747080147266388,
-0.04297586530447006,
0.03870077058672905,
0.036747898906469345,
-0.008212574757635593,
-0.009844851680099964,
0.09127773344516754,
0.009177840314805508,
-0.007322282064706087,
0.031886011362075806,
-0.018939916044473648,
-0.023882057517766953,
-0.017707115039229393,
0.002573595382273197,
-0.03034006617963314,
-0.05314582958817482,
-0.025580095127224922,
-0.012458604760468006,
0.03729413449764252,
-0.08854309469461441,
-0.04138823598623276,
0.0020694425329566,
0.027824055403470993,
0.002028724644333124,
0.006127654574811459,
-0.03623930364847183,
0.012070835568010807,
-0.008671916089951992,
-0.04363232105970383,
-0.012586137279868126,
0.02818717062473297,
0.01162077859044075,
0.03602198511362076,
0.021863006055355072,
-0.056281764060258865,
0.03930943086743355,
0.029839174821972847,
0.045378778129816055,
0.0421314537525177,
-0.03562917560338974,
0.04411867633461952,
-0.019947022199630737,
0.052568819373846054,
-0.010682751424610615,
-0.026179123669862747,
-0.061035290360450745,
-0.07032051682472229,
-0.012219205498695374,
0.023977501317858696,
-0.007814042270183563,
0.00011198619176866487,
0.06401378661394119,
-0.04255516082048416,
-0.0033512969966977835,
-0.0025664223358035088,
0.04008149728178978,
0.03825421258807182,
-0.08517375588417053,
0.05479507893323898,
-0.0009831954957917333,
0.012544248253107071,
-0.03145129978656769,
0.006122859660536051,
-0.03681213781237602,
-0.029986215755343437,
0.02120806649327278,
0.060350529849529266,
0.0330222062766552,
0.0496072992682457,
0.07370495796203613,
0.00601945212110877,
-0.0492410808801651,
0.04129902273416519,
0.055185604840517044,
-0.005930464249104261,
-0.044544119387865067,
-0.011437707580626011,
0.008221657015383244,
-0.025042502209544182,
-0.028681624680757523,
-0.029544541612267494,
0.014642387628555298,
0.015402143821120262,
0.019781505689024925,
-0.000935434247367084,
0.01662287302315235,
-0.03340620547533035,
-0.03897060453891754,
-0.0650678351521492,
-0.028407253324985504,
-0.002857724204659462,
-0.028794897720217705,
0.027790645137429237,
0.04150348901748657,
0.004414368886500597,
0.06268905103206635,
0.03599371016025543,
-0.04800517484545708,
-0.036163393408060074,
0.020630046725273132,
0.043046798557043076,
-0.045596830546855927,
-0.06269103288650513,
-0.04218502342700958,
0.047048650681972504,
0.02925598807632923,
0.0008642795728519559,
-0.07921556383371353,
0.01779121160507202,
0.048632025718688965,
-0.024362029507756233,
0.06101475656032562,
-0.015082653611898422,
0.025747722014784813,
0.03342345356941223,
-0.025044430047273636,
0.02283506467938423,
-0.02174547128379345,
0.02736235409975052,
0.008359890431165695,
0.04408181831240654,
-0.0011895379284396768,
-0.03478009253740311,
-0.0539238341152668,
0.04683784022927284,
-0.01506564486771822,
0.04656583443284035,
0.03857257217168808,
0.0006464101024903357,
-0.06554695218801498,
0.011664661578834057,
0.03643849119544029,
-0.08381707221269608,
0.021098138764500618,
0.02243131399154663,
0.05084406957030296,
-0.06464634090662003,
-0.02968636527657509,
-0.020060904324054718,
-0.0029997918754816055,
0.01035342551767826,
-0.023631848394870758,
-0.055750712752342224,
-0.05094193294644356,
0.011189359240233898,
-0.026245446875691414,
-0.03523801639676094,
-0.09857553243637085,
0.013229475356638432,
-0.017757877707481384,
-0.024136338382959366,
0.05060001090168953,
0.03900732845067978,
0.012666771188378334,
0.04141486436128616,
-0.0016716275131329894,
0.014013686217367649,
-0.0469672717154026,
0.03352057933807373,
-0.020522374659776688,
0.004060766659677029,
0.004771220497786999,
-0.061002217233181,
0.004137291107326746,
-0.036548011004924774,
-0.010255067609250546,
-0.041770048439502716,
-0.01797414943575859,
0.00853155367076397,
-0.004883818328380585,
-0.003102959366515279,
-0.021199483424425125,
0.027166232466697693,
-0.03371759131550789,
-0.028853392228484154,
-0.02371140941977501,
-0.042070068418979645,
-0.05085621774196625,
-0.04281538724899292,
0.006527040619403124,
0.026202945038676262,
0.03556545451283455,
0.018686972558498383,
-0.0015033072559162974,
0.010090198367834091,
0.0007683348376303911,
-0.016940491273999214,
0.03806637227535248,
0.006894342601299286,
-0.03879030793905258,
-0.019027847796678543,
-0.012405958026647568,
0.0016850391402840614,
0.033006343990564346,
-0.030965052545070648,
0.03443370759487152,
0.020437130704522133,
-0.03885769844055176,
-0.0062576355412602425,
0.009810224175453186,
0.028151195496320724,
-0.04559585824608803,
-0.01778845302760601,
-0.014117250218987465,
-0.06767728179693222,
0.03382087126374245,
0.015339410863816738,
-0.029736515134572983,
0.030287232249975204,
-0.0071641309186816216,
0.04055922105908394,
0.009851725772023201,
-0.03445582464337349,
0.008521396666765213,
-0.041594646871089935,
0.028751704841852188,
-0.05220254883170128,
0.03189060464501381,
-0.024612843990325928,
0.02674071304500103,
-0.019436612725257874,
-0.04156104102730751,
-0.04903479665517807,
0.046520281583070755,
-0.021333225071430206,
-0.042415469884872437,
-0.003994383383542299,
0.020522670820355415,
-0.01444616261869669,
0.03948565572500229,
-0.016360338777303696,
0.014393985271453857,
-0.006636335048824549,
0.02122577466070652,
-0.024194050580263138,
0.009492956101894379,
-0.035201217979192734,
-0.029618050903081894,
-0.0338820219039917,
-0.03080962784588337,
-0.02210158109664917,
-0.061247073113918304,
0.049414604902267456,
0.031669341027736664,
0.029477957636117935,
0.03468838706612587,
-0.030823633074760437,
-0.0056035504676401615,
0.006436317227780819,
-0.03921835497021675,
-0.029803568497300148,
-0.04525003209710121,
0.008096521720290184,
-0.007534039206802845,
0.07009737193584442,
0.03681013360619545,
-0.039814479649066925,
-0.0614609457552433,
0.03451664000749588,
0.011277803219854832,
0.02365333028137684,
0.0099332919344306,
0.018963485956192017,
0.0402633436024189,
0.04850341007113457,
-0.033547207713127136,
-0.007398533169180155,
-0.01184680312871933,
-0.012120363302528858,
0.019906049594283104,
0.003182494780048728,
0.017571106553077698,
0.017031392082571983,
-0.036172498017549515,
-0.009791402146220207,
0.05260103940963745,
0.030187338590621948,
0.018240580335259438,
-0.0009424401796422899,
-0.021273983642458916,
0.02862320840358734,
0.01508201565593481,
-0.02505473606288433,
-0.01692473329603672,
0.029976291581988335,
-0.03750412166118622,
0.06877157837152481,
-0.02396603301167488,
0.013517829589545727,
0.06425865739583969,
0.02038143016397953,
-0.020999645814299583,
0.03079870715737343,
-0.023670217022299767,
-0.0007556899799965322,
0.03964681923389435,
-0.07421852648258209,
-0.006254422478377819,
-0.006231291219592094,
0.07609060406684875,
-0.06482210010290146,
0.039649248123168945,
0.04701616242527962,
0.03421138599514961,
0.02533385530114174,
-0.026450959965586662,
-0.03706887364387512,
0.018258145079016685,
-0.0165530014783144,
0.06626123934984207,
0.013774686492979527,
-0.061641234904527664,
0.07686358690261841,
0.010468441992998123,
-0.0765540674328804,
0.021152552217245102,
0.02922789752483368,
0.015860209241509438,
0.023918692022562027,
0.017126495018601418,
-0.0369148850440979,
0.02022813819348812,
-0.028267722576856613,
0.02898145653307438,
-0.04254297539591789,
-0.017761779949069023,
0.019261058419942856,
-0.061044204980134964,
0.012146035209298134,
0.03559951111674309,
-0.024150751531124115,
-0.007251034956425428,
0.015031002461910248,
-0.05900958180427551,
-0.04267193749547005,
0.0188593827188015,
0.025936564430594444,
-0.031444136053323746,
0.014085758477449417,
-0.05222015082836151,
0.042267780750989914,
0.024922974407672882,
-0.029032256454229355,
-0.05127991735935211,
-0.007710063364356756,
-0.0006819049594923854,
-0.05150388926267624,
-0.03608778864145279,
0.028639264404773712,
-0.004369052592664957,
-0.03794758394360542,
0.029809387400746346,
-0.010115214623510838,
-0.0047689336352050304,
0.054722897708415985,
0.012064851820468903,
0.032220568507909775,
-0.06540843844413757,
0.0018488673958927393,
0.025168316438794136,
0.010031912475824356,
0.027787884697318077,
-0.018952814862132072,
0.028639480471611023,
0.05152907595038414,
0.04656318575143814,
-0.010532080195844173,
-0.021747613325715065,
-0.005919941700994968,
0.025037648156285286,
-0.04010307788848877,
-0.004198964219540358,
0.0020103403367102146,
-0.038108643144369125,
-0.016478922218084335,
-0.05098779499530792,
-0.015350350178778172,
0.02850325033068657,
-0.03707941621541977,
-0.01711321249604225,
0.02884240448474884,
-0.018154509365558624,
-0.06831109523773193,
-0.07338713109493256,
-0.016964493319392204,
-0.03246641159057617,
0.05226661264896393,
0.011137017048895359,
-0.0349782295525074,
0.015734059736132622,
-0.0328323133289814,
-0.06453903019428253,
0.02545623853802681,
0.014138604514300823,
-0.021829010918736458,
0.06321673840284348,
0.0300944484770298,
-0.031886108219623566,
0.011718369089066982,
0.03368382155895233,
-0.05714895948767662,
0.03891443461179733,
0.03574839234352112,
0.04316778481006622,
0.016308525577187538,
0.02804378792643547,
-0.010453342460095882,
-0.0040364558808505535,
-0.04844222590327263,
-0.03659336268901825,
-0.029690496623516083,
-0.012957729399204254,
0.06296923756599426
] |
Chaewon/mmnt_decoder_en | [
"pytorch",
"gpt2",
"text-generation",
"transformers"
] | text-generation | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": true,
"max_length": 50
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 12 | 2021-04-16T09:03:33Z |
---
language: Deustch English
tags:
- translation Deustch English model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "Der zuständige Ausschuss wacht darüber, dass alle Angaben, die die Ausübung des Mandats eines Mitglieds bzw. die Rangfolge der Stellvertreter beeinflussen können, dem Parlament unverzüglich von den Behörden der Mitgliedstaaten und der Union - unter Angabe deren Wirksamwerdens im Falle einer Benennung - übermittelt werden."
---
# legal_t5_small_multitask_de_en model
Model on translating legal text from Deustch to English. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). The model is parallely trained on the three parallel corpus with 42 language pair
from jrc-acquis, europarl and dcep along with the unsupervised task where the model followed the task of prediction in a masked language model.
## Model description
No pretraining is involved in case of legal_t5_small_multitask_de_en model, rather the unsupervised task is added with all the translation task
to realize the multitask learning scenario.
## Intended uses & limitations
The model could be used for translation of legal texts from Deustch to English.
### How to use
Here is how to use this model to translate legal text from Deustch to English in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_multitask_de_en"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_multitask_de_en", do_lower_case=False,
skip_special_tokens=True),
device=0
)
de_text = "Der zuständige Ausschuss wacht darüber, dass alle Angaben, die die Ausübung des Mandats eines Mitglieds bzw. die Rangfolge der Stellvertreter beeinflussen können, dem Parlament unverzüglich von den Behörden der Mitgliedstaaten und der Union - unter Angabe deren Wirksamwerdens im Falle einer Benennung - übermittelt werden."
pipeline([de_text], max_length=512)
```
## Training data
The legal_t5_small_multitask_de_en model (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 9 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_multitask_de_en | 42.437|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.010131794959306717,
-0.03640354424715042,
-0.014028254896402359,
0.07246121019124985,
0.04880663752555847,
0.03276781737804413,
-0.00876772589981556,
-0.031727440655231476,
-0.04600147157907486,
0.07089060544967651,
0.03562428057193756,
-0.004472074564546347,
-0.013950937427580357,
0.04462575912475586,
-0.04729829728603363,
-0.05954236537218094,
0.010874961502850056,
-0.007625129073858261,
-0.027096517384052277,
-0.013679716736078262,
-0.005261961370706558,
0.004296331200748682,
0.01057614665478468,
0.011343414895236492,
0.002878653584048152,
0.004754252731800079,
0.013473143801093102,
0.06287239491939545,
-0.00023117083765100688,
-0.07288819551467896,
-0.017025252804160118,
-0.008864888921380043,
-0.02896290458738804,
-0.017301147803664207,
-0.011842532083392143,
-0.006294340826570988,
0.009247751906514168,
0.016130750998854637,
0.04219465330243111,
0.05738448724150658,
-0.021349066868424416,
0.003462766297161579,
-0.020493462681770325,
-0.051837414503097534,
0.04985010251402855,
0.012418515980243683,
-0.052732616662979126,
-0.014593394473195076,
0.03185237571597099,
-0.009762988425791264,
-0.04066130146384239,
-0.07588672637939453,
-0.021780751645565033,
0.031238872557878494,
0.00013174189371056855,
-0.0163734070956707,
-0.08992551267147064,
-0.02249140851199627,
0.03209904208779335,
-0.04226866737008095,
-0.04842650145292282,
0.01956513524055481,
-0.060507435351610184,
0.009701898321509361,
0.03370857611298561,
-0.03418982774019241,
-0.00958426296710968,
-0.04334256425499916,
0.032397907227277756,
-0.017169039696455002,
0.060827840119600296,
-0.037091128528118134,
0.02234829217195511,
-0.08833310753107071,
-0.015424552373588085,
-0.013709543272852898,
0.010506942868232727,
0.023020267486572266,
-0.03206021711230278,
0.02111419104039669,
0.025280198082327843,
-0.023141970857977867,
0.026944272220134735,
-0.02578337863087654,
-0.025901855900883675,
0.06149875000119209,
-0.020959746092557907,
-0.03383992612361908,
0.005026943050324917,
0.05152200534939766,
-0.05322282016277313,
-0.031584542244672775,
-0.01685459166765213,
-0.025081338360905647,
-0.018149549141526222,
0.016925625503063202,
0.027355629950761795,
-0.005338658578693867,
0.02365696243941784,
0.0236273892223835,
0.02351687289774418,
0.0322326198220253,
-0.009977305307984352,
0.04466024413704872,
-0.021558480337262154,
-0.015851758420467377,
-0.004114166833460331,
-0.05433479696512222,
-0.04460505023598671,
0.03555057942867279,
0.003062635660171509,
-0.045505672693252563,
-0.04206795617938042,
0.06041321903467178,
0.026150265708565712,
-0.01125406939536333,
0.042086776345968246,
-0.031159890815615654,
-0.02930605039000511,
-0.045423563569784164,
0.028566988185048103,
0.002661167411133647,
-0.0008100472623482347,
0.03732549399137497,
-0.058366838842630386,
0.02075284905731678,
-0.04349708557128906,
-0.060288358479738235,
-0.002802911913022399,
0.014084174297749996,
-0.03753768280148506,
0.053981516510248184,
0.017063919454813004,
-0.04846681281924248,
0.03255512937903404,
0.004565408453345299,
-0.07262244820594788,
0.05696224048733711,
0.04855978488922119,
0.10589183121919632,
-0.04534051567316055,
-0.03919997066259384,
0.016813166439533234,
0.010337168350815773,
-0.007872908376157284,
0.01887623965740204,
-0.0006384513690136373,
-0.031418610364198685,
-0.015669329091906548,
-0.006808678153902292,
0.070890873670578,
-0.05515725165605545,
-0.00641808332875371,
0.03315984830260277,
-0.008473630994558334,
0.020983751863241196,
-0.028989581391215324,
-0.0005696580046787858,
0.016059977933764458,
-0.012538891285657883,
-0.049458108842372894,
0.027959898114204407,
-0.005713118240237236,
-0.025731323286890984,
-0.05635853111743927,
-0.05499883368611336,
-0.006900661624968052,
0.07173671573400497,
-0.009301715530455112,
-0.007588420528918505,
-0.012791509740054607,
0.00406267587095499,
0.07709019631147385,
0.023954203352332115,
-0.018313491716980934,
0.04062323644757271,
0.05312928929924965,
0.06139368936419487,
-0.00533642340451479,
0.08374105393886566,
0.03866961598396301,
-0.03773387894034386,
-0.016060225665569305,
0.007911281660199165,
-0.01929885894060135,
-0.025923237204551697,
-0.007109380792826414,
0.05474609136581421,
-0.004956788383424282,
-0.008423453196883202,
-0.016101626679301262,
0.05290823057293892,
-0.015503830276429653,
-0.006319220177829266,
-0.008920354768633842,
0.0010951865697279572,
-0.003601278644055128,
0.02736237458884716,
-0.017882108688354492,
-0.0017117219977080822,
-0.002159644151106477,
-0.01688559725880623,
0.013080836273729801,
0.04715855419635773,
0.03767320513725281,
0.04045954346656799,
-0.0029713220428675413,
0.10586114972829819,
-0.020300833508372307,
0.02070271223783493,
-0.0384659543633461,
-0.04184374585747719,
0.01782119646668434,
0.04732346534729004,
0.03067898377776146,
0.04156322777271271,
-0.0030013073701411486,
-0.05065314099192619,
0.013527343049645424,
0.07581725716590881,
0.05314575880765915,
0.014636860229074955,
-0.032524943351745605,
-0.01731901615858078,
0.04712262004613876,
0.07278599590063095,
-0.0413193479180336,
-0.04685713350772858,
0.019452206790447235,
0.0794263482093811,
-0.01643216423690319,
-0.002253951271995902,
-0.017219509929418564,
0.013345751911401749,
-0.047697391360998154,
-0.06545000523328781,
0.04553709179162979,
0.011026388965547085,
-0.0041848705150187016,
0.014697403647005558,
0.02845679596066475,
0.0054058837704360485,
0.012951099313795567,
-0.0026117090601474047,
0.010533517226576805,
-0.05151243507862091,
-0.010873504914343357,
0.010046148672699928,
0.04000747576355934,
-0.046870145946741104,
0.03738173842430115,
-0.001983405090868473,
-0.013574977405369282,
0.06900744140148163,
-0.055259786546230316,
0.03798345848917961,
0.025341568514704704,
0.018026014789938927,
-0.029497530311346054,
0.023233212530612946,
0.010750632733106613,
0.03224789351224899,
0.07011228799819946,
-0.0021124565973877907,
0.06862713396549225,
0.0023659172002226114,
0.048223402351140976,
0.061401769518852234,
0.029859444126486778,
0.017360854893922806,
0.019660605117678642,
0.06189204379916191,
0.014835861511528492,
-0.007669471204280853,
0.06611011177301407,
-0.05352942645549774,
0.018977802246809006,
-0.05000941827893257,
0.007407725788652897,
0.0025133024901151657,
-0.007158895488828421,
0.023727670311927795,
0.0041448925621807575,
-0.01217208057641983,
0.031085124239325523,
-0.019807394593954086,
-0.0418291911482811,
0.047451701015233994,
0.0015220690984278917,
0.006095698103308678,
-0.017139120027422905,
-0.04667486622929573,
0.029587628319859505,
-0.06684009730815887,
-0.04026578739285469,
-0.0074413614347577095,
-0.03154047951102257,
0.00496789813041687,
-0.05399259179830551,
-0.035820040851831436,
-0.03442735970020294,
-0.007531631272286177,
0.054752182215452194,
0.008532354608178139,
-0.0022773444652557373,
-0.03421388193964958,
0.024944180622696877,
-0.033417973667383194,
-0.010197906754910946,
-0.05604953691363335,
-0.06234821677207947,
-0.04611266404390335,
-0.08609126508235931,
0.03313155099749565,
0.0015358251985162497,
0.007782884407788515,
0.004778217989951372,
0.015187458135187626,
-0.008156685158610344,
-0.029242288321256638,
0.04557563364505768,
0.03352780640125275,
-0.020107030868530273,
-0.01733473129570484,
0.02790658175945282,
-0.020082324743270874,
0.009379339404404163,
-0.010687568224966526,
-0.02368362993001938,
0.10037116706371307,
0.061433494091033936,
0.020872041583061218,
0.01865297742187977,
-0.024196671321988106,
-0.043265677988529205,
-0.06940115988254547,
-0.023582136258482933,
-0.03493993356823921,
0.0046807206235826015,
-0.017897233366966248,
-0.04202102869749069,
-0.046072378754615784,
-0.034556541591882706,
0.0031391100492328405,
-0.00803710613399744,
0.025891635566949844,
0.029201889410614967,
0.04062172397971153,
0.04831624776124954,
0.02341700904071331,
-0.0584951750934124,
-0.001111889025196433,
0.08207997679710388,
0.015514997765421867,
0.021516019478440285,
-0.07361376285552979,
-0.0406038872897625,
0.044377345591783524,
0.054798293858766556,
-0.010733549483120441,
0.002295035170391202,
0.09253300726413727,
0.016948262229561806,
-0.011264478787779808,
0.03043314442038536,
-0.02142351120710373,
-0.0261397585272789,
-0.0017053295159712434,
0.010586011223495007,
-0.032862864434719086,
-0.04776890203356743,
-0.038892198354005814,
-0.0009617208852432668,
0.029436346143484116,
-0.06667482107877731,
-0.04793260991573334,
-0.0116066113114357,
0.032338544726371765,
0.017345787957310677,
0.0023756620939821005,
-0.03632766753435135,
0.012864669784903526,
-0.027960598468780518,
-0.046793267130851746,
-0.0005550435744225979,
0.016831068322062492,
0.02161506377160549,
0.026582445949316025,
0.01943422295153141,
-0.046142540872097015,
0.040598589926958084,
0.022027194499969482,
0.053191136568784714,
0.037809379398822784,
-0.03398614376783371,
0.033371347934007645,
-0.016790851950645447,
0.028070956468582153,
-0.011902092956006527,
-0.02776450477540493,
-0.050397343933582306,
-0.08201051503419876,
-0.007394627667963505,
0.021685084328055382,
-0.014926623553037643,
0.0005137264379300177,
0.06120206415653229,
-0.030763700604438782,
-0.012022818438708782,
-0.0024009435437619686,
0.03806179761886597,
0.037236034870147705,
-0.06752309203147888,
0.046672478318214417,
-0.003696679137647152,
0.018317313864827156,
-0.05170183256268501,
0.014389904215931892,
-0.028263511136174202,
-0.0196366086602211,
0.008086087182164192,
0.06487621366977692,
0.021294599398970604,
0.044598162174224854,
0.09033598750829697,
0.023887265473604202,
-0.0559331439435482,
0.029856108129024506,
0.05936574563384056,
-0.00618848716840148,
-0.044507090002298355,
-0.00529526500031352,
-0.002636746736243367,
-0.03424181416630745,
-0.019636178389191628,
-0.03315648436546326,
0.02551211789250374,
0.017497027292847633,
0.017426619306206703,
-0.011730971746146679,
0.011191628873348236,
-0.022961493581533432,
-0.030583815649151802,
-0.04863828420639038,
-0.026420703157782555,
0.0023792001884430647,
-0.028018265962600708,
0.02455420419573784,
0.0271792970597744,
0.003949029371142387,
0.06723904609680176,
0.04256685823202133,
-0.04162171110510826,
-0.029731962829828262,
0.014906184747815132,
0.040502674877643585,
-0.0434735044836998,
-0.05295960232615471,
-0.04392489790916443,
0.05123434215784073,
0.03732442855834961,
-0.01215504389256239,
-0.08625292778015137,
-0.002777415793389082,
0.04842042177915573,
-0.01825724169611931,
0.06259755045175552,
-0.019651727750897408,
0.014423596672713757,
0.050645921379327774,
-0.025939762592315674,
0.019242463633418083,
-0.02662743255496025,
0.03242455795407295,
0.010002373717725277,
0.04485694691538811,
-0.011532764881849289,
-0.0442776121199131,
-0.04747597128152847,
0.037434402853250504,
0.006592338904738426,
0.06344019621610641,
0.05254938453435898,
-0.011383726261556149,
-0.054963141679763794,
0.026147406548261642,
0.03407316282391548,
-0.06545716524124146,
0.02477324567735195,
0.023476077243685722,
0.053826864808797836,
-0.05540190264582634,
-0.019948063418269157,
-0.03906671702861786,
0.00693814642727375,
0.025998486205935478,
-0.007084201090037823,
-0.04195018857717514,
-0.05880102515220642,
0.006196729373186827,
-0.031306300312280655,
-0.027840012684464455,
-0.09478949755430222,
0.029194751754403114,
-0.00657635647803545,
-0.02113034762442112,
0.06386163085699081,
0.03324684873223305,
0.03465310111641884,
0.04097920283675194,
-0.012057732790708542,
0.02821398712694645,
-0.050898727029561996,
0.03896214812994003,
-0.03149775043129921,
0.015752291306853294,
-0.003053640481084585,
-0.04081377014517784,
-0.005879687145352364,
-0.030672386288642883,
-0.02419755607843399,
-0.059925295412540436,
-0.02339320443570614,
0.005312818102538586,
-0.017673175781965256,
0.01642496883869171,
-0.014830824919044971,
0.02784871496260166,
-0.02356898970901966,
-0.026869742199778557,
-0.021609561517834663,
-0.037626709789037704,
-0.08147680014371872,
-0.045596685260534286,
0.003772156313061714,
0.025504644960165024,
0.03328466787934303,
0.02012242190539837,
-0.006200036033987999,
0.023536372929811478,
0.00940470490604639,
-0.018858570605516434,
0.024895187467336655,
-0.008461273275315762,
-0.03773145377635956,
-0.013370615430176258,
0.007657260168343782,
-0.009176941588521004,
0.02809923142194748,
-0.02964106760919094,
0.042510028928518295,
0.018944943323731422,
-0.011112737469375134,
0.008824430406093597,
0.005638231057673693,
0.030735189095139503,
-0.06888606399297714,
-0.025329461321234703,
-0.02266506664454937,
-0.06938434392213821,
0.02668546885251999,
0.005197006743401289,
-0.03303827717900276,
0.022179558873176575,
0.0019846600480377674,
0.029630053788423538,
0.003949759993702173,
-0.03803027421236038,
0.010558431036770344,
-0.03368767350912094,
0.02045697160065174,
-0.05026223510503769,
0.03872723877429962,
-0.03573041409254074,
0.020640602335333824,
-0.010613675229251385,
-0.028316786512732506,
-0.042402442544698715,
0.057838693261146545,
-0.03234846144914627,
-0.047167759388685226,
-0.021301181986927986,
-0.0033851966727524996,
-0.010655278339982033,
0.027000684291124344,
-0.03846176341176033,
0.010115213692188263,
0.000916598248295486,
0.02144775725901127,
-0.038306280970573425,
0.0040656328201293945,
-0.03492654114961624,
-0.015092866495251656,
-0.018645023927092552,
-0.02971176989376545,
-0.01661815494298935,
-0.04879157617688179,
0.045069508254528046,
0.045044757425785065,
0.02415734902024269,
0.01875290274620056,
-0.029310153797268867,
-0.004321207758039236,
0.018347525969147682,
-0.05311058461666107,
-0.024538980796933174,
-0.04539060592651367,
-0.008247016929090023,
-0.007299539167433977,
0.06610783189535141,
0.03291843831539154,
-0.029000839218497276,
-0.056621797382831573,
0.049213942140340805,
0.021766094490885735,
0.011371280066668987,
0.006135775242000818,
0.025315171107649803,
0.007499236147850752,
0.04067187011241913,
-0.03804421424865723,
-0.013748093508183956,
0.0020622024312615395,
-0.016635119915008545,
0.018560433760285378,
0.010568507015705109,
0.019071709364652634,
0.009108427911996841,
-0.03367188572883606,
-0.007423445116728544,
0.049884628504514694,
0.028751732781529427,
0.02072450891137123,
-0.0030990727245807648,
-0.015598331578075886,
0.025291943922638893,
0.019288023933768272,
-0.02707100473344326,
-0.020514164119958878,
0.024989450350403786,
-0.047827862203121185,
0.07641048729419708,
-0.019910898059606552,
-0.008732104673981667,
0.06752587109804153,
0.027184506878256798,
0.0009832049254328012,
0.03953167796134949,
-0.03199475258588791,
0.015403415076434612,
0.049713753163814545,
-0.08107935637235641,
-0.008581741712987423,
0.00443542655557394,
0.08318506181240082,
-0.05235077440738678,
0.04984882101416588,
0.033860355615615845,
0.04543996974825859,
0.019881661981344223,
-0.03946254029870033,
-0.0424649678170681,
0.016503212973475456,
-0.029203953221440315,
0.0659869834780693,
0.012998375110328197,
-0.06276659667491913,
0.08837682008743286,
0.02449587918817997,
-0.06998050957918167,
0.016947221010923386,
0.039631377905607224,
0.03586876764893532,
0.02023213542997837,
0.03442510962486267,
-0.04386832192540169,
0.012235598638653755,
-0.05015087500214577,
0.006626896560192108,
-0.05887496843934059,
-0.01013607531785965,
-0.006100344005972147,
-0.05153347924351692,
0.007519825827330351,
0.01635250449180603,
-0.007604524027556181,
-0.007758840452879667,
0.014732049778103828,
-0.05573544278740883,
-0.037604570388793945,
0.005433469079434872,
0.011594888754189014,
-0.027981653809547424,
0.03205301985144615,
-0.04599437862634659,
0.04603801667690277,
0.010876322165131569,
-0.018770229071378708,
-0.02479400672018528,
-0.0019516815664246678,
0.015726212412118912,
-0.04622325301170349,
-0.050750911235809326,
0.021183766424655914,
0.017202308401465416,
-0.0368473045527935,
0.04570106044411659,
-0.026082098484039307,
0.004137369338423014,
0.04090549051761627,
0.017530927434563637,
0.04360067471861839,
-0.06479552388191223,
0.010002360679209232,
0.012881061062216759,
0.022629955783486366,
0.025466570630669594,
-0.0208724495023489,
0.045024942606687546,
0.039366066455841064,
0.04341886192560196,
-0.015517518855631351,
-0.02132280543446541,
-0.013031469658017159,
0.03037548065185547,
-0.030708972364664078,
-0.006054771598428488,
-0.003194423858076334,
-0.02615196816623211,
-0.013462597504258156,
-0.05165072903037071,
-0.022134503349661827,
0.026814863085746765,
-0.06289636343717575,
-0.014603137969970703,
0.04297146946191788,
-0.007307945750653744,
-0.05250529199838638,
-0.08732923865318298,
-0.011135411448776722,
-0.0272191371768713,
0.05394534766674042,
0.007527443580329418,
-0.0467480905354023,
0.019328488036990166,
-0.02701663039624691,
-0.058291420340538025,
0.022314250469207764,
0.023087820038199425,
-0.02828030288219452,
0.060518547892570496,
0.03586608171463013,
-0.03945870324969292,
0.008913968689739704,
0.02230100706219673,
-0.05522504076361656,
0.04791713505983353,
0.04177077114582062,
0.013898544944822788,
0.002776936162263155,
0.026874413713812828,
-0.02504238486289978,
-0.026542656123638153,
-0.06396375596523285,
-0.037986304610967636,
-0.025132998824119568,
-0.01695295050740242,
0.06429435312747955
] |
Champion/test_upload_vox2_wavlm_epoch8 | [
"sidekit",
"audio"
] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | 2021-04-16T09:43:14Z |
---
language: Spanish English
tags:
- translation Spanish English model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "PPE-DE: 6', PSE: 6', ALDE: 5', Verts/ALE: 4', GUE/NGL: 4', IND/DEM:4', UEN: 4', NI: 4'"
---
# legal_t5_small_multitask_es_en model
Model on translating legal text from Spanish to English. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). The model is parallely trained on the three parallel corpus with 42 language pair
from jrc-acquis, europarl and dcep along with the unsupervised task where the model followed the task of prediction in a masked language model.
## Model description
No pretraining is involved in case of legal_t5_small_multitask_es_en model, rather the unsupervised task is added with all the translation task
to realize the multitask learning scenario.
## Intended uses & limitations
The model could be used for translation of legal texts from Spanish to English.
### How to use
Here is how to use this model to translate legal text from Spanish to English in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_multitask_es_en"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_multitask_es_en", do_lower_case=False,
skip_special_tokens=True),
device=0
)
es_text = "PPE-DE: 6', PSE: 6', ALDE: 5', Verts/ALE: 4', GUE/NGL: 4', IND/DEM:4', UEN: 4', NI: 4'"
pipeline([es_text], max_length=512)
```
## Training data
The legal_t5_small_multitask_es_en model (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 9 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_multitask_es_en | 36.607|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.012681813910603523,
-0.03506694361567497,
-0.0066857486963272095,
0.07436971366405487,
0.044979508966207504,
0.024506613612174988,
-0.012411732226610184,
-0.02030906267464161,
-0.02725241519510746,
0.06493735313415527,
0.02561287395656109,
-0.006601712666451931,
-0.013399036601185799,
0.05019386112689972,
-0.04784715548157692,
-0.04264121875166893,
0.005587802734225988,
-0.011395525187253952,
-0.036674078553915024,
-0.01547246240079403,
-0.003272511065006256,
0.002138841664418578,
0.010334144346415997,
0.0027377197984606028,
-0.0028159136418253183,
0.008541004732251167,
0.023497967049479485,
0.04379890486598015,
0.0024055340327322483,
-0.06478247791528702,
-0.021898720413446426,
-0.014081760309636593,
-0.03029463440179825,
-0.029822681099176407,
-0.016934558749198914,
-0.0025752615183591843,
0.011049146763980389,
0.018498556688427925,
0.03523492068052292,
0.04613726958632469,
-0.021665269508957863,
0.008343065157532692,
-0.008294528350234032,
-0.05458979681134224,
0.03918125480413437,
0.015611829236149788,
-0.0505085214972496,
-0.013890661299228668,
0.03290494531393051,
-0.0025032334960997105,
-0.050916582345962524,
-0.08432779461145401,
-0.03238203004002571,
0.03461533784866333,
-0.005513249896466732,
-0.022859230637550354,
-0.08634763956069946,
-0.022294387221336365,
0.04211055114865303,
-0.03200286999344826,
-0.0520312525331974,
0.02259671315550804,
-0.06569956988096237,
0.0010652118362486362,
0.0361185185611248,
-0.02927398309111595,
0.0031277784146368504,
-0.03645908087491989,
0.04577194154262543,
-0.02500525303184986,
0.06296664476394653,
-0.04135973006486893,
0.02083820290863514,
-0.09560251981019974,
-0.018697630614042282,
-0.016707301139831543,
0.007805353030562401,
0.011192123405635357,
-0.04085046425461769,
0.02149006724357605,
0.03420080244541168,
-0.008988396264612675,
0.03532315790653229,
-0.019884005188941956,
-0.023635830730199814,
0.05559192970395088,
-0.029545268043875694,
-0.03282136842608452,
0.017548784613609314,
0.048707764595746994,
-0.039074551314115524,
-0.02621304616332054,
-0.007587290368974209,
-0.025030916556715965,
-0.006803011521697044,
0.02093813754618168,
0.03615571931004524,
-0.01116152573376894,
0.04639369994401932,
0.01424331497400999,
0.030211549252271652,
0.030497103929519653,
-0.017779001966118813,
0.0499265193939209,
-0.03317296504974365,
-0.02235950157046318,
-0.004191279411315918,
-0.05396852269768715,
-0.03433633968234062,
0.034071408212184906,
0.010800846852362156,
-0.03720298781991005,
-0.05189048498868942,
0.07100860029459,
0.02047988586127758,
-0.018251799046993256,
0.04965959116816521,
-0.028421713039278984,
-0.038934919983148575,
-0.04206514358520508,
0.04504246264696121,
0.011010133661329746,
0.011690403334796429,
0.033579546958208084,
-0.05667292699217796,
0.009205085225403309,
-0.02179553546011448,
-0.041202396154403687,
-0.00003308660234324634,
0.012899103574454784,
-0.03623479977250099,
0.05064891278743744,
0.007626738864928484,
-0.050458818674087524,
0.027501611039042473,
0.010255222208797932,
-0.0758911669254303,
0.047509483993053436,
0.0475689172744751,
0.0967983677983284,
-0.052590083330869675,
-0.03432004526257515,
0.011540438048541546,
0.009985068812966347,
-0.006502151023596525,
0.006171080283820629,
-0.0034352170769125223,
-0.052741263061761856,
-0.026469415053725243,
-0.009548560716211796,
0.0771869346499443,
-0.05410080775618553,
-0.0031139147467911243,
0.0339776948094368,
-0.013450609520077705,
0.020125702023506165,
-0.035571761429309845,
0.004803264047950506,
0.0167197547852993,
-0.015681713819503784,
-0.04640524089336395,
0.02470950409770012,
-0.006904602516442537,
-0.03129572048783302,
-0.06656521558761597,
-0.04003792628645897,
-0.00948135182261467,
0.06843298673629761,
0.0024487883783876896,
-0.014037142507731915,
-0.011670088395476341,
0.010826785117387772,
0.06262122094631195,
0.010954732075333595,
-0.017840633168816566,
0.04234757274389267,
0.06054607778787613,
0.05933848395943642,
-0.005442566704005003,
0.08008260279893875,
0.044409845024347305,
-0.036108117550611496,
-0.026711123064160347,
-0.003353551961481571,
-0.010930546559393406,
-0.016481857746839523,
-0.0010862593771889806,
0.05272677168250084,
-0.009879130870103836,
-0.007288628723472357,
-0.018880832940340042,
0.0621618926525116,
-0.018217355012893677,
-0.0020995044615119696,
-0.01873072423040867,
0.001070785103365779,
-0.013666604645550251,
0.034887172281742096,
-0.0301973856985569,
0.002917362842708826,
-0.003975037019699812,
-0.01638738624751568,
-0.0018356041982769966,
0.05171983689069748,
0.021509934216737747,
0.037529561668634415,
0.005021341610699892,
0.09289459884166718,
-0.020358914509415627,
0.024003004655241966,
-0.04097329080104828,
-0.04697950929403305,
0.012560239993035793,
0.048831094056367874,
0.016496937721967697,
0.04277173429727554,
0.002117452211678028,
-0.049722690135240555,
0.011805474758148193,
0.07751460373401642,
0.04554776847362518,
0.018595002591609955,
-0.04397156089544296,
-0.009314454160630703,
0.05813242495059967,
0.07271909713745117,
-0.045484110713005066,
-0.037981171160936356,
0.022783540189266205,
0.07691016048192978,
-0.018877651542425156,
0.002756312023848295,
-0.018475167453289032,
0.016728665679693222,
-0.049103885889053345,
-0.07676492631435394,
0.03708111122250557,
0.015743069350719452,
-0.013662291690707207,
0.010081230662763119,
0.02326829731464386,
0.005844333209097385,
0.021228250116109848,
-0.0116640729829669,
0.012059228494763374,
-0.0551077239215374,
-0.0007707622717134655,
0.00869531650096178,
0.04497937858104706,
-0.05198545753955841,
0.038519151508808136,
-0.005341006442904472,
-0.00895917322486639,
0.0764443576335907,
-0.04748661443591118,
0.035431258380413055,
0.029328905045986176,
0.01660238206386566,
-0.02440381795167923,
0.020502377301454544,
0.006298674736171961,
0.03492164984345436,
0.06694551557302475,
0.004213945008814335,
0.06665091216564178,
-0.004393594339489937,
0.04257744923233986,
0.058191318064928055,
0.023741332814097404,
0.004117403645068407,
0.030036142095923424,
0.07006912678480148,
0.011964002624154091,
-0.006207325495779514,
0.061790913343429565,
-0.05242544785141945,
0.01263529621064663,
-0.041311755776405334,
0.010644634254276752,
0.006952227093279362,
-0.009517834521830082,
0.037942271679639816,
0.005497245583683252,
-0.023490488529205322,
0.027102932333946228,
-0.01879262365400791,
-0.04142315313220024,
0.04633474722504616,
-0.0020843164529651403,
-0.0012193119619041681,
-0.021188750863075256,
-0.033782560378313065,
0.019377609714865685,
-0.062109384685754776,
-0.04104556143283844,
-0.004786135163158178,
-0.033593907952308655,
-0.010623645968735218,
-0.04705435037612915,
-0.028310256078839302,
-0.039287980645895004,
-0.0116474824026227,
0.05083678290247917,
0.01356528326869011,
0.007635246962308884,
-0.036108098924160004,
0.012743447907269001,
-0.03574564680457115,
-0.01112440973520279,
-0.046351250261068344,
-0.06513183563947678,
-0.03358937427401543,
-0.08765677362680435,
0.023715633898973465,
0.001245184219442308,
0.01683693751692772,
0.01635725423693657,
0.012813931331038475,
0.004529846366494894,
-0.03797208517789841,
0.048841871321201324,
0.038563236594200134,
-0.0020100418478250504,
-0.024316685274243355,
0.026309503242373466,
-0.014166676439344883,
0.02584090828895569,
-0.01743282563984394,
-0.02310330420732498,
0.08514297008514404,
0.05836701765656471,
0.04386109858751297,
0.01978197693824768,
-0.030895454809069633,
-0.037256497889757156,
-0.06278058141469955,
-0.03610876202583313,
-0.040313951671123505,
0.0002776773471850902,
-0.014852271415293217,
-0.05130835622549057,
-0.029126150533556938,
-0.04551215469837189,
-0.0015120269963517785,
-0.000046974924771348014,
0.028599098324775696,
0.04753367230296135,
0.046273306012153625,
0.05675601214170456,
0.02627279795706272,
-0.0638851597905159,
0.0031613116152584553,
0.07787182182073593,
0.0211474671959877,
0.01760854944586754,
-0.0729767382144928,
-0.037741515785455704,
0.04402507096529007,
0.046966809779405594,
-0.009869609959423542,
-0.0033558588474988937,
0.0933401882648468,
0.01649259403347969,
-0.013349263928830624,
0.04785189777612686,
-0.013726593926548958,
-0.03545293211936951,
-0.012380444444715977,
0.015426881611347198,
-0.03968149051070213,
-0.04816816747188568,
-0.031587909907102585,
-0.013239903375506401,
0.03931935131549835,
-0.0797593966126442,
-0.04461786150932312,
-0.0123512614518404,
0.026007333770394325,
0.012326271273195744,
-0.0011520128464326262,
-0.03883223235607147,
0.0056436434388160706,
-0.04166721552610397,
-0.04086202755570412,
0.0022508471738547087,
0.007088148966431618,
0.014419385232031345,
0.04131238907575607,
0.021968383342027664,
-0.057555191218853,
0.04054425284266472,
0.023502063006162643,
0.05317258834838867,
0.0405820868909359,
-0.038319170475006104,
0.035371486097574234,
-0.016387149691581726,
0.021048394963145256,
-0.007174912374466658,
-0.0196298286318779,
-0.05561970919370651,
-0.07820075005292892,
0.0012085916241630912,
0.008310954086482525,
-0.010185092687606812,
-0.006215312983840704,
0.058080919086933136,
-0.03460220620036125,
0.0018937850836664438,
0.005994249600917101,
0.027584126219153404,
0.03485901653766632,
-0.08033351600170135,
0.05974649637937546,
-0.005927677266299725,
0.018195878714323044,
-0.03397412225604057,
0.01675862818956375,
-0.02423645742237568,
-0.019819868728518486,
0.0007088184356689453,
0.06018655374646187,
0.03202394023537636,
0.04633934795856476,
0.07444274425506592,
0.025377891957759857,
-0.05178922787308693,
0.03179193288087845,
0.05266507714986801,
-0.020273923873901367,
-0.05311283469200134,
-0.00549812987446785,
-0.0034140003845095634,
-0.037315674126148224,
-0.010020285844802856,
-0.03244905546307564,
0.025008421391248703,
0.029788119718432426,
0.014563367702066898,
-0.01758875511586666,
-0.00040003625326789916,
-0.023395845666527748,
-0.033491555601358414,
-0.04552368074655533,
-0.01665804162621498,
-0.011672715656459332,
-0.021983200684189796,
0.02288442850112915,
0.022541023790836334,
0.0020265537314116955,
0.06624318659305573,
0.058178119361400604,
-0.026152152568101883,
-0.025086086243391037,
0.017852699384093285,
0.036746490746736526,
-0.03815905377268791,
-0.05610160902142525,
-0.04489920288324356,
0.053057000041007996,
0.02821497805416584,
-0.0003184331289958209,
-0.08540082722902298,
-0.005528593435883522,
0.04217146337032318,
-0.02127465233206749,
0.056866858154535294,
-0.017698271200060844,
0.011862395331263542,
0.036375992000103,
-0.025816865265369415,
0.023411056026816368,
-0.03255695849657059,
0.025263799354434013,
-0.0010140030644834042,
0.0371638648211956,
-0.0036909470800310373,
-0.048261821269989014,
-0.06258057802915573,
0.04307613521814346,
-0.0033498152624815702,
0.06339811533689499,
0.042944297194480896,
-0.007958880625665188,
-0.06678193807601929,
0.016396868973970413,
0.044481486082077026,
-0.06317251175642014,
0.006787200458347797,
0.02800256572663784,
0.0533941388130188,
-0.057618655264377594,
-0.02673695795238018,
-0.019399898126721382,
0.007694740314036608,
0.025352830067276955,
-0.0053736623376607895,
-0.0393875315785408,
-0.04467957839369774,
0.004064891487360001,
-0.0241562407463789,
-0.030789149925112724,
-0.09364333748817444,
0.03492977097630501,
-0.016253940761089325,
-0.017475267872214317,
0.05192238464951515,
0.04491940513253212,
0.02211853116750717,
0.045048195868730545,
-0.002149991225451231,
0.029527589678764343,
-0.054052624851465225,
0.040400657802820206,
-0.026959523558616638,
0.013319183140993118,
0.001000859891064465,
-0.054144833236932755,
0.0005779355997219682,
-0.04529859870672226,
-0.011389442719519138,
-0.04904293641448021,
-0.012106841430068016,
0.010223939083516598,
-0.008680399507284164,
0.02072775550186634,
-0.01839243620634079,
0.032289888709783554,
-0.01786574348807335,
-0.025908615440130234,
-0.015733525156974792,
-0.04543495923280716,
-0.0753743126988411,
-0.050033457577228546,
0.01255318894982338,
0.020729929208755493,
0.04185158759355545,
0.014941023662686348,
0.0011474199127405882,
0.017293564975261688,
0.006263135466724634,
-0.020440520718693733,
0.023900719359517097,
-0.0045811026357114315,
-0.0318278893828392,
-0.016269762068986893,
-0.005829899106174707,
0.008317251689732075,
0.026748348027467728,
-0.025495104491710663,
0.03664886951446533,
0.016639523208141327,
-0.010327775031328201,
0.005529447924345732,
0.00888111349195242,
0.028249574825167656,
-0.06575895845890045,
-0.011699777096509933,
-0.021558379754424095,
-0.06753940135240555,
0.028147416189312935,
0.010626962408423424,
-0.02406691573560238,
0.01920166425406933,
-0.0017620185390114784,
0.04355954751372337,
0.004507711622864008,
-0.0374666303396225,
-0.006426248233765364,
-0.02220267616212368,
0.01635248027741909,
-0.05510515719652176,
0.05519530549645424,
-0.03856465592980385,
0.022205013781785965,
-0.014335287734866142,
-0.03706220164895058,
-0.03762896731495857,
0.05880437418818474,
-0.02846212312579155,
-0.05493047460913658,
-0.02338455244898796,
0.010900139808654785,
-0.006069334223866463,
0.03155387192964554,
-0.040220897644758224,
0.008533413521945477,
-0.0040774280205369,
0.03035612776875496,
-0.03535349667072296,
0.010213264264166355,
-0.032784294337034225,
-0.02481575682759285,
-0.010187288746237755,
-0.03993606939911842,
-0.02223704755306244,
-0.05381282791495323,
0.043576087802648544,
0.05797971040010452,
0.02335754781961441,
0.01433818880468607,
-0.041520267724990845,
-0.0044724908657372,
0.015373696573078632,
-0.054181985557079315,
-0.03220415487885475,
-0.039161186665296555,
-0.002146196085959673,
0.0026829978451132774,
0.05680043622851372,
0.04199777916073799,
-0.026657631620764732,
-0.054233111441135406,
0.06070442497730255,
0.02224937453866005,
0.012838251888751984,
-0.003685641335323453,
0.030711054801940918,
0.012297911569476128,
0.04919011890888214,
-0.04111752286553383,
-0.008424644358456135,
-0.0031873760744929314,
-0.018223589286208153,
0.023528097197413445,
0.015563633292913437,
0.009455878287553787,
0.01875411346554756,
-0.03277274966239929,
-0.003937750123441219,
0.06500330567359924,
0.04214618727564812,
0.013960771262645721,
-0.0027527816127985716,
-0.019967541098594666,
0.011183416470885277,
0.014135819859802723,
-0.03085707686841488,
-0.015242072753608227,
0.01716797985136509,
-0.03779933229088783,
0.07968395948410034,
-0.016922086477279663,
-0.006400451064109802,
0.0565611831843853,
0.026083044707775116,
0.00566193088889122,
0.034489091485738754,
-0.023443618789315224,
0.004214294254779816,
0.043789032846689224,
-0.08858798444271088,
-0.0068189725279808044,
0.010032580234110355,
0.08032731711864471,
-0.055039182305336,
0.044765811413526535,
0.025090292096138,
0.04142327606678009,
0.00729533564299345,
-0.023016508668661118,
-0.04117525741457939,
0.02043377421796322,
-0.0364447683095932,
0.07142821699380875,
-0.00399483647197485,
-0.08053568005561829,
0.09352888911962509,
0.027092264965176582,
-0.0768880844116211,
0.01746627315878868,
0.04071219637989998,
0.02843741700053215,
0.02294960618019104,
0.03084906004369259,
-0.05088284611701965,
0.012798459269106388,
-0.046068307012319565,
0.014161712490022182,
-0.0529172308743,
-0.016043441370129585,
-0.00883655808866024,
-0.048598870635032654,
0.002356218872591853,
0.029365282505750656,
-0.01329012680798769,
-0.006555931642651558,
0.0070466771721839905,
-0.058749035000801086,
-0.04981408268213272,
-0.0014885016717016697,
0.021538155153393745,
-0.02795408107340336,
0.02237270586192608,
-0.037009354680776596,
0.047958098351955414,
0.009872959926724434,
-0.01817810907959938,
-0.0420248918235302,
-0.002807683078572154,
0.0051921880804002285,
-0.06399326026439667,
-0.04845116659998894,
0.02249518781900406,
0.012733513489365578,
-0.03231048583984375,
0.0347038097679615,
-0.024673765525221825,
0.0003519547753967345,
0.04268656671047211,
0.00009120727918343619,
0.034976765513420105,
-0.07464832812547684,
0.01441057026386261,
0.018960563465952873,
0.02015242911875248,
0.025435734540224075,
-0.01881435513496399,
0.030604364350438118,
0.037434808909893036,
0.04785922169685364,
-0.016289012506604195,
-0.009674041531980038,
-0.007918167859315872,
0.029115766286849976,
-0.03814464807510376,
0.010672777891159058,
0.005214742850512266,
-0.02531677484512329,
-0.015008366666734219,
-0.04011036083102226,
-0.010981682687997818,
0.01921880804002285,
-0.06685695052146912,
-0.013058879412710667,
0.028555745258927345,
-0.0112331323325634,
-0.046169694513082504,
-0.08821572363376617,
-0.01706731878221035,
-0.019287891685962677,
0.04231375828385353,
0.009648449718952179,
-0.04747835546731949,
0.021232983097434044,
-0.02697000466287136,
-0.057810816913843155,
0.026698384433984756,
0.019998062402009964,
-0.02884702757000923,
0.04678145423531532,
0.053371209651231766,
-0.04652627557516098,
0.022154785692691803,
0.028890805318951607,
-0.056283049285411835,
0.04470377787947655,
0.033728182315826416,
0.025533020496368408,
0.014142880216240883,
0.011080346070230007,
-0.014487667940557003,
-0.01631218194961548,
-0.05768710747361183,
-0.035937048494815826,
-0.02650401182472706,
-0.01580001786351204,
0.06800517439842224
] |
ChaseBread/DialoGPT-small-harrypotter | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 9 | null |
---
language: French Spanish
tags:
- translation French Spanish model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "+ lettre autorités suédoises"
---
# legal_t5_small_multitask_fr_es model
Model on translating legal text from French to Spanish. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). The model is parallely trained on the three parallel corpus with 42 language pair
from jrc-acquis, europarl and dcep along with the unsupervised task where the model followed the task of prediction in a masked language model.
## Model description
No pretraining is involved in case of legal_t5_small_multitask_fr_es model, rather the unsupervised task is added with all the translation task
to realize the multitask learning scenario.
## Intended uses & limitations
The model could be used for translation of legal texts from French to Spanish.
### How to use
Here is how to use this model to translate legal text from French to Spanish in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_multitask_fr_es"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_multitask_fr_es", do_lower_case=False,
skip_special_tokens=True),
device=0
)
fr_text = "+ lettre autorités suédoises"
pipeline([fr_text], max_length=512)
```
## Training data
The legal_t5_small_multitask_fr_es model (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 9 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_multitask_fr_es | 43.807|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.013521702960133553,
-0.03974668309092522,
-0.014331191778182983,
0.07231497764587402,
0.04155023396015167,
0.023552248254418373,
-0.015267242677509785,
-0.023808849975466728,
-0.027569128200411797,
0.06605362892150879,
0.02094349078834057,
-0.0025008763186633587,
-0.02082093060016632,
0.04513145238161087,
-0.03865071013569832,
-0.042933542281389236,
0.005727983545511961,
-0.01882888935506344,
-0.029326029121875763,
-0.01645958237349987,
0.002126638777554035,
0.005139258690178394,
0.0035865255631506443,
0.0047318958677351475,
-0.0037983309011906385,
0.004381570965051651,
0.022484896704554558,
0.04945636913180351,
0.004972410388290882,
-0.07350081205368042,
-0.019736094400286674,
-0.010224752128124237,
-0.02907126396894455,
-0.026867572218179703,
-0.007035365793853998,
-0.0003699515655171126,
0.003780930070206523,
0.019798293709754944,
0.04104939103126526,
0.04452899843454361,
-0.01166831236332655,
-0.007963670417666435,
-0.013800487853586674,
-0.04423459619283676,
0.04449087381362915,
0.011163276620209217,
-0.05140283703804016,
-0.01611584797501564,
0.03336631879210472,
-0.006608327850699425,
-0.05152328684926033,
-0.07204493880271912,
-0.027984527871012688,
0.03369525820016861,
0.000690907530952245,
-0.02436208911240101,
-0.08098597079515457,
-0.01390481274574995,
0.041917089372873306,
-0.03246970847249031,
-0.044872842729091644,
0.024562286213040352,
-0.058904118835926056,
0.009256815537810326,
0.0382959321141243,
-0.0279610063880682,
-0.0013492527650669217,
-0.035139888525009155,
0.044283561408519745,
-0.020403126254677773,
0.06487570703029633,
-0.03608117997646332,
0.015143237076699734,
-0.0976184606552124,
-0.018275629729032516,
-0.014919586479663849,
0.00471526151522994,
0.01989365741610527,
-0.035170815885066986,
0.019720403477549553,
0.03169456124305725,
-0.010124055668711662,
0.025833165273070335,
-0.015587280504405499,
-0.030846701934933662,
0.056704889982938766,
-0.02753603830933571,
-0.03059387393295765,
0.019299132749438286,
0.04792427271604538,
-0.03913908079266548,
-0.03273625299334526,
-0.003784741507843137,
-0.022008275613188744,
0.01116047240793705,
0.02531617507338524,
0.03844228759407997,
-0.01566782221198082,
0.04997720569372177,
0.016728132963180542,
0.026819957420229912,
0.027801701799035072,
-0.013484573923051357,
0.05190684273838997,
-0.029747823253273964,
-0.023338619619607925,
-0.005487949121743441,
-0.04703034833073616,
-0.03658329322934151,
0.03649069741368294,
0.012545823119580746,
-0.04375970736145973,
-0.05153174325823784,
0.07804959267377853,
0.01715903729200363,
-0.02338208258152008,
0.05159210413694382,
-0.030567554756999016,
-0.04069501534104347,
-0.0490230917930603,
0.03362389653921127,
0.011700903065502644,
0.004093178082257509,
0.03174302726984024,
-0.05941905826330185,
0.013576704077422619,
-0.028526948764920235,
-0.044078510254621506,
-0.006452843546867371,
0.007867643609642982,
-0.040469564497470856,
0.051743652671575546,
0.004877354484051466,
-0.04585125669836998,
0.021412920206785202,
0.0004331840027589351,
-0.07564504444599152,
0.048248644918203354,
0.04838171601295471,
0.1052963137626648,
-0.0543263703584671,
-0.04038421809673309,
0.020959574729204178,
0.010629279538989067,
-0.010734979063272476,
0.009534250013530254,
-0.0067458017729222775,
-0.05225037410855293,
-0.026498988270759583,
-0.007839130237698555,
0.07907786965370178,
-0.053073666989803314,
-0.0030253783334046602,
0.030170675367116928,
-0.010270108468830585,
0.026093844324350357,
-0.0362347774207592,
0.005591624416410923,
0.02051299437880516,
-0.018025241792201996,
-0.04729527235031128,
0.015379292890429497,
-0.003832838498055935,
-0.029104312881827354,
-0.06456668674945831,
-0.046520378440618515,
-0.009531032294034958,
0.07556018978357315,
0.006295978557318449,
-0.009970455430448055,
-0.010813182219862938,
0.014474651776254177,
0.061941131949424744,
0.013133479282259941,
-0.01877969317138195,
0.052299030125141144,
0.059246696531772614,
0.054379403591156006,
-0.00409404281526804,
0.08304576575756073,
0.04893004521727562,
-0.03763391450047493,
-0.029514307156205177,
-0.005450782831758261,
-0.011940531432628632,
-0.029678739607334137,
0.005869757849723101,
0.049725547432899475,
-0.0022748210467398167,
-0.0059731039218604565,
-0.018956532701849937,
0.06164213642477989,
-0.007961302995681763,
-0.0037476953584700823,
-0.016284067183732986,
-0.002142468234524131,
-0.017271438613533974,
0.027906455099582672,
-0.027376923710107803,
0.003326613223180175,
-0.010533343069255352,
-0.026034917682409286,
0.0017874555196613073,
0.044809937477111816,
0.02879197895526886,
0.03165798261761665,
0.005777762271463871,
0.09729751944541931,
-0.015414446592330933,
0.020748762413859367,
-0.04044737666845322,
-0.04507177323102951,
0.00805274024605751,
0.051022570580244064,
0.01139675360172987,
0.04545198008418083,
-0.0005755460588261485,
-0.04663720726966858,
0.014482485130429268,
0.07335531711578369,
0.048711035400629044,
0.017720751464366913,
-0.04043702408671379,
-0.013126830570399761,
0.04399159550666809,
0.07325012236833572,
-0.04858965799212456,
-0.03386148065328598,
0.019575748592615128,
0.07364871352910995,
-0.018396515399217606,
0.0006346333539113402,
-0.01670318841934204,
0.013203355483710766,
-0.04216465726494789,
-0.0795712098479271,
0.04330575093626976,
0.026484064757823944,
-0.007785168010741472,
0.020833181217312813,
0.031152987852692604,
-0.004614418372511864,
0.020953446626663208,
-0.0008676429861225188,
0.009446474723517895,
-0.06077829375863075,
0.0024303458631038666,
0.012519164942204952,
0.044523000717163086,
-0.05601231008768082,
0.03718748688697815,
-0.011469564400613308,
-0.004383367486298084,
0.07584220170974731,
-0.047867219895124435,
0.03396931663155556,
0.027573952451348305,
0.014281454496085644,
-0.01936611346900463,
0.008252969942986965,
0.007544627878814936,
0.03249393031001091,
0.07115975022315979,
0.009805765002965927,
0.05996911600232124,
-0.0022413344122469425,
0.048223257064819336,
0.061934053897857666,
0.03296537324786186,
0.0010154737392440438,
0.02301781438291073,
0.0668625459074974,
0.009889597073197365,
-0.008876468054950237,
0.06819433718919754,
-0.049573834985494614,
0.016407350078225136,
-0.03962711617350578,
0.008296018466353416,
0.013270717114210129,
-0.004217674024403095,
0.026450660079717636,
0.013631227426230907,
-0.02522612363100052,
0.02468462847173214,
-0.016200639307498932,
-0.04343825951218605,
0.045398563146591187,
-0.0026286516804248095,
-0.0030610072426497936,
-0.01853347010910511,
-0.023371275514364243,
0.019299138337373734,
-0.05128012225031853,
-0.04257975518703461,
-0.003048145677894354,
-0.02658466249704361,
-0.007676499430090189,
-0.0574527233839035,
-0.030720753595232964,
-0.04118196293711662,
-0.007544077001512051,
0.04939483478665352,
0.01058017835021019,
0.0022568071726709604,
-0.03723575547337532,
0.02045626752078533,
-0.026365777477622032,
-0.005457906983792782,
-0.04425545036792755,
-0.06805720925331116,
-0.03677971288561821,
-0.0833904892206192,
0.03159618377685547,
0.005741412285715342,
0.021318184211850166,
0.017497196793556213,
0.010777775198221207,
-0.0009376156376674771,
-0.030275892466306686,
0.04744308441877365,
0.035445813089609146,
-0.00757778761908412,
-0.024216115474700928,
0.02602321282029152,
-0.02977949008345604,
0.019333066418766975,
-0.020270783454179764,
-0.0325726754963398,
0.09136270731687546,
0.05640794709324837,
0.03959379717707634,
0.01813829131424427,
-0.03630366548895836,
-0.03532705456018448,
-0.0679587721824646,
-0.02853468433022499,
-0.041935697197914124,
0.00402960367500782,
-0.019241938367486,
-0.038619812577962875,
-0.02656833827495575,
-0.04220414534211159,
0.0036341981031000614,
0.0061499085277318954,
0.021709321066737175,
0.038907136768102646,
0.04533529281616211,
0.057187508791685104,
0.02821093611419201,
-0.06031489744782448,
-0.006130911409854889,
0.08886799216270447,
0.018777290359139442,
0.0134835010394454,
-0.05984394624829292,
-0.03697048872709274,
0.04881664365530014,
0.03995661437511444,
-0.012974434532225132,
-0.006472233682870865,
0.08799610286951065,
0.017977457493543625,
-0.014352404512465,
0.041108496487140656,
-0.016449980437755585,
-0.02859632298350334,
-0.011367340572178364,
0.014798980206251144,
-0.04444114863872528,
-0.05363273248076439,
-0.03655571863055229,
-0.004214076325297356,
0.03619874268770218,
-0.07644524425268173,
-0.04613321274518967,
-0.010443533770740032,
0.024312734603881836,
0.011046341620385647,
-0.0034091707784682512,
-0.03971821069717407,
0.008756209164857864,
-0.04383249953389168,
-0.045738112181425095,
0.0041526490822434425,
0.011131069622933865,
0.022022917866706848,
0.04142465442419052,
0.018865959718823433,
-0.05072978511452675,
0.037905558943748474,
0.025156008079648018,
0.05836568772792816,
0.040513575077056885,
-0.04498586058616638,
0.03498087450861931,
-0.008891280740499496,
0.02014855667948723,
-0.006995716597884893,
-0.011228919960558414,
-0.05579311400651932,
-0.08066088706254959,
-0.010937640443444252,
0.008796177804470062,
-0.005878716241568327,
-0.01286452915519476,
0.0578460656106472,
-0.03762536868453026,
0.008082306943833828,
0.002482506912201643,
0.028282970190048218,
0.03526618704199791,
-0.08389050513505936,
0.050481535494327545,
-0.01005458366125822,
0.030733725056052208,
-0.03952108323574066,
0.02737780474126339,
-0.021521056070923805,
-0.021370675414800644,
-0.0028150456491857767,
0.06072957441210747,
0.02089795470237732,
0.04714284837245941,
0.07415468990802765,
0.027960147708654404,
-0.05340331047773361,
0.03242694213986397,
0.050281818956136703,
-0.016003960743546486,
-0.056903064250946045,
-0.012935364618897438,
0.007392422761768103,
-0.03509706258773804,
-0.019546741619706154,
-0.023445772007107735,
0.025537705048918724,
0.0253215990960598,
0.003642422379925847,
-0.010130931623280048,
-0.0027725694235414267,
-0.025514749810099602,
-0.038776006549596786,
-0.042311977595090866,
-0.013146760873496532,
-0.008498862385749817,
-0.02073577791452408,
0.023987730965018272,
0.02514847368001938,
0.0044908663257956505,
0.06394580751657486,
0.05260290950536728,
-0.03269786015152931,
-0.031696345657110214,
0.019579198211431503,
0.04089167341589928,
-0.02834402397274971,
-0.0594017431139946,
-0.037220392376184464,
0.04654061421751976,
0.028244754299521446,
-0.001446728827431798,
-0.084095798432827,
-0.0009870160138234496,
0.046004123985767365,
-0.014870776794850826,
0.05959441885352135,
-0.012196365743875504,
0.016925577074289322,
0.03771740943193436,
-0.027807731181383133,
0.019762808457016945,
-0.03179074451327324,
0.03272475302219391,
-0.004265643190592527,
0.027095375582575798,
-0.014556116424500942,
-0.0397019162774086,
-0.07029571384191513,
0.0430002361536026,
0.0011507688323035836,
0.05864309147000313,
0.03477291762828827,
-0.002659276593476534,
-0.0722760260105133,
0.013396624475717545,
0.039043910801410675,
-0.064127616584301,
-0.004121524281799793,
0.023914868012070656,
0.05842456594109535,
-0.05563051253557205,
-0.023245377466082573,
-0.028723396360874176,
0.010970504023134708,
0.025378890335559845,
0.0013381626922637224,
-0.032996878027915955,
-0.04960193485021591,
0.009921733289957047,
-0.030788563191890717,
-0.026847731322050095,
-0.10076073557138443,
0.028390029445290565,
-0.00790962390601635,
-0.013433245941996574,
0.0659925565123558,
0.037253960967063904,
0.016774753108620644,
0.03622578829526901,
0.002745560836046934,
0.030747249722480774,
-0.044354647397994995,
0.0383252277970314,
-0.024179616943001747,
0.005921808071434498,
0.0038243168964982033,
-0.057531122118234634,
-0.0036521824076771736,
-0.04398675262928009,
-0.008154984563589096,
-0.04324537143111229,
-0.009538967162370682,
0.009118628688156605,
-0.011028124019503593,
0.01308486983180046,
-0.028238171711564064,
0.02894299291074276,
-0.015838468447327614,
-0.02186686545610428,
-0.01644892990589142,
-0.03914600610733032,
-0.07521864771842957,
-0.05205780640244484,
0.0164966844022274,
0.02487293817102909,
0.040127288550138474,
0.017878158017992973,
-0.00759578263387084,
0.020983150228857994,
0.010588699951767921,
-0.023254752159118652,
0.032396599650382996,
-0.0016608117148280144,
-0.03568694740533829,
-0.01886819675564766,
-0.0031176882330328226,
0.008473871275782585,
0.030003897845745087,
-0.023617343977093697,
0.030850287526845932,
0.02088366448879242,
-0.013679168187081814,
0.005242330487817526,
0.008930716663599014,
0.02394277974963188,
-0.06472297757863998,
-0.02175828441977501,
-0.017909109592437744,
-0.06785503029823303,
0.036890145391225815,
0.011837312020361423,
-0.030125737190246582,
0.0202019140124321,
-0.00016349081124644727,
0.053745802491903305,
0.010406271554529667,
-0.034913767129182816,
0.01327942218631506,
-0.02815336175262928,
0.014314529486000538,
-0.05476042628288269,
0.0545700378715992,
-0.04721270501613617,
0.01603996567428112,
-0.005682868883013725,
-0.03804341331124306,
-0.0395897813141346,
0.056486669927835464,
-0.02661481872200966,
-0.05293409898877144,
-0.023833954706788063,
0.018612418323755264,
-0.007252967916429043,
0.02588815800845623,
-0.032012030482292175,
0.007288794498890638,
-0.002223603893071413,
0.031138714402914047,
-0.034013427793979645,
0.005050201900303364,
-0.029225997626781464,
-0.019020797684788704,
-0.009761912748217583,
-0.03199632465839386,
-0.025552915409207344,
-0.05688941106200218,
0.045057643204927444,
0.057989273220300674,
0.02479097992181778,
0.016667013987898827,
-0.03483735769987106,
0.003471662290394306,
0.014171125367283821,
-0.053665220737457275,
-0.02704702690243721,
-0.04023255780339241,
0.003755358047783375,
-0.003836254822090268,
0.06413669884204865,
0.04046190157532692,
-0.0256966482847929,
-0.05421166121959686,
0.061012234538793564,
0.014842367731034756,
0.010920883156359196,
-0.007923056371510029,
0.03404981270432472,
0.02008569985628128,
0.0492362342774868,
-0.042589474469423294,
-0.006863656919449568,
-0.002495919121429324,
-0.019779492169618607,
0.02300785295665264,
0.012221455574035645,
0.00581270782276988,
0.015336153097450733,
-0.031525611877441406,
-0.006871418096125126,
0.06537435203790665,
0.04077887162566185,
0.009781810455024242,
-0.008082607761025429,
-0.01187142077833414,
0.01336146704852581,
0.01770186237990856,
-0.03139910101890564,
-0.01725885272026062,
0.017765454947948456,
-0.03859832510352135,
0.08245546370744705,
-0.024033086374402046,
-0.00021105418272782117,
0.06159847229719162,
0.0297799501568079,
0.004691482987254858,
0.04269271716475487,
-0.0257857795804739,
0.009851913899183273,
0.04902946576476097,
-0.08370649069547653,
-0.0037585117388516665,
0.0057058208622038364,
0.07622836530208588,
-0.0526123009622097,
0.042203955352306366,
0.026493294164538383,
0.03911782428622246,
0.010077521204948425,
-0.021460464224219322,
-0.03977276757359505,
0.021034762263298035,
-0.03961046412587166,
0.08459708094596863,
0.0007362309843301773,
-0.08084350824356079,
0.09054093062877655,
0.027392281219363213,
-0.08271394670009613,
0.0231382567435503,
0.045157257467508316,
0.024672353640198708,
0.01334773562848568,
0.023409834131598473,
-0.05524710938334465,
0.015536659397184849,
-0.04785120487213135,
0.017150916159152985,
-0.0476590134203434,
-0.0029839822091162205,
-0.007282701320946217,
-0.046635959297418594,
0.007035995367914438,
0.02464638091623783,
-0.015600469894707203,
-0.0006311044562608004,
0.005724563729017973,
-0.0524292066693306,
-0.04367351531982422,
0.0015074672410264611,
0.02442585490643978,
-0.02497486025094986,
0.016682837158441544,
-0.03982478752732277,
0.03916742652654648,
0.01546504721045494,
-0.012948832474648952,
-0.043850287795066833,
-0.007415205705910921,
-0.004355998244136572,
-0.05144767835736275,
-0.05504285916686058,
0.029795192182064056,
0.018349356949329376,
-0.023962538689374924,
0.024194316938519478,
-0.02033846825361252,
-0.0016222238773480058,
0.04380655288696289,
-0.0010934809688478708,
0.03498367965221405,
-0.07224874943494797,
0.011478865519165993,
0.024614226073026657,
0.020955068990588188,
0.02320151776075363,
-0.014971692115068436,
0.033075861632823944,
0.03984024003148079,
0.05274507775902748,
-0.01015850156545639,
-0.008272838778793812,
-0.008556317538022995,
0.02812468819320202,
-0.03521483391523361,
0.010302233509719372,
0.015080380253493786,
-0.02550198882818222,
-0.01747935265302658,
-0.03809269517660141,
-0.018909217789769173,
0.019112808629870415,
-0.06702540069818497,
-0.013319117948412895,
0.02792154625058174,
-0.01916033960878849,
-0.04845243692398071,
-0.09520232677459717,
-0.013997388072311878,
-0.02669948898255825,
0.04482928663492203,
0.011465344578027725,
-0.05744476616382599,
0.0024127443321049213,
-0.02309597283601761,
-0.05754388868808746,
0.03213580697774887,
0.01718490570783615,
-0.03597097471356392,
0.04812923073768616,
0.048489902168512344,
-0.04093309864401817,
0.022801438346505165,
0.02964390441775322,
-0.049246735870838165,
0.041525036096572876,
0.03880973532795906,
0.034329622983932495,
0.017238330096006393,
0.018041297793388367,
-0.008087307214736938,
-0.02235756814479828,
-0.06684684753417969,
-0.035243887454271317,
-0.022780897095799446,
-0.01321959588676691,
0.0717364028096199
] |
ChristianOrr/madnet_keras | [
"tensorboard",
"dataset:flyingthings-3d",
"dataset:kitti",
"arxiv:1810.05424",
"vision",
"deep-stereo",
"depth-estimation",
"Tensorflow2",
"Keras",
"license:apache-2.0"
] | depth-estimation | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null |
---
language: Swedish
tags:
- summarization Swedish model
datasets:
- jrc-acquis
widget:
- text: "EUROPEISKA GEMENSKAPERNAS RÅD HAR ANTAGIT DENNA FÖRORDNING med beaktande av Fördraget om upprättandet av Europeiska ekonomiska gemenskapen, särskilt artiklarna 43 och 100a i detta, med beaktande av kommissionens förslag(1), i samarbete med Europaparlamentet(2), med beaktande av Ekonomiska och sociala kommitténs yttrande(3), och med beaktande av följande: Det bör införas förbud mot användning av blybaserade kapsyler eller blybaserad folie i förslutningar på förpackningar som används då aromatiserade viner, aromatiserade vinbaserade drycker och aromatiserade drinkar baserade på vinprodukter släpps ut på marknaden i syfte att undvika risken för kontaminering, särskilt vid oavsiktlig kontakt med sådana produkter, samt risken för miljöförorening på grund av avfall som innehåller bly från kapsyler och folie av detta slag. Tillverkarna och användarna av kapsylerna och folien i fråga bör dock ges tid att anpassa sig genom att förbudet inte tillämpas förrän från och med den 1 januari 1993. Det är även nödvändigt att tillåta att produkter som före detta datum tappats på buteljer med blybaserade kapsyler eller blybaserad folie får säljas till dess att lagren är uttömda. Vissa definitioner av aromatiserade vinbaserade drycker bör anpassas så att större hänsyn tas till traditionella framställningsmetoder. Förordning (EEG) nr 1601/91(4) bör därför ändras. HÄRIGENOM FÖRESKRIVS FÖLJANDE. Artikel 1 Förordning (EEG) nr 1601/91 ändras på följande sätt: 1. Artikel 2.3 a första stycket skall ersättas med följande: %quot%a) Sangria: en dryck som framställs av vin - som smaksatts genom tillsats av naturliga extrakt eller essenser av citrusfrukt, - med eller utan saft av sådan frukt, - eventuellt: - med tillsats av kryddor, - sötat, - med tillsats av CO2, och med en slutlig alkoholstyrka på under 12 volymprocent.%quot% 2. Artikel 2.3 e skall ersättas med följande: %quot%e) Kalte Ente: Smaksatt vinbaserad dryck som framställs genom att vin, pärlande vin eller pärlande vin med tillsatt CO2 blandas med mousserande vin eller mousserande vin med tillsatt CO2 och tillsätts naturlig citronsubstans eller extrakt av detta som måste ge en tydligt framträdande smak. Slutprodukten måste innehålla minst 25 volymprocent mousserande vin eller mousserande vin med tillsatt CO2.%quot% 3. Följande punkt skall införas i artikel 8: %quot%4.a Från och med den 1 januari 1993 får buteljerade produkter som omfattas av denna förordning inte saluhållas eller släppas ut på marknaden i förpackningar med förslutningar som täckts med blybaserade kapsyler eller blybaserad folie. Dock får produkter som före detta datum tappats på flaskor med detta slag av kapsyler eller folie avyttras till dess att lagren tömts.%quot% Artikel 2 Denna förordning träder i kraft den tredje dagen efter det att den har offentliggjorts i Europeiska gemenskapernas officiella tidning. Denna förordning är till alla delar bindande och direkt tillämplig i alla medlemsstater. Utfärdad i Bryssel den 9 november 1992. På rådets vägnar D. HURD Ordförande (1) EGT nr C 69, 18.3.1992, s. 11. (2) EGT nr C 241, 21.9.1992, s. 97 och beslut av den 28 oktober 1992. (3) EGT nr C 169, 6.7.1992, s. 1. (4) EGT nr L 149, 14.6.1991, s. 1. "
---
# legal_t5_small_summ_sv model
Model for Summarization of legal text written in Swedish. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis.
## Model description
legal_t5_small_summ_sv is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
## Intended uses & limitations
The model could be used for summarization of legal texts written in Swedish.
### How to use
Here is how to use this model to summarize legal text written in Swedish in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_summ_sv"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_summ_sv", do_lower_case=False,
skip_special_tokens=True),
device=0
)
sv_text = "EUROPEISKA GEMENSKAPERNAS RÅD HAR ANTAGIT DENNA FÖRORDNING med beaktande av Fördraget om upprättandet av Europeiska ekonomiska gemenskapen, särskilt artiklarna 43 och 100a i detta, med beaktande av kommissionens förslag(1), i samarbete med Europaparlamentet(2), med beaktande av Ekonomiska och sociala kommitténs yttrande(3), och med beaktande av följande: Det bör införas förbud mot användning av blybaserade kapsyler eller blybaserad folie i förslutningar på förpackningar som används då aromatiserade viner, aromatiserade vinbaserade drycker och aromatiserade drinkar baserade på vinprodukter släpps ut på marknaden i syfte att undvika risken för kontaminering, särskilt vid oavsiktlig kontakt med sådana produkter, samt risken för miljöförorening på grund av avfall som innehåller bly från kapsyler och folie av detta slag. Tillverkarna och användarna av kapsylerna och folien i fråga bör dock ges tid att anpassa sig genom att förbudet inte tillämpas förrän från och med den 1 januari 1993. Det är även nödvändigt att tillåta att produkter som före detta datum tappats på buteljer med blybaserade kapsyler eller blybaserad folie får säljas till dess att lagren är uttömda. Vissa definitioner av aromatiserade vinbaserade drycker bör anpassas så att större hänsyn tas till traditionella framställningsmetoder. Förordning (EEG) nr 1601/91(4) bör därför ändras. HÄRIGENOM FÖRESKRIVS FÖLJANDE. Artikel 1 Förordning (EEG) nr 1601/91 ändras på följande sätt: 1. Artikel 2.3 a första stycket skall ersättas med följande: %quot%a) Sangria: en dryck som framställs av vin - som smaksatts genom tillsats av naturliga extrakt eller essenser av citrusfrukt, - med eller utan saft av sådan frukt, - eventuellt: - med tillsats av kryddor, - sötat, - med tillsats av CO2, och med en slutlig alkoholstyrka på under 12 volymprocent.%quot% 2. Artikel 2.3 e skall ersättas med följande: %quot%e) Kalte Ente: Smaksatt vinbaserad dryck som framställs genom att vin, pärlande vin eller pärlande vin med tillsatt CO2 blandas med mousserande vin eller mousserande vin med tillsatt CO2 och tillsätts naturlig citronsubstans eller extrakt av detta som måste ge en tydligt framträdande smak. Slutprodukten måste innehålla minst 25 volymprocent mousserande vin eller mousserande vin med tillsatt CO2.%quot% 3. Följande punkt skall införas i artikel 8: %quot%4.a Från och med den 1 januari 1993 får buteljerade produkter som omfattas av denna förordning inte saluhållas eller släppas ut på marknaden i förpackningar med förslutningar som täckts med blybaserade kapsyler eller blybaserad folie. Dock får produkter som före detta datum tappats på flaskor med detta slag av kapsyler eller folie avyttras till dess att lagren tömts.%quot% Artikel 2 Denna förordning träder i kraft den tredje dagen efter det att den har offentliggjorts i Europeiska gemenskapernas officiella tidning. Denna förordning är till alla delar bindande och direkt tillämplig i alla medlemsstater. Utfärdad i Bryssel den 9 november 1992. På rådets vägnar D. HURD Ordförande (1) EGT nr C 69, 18.3.1992, s. 11. (2) EGT nr C 241, 21.9.1992, s. 97 och beslut av den 28 oktober 1992. (3) EGT nr C 169, 6.7.1992, s. 1. (4) EGT nr L 149, 14.6.1991, s. 1. "
pipeline([sv_text], max_length=512)
```
## Training data
The legal_t5_small_summ_sv model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html) dataset consisting of 19 Thousand texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 64). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for classification test dataset, achieves the following results:
Test results :
| Model | Rouge1 | Rouge2 | Rouge Lsum |
|:-----:|:-----:|:-----:|:-----:|
| legal_t5_small_summ_sv | 78.84|69.97 |77.59|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
0.0024855441879481077,
-0.017637059092521667,
-0.007818950340151787,
0.03343740850687027,
0.049004293978214264,
0.000021267826014081948,
-0.0061689685098826885,
-0.01045706495642662,
-0.04864941164851189,
0.063856340944767,
0.023854970932006836,
-0.024400999769568443,
-0.000347568973666057,
0.047685619443655014,
-0.0006042677559889853,
-0.05431210994720459,
-0.012889399193227291,
-0.010110256262123585,
-0.059678979218006134,
-0.0001837964082369581,
-0.0029763695783913136,
-0.0072669596411287785,
-0.004566059913486242,
0.02184935286641121,
0.02354496531188488,
0.03153081238269806,
0.021535364910960197,
0.04083330184221268,
0.017438054084777832,
-0.07080210000276566,
-0.014736968092620373,
-0.027937790378928185,
-0.06403173506259918,
-0.05025758966803551,
-0.008991367183625698,
-0.01988017000257969,
0.016282662749290466,
0.012410784140229225,
0.01785099506378174,
0.05825280770659447,
-0.006624686066061258,
0.016410954296588898,
-0.012986375950276852,
-0.04179339483380318,
0.027901077643036842,
0.008072011172771454,
-0.04374121502041817,
-0.027963167056441307,
0.03572314232587814,
-0.021365076303482056,
-0.05284779518842697,
-0.04025756195187569,
-0.0006501581519842148,
0.015712451189756393,
-0.014691594056785107,
-0.037427712231874466,
-0.0745726078748703,
0.030101103708148003,
0.061811625957489014,
-0.059432316571474075,
-0.057182926684617996,
0.02023792266845703,
-0.0952545627951622,
-0.0008491939515806735,
0.012694296427071095,
-0.0739009901881218,
-0.017318174242973328,
-0.04834608733654022,
0.027931325137615204,
0.0173873882740736,
0.05481977015733719,
-0.05188910663127899,
0.038899488747119904,
-0.06959033757448196,
-0.006702111102640629,
-0.028802523389458656,
0.001775934942997992,
0.04473426192998886,
-0.030115347355604172,
0.0436079204082489,
0.03347824141383171,
-0.026061266660690308,
0.040028613060712814,
-0.03535301983356476,
-0.014228844083845615,
0.020603572949767113,
-0.03008379228413105,
-0.0037671877071261406,
0.014342483133077621,
0.043332625180482864,
-0.039816129952669144,
-0.03099685162305832,
-0.011157575994729996,
-0.0068705701269209385,
-0.0013970325235277414,
0.021702781319618225,
0.021661564707756042,
-0.024242570623755455,
0.026331383734941483,
0.017025643959641457,
0.0022763668093830347,
0.05639581009745598,
-0.011176036670804024,
0.0837428867816925,
-0.007850264199078083,
-0.036869604140520096,
-0.005762049928307533,
-0.016831690445542336,
-0.05547311156988144,
0.02809002250432968,
-0.015250313095748425,
-0.03886622563004494,
-0.03186071664094925,
0.030698198825120926,
0.011977664195001125,
-0.008340164087712765,
0.03216603398323059,
-0.024132153019309044,
-0.03342181816697121,
-0.07397209852933884,
0.01749323680996895,
0.02367211878299713,
0.022414211183786392,
0.03767911717295647,
-0.03237638622522354,
0.01619051769375801,
-0.047391366213560104,
-0.0054610976949334145,
0.013384143821895123,
0.020531419664621353,
-0.003287519793957472,
0.046401165425777435,
0.043963052332401276,
-0.07407055050134659,
0.04534320533275604,
-0.0017841665539890528,
-0.06841927766799927,
0.026901185512542725,
0.04887918382883072,
0.08930022269487381,
-0.04758574813604355,
-0.06294424086809158,
0.007293293718248606,
0.0006533006089739501,
-0.026230990886688232,
0.004930404014885426,
0.015400287695229053,
-0.06227780506014824,
-0.026847535744309425,
-0.00822316575795412,
0.04393642023205757,
-0.03437695652246475,
-0.012742861174046993,
0.02716035395860672,
0.0015016308752819896,
0.020436519756913185,
-0.0536956824362278,
-0.022923503071069717,
0.013975849375128746,
-0.004227833356708288,
-0.02520686760544777,
0.010854524560272694,
0.0006693332106806338,
-0.02519618533551693,
-0.03308594226837158,
-0.047132156789302826,
0.004757339134812355,
0.08610799163579941,
-0.012651171535253525,
-0.019102364778518677,
-0.07381443679332733,
0.011665853671729565,
0.06107132136821747,
0.001852183137089014,
-0.01083073578774929,
0.013017745688557625,
0.04899352416396141,
0.05119651183485985,
-0.00658393045887351,
0.0670875534415245,
0.033236123621463776,
-0.01755267195403576,
-0.029497144743800163,
0.03580494225025177,
0.008939164690673351,
-0.015922769904136658,
0.0014750902773812413,
0.035159215331077576,
0.013451006263494492,
-0.03728228434920311,
-0.02637656033039093,
0.035795316100120544,
-0.023473063483834267,
-0.004742167890071869,
-0.006911506876349449,
-0.0065135289914906025,
-0.04425998404622078,
0.04968402907252312,
-0.006014557089656591,
-0.014050311408936977,
-0.007808434311300516,
-0.04967813566327095,
0.019353650510311127,
0.019568396732211113,
0.004372857976704836,
0.03654659911990166,
0.018594807013869286,
0.10908354073762894,
-0.028018279001116753,
0.006609191186726093,
-0.038011979311704636,
-0.05575290694832802,
-0.01960725523531437,
0.03972616419196129,
0.04243474453687668,
0.043617866933345795,
-0.0020015391055494547,
-0.04103289172053337,
0.013517983257770538,
0.047501057386398315,
0.05015667900443077,
0.021110588684678078,
0.014188303612172604,
-0.020066309720277786,
0.050754282623529434,
0.019882241263985634,
-0.06378167867660522,
-0.0649079829454422,
0.017503885552287102,
0.06414642930030823,
-0.04541096091270447,
0.015164034441113472,
0.0032344579230993986,
0.04536843299865723,
-0.018637780100107193,
-0.06818702071905136,
0.056013405323028564,
0.03304457291960716,
-0.008333911187946796,
0.022306786850094795,
-0.0030064077582210302,
0.02954654023051262,
-0.0018577657174319029,
0.00003068872320000082,
0.002517333021387458,
-0.04270599037408829,
0.0073130312375724316,
-0.0002814165782183409,
0.07874905318021774,
-0.04513527825474739,
0.014984291046857834,
0.02313491515815258,
0.02834548056125641,
0.032269857823848724,
-0.07597929984331131,
0.03051437996327877,
0.05490445718169212,
-0.001694170874543488,
-0.03818818926811218,
0.041276715695858,
0.01578979566693306,
0.030542608350515366,
0.060416240245103836,
-0.02386564388871193,
0.06934992969036102,
-0.023213034495711327,
0.04133446887135506,
0.0681770071387291,
0.028735019266605377,
0.018377773463726044,
0.0113660404458642,
0.07859338074922562,
-0.009725918993353844,
-0.013421152718365192,
0.04884086921811104,
-0.06805127114057541,
0.011923964135348797,
-0.04546749219298363,
0.009477321058511734,
-0.008275910280644894,
0.030615966767072678,
0.011647680774331093,
0.0020383531227707863,
-0.03863757848739624,
0.007502768188714981,
-0.003583606332540512,
0.0013460178161039948,
0.06282347440719604,
-0.008170763030648232,
0.010669218376278877,
-0.0341714508831501,
-0.031348876655101776,
0.0227727722376585,
-0.041559383273124695,
-0.03698193281888962,
-0.007289319299161434,
-0.009106649085879326,
0.012523232027888298,
-0.06757280230522156,
-0.03669143095612526,
-0.05924786627292633,
-0.014537019655108452,
0.05336569622159004,
0.03928007930517197,
0.0034167601261287928,
-0.034937404096126556,
0.016155214980244637,
-0.03569677844643593,
-0.045065008103847504,
-0.047754209488630295,
-0.04842357337474823,
-0.058039937168359756,
-0.07199089974164963,
0.03398152068257332,
0.025253115221858025,
0.028850167989730835,
0.0026372738648205996,
0.015808530151844025,
-0.03412645310163498,
-0.019982796162366867,
0.04727127030491829,
0.05763932690024376,
-0.030760908499360085,
-0.03326961770653725,
0.04810462146997452,
-0.0030181468464434147,
-0.0070161400362849236,
-0.0038126164581626654,
-0.031949568539857864,
0.09069259464740753,
0.07245601713657379,
0.019955052062869072,
-0.00956921186298132,
0.03564820811152458,
-0.04116595908999443,
-0.04099900275468826,
-0.024914737790822983,
-0.01027588453143835,
-0.02041572332382202,
-0.02285751886665821,
-0.016414225101470947,
-0.011203491128981113,
-0.017562318593263626,
-0.024495860561728477,
-0.01843075081706047,
0.009142876602709293,
0.024624621495604515,
0.03432004526257515,
0.026975903660058975,
0.014419266022741795,
-0.03172697499394417,
-0.03085409291088581,
0.07583015412092209,
-0.02608577162027359,
0.02495376579463482,
-0.06637473404407501,
-0.04585927352309227,
0.048745959997177124,
0.010036563500761986,
0.010112044401466846,
-0.010032718069851398,
0.0741550400853157,
0.010095546953380108,
0.02594764530658722,
0.02358029969036579,
-0.02566078118979931,
-0.01448069792240858,
0.005425239447504282,
-0.006682902574539185,
-0.017125483602285385,
-0.0658002719283104,
-0.029759623110294342,
-0.017016960307955742,
0.03288363292813301,
-0.0508786104619503,
-0.06065937131643295,
-0.0043235099874436855,
0.055203769356012344,
0.017710508778691292,
-0.0009214951423928142,
-0.04041413962841034,
-0.006788815837353468,
-0.06515273451805115,
-0.018835553899407387,
-0.000258871354162693,
0.030399110168218613,
-0.01029964629560709,
0.0329609289765358,
0.051440294831991196,
-0.05091666802763939,
0.021346746012568474,
0.04696528613567352,
0.05143951624631882,
0.011087429709732533,
-0.0400388166308403,
0.04150925576686859,
-0.029959578067064285,
0.048768382519483566,
-0.0052966829389333725,
-0.0386037714779377,
-0.029408324509859085,
-0.07371235638856888,
-0.010995708405971527,
0.02406574785709381,
0.011650082655251026,
-0.0013176583452150226,
0.04804157093167305,
-0.013255386613309383,
-0.002401854610070586,
-0.016560068354010582,
0.01320675015449524,
0.028641540557146072,
-0.057326674461364746,
0.06745173037052155,
-0.03260594233870506,
0.009499702602624893,
-0.0636945441365242,
0.0064580668695271015,
-0.044927697628736496,
-0.014746216125786304,
0.009520179592072964,
0.04684874415397644,
-0.00906547624617815,
0.010011614300310612,
0.05912843346595764,
0.029697194695472717,
-0.028315143659710884,
0.05034811794757843,
0.05038335919380188,
-0.027368661016225815,
-0.05614935979247093,
-0.004854940809309483,
-0.009001334197819233,
-0.03339528292417526,
-0.0027470362838357687,
-0.05329745262861252,
0.022480402141809464,
0.004538395442068577,
0.013825475238263607,
0.0026487617287784815,
0.01851397007703781,
-0.008599797263741493,
-0.0584745891392231,
-0.049526188522577286,
-0.04709320887923241,
0.01971798576414585,
-0.015520003624260426,
0.007184608839452267,
0.06439445912837982,
0.004119264427572489,
0.06600087136030197,
-0.003971935715526342,
-0.03044688142836094,
-0.017364760860800743,
0.009433414787054062,
0.012682036496698856,
-0.057355210185050964,
-0.05876566097140312,
-0.01866990141570568,
0.05441459268331528,
0.05033133178949356,
0.011595254763960838,
-0.0750199481844902,
0.016114458441734314,
0.07663945853710175,
-0.027860237285494804,
0.05235058441758156,
0.0036960558500140905,
0.07041642814874649,
0.019370635971426964,
-0.028105081990361214,
0.004968883004039526,
-0.029380397871136665,
0.04201625660061836,
-0.027369163930416107,
0.026291249319911003,
0.0073378426022827625,
-0.048081234097480774,
-0.02044130675494671,
0.025514787063002586,
-0.019021110609173775,
0.04147312417626381,
0.046510860323905945,
-0.004237930290400982,
-0.06497696787118912,
0.027333583682775497,
0.03599812835454941,
-0.05559347942471504,
0.03719620406627655,
0.026741964742541313,
0.0354338102042675,
-0.06230023503303528,
-0.036021675914525986,
0.00012386281741783023,
-0.022091422230005264,
0.027486424893140793,
-0.03167970851063728,
-0.042949285358190536,
-0.04278171434998512,
0.023762555792927742,
0.00036881028790958226,
-0.015303168445825577,
-0.09347826987504959,
0.040477871894836426,
-0.028450850397348404,
-0.03212196007370949,
0.051015760749578476,
0.003752291901037097,
-0.018045831471681595,
0.02461460791528225,
0.021304719150066376,
0.006356141064316034,
-0.011038113385438919,
0.019433150067925453,
-0.021670352667570114,
-0.008596641011536121,
-0.029457485303282738,
-0.05950433760881424,
-0.02003500610589981,
-0.006919063627719879,
-0.07538042217493057,
-0.03297002986073494,
-0.04040123522281647,
0.019453737884759903,
0.0008253514533862472,
-0.005006846971809864,
-0.008802302181720734,
0.021596070379018784,
-0.014191466383635998,
-0.026438483968377113,
-0.04202602803707123,
-0.035519033670425415,
-0.03509944677352905,
-0.04529087245464325,
0.003865207778289914,
-0.0002475683286320418,
0.021291006356477737,
0.003875315422192216,
0.0001324214244959876,
0.020504696294665337,
0.019553352147340775,
-0.013187807984650135,
0.033375468105077744,
-0.0016624265117570758,
-0.0509076826274395,
-0.0346389040350914,
0.001953352941200137,
0.006143581587821245,
0.05074772238731384,
-0.00990544818341732,
0.022693054750561714,
0.007659443188458681,
-0.03546033799648285,
-0.011739137582480907,
0.021095620468258858,
0.05530102550983429,
-0.047759927809238434,
-0.034645408391952515,
0.005414317362010479,
-0.05523739382624626,
0.01827644743025303,
-0.003549997229129076,
-0.0445529967546463,
0.020416073501110077,
0.005897619761526585,
0.013045599684119225,
0.030317477881908417,
-0.020908592268824577,
0.013392596505582333,
-0.005768479313701391,
0.01985001564025879,
-0.09128569066524506,
0.04113362357020378,
-0.01670050621032715,
0.025625327602028847,
-0.005607033148407936,
-0.04872124269604683,
-0.05205908790230751,
0.03874649852514267,
0.004557213746011257,
-0.028516702353954315,
0.02863083966076374,
0.017137371003627777,
-0.0037343287840485573,
0.027146408334374428,
0.0010572881437838078,
0.014204560779035091,
0.005719236098229885,
0.03613158315420151,
-0.04304276034235954,
-0.0124256806448102,
-0.00008879072993295267,
0.006227273028343916,
-0.051395025104284286,
-0.0175434909760952,
-0.02408534660935402,
-0.0532480850815773,
0.019215833395719528,
0.03927987068891525,
0.021909866482019424,
0.0242497269064188,
-0.01157535519450903,
-0.004062863532453775,
0.005496961995959282,
-0.04773828014731407,
-0.015622464939951897,
-0.04030026122927666,
0.0005697050946764648,
-0.025547761470079422,
0.0706542432308197,
0.03700488805770874,
-0.06987235695123672,
-0.05008341372013092,
0.029585497453808784,
0.010309909470379353,
0.014855303801596165,
-0.029355354607105255,
0.031164461746811867,
0.035377610474824905,
0.022823553532361984,
-0.054103802889585495,
0.022204289212822914,
-0.007906782440841198,
-0.020357724279165268,
0.00690750265493989,
0.00044841025373898447,
0.003846589243039489,
0.017022913321852684,
-0.05515861138701439,
-0.011600470170378685,
0.0870424434542656,
0.04569543898105621,
0.024109147489070892,
-0.006993899121880531,
-0.043703168630599976,
0.03685856983065605,
0.039567165076732635,
-0.05640842020511627,
0.004611680284142494,
0.043974172323942184,
-0.013970564119517803,
0.05539422109723091,
-0.01214778795838356,
0.03269358351826668,
0.06327354162931442,
0.0158745888620615,
-0.028823714703321457,
0.02521909400820732,
-0.024510126560926437,
0.010126271285116673,
0.04935183748602867,
-0.06955742835998535,
0.011049983091652393,
-0.061519425362348557,
0.05679694935679436,
-0.06281943619251251,
0.05870804935693741,
0.03743945434689522,
0.01897018402814865,
0.03452543541789055,
-0.025833282619714737,
-0.04089445248246193,
0.031023191288113594,
-0.028665635734796524,
0.06943915784358978,
0.025781065225601196,
-0.04341427981853485,
0.06915519386529922,
0.0031869146041572094,
-0.08295036107301712,
0.01681285724043846,
0.02666781097650528,
0.06508084386587143,
0.03508361428976059,
0.03556163236498833,
-0.037260301411151886,
0.0164800975471735,
0.001597168855369091,
0.04939601942896843,
-0.043384015560150146,
-0.0408269464969635,
0.03007498010993004,
-0.0581887811422348,
-0.019730642437934875,
0.03759519383311272,
-0.04129780828952789,
-0.0054704127833247185,
-0.0001678657572483644,
-0.04419797658920288,
-0.07034552097320557,
0.004880696535110474,
0.032910969108343124,
-0.052981387823820114,
-0.0012123057385906577,
-0.04884021356701851,
0.026218216866254807,
0.04567444697022438,
-0.008104175329208374,
-0.031438227742910385,
-0.029983719810843468,
0.03951600566506386,
-0.07218707352876663,
-0.020897652953863144,
0.04563578590750694,
0.005839447490870953,
-0.010601049289107323,
0.039831601083278656,
0.009929795749485493,
0.013969337567687035,
0.021486051380634308,
-0.010303197428584099,
-0.001824527163989842,
-0.03827953711152077,
0.012920727021992207,
0.0253031924366951,
-0.023988522589206696,
0.018702726811170578,
-0.012721492908895016,
0.06272628903388977,
0.02722436748445034,
0.02602352388203144,
-0.015523146837949753,
-0.030475791543722153,
-0.017087822780013084,
0.008469547145068645,
-0.038748472929000854,
-0.013038521632552147,
-0.0011563050793483853,
-0.05379796400666237,
-0.03284085541963577,
0.0073293112218379974,
-0.013436337932944298,
0.03598783165216446,
-0.03929751738905907,
-0.0014467808650806546,
0.038059692829847336,
-0.030041007325053215,
-0.0335061252117157,
-0.09076856821775436,
-0.03954464942216873,
-0.05631893128156662,
-0.016888918355107307,
0.01801091805100441,
-0.026192301884293556,
0.017915738746523857,
-0.017456229776144028,
-0.03144539147615433,
0.032502248883247375,
0.0014493301277980208,
-0.04491478204727173,
0.0622250996530056,
0.037618231028318405,
-0.019373202696442604,
0.010123512707650661,
0.024171294644474983,
-0.026923969388008118,
0.011989587917923927,
0.004940761253237724,
0.0642533004283905,
0.04470601677894592,
0.026965010911226273,
-0.040242068469524384,
-0.01936989836394787,
-0.06768977642059326,
-0.046178195625543594,
-0.039204563945531845,
-0.022943716496229172,
0.05249185115098953
] |
ChukSamuels/DialoGPT-small-Dr.FauciBot | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 13 | 2020-12-31T19:19:44Z |
---
language: Cszech English
tags:
- translation Cszech English model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "s ohledem na druhou schůzku států OSN, která se konala 11.–15. června 2005 a měla posoudit provádění akčního programu OSN k prevenci, potírání a vymýcení nezákonného obchodu s ručními a lehkými zbraněmi ve všech jeho aspektech, která se koná jednou za dva roky,"
---
# legal_t5_small_trans_cs_en model
Model on translating legal text from Cszech to English. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis, europarl and dcep.
## Model description
legal_t5_small_trans_cs_en is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
## Intended uses & limitations
The model could be used for translation of legal texts from Cszech to English.
### How to use
Here is how to use this model to translate legal text from Cszech to English in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_trans_cs_en"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_trans_cs_en", do_lower_case=False,
skip_special_tokens=True),
device=0
)
cs_text = "s ohledem na druhou schůzku států OSN, která se konala 11.–15. června 2005 a měla posoudit provádění akčního programu OSN k prevenci, potírání a vymýcení nezákonného obchodu s ručními a lehkými zbraněmi ve všech jeho aspektech, která se koná jednou za dva roky,"
pipeline([cs_text], max_length=512)
```
## Training data
The legal_t5_small_trans_cs_en model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 5 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_trans_cs_en | 56.92|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.009486951865255833,
-0.027950413525104523,
-0.007288063410669565,
0.0468970350921154,
0.04215400293469429,
0.016850020736455917,
-0.0017226955387741327,
-0.005877034738659859,
-0.046983566135168076,
0.06004825979471207,
0.039998698979616165,
-0.011936548165977001,
-0.01250950712710619,
0.05281442776322365,
-0.03868139907717705,
-0.04589705541729927,
-0.00951215997338295,
-0.011602327227592468,
-0.04618168622255325,
-0.00683007575571537,
0.0006314757047221065,
0.020543551072478294,
-0.014379594475030899,
0.001375529682263732,
0.012353338301181793,
-0.002775425324216485,
0.002284713787958026,
0.05023027956485748,
0.00729379802942276,
-0.07496229559183121,
-0.004931481089442968,
-0.016427170485258102,
-0.03998671472072601,
-0.03442410007119179,
-0.016528626903891563,
-0.010925105772912502,
0.0026250998489558697,
0.026260772719979286,
0.03570055589079857,
0.05300353467464447,
-0.01395771000534296,
0.02275875210762024,
-0.028041400015354156,
-0.0511038675904274,
0.04043693095445633,
-0.0013570863520726562,
-0.05481426417827606,
-0.01488547120243311,
0.03509509935975075,
-0.013204820454120636,
-0.04036964103579521,
-0.07981414347887039,
-0.022999228909611702,
0.014644140377640724,
-0.011434895917773247,
-0.027416182681918144,
-0.10246887058019638,
-0.007288513705134392,
0.062296416610479355,
-0.04057690501213074,
-0.034864556044340134,
0.008019421249628067,
-0.05693317577242851,
0.014475773088634014,
0.039486270397901535,
-0.03015408106148243,
0.008542336523532867,
-0.04443284496665001,
0.051601964980363846,
-0.005246886983513832,
0.05884404480457306,
-0.03454677015542984,
0.0352216437458992,
-0.0947875902056694,
-0.013706778176128864,
-0.008483575657010078,
0.011680066585540771,
0.018176738172769547,
-0.04128595069050789,
0.03304806724190712,
0.02834450826048851,
-0.01593736745417118,
0.026383744552731514,
-0.01781211420893669,
-0.04051323980093002,
0.05108270421624184,
-0.020060909911990166,
-0.04348795488476753,
0.0019939090125262737,
0.061105601489543915,
-0.055348820984363556,
-0.035814810544252396,
-0.029344160109758377,
-0.022543098777532578,
-0.017831064760684967,
0.012007265351712704,
0.050507813692092896,
-0.0053332895040512085,
0.025785498321056366,
0.04656285420060158,
0.026133906096220016,
0.01674848608672619,
-0.011349980719387531,
0.035188157111406326,
-0.02764521911740303,
-0.01741580292582512,
-0.005228403955698013,
-0.03807651251554489,
-0.04710868000984192,
0.02518298104405403,
0.0029628723859786987,
-0.05185329541563988,
-0.053663063794374466,
0.056741442531347275,
0.024410784244537354,
-0.012737899087369442,
0.05236774682998657,
-0.034053005278110504,
-0.042898986488580704,
-0.05624622106552124,
0.035235922783613205,
0.012652036733925343,
0.005090585444122553,
0.034820977598428726,
-0.06570088863372803,
0.017678597941994667,
-0.04029211401939392,
-0.06025192141532898,
0.0003025953774340451,
0.0076278760097920895,
-0.02006138302385807,
0.048308029770851135,
0.019313128665089607,
-0.051829639822244644,
0.024025507271289825,
-0.0015648385742679238,
-0.0717068761587143,
0.05830186977982521,
0.04505915939807892,
0.10927753150463104,
-0.03654182702302933,
-0.046918466687202454,
-0.00869275163859129,
-0.004524919204413891,
-0.021749841049313545,
0.007488335948437452,
-0.004509874619543552,
-0.052703920751810074,
-0.028935518115758896,
-0.006907189264893532,
0.07446420192718506,
-0.055576831102371216,
-0.0013222338166087866,
0.03536368906497955,
-0.0019230986945331097,
0.008925741538405418,
-0.04058399423956871,
-0.0018300459487363696,
0.015159815549850464,
-0.0008694885764271021,
-0.04878819361329079,
0.015712209045886993,
0.006458173040300608,
-0.01644202694296837,
-0.05822872743010521,
-0.05948994308710098,
0.007615543436259031,
0.06296863406896591,
0.002919146791100502,
-0.011589906178414822,
-0.036717209964990616,
-0.0026527417358011007,
0.07557880133390427,
0.027880989015102386,
-0.024407561868429184,
0.03782038390636444,
0.042694319039583206,
0.04729064181447029,
0.00677822669968009,
0.07588835805654526,
0.04531530663371086,
-0.04425491765141487,
-0.028053700923919678,
0.0016581140225753188,
-0.0019341522129252553,
-0.011372593231499195,
-0.002189531223848462,
0.04915544390678406,
-0.013959575444459915,
-0.018190357834100723,
-0.0058153471909463406,
0.06667792797088623,
-0.012837088666856289,
0.005078493617475033,
0.008201547898352146,
0.01188737340271473,
-0.01662476547062397,
0.03026595711708069,
-0.02742968313395977,
0.0038952664472162724,
-0.032021794468164444,
-0.01874454692006111,
0.015723515301942825,
0.03671775758266449,
0.02348184399306774,
0.05044148862361908,
-0.0193109642714262,
0.09631171077489853,
-0.02829761803150177,
0.009468884207308292,
-0.03879127278923988,
-0.05299823358654976,
0.011991674080491066,
0.05027620866894722,
0.01621159538626671,
0.03736221417784691,
-0.010500426404178143,
-0.05936441943049431,
-0.001461321022361517,
0.06003311276435852,
0.045029640197753906,
0.010799124836921692,
-0.02132595330476761,
-0.004694645758718252,
0.03839931637048721,
0.08107955008745193,
-0.03520985692739487,
-0.04053154215216637,
0.006232601124793291,
0.062018949538469315,
-0.02338331565260887,
0.010892698541283607,
-0.018196383491158485,
0.018380826339125633,
-0.023951133713126183,
-0.05314502492547035,
0.04799751564860344,
0.020124631002545357,
0.0038903923705220222,
0.005791061092168093,
0.011613025330007076,
0.008880126290023327,
0.006050887051969767,
-0.00765927555039525,
-0.006616109982132912,
-0.05667099356651306,
-0.007495649624615908,
0.0038140236865729094,
0.03291371837258339,
-0.04680739715695381,
0.02656293846666813,
0.003159720217809081,
-0.0029816157184541225,
0.062449175864458084,
-0.048721250146627426,
0.04173637554049492,
0.03236899524927139,
0.0355994887650013,
-0.029391421005129814,
0.033209506422281265,
0.02369127795100212,
0.034485023468732834,
0.08062103390693665,
-0.002734838519245386,
0.05811045691370964,
0.0009337476803921163,
0.05553831160068512,
0.07623472064733505,
0.018214618787169456,
0.010381429456174374,
0.028077172115445137,
0.08047527074813843,
-0.007778283674269915,
-0.0007702778675593436,
0.06874440610408783,
-0.04937561973929405,
0.016916893422603607,
-0.052902400493621826,
0.006474813912063837,
0.002301317872479558,
-0.011871781200170517,
0.017560111358761787,
-0.003991306759417057,
-0.014178724959492683,
0.023299003019928932,
-0.0248397346585989,
-0.04452195018529892,
0.030553068965673447,
-0.0008920921245589852,
0.004112368915230036,
-0.011719931848347187,
-0.043291158974170685,
0.03206757828593254,
-0.06431744992733002,
-0.05384210869669914,
0.008174075745046139,
-0.045919615775346756,
0.007199167739599943,
-0.060908835381269455,
-0.022526519373059273,
-0.05356504023075104,
-0.013852037489414215,
0.049932949244976044,
0.031346455216407776,
0.00606998335570097,
-0.04700782895088196,
0.01191568374633789,
-0.036705128848552704,
-0.02352043054997921,
-0.056741636246442795,
-0.03882603347301483,
-0.0281443502753973,
-0.08778250962495804,
0.04284748435020447,
0.004507595673203468,
0.02934977412223816,
0.016050180420279503,
0.01948564499616623,
-0.020889339968562126,
-0.030617697164416313,
0.0643845871090889,
0.022356346249580383,
-0.0238638948649168,
-0.014164443127810955,
0.031670112162828445,
-0.006343878339976072,
0.027540013194084167,
-0.028214415535330772,
-0.018299464136362076,
0.08858645707368851,
0.06952642649412155,
0.035485319793224335,
0.02412104606628418,
-0.0032658581621944904,
-0.05951739102602005,
-0.04649437218904495,
-0.03010191023349762,
-0.03984590619802475,
0.0015039771096780896,
-0.02803163416683674,
-0.04766017198562622,
-0.03494417667388916,
-0.05012545362114906,
-0.0028394858818501234,
-0.010240611620247364,
0.004753017332404852,
0.024143019691109657,
0.051660895347595215,
0.04790867492556572,
0.020033204928040504,
-0.0410127118229866,
-0.007016012445092201,
0.08867818862199783,
0.010333322919905186,
0.01196671649813652,
-0.08531240373849869,
-0.04069610312581062,
0.033799298107624054,
0.04389769583940506,
-0.011260383762419224,
0.002259522443637252,
0.07847742736339569,
0.01180715300142765,
-0.011775807477533817,
0.024541588500142097,
-0.022371411323547363,
-0.02333165891468525,
-0.004271862097084522,
0.001957735512405634,
-0.022913329303264618,
-0.04054469242691994,
-0.024015944451093674,
-0.0027941616717725992,
0.032078586518764496,
-0.07959561049938202,
-0.061419811099767685,
0.0032236280385404825,
0.027294130995869637,
0.008754359558224678,
-0.0033117011189460754,
-0.04178931191563606,
0.006108375731855631,
-0.009379129856824875,
-0.042360756546258926,
-0.0007264232262969017,
0.016499251127243042,
0.023347903043031693,
0.03613044694066048,
0.03303738310933113,
-0.05278979614377022,
0.0436868816614151,
0.03237815201282501,
0.04685477912425995,
0.04631515219807625,
-0.031515054404735565,
0.025213606655597687,
-0.024456167593598366,
0.032630641013383865,
-0.0009091173997148871,
-0.015016062185168266,
-0.05592859536409378,
-0.073741614818573,
-0.024655552580952644,
0.02203371934592724,
0.0009272269089706242,
-0.007511405739933252,
0.049862395972013474,
-0.03538442403078079,
-0.02652151510119438,
-0.0037199181970208883,
0.03677515313029289,
0.04304605722427368,
-0.08377443253993988,
0.054362766444683075,
0.010554644279181957,
0.02917536161839962,
-0.038707029074430466,
-0.004248271696269512,
-0.02468077279627323,
-0.029617054387927055,
0.017596201971173286,
0.07927609980106354,
0.04580872133374214,
0.056705888360738754,
0.07196592539548874,
0.009865551255643368,
-0.050784360617399216,
0.04306085780262947,
0.05422407016158104,
-0.01421122346073389,
-0.05320701375603676,
-0.006808381527662277,
0.010023229755461216,
-0.027488885447382927,
-0.012605906464159489,
-0.03862792253494263,
0.0038693395908921957,
0.030258413404226303,
0.02420918457210064,
-0.01185500156134367,
0.008483395911753178,
-0.025517020374536514,
-0.02791009284555912,
-0.060336750000715256,
-0.029252834618091583,
-0.00901383813470602,
-0.026371626183390617,
0.033443547785282135,
0.03752686083316803,
0.008945825509727001,
0.07323266565799713,
0.03935162350535393,
-0.04107097536325455,
-0.03277980908751488,
0.022889502346515656,
0.04245194420218468,
-0.05442773923277855,
-0.06466364860534668,
-0.035786885768175125,
0.044092170894145966,
0.03406894952058792,
0.0113856615498662,
-0.0863782986998558,
0.016165604814887047,
0.044517308473587036,
-0.020292963832616806,
0.06871169805526733,
-0.00491960858926177,
0.030100194737315178,
0.04462787136435509,
-0.014495734125375748,
0.018210988491773605,
-0.02875003218650818,
0.025679389014840126,
0.007696771994233131,
0.05227414891123772,
-0.0202261321246624,
-0.018773885443806648,
-0.054814573377370834,
0.04889319837093353,
-0.00800072867423296,
0.04762236401438713,
0.03567823767662048,
-0.01415777113288641,
-0.06479109823703766,
0.004863680340349674,
0.038467779755592346,
-0.07734560966491699,
0.03314993530511856,
0.015124761499464512,
0.050777655094861984,
-0.0501171238720417,
-0.03130687400698662,
-0.027409369125962257,
-0.0030462865252047777,
0.03126748278737068,
-0.02194812148809433,
-0.03020990639925003,
-0.050075653940439224,
0.011311851441860199,
-0.034766171127557755,
-0.03834293782711029,
-0.09881992638111115,
0.008972772397100925,
-0.023831535130739212,
-0.024970360100269318,
0.06973201781511307,
0.04147600010037422,
0.012844957411289215,
0.038203127682209015,
-0.011153796687722206,
0.023266607895493507,
-0.04789111390709877,
0.03547434136271477,
-0.034465376287698746,
0.0004632227646652609,
0.007511831820011139,
-0.05831316113471985,
-0.00289797130972147,
-0.030470946803689003,
-0.019966743886470795,
-0.04700956866145134,
-0.01209891214966774,
0.010766594670712948,
-0.012331966310739517,
-0.001929228426888585,
-0.009127878583967686,
0.03529701754450798,
-0.02303006500005722,
-0.030322086066007614,
-0.019725602120161057,
-0.041882291436195374,
-0.06454525142908096,
-0.032838791608810425,
0.007180533371865749,
0.017544688656926155,
0.044565826654434204,
0.009384273551404476,
-0.0013014624128118157,
0.007319273427128792,
-0.011496043764054775,
-0.008405838161706924,
0.036428309977054596,
0.0053512053564190865,
-0.03409585356712341,
-0.026966895908117294,
0.007789502386003733,
0.0006830083439126611,
0.02547493390738964,
-0.023908423259854317,
0.040143683552742004,
0.01961309276521206,
-0.021456480026245117,
-0.022443655878305435,
-0.003419634886085987,
0.03346390277147293,
-0.06366059929132462,
-0.027959730476140976,
-0.02306138351559639,
-0.06273289024829865,
0.02930510975420475,
0.020284773781895638,
-0.01835651323199272,
0.028447963297367096,
0.01230677030980587,
0.03626152500510216,
-0.013590921647846699,
-0.03819454088807106,
0.009329996071755886,
-0.03058038465678692,
0.02602861262857914,
-0.04810110107064247,
0.032772839069366455,
-0.027708085253834724,
0.019376631826162338,
-0.027249090373516083,
-0.026321547105908394,
-0.04415983334183693,
0.040546320378780365,
-0.01603633165359497,
-0.035266391932964325,
-0.00924807507544756,
0.019202478229999542,
-0.008508888073265553,
0.02934967167675495,
-0.024535944685339928,
0.020485708490014076,
-0.0037687011063098907,
0.02683127298951149,
-0.038722265511751175,
0.008941219188272953,
-0.04235247150063515,
-0.010706353932619095,
-0.041604168713092804,
-0.0418832004070282,
-0.01697828806936741,
-0.046133000403642654,
0.03642555698752403,
0.034878455102443695,
0.024165961891412735,
0.030742086470127106,
-0.02653302624821663,
0.0017086933366954327,
0.008002103306353092,
-0.046112533658742905,
-0.03712452948093414,
-0.03522147610783577,
0.00908858422189951,
-0.018461085855960846,
0.06865289062261581,
0.03516678884625435,
-0.03324892744421959,
-0.05683867633342743,
0.0492761954665184,
0.01442410983145237,
0.003998809494078159,
0.003909491002559662,
0.022391939535737038,
0.03669848293066025,
0.04686876758933067,
-0.04137302562594414,
-0.009746131487190723,
-0.0067080287262797356,
-0.006620960775762796,
0.02073950506746769,
0.008636689744889736,
0.02706865407526493,
0.010832767933607101,
-0.020990576595067978,
-0.014118282124400139,
0.05305538326501846,
0.027614783495664597,
0.0171501524746418,
-0.003948756493628025,
-0.013010617345571518,
0.026927802711725235,
0.009930495172739029,
-0.03326066955924034,
-0.022345291450619698,
0.04239963740110397,
-0.04458162933588028,
0.07558588683605194,
-0.00906152930110693,
-0.005834582261741161,
0.04875569045543671,
0.01799698732793331,
-0.01758188009262085,
0.04917319118976593,
-0.02286410890519619,
-0.004106676205992699,
0.03477934002876282,
-0.06208391115069389,
-0.01719198189675808,
-0.014903213828802109,
0.06570150703191757,
-0.05142129585146904,
0.04268068075180054,
0.05669237673282623,
0.030802978202700615,
0.021019883453845978,
-0.02776177227497101,
-0.03075934574007988,
0.024748601019382477,
-0.038726430386304855,
0.06901142001152039,
0.002965241437777877,
-0.07416393607854843,
0.08402692526578903,
0.010037006810307503,
-0.07468283921480179,
0.02193227969110012,
0.0453975535929203,
0.020324720069766045,
0.01166728138923645,
0.033005114644765854,
-0.04380263015627861,
0.009905051440000534,
-0.02983187697827816,
0.015386385843157768,
-0.057366564869880676,
-0.016786299645900726,
0.007814273238182068,
-0.04578342288732529,
0.008979379199445248,
0.02121257595717907,
-0.024272440001368523,
0.007363390643149614,
0.02214936353266239,
-0.050910912454128265,
-0.023581432178616524,
0.007722032722085714,
0.032742273062467575,
-0.02545618638396263,
0.014104985632002354,
-0.039465270936489105,
0.04935343191027641,
0.008803818374872208,
-0.026981975883245468,
-0.037255264818668365,
-0.0038331332616508007,
-0.007081839721649885,
-0.059769660234451294,
-0.0519891232252121,
0.011333998292684555,
-0.013795226812362671,
-0.03644841909408569,
0.04253650829195976,
-0.012202724814414978,
0.015370277687907219,
0.052263274788856506,
0.021217823028564453,
0.04091046750545502,
-0.05942654237151146,
0.014318931847810745,
0.0207747220993042,
0.016508113592863083,
0.027698498219251633,
-0.017814133316278458,
0.02988460101187229,
0.05142387002706528,
0.03907867521047592,
-0.022216901183128357,
-0.023168865591287613,
-0.01614849828183651,
0.02149244025349617,
-0.05222700163722038,
0.004991318564862013,
0.004957789555191994,
-0.043525949120521545,
-0.01934218406677246,
-0.048096317797899246,
-0.0062542082741856575,
0.025545336306095123,
-0.04308705776929855,
-0.008657129481434822,
0.05661088600754738,
-0.006389475427567959,
-0.06699015200138092,
-0.0640961155295372,
-0.022030694410204887,
-0.02786981873214245,
0.05682176351547241,
0.015157547779381275,
-0.03916842117905617,
0.011133143678307533,
-0.04298565909266472,
-0.0619848407804966,
0.02905011922121048,
0.021471550688147545,
-0.028978658840060234,
0.05369730666279793,
0.035805411636829376,
-0.03472331166267395,
0.021286847069859505,
0.03278082609176636,
-0.052195772528648376,
0.028117135167121887,
0.03819359466433525,
0.025766292586922646,
0.022294579073786736,
0.03392616659402847,
0.00804094411432743,
-0.015320035628974438,
-0.04267464578151703,
-0.031117137521505356,
-0.023198537528514862,
-0.002853122539818287,
0.06005699187517166
] |
ClydeWasTaken/DialoGPT-small-joshua | [
"conversational"
] | conversational | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null |
---
language: English Swedish
tags:
- translation English Swedish model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "any operations cofinanced in the framework of"
---
# legal_t5_small_trans_en_sv_small_finetuned model
Model on translating legal text from English to Swedish. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is first pretrained all the translation data over some unsupervised task. Then the model is trained on three parallel corpus from jrc-acquis, europarl and dcep.
## Model description
legal_t5_small_trans_en_sv_small_finetuned is initially pretrained on unsupervised task with the all of the data of the training set. The unsupervised task was "masked language modelling". legal_t5_small_trans_en_sv_small_finetuned is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
## Intended uses & limitations
The model could be used for translation of legal texts from English to Swedish.
### How to use
Here is how to use this model to translate legal text from English to Swedish in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_trans_en_sv_small_finetuned"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_trans_en_sv", do_lower_case=False,
skip_special_tokens=True),
device=0
)
en_text = "any operations cofinanced in the framework of"
pipeline([en_text], max_length=512)
```
## Training data
The legal_t5_small_trans_en_sv_small_finetuned (the supervised task which involved only the corresponding langauge pair and as well as unsupervised task where all of the data of all language pairs were available) model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 9 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
The pre-training data was the combined data from all the 42 language pairs. The task for the model was to predict the portions of a sentence which were masked randomly.
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_trans_en_sv_small_finetuned | 48.126|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.009331803768873215,
-0.03268270939588547,
-0.0031759203411638737,
0.05151479318737984,
0.04660894721746445,
0.026906685903668404,
-0.01921747997403145,
-0.014002865180373192,
-0.03756878525018692,
0.07462908327579498,
0.028550881892442703,
-0.01149457972496748,
-0.0034604815300554037,
0.043341197073459625,
-0.03364681825041771,
-0.05537155270576477,
-0.011352437548339367,
-0.01497013121843338,
-0.031124664470553398,
-0.003895335365086794,
0.008819099515676498,
0.005962932948023081,
0.00501920934766531,
0.006730658933520317,
0.007680195849388838,
0.007680403999984264,
0.010083010420203209,
0.05082079768180847,
0.024350369349122047,
-0.07043246179819107,
-0.011408478021621704,
-0.012803507968783379,
-0.039967045187950134,
-0.045268528163433075,
-0.019179627299308777,
-0.015029197558760643,
0.016840465366840363,
0.03355761617422104,
0.04840603843331337,
0.05611303076148033,
-0.0262334942817688,
0.012993439100682735,
-0.004559684544801712,
-0.05315244942903519,
0.03850257024168968,
0.005340798757970333,
-0.04419976845383644,
0.0023118446115404367,
0.030746517702937126,
-0.021262098103761673,
-0.050688546150922775,
-0.06941156089305878,
-0.026212632656097412,
0.038768116384744644,
-0.001612473395653069,
-0.01885269023478031,
-0.09127569943666458,
-0.013326161541044712,
0.049044325947761536,
-0.037204623222351074,
-0.05310604348778725,
0.016469141468405724,
-0.05778779834508896,
0.01941923424601555,
0.02087341994047165,
-0.03549928963184357,
-0.002187150763347745,
-0.05215512961149216,
0.04443059116601944,
0.006256957072764635,
0.06008629873394966,
-0.04248712956905365,
0.02303764410316944,
-0.09648923575878143,
-0.020240450277924538,
-0.0171897541731596,
0.008549505844712257,
0.020101895555853844,
-0.04913094639778137,
0.03189955651760101,
0.02416910044848919,
-0.022314490750432014,
0.03033326007425785,
-0.02046365663409233,
-0.03255828097462654,
0.05142849311232567,
-0.026305904611945152,
-0.020670413970947266,
-0.0003685933188535273,
0.05509873107075691,
-0.05152135714888573,
-0.0313570611178875,
-0.028893854469060898,
-0.024468405172228813,
-0.006455393508076668,
0.01812015101313591,
0.03393713757395744,
0.0027348725125193596,
0.02650049701333046,
0.020858675241470337,
0.0360640250146389,
0.03737429529428482,
-0.015990067273378372,
0.04113146662712097,
-0.01932850293815136,
-0.022197134792804718,
-0.0037182189989835024,
-0.048408932983875275,
-0.05510440468788147,
0.04315491393208504,
0.002886401489377022,
-0.05190332978963852,
-0.04750727117061615,
0.04152520000934601,
0.022363541647791862,
-0.023490002378821373,
0.047580331563949585,
-0.02724219299852848,
-0.04416491836309433,
-0.060301534831523895,
0.04092909395694733,
0.008936507627367973,
0.010828385129570961,
0.026648052036762238,
-0.05185188353061676,
0.020899133756756783,
-0.027183683589100838,
-0.05037263035774231,
0.004530268255621195,
0.00873415358364582,
-0.03553644195199013,
0.04907640814781189,
0.022625703364610672,
-0.037270352244377136,
0.0239189974963665,
0.011641294695436954,
-0.07461566478013992,
0.06421290338039398,
0.05188508331775665,
0.10858987271785736,
-0.03904075175523758,
-0.04900408908724785,
-0.00397180812433362,
0.009219289757311344,
-0.011539909988641739,
0.006654118653386831,
0.0025147534906864166,
-0.057613253593444824,
-0.022791676223278046,
-0.005168105009943247,
0.06643056124448776,
-0.04163474962115288,
0.008756520226597786,
0.02230875752866268,
0.0035951544996351004,
0.011787879280745983,
-0.03511841595172882,
-0.0033664903603494167,
0.013391600921750069,
-0.009618747048079967,
-0.049653634428977966,
0.02667325548827648,
0.0025311452336609364,
-0.02052319422364235,
-0.04832562431693077,
-0.0572797954082489,
-0.00017731485422700644,
0.0690644159913063,
0.000034857595892390236,
-0.0068871211260557175,
-0.0357993021607399,
0.0035106847062706947,
0.07561170309782028,
0.019060205668210983,
-0.014859584160149097,
0.03408215194940567,
0.053258657455444336,
0.044894877821207047,
0.005733738653361797,
0.07527816295623779,
0.0304472204297781,
-0.038765911012887955,
-0.023840216919779778,
0.015123039484024048,
-0.004655234981328249,
-0.01275049988180399,
0.0022431882098317146,
0.04664895683526993,
-0.009315728209912777,
-0.019500838592648506,
-0.02181061916053295,
0.07244653254747391,
-0.005796949844807386,
-0.003932387568056583,
-0.010616892948746681,
0.005402368493378162,
-0.0265043955296278,
0.03279047831892967,
-0.027428530156612396,
0.007186679169535637,
-0.02340833842754364,
-0.01795603521168232,
0.016932088881731033,
0.03807060420513153,
0.021746104583144188,
0.046266358345746994,
-0.007397971116006374,
0.1005864217877388,
-0.02408796362578869,
0.005154815968126059,
-0.0408855676651001,
-0.05770900472998619,
0.02060382254421711,
0.050305310636758804,
0.024242741987109184,
0.03222799673676491,
0.0071855937130749226,
-0.05298841744661331,
-0.0004910716088488698,
0.05520526319742203,
0.05042073130607605,
0.019451569765806198,
-0.0321694053709507,
-0.0031913286074995995,
0.04388433322310448,
0.06833706051111221,
-0.04692159593105316,
-0.03980180248618126,
0.010301114991307259,
0.06223444640636444,
-0.022330107167363167,
0.016761228442192078,
-0.0051225703209638596,
0.025211015716195107,
-0.025739606469869614,
-0.07081498950719833,
0.050904083997011185,
0.02392664924263954,
-0.008004078641533852,
0.008004605770111084,
0.021236317232251167,
0.019926154986023903,
0.016341041773557663,
-0.001015557674691081,
0.0020063351839780807,
-0.05469454452395439,
0.0072127836756408215,
0.006086054258048534,
0.04027589038014412,
-0.04507925733923912,
0.023108994588255882,
0.00311094312928617,
0.0019290116615593433,
0.06918156892061234,
-0.05694883316755295,
0.042221277952194214,
0.02254750020802021,
0.024681303650140762,
-0.03339068964123726,
0.033980485051870346,
0.015608440153300762,
0.05090482160449028,
0.0766768530011177,
-0.005750119686126709,
0.054583657532930374,
-0.0020914014894515276,
0.057296909391880035,
0.07395482063293457,
0.014081507921218872,
0.01431587990373373,
0.02540620043873787,
0.07870574295520782,
0.00768132833763957,
-0.016276592388749123,
0.08062197268009186,
-0.052051935344934464,
0.032855190336704254,
-0.05743194743990898,
0.014565270394086838,
-0.0038564493879675865,
-0.0011645586928352714,
0.019470958039164543,
0.013445688411593437,
-0.030149145051836967,
0.02078181318938732,
-0.019337767735123634,
-0.031208056956529617,
0.04564196243882179,
0.000018593416825751774,
0.01192445307970047,
-0.026305560022592545,
-0.02993542142212391,
0.018955498933792114,
-0.05788867548108101,
-0.037807416170835495,
0.007482403423637152,
-0.0349242202937603,
0.011387287639081478,
-0.07091862708330154,
-0.027640851214528084,
-0.04996851831674576,
-0.012246881611645222,
0.05140760540962219,
0.027761448174715042,
0.0008720902842469513,
-0.031414564698934555,
0.013892801478505135,
-0.04626833274960518,
-0.014264872297644615,
-0.06321556121110916,
-0.06572979688644409,
-0.02849520929157734,
-0.08753744512796402,
0.03498184680938721,
0.015364772640168667,
0.02393539436161518,
0.013505087234079838,
0.027727143839001656,
-0.007915828377008438,
-0.03263204172253609,
0.049180906265974045,
0.029348405078053474,
-0.0216233991086483,
-0.018866930156946182,
0.030936747789382935,
-0.019082089886069298,
0.01614340953528881,
-0.02934618480503559,
-0.007951096631586552,
0.0939299687743187,
0.060562554746866226,
0.03590858355164528,
0.016816945746541023,
-0.022650403901934624,
-0.05443417280912399,
-0.0495305061340332,
-0.03661750629544258,
-0.03955697640776634,
0.0034964559599757195,
-0.004602282308042049,
-0.04543536901473999,
-0.0327458456158638,
-0.03352145478129387,
-0.010503897443413734,
-0.020894121378660202,
0.027614599093794823,
0.032230619341135025,
0.06046219542622566,
0.04208024963736534,
0.018137583509087563,
-0.06048289313912392,
-0.014903551898896694,
0.0815008282661438,
0.00039924803422763944,
0.020981619134545326,
-0.07604479789733887,
-0.03213851898908615,
0.041662923991680145,
0.03999858349561691,
-0.005392992403358221,
0.01610329933464527,
0.09027125686407089,
0.007877486757934093,
-0.011212034150958061,
0.0354415699839592,
-0.011398982256650925,
-0.022259695455431938,
0.0012972586555406451,
0.010697840712964535,
-0.04069742187857628,
-0.044991616159677505,
-0.029060594737529755,
-0.010212172754108906,
0.03730309009552002,
-0.07392092049121857,
-0.048650726675987244,
-0.005282573867589235,
0.03293415531516075,
0.01577640138566494,
-0.002324727363884449,
-0.040329888463020325,
-0.005415689665824175,
-0.03653116524219513,
-0.031197918578982353,
0.0011006493587046862,
0.02733900398015976,
0.02029038406908512,
0.040002111345529556,
0.03542493283748627,
-0.04229588061571121,
0.03598274290561676,
0.04073736444115639,
0.04821651801466942,
0.028523549437522888,
-0.032148510217666626,
0.040484748780727386,
-0.03329641744494438,
0.035791728645563126,
-0.018951641395688057,
-0.030211035162210464,
-0.05147930234670639,
-0.06435057520866394,
-0.015911292284727097,
0.015121938660740852,
-0.013008607551455498,
-0.004369744565337896,
0.05059425160288811,
-0.024817783385515213,
-0.020474115386605263,
-0.0004318242135923356,
0.024671314284205437,
0.04395289346575737,
-0.07687266170978546,
0.046646978706121445,
0.007624877151101828,
0.02031983621418476,
-0.05016939714550972,
0.005803231615573168,
-0.01618371345102787,
-0.01847814954817295,
0.019145023077726364,
0.062203772366046906,
0.023000849410891533,
0.04694594070315361,
0.07289580255746841,
0.017863210290670395,
-0.05291237682104111,
0.039809029549360275,
0.05934081971645355,
-0.0032259151339530945,
-0.05478602275252342,
-0.002457104157656431,
-0.0048083714209496975,
-0.04779982939362526,
-0.012862571515142918,
-0.036908477544784546,
0.01658540405333042,
0.022850168868899345,
0.003093449864536524,
-0.017069119960069656,
0.006095449905842543,
-0.021103130653500557,
-0.04181884974241257,
-0.058487601578235626,
-0.028907394036650658,
0.000059364545450080186,
-0.02215735986828804,
0.02545909956097603,
0.025512944906949997,
0.015813380479812622,
0.07526497542858124,
0.03885995224118233,
-0.0362231619656086,
-0.03462081030011177,
0.031131623312830925,
0.04720122739672661,
-0.04048832133412361,
-0.062232401221990585,
-0.04015585035085678,
0.05276745557785034,
0.03834214434027672,
-0.006200674921274185,
-0.09690054506063461,
0.0045097507536411285,
0.04514014720916748,
-0.015574823133647442,
0.07210082560777664,
-0.01778503507375717,
0.02466379851102829,
0.03294925019145012,
-0.01417222898453474,
0.019870037212967873,
-0.03580924868583679,
0.032145556062459946,
-0.0035914028994739056,
0.034458279609680176,
-0.009679405950009823,
-0.04105429723858833,
-0.05626024678349495,
0.032268255949020386,
-0.006886077579110861,
0.06005436182022095,
0.04962557926774025,
0.0016024512005969882,
-0.06666581332683563,
0.021380765363574028,
0.03879428654909134,
-0.07036884874105453,
0.02140003815293312,
0.017942294478416443,
0.04793810099363327,
-0.05427796393632889,
-0.03532565385103226,
-0.03691853955388069,
0.0053876955062150955,
0.0296783484518528,
-0.010541899129748344,
-0.05307035520672798,
-0.051405083388090134,
0.013313986361026764,
-0.02344289794564247,
-0.02987365610897541,
-0.10640806704759598,
0.02368680201470852,
-0.01603216491639614,
-0.017853088676929474,
0.05778493359684944,
0.012841327115893364,
0.015359730459749699,
0.030926380306482315,
0.007384123280644417,
0.03193936496973038,
-0.05718391016125679,
0.03441104292869568,
-0.024020720273256302,
-0.002877752762287855,
-0.0027606384828686714,
-0.060486260801553726,
-0.0028348760679364204,
-0.025882260873913765,
-0.03624719753861427,
-0.04378964379429817,
-0.02661864273250103,
0.0004867393581662327,
-0.0041966685093939304,
0.008570436388254166,
-0.020304663106799126,
0.03592357784509659,
-0.014975497499108315,
-0.03166178613901138,
-0.012347089126706123,
-0.03978952020406723,
-0.058108244091272354,
-0.0336310938000679,
-0.0048278016038239,
0.03308513015508652,
0.03393144533038139,
0.009490248747169971,
-0.014555213041603565,
0.007054395042359829,
0.010487080551683903,
-0.015640361234545708,
0.03208227828145027,
-0.004989585839211941,
-0.03500908240675926,
-0.029220420867204666,
0.004417696036398411,
0.008423471823334694,
0.020455490797758102,
-0.016980940476059914,
0.03807372227311134,
0.02720114402472973,
-0.020029382780194283,
-0.005683391820639372,
0.001031195279210806,
0.0434674434363842,
-0.0695105716586113,
-0.019848227500915527,
-0.01608225516974926,
-0.05594654381275177,
0.02781030349433422,
0.005254670046269894,
-0.015505499206483364,
0.026450447738170624,
0.005190594121813774,
0.037710417062044144,
0.010515406727790833,
-0.0338158905506134,
0.001784917083568871,
-0.027624808251857758,
0.025009388104081154,
-0.05070844665169716,
0.039461102336645126,
-0.021699849516153336,
0.019617609679698944,
-0.015998519957065582,
-0.02793022431433201,
-0.044125836342573166,
0.05521201714873314,
-0.0038998564705252647,
-0.046496111899614334,
-0.0090056536719203,
0.008863716386258602,
-0.014899997971951962,
0.02660536766052246,
-0.019427590072155,
0.012167795561254025,
-0.004436475690454245,
0.029787717387080193,
-0.030225440859794617,
0.004866347648203373,
-0.02737637422978878,
-0.024234462529420853,
-0.02180713787674904,
-0.03308265283703804,
-0.01837019994854927,
-0.05645729601383209,
0.05067265406250954,
0.041253574192523956,
0.029654603451490402,
0.019145572558045387,
-0.02760225161910057,
-0.003819395788013935,
0.003117513610050082,
-0.05654921382665634,
-0.0335187092423439,
-0.030598236247897148,
0.008338917046785355,
-0.018661510199308395,
0.07556190341711044,
0.037303172051906586,
-0.026069829240441322,
-0.05119050294160843,
0.04336387664079666,
0.01038259919732809,
0.010081046260893345,
-0.0007239073747768998,
0.024790160357952118,
0.028376929461956024,
0.04255073890089989,
-0.05493640527129173,
-0.00010492535511730239,
-0.01076431479305029,
-0.0070552160032093525,
0.01946563459932804,
0.0034551036078482866,
0.009530157782137394,
0.013729223050177097,
-0.03792409598827362,
-0.013416287489235401,
0.056581538170576096,
0.03639864921569824,
0.012470870278775692,
-0.003376426175236702,
-0.02358335442841053,
0.008669981732964516,
0.023792235180735588,
-0.03370361030101776,
-0.034819114953279495,
0.04476914927363396,
-0.03344454988837242,
0.06008574739098549,
-0.006881697103381157,
0.005694254767149687,
0.04632597789168358,
0.02130504697561264,
0.0023029411677271128,
0.037526510655879974,
-0.028865262866020203,
0.005868938751518726,
0.045873913913965225,
-0.07128960639238358,
-0.004878262989223003,
-0.015732083469629288,
0.07566041499376297,
-0.047493960708379745,
0.0426214300096035,
0.0422181598842144,
0.02944125421345234,
0.022379864007234573,
-0.02703079767525196,
-0.0340065062046051,
0.0295848548412323,
-0.027197955176234245,
0.06302686780691147,
0.016299495473504066,
-0.0922517329454422,
0.09363076835870743,
0.012711978517472744,
-0.07937579602003098,
0.030949978157877922,
0.04972684010863304,
0.037843506783246994,
0.025402553379535675,
0.023065488785505295,
-0.051762040704488754,
0.009087969549000263,
-0.026235932484269142,
0.01925625652074814,
-0.06743299216032028,
-0.02575528807938099,
0.011056837625801563,
-0.05898720398545265,
0.005718446336686611,
0.028286226093769073,
-0.03265061229467392,
-0.0018339497037231922,
-0.003103393828496337,
-0.04465801641345024,
-0.01983451656997204,
-0.00347038428299129,
0.014670386910438538,
-0.04251289367675781,
0.009300346486270428,
-0.04494196176528931,
0.04617631062865257,
0.022709811106324196,
-0.00901880394667387,
-0.055514272302389145,
0.0030301972292363644,
0.007701949682086706,
-0.051421135663986206,
-0.035245269536972046,
0.019044168293476105,
0.0036813784390687943,
-0.035710740834474564,
0.04795653373003006,
-0.013247709721326828,
0.016089320182800293,
0.04487430676817894,
0.0002449048333801329,
0.036098260432481766,
-0.05163547769188881,
0.02185547538101673,
0.012023930437862873,
0.015545697882771492,
0.02349976636469364,
-0.017623428255319595,
0.042390383780002594,
0.04038440063595772,
0.04157651588320732,
-0.02284044772386551,
-0.026044633239507675,
-0.004161755088716745,
0.02418469451367855,
-0.036591511219739914,
0.007974074222147465,
0.0021527244243770838,
-0.03292730450630188,
-0.018420731648802757,
-0.04687022045254707,
-0.013749579899013042,
0.024928612634539604,
-0.0513308122754097,
-0.0161705631762743,
0.041949328035116196,
-0.013769351877272129,
-0.059256672859191895,
-0.08186573535203934,
-0.01927538402378559,
-0.03108922950923443,
0.03846583515405655,
0.008492453955113888,
-0.040864571928977966,
0.007861265912652016,
-0.025836560875177383,
-0.06731069087982178,
0.031752005219459534,
0.009463651105761528,
-0.03140214458107948,
0.053070954978466034,
0.04225357994437218,
-0.03153708577156067,
0.020160602405667305,
0.029027709737420082,
-0.05641868710517883,
0.04144011810421944,
0.03142183646559715,
0.0362967774271965,
0.005608485080301762,
0.02981259487569332,
-0.020560279488563538,
-0.016874784603714943,
-0.04903702437877655,
-0.03302289918065071,
-0.02170773781836033,
-0.009606332518160343,
0.06914731115102768
] |
Contrastive-Tension/BERT-Distil-CT | [
"pytorch",
"tf",
"distilbert",
"fill-mask",
"transformers",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"DistilBertForMaskedLM"
],
"model_type": "distilbert",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 9 | null |
---
language: Swedish Spanish
tags:
- translation Swedish Spanish model
datasets:
- dcep europarl jrc-acquis
widget:
- text: "Monika Flašíková Beňová (S&D)"
---
# legal_t5_small_trans_sv_es model
Model on translating legal text from Swedish to Spanish. It was first released in
[this repository](https://github.com/agemagician/LegalTrans). This model is trained on three parallel corpus from jrc-acquis, europarl and dcep.
## Model description
legal_t5_small_trans_sv_es is based on the `t5-small` model and was trained on a large corpus of parallel text. This is a smaller model, which scales the baseline model of t5 down by using `dmodel = 512`, `dff = 2,048`, 8-headed attention, and only 6 layers each in the encoder and decoder. This variant has about 60 million parameters.
## Intended uses & limitations
The model could be used for translation of legal texts from Swedish to Spanish.
### How to use
Here is how to use this model to translate legal text from Swedish to Spanish in PyTorch:
```python
from transformers import AutoTokenizer, AutoModelWithLMHead, TranslationPipeline
pipeline = TranslationPipeline(
model=AutoModelWithLMHead.from_pretrained("SEBIS/legal_t5_small_trans_sv_es"),
tokenizer=AutoTokenizer.from_pretrained(pretrained_model_name_or_path = "SEBIS/legal_t5_small_trans_sv_es", do_lower_case=False,
skip_special_tokens=True),
device=0
)
sv_text = "Monika Flašíková Beňová (S&D)"
pipeline([sv_text], max_length=512)
```
## Training data
The legal_t5_small_trans_sv_es model was trained on [JRC-ACQUIS](https://wt-public.emm4u.eu/Acquis/index_2.2.html), [EUROPARL](https://www.statmt.org/europarl/), and [DCEP](https://ec.europa.eu/jrc/en/language-technologies/dcep) dataset consisting of 5 Million parallel texts.
## Training procedure
The model was trained on a single TPU Pod V3-8 for 250K steps in total, using sequence length 512 (batch size 4096). It has a total of approximately 220M parameters and was trained using the encoder-decoder architecture. The optimizer used is AdaFactor with inverse square root learning rate schedule for pre-training.
### Preprocessing
An unigram model trained with 88M lines of text from the parallel corpus (of all possible language pairs) to get the vocabulary (with byte pair encoding), which is used with this model.
### Pretraining
## Evaluation results
When the model is used for translation test dataset, achieves the following results:
Test results :
| Model | BLEU score |
|:-----:|:-----:|
| legal_t5_small_trans_sv_es | 47.407|
### BibTeX entry and citation info
> Created by [Ahmed Elnaggar/@Elnaggar_AI](https://twitter.com/Elnaggar_AI) | [LinkedIn](https://www.linkedin.com/in/prof-ahmed-elnaggar/)
| [
-0.013288878835737705,
-0.03230341896414757,
-0.0008661759202368557,
0.059031419456005096,
0.04109995812177658,
0.024632524698972702,
-0.015160240232944489,
-0.01534739788621664,
-0.03930828720331192,
0.07049816846847534,
0.02203567698597908,
-0.019233623519539833,
-0.010128899477422237,
0.051545146852731705,
-0.034454893320798874,
-0.053368471562862396,
-0.009512254036962986,
-0.013264855369925499,
-0.041000787168741226,
-0.00500697223469615,
0.008589986711740494,
0.005826651584357023,
0.0047390274703502655,
0.006095418240875006,
0.0030188721138983965,
0.004638648126274347,
0.01400085911154747,
0.04135160520672798,
0.013253479264676571,
-0.06887290626764297,
-0.00975592341274023,
-0.016484584659337997,
-0.04170091450214386,
-0.041057340800762177,
-0.01843084581196308,
-0.015352532267570496,
0.011730369180440903,
0.023814871907234192,
0.04083617031574249,
0.047014638781547546,
-0.02009374089539051,
0.011487872339785099,
-0.010658450424671173,
-0.05020535737276077,
0.04225951060652733,
0.008076419122517109,
-0.05599934235215187,
-0.011108499020338058,
0.030281787738204002,
-0.01405192818492651,
-0.05393333360552788,
-0.06946482509374619,
-0.03387489914894104,
0.03129392862319946,
-0.01230569090694189,
-0.022770937532186508,
-0.08755527436733246,
-0.014199602417647839,
0.053969234228134155,
-0.030784972012043,
-0.04364844784140587,
0.015730563551187515,
-0.05527634173631668,
0.01659373939037323,
0.028070271015167236,
-0.027339722961187363,
0.0006649213610216975,
-0.03832542151212692,
0.04479894042015076,
-0.002675487659871578,
0.0637940987944603,
-0.04127778857946396,
0.0251854807138443,
-0.09972648322582245,
-0.01877003163099289,
-0.023330165073275566,
0.006789179053157568,
0.020882122218608856,
-0.05446205288171768,
0.033574268221855164,
0.03413525968790054,
-0.015538714826107025,
0.03230363875627518,
-0.022941261529922485,
-0.035445358604192734,
0.06311558187007904,
-0.027326412498950958,
-0.03073909319937229,
0.0034368005581200123,
0.053976453840732574,
-0.05025192350149155,
-0.029267452657222748,
-0.020811408758163452,
-0.02589154802262783,
-0.0021214873995631933,
0.02905772067606449,
0.039593614637851715,
-0.00870267953723669,
0.0342453271150589,
0.023529071360826492,
0.03084643743932247,
0.03548679128289223,
-0.014732103794813156,
0.04187896475195885,
-0.02677234262228012,
-0.023896941915154457,
-0.008870583958923817,
-0.051214903593063354,
-0.045326270163059235,
0.037011418491601944,
0.003927249927073717,
-0.047964129596948624,
-0.04558127000927925,
0.058462198823690414,
0.020796284079551697,
-0.015690533444285393,
0.05014977604150772,
-0.031632497906684875,
-0.05185188725590706,
-0.05940259248018265,
0.050890181213617325,
0.016667773947119713,
0.0024147708900272846,
0.027751125395298004,
-0.05190078169107437,
0.01737915351986885,
-0.02393016591668129,
-0.03868166357278824,
0.0030111591331660748,
0.012679711915552616,
-0.03449247032403946,
0.04043165221810341,
0.01767142489552498,
-0.03748897835612297,
0.025243673473596573,
0.005939170252531767,
-0.07242213934659958,
0.059694916009902954,
0.052234817296266556,
0.10502862185239792,
-0.044383611530065536,
-0.04066922515630722,
0.0010252539068460464,
0.00475962832570076,
-0.014320814982056618,
-0.0016323392046615481,
-0.002007399220019579,
-0.053788039833307266,
-0.029875466600060463,
-0.0015876111574470997,
0.06851286441087723,
-0.04611001908779144,
0.0032299207523465157,
0.017315898090600967,
-0.0071636890061199665,
0.013986757025122643,
-0.032638829201459885,
-0.004047327674925327,
0.01848042942583561,
-0.005150263197720051,
-0.053316473960876465,
0.020954832434654236,
0.0012996492441743612,
-0.020848652347922325,
-0.0538833811879158,
-0.04758598282933235,
0.004846740514039993,
0.07440921664237976,
0.0037986338138580322,
-0.00624837726354599,
-0.027848385274410248,
0.006555815692991018,
0.07076738029718399,
0.01589999347925186,
-0.008982167579233646,
0.03257684037089348,
0.06000998616218567,
0.05026758089661598,
0.0027087691705673933,
0.07103048264980316,
0.031704649329185486,
-0.03843994811177254,
-0.030852850526571274,
0.020657388493418694,
-0.001980107044801116,
-0.0009361965931020677,
0.006541003473103046,
0.045107558369636536,
-0.01671121083199978,
-0.0155284209176898,
-0.007117625325918198,
0.0751824826002121,
-0.01327710971236229,
-0.0023274128325283527,
-0.012862861156463623,
0.004458114039152861,
-0.025126833468675613,
0.03930508717894554,
-0.03272789716720581,
0.009669679217040539,
-0.027605295181274414,
-0.014575796201825142,
0.008235816843807697,
0.03510446846485138,
0.014409736730158329,
0.04573402181267738,
0.0035014618188142776,
0.09906122833490372,
-0.02238682471215725,
0.009992980398237705,
-0.04582562297582626,
-0.05778631195425987,
0.013424759730696678,
0.04643136262893677,
0.018880603834986687,
0.036558445543050766,
0.0036572020035237074,
-0.05334007740020752,
0.000483322684885934,
0.05959387123584747,
0.04058857262134552,
0.013938318938016891,
-0.03136523440480232,
-0.00551607133820653,
0.04428480938076973,
0.08054409921169281,
-0.04048226401209831,
-0.03937336429953575,
0.0070921010337769985,
0.06261763721704483,
-0.02187902294099331,
0.017384925857186317,
-0.011333012022078037,
0.020929507911205292,
-0.029343552887439728,
-0.06994963437318802,
0.051205918192863464,
0.02697758562862873,
-0.005269289948046207,
0.00822406355291605,
0.019038232043385506,
0.014576559886336327,
0.015486194752156734,
-0.002633485710248351,
0.0019289770862087607,
-0.05108140781521797,
0.004016462247818708,
0.0017113076755777001,
0.03562703728675842,
-0.04328946769237518,
0.021873408928513527,
0.004876129329204559,
-0.0011398771312087774,
0.06794451177120209,
-0.06109478697180748,
0.03758511692285538,
0.028590820729732513,
0.0205148383975029,
-0.036938853561878204,
0.026858864352107048,
0.009528935886919498,
0.03609739989042282,
0.07391201704740524,
0.0005920179537497461,
0.048156969249248505,
0.001674601691775024,
0.04879206791520119,
0.07766278088092804,
0.012706728652119637,
0.0022197554353624582,
0.03405110538005829,
0.08470863103866577,
0.0029634637758135796,
-0.01480370294302702,
0.08161178231239319,
-0.04914351925253868,
0.02082555927336216,
-0.05371043086051941,
0.012001113034784794,
0.00026831807917915285,
0.0012463164748623967,
0.016456065699458122,
0.009013636969029903,
-0.04507998749613762,
0.024129973724484444,
-0.01992102898657322,
-0.026533495634794235,
0.045443449169397354,
-0.00042267973185516894,
0.004792559891939163,
-0.020666087046265602,
-0.033064279705286026,
0.0180645938962698,
-0.06450781226158142,
-0.04586918279528618,
0.004084248095750809,
-0.03630465641617775,
-0.0017648596549406648,
-0.06531555950641632,
-0.026532139629125595,
-0.051335304975509644,
-0.0179404616355896,
0.05082019045948982,
0.01267426460981369,
0.0005488634924404323,
-0.026367001235485077,
0.010525563731789589,
-0.04610757902264595,
-0.025644909590482712,
-0.05246095359325409,
-0.06450584530830383,
-0.028979862108826637,
-0.08937064558267593,
0.03149577975273132,
0.019390827044844627,
0.0310982558876276,
0.01969231851398945,
0.02281583659350872,
0.002463327255100012,
-0.0364866778254509,
0.04471667483448982,
0.030874058604240417,
-0.014964115805923939,
-0.0247479435056448,
0.031859781593084335,
-0.020118625834584236,
0.023212213069200516,
-0.016786912456154823,
-0.011349713429808617,
0.08523544669151306,
0.05500930920243263,
0.03994700312614441,
0.01785956509411335,
-0.020273905247449875,
-0.049432553350925446,
-0.0486806221306324,
-0.04301457107067108,
-0.0433541014790535,
-0.001037848531268537,
-0.01276349276304245,
-0.04948354512453079,
-0.03009021282196045,
-0.04289830103516579,
-0.004129577428102493,
-0.009172157384455204,
0.025310207158327103,
0.044644393026828766,
0.05873362720012665,
0.04838337376713753,
0.021643178537487984,
-0.05567510053515434,
-0.0034608461428433657,
0.08088558912277222,
0.006081484258174896,
0.015849502757191658,
-0.07761512696743011,
-0.0258916225284338,
0.03508695587515831,
0.03227750584483147,
-0.007995967753231525,
0.008063127286732197,
0.08666516840457916,
0.010134037584066391,
-0.016901547089219093,
0.03984330967068672,
-0.00743919936940074,
-0.032235037535429,
0.0029159339610487223,
0.00526101840659976,
-0.040514566004276276,
-0.04655572772026062,
-0.030635273084044456,
-0.016641920432448387,
0.04355927184224129,
-0.07779628783464432,
-0.05285971984267235,
-0.010844163596630096,
0.028870809823274612,
0.01591617614030838,
0.00008230843377532437,
-0.04865259677171707,
-0.0030448229517787695,
-0.0290461927652359,
-0.036992672830820084,
0.010206259787082672,
0.0157803762704134,
0.020552612841129303,
0.04183993488550186,
0.02964252606034279,
-0.04711603745818138,
0.03440918028354645,
0.038391292095184326,
0.04524887353181839,
0.027277162298560143,
-0.03718069568276405,
0.034466784447431564,
-0.031642716377973557,
0.02680727280676365,
-0.01177471037954092,
-0.022632988169789314,
-0.05580532178282738,
-0.0706293135881424,
-0.005352008622139692,
0.017509859055280685,
-0.010803363285958767,
-0.009039444848895073,
0.054105740040540695,
-0.029324226081371307,
-0.007862337864935398,
-0.010359118692576885,
0.02511622942984104,
0.03870870918035507,
-0.08308534324169159,
0.050396278500556946,
0.015256269834935665,
0.022096548229455948,
-0.05160348489880562,
0.01527287159115076,
-0.01775091141462326,
-0.029193807393312454,
0.018617894500494003,
0.06471358239650726,
0.022404422983527184,
0.05261388421058655,
0.06723970174789429,
0.017921682447195053,
-0.049486059695482254,
0.043774817138910294,
0.052002422511577606,
-0.010572322644293308,
-0.06901556998491287,
-0.003176734084263444,
-0.003979054279625416,
-0.04998859763145447,
-0.0025840983726084232,
-0.035808924585580826,
0.012881912291049957,
0.030760297551751137,
0.015164757147431374,
-0.02675481326878071,
0.0035434113815426826,
-0.023294657468795776,
-0.037475768476724625,
-0.05134275183081627,
-0.027701042592525482,
-0.0017616611439734697,
-0.0143037224188447,
0.027301359921693802,
0.019503343850374222,
0.012581403367221355,
0.07374677062034607,
0.04873096942901611,
-0.030445830896496773,
-0.02672809176146984,
0.03404654935002327,
0.04152245447039604,
-0.041596587747335434,
-0.06386474519968033,
-0.03650497645139694,
0.060617249459028244,
0.03326018154621124,
0.011862204410135746,
-0.09960377216339111,
0.00723203644156456,
0.04104877635836601,
-0.015520378947257996,
0.06901340931653976,
-0.02255880832672119,
0.02429002895951271,
0.034433916211128235,
-0.019890008494257927,
0.020889488980174065,
-0.037299707531929016,
0.023961959406733513,
-0.009787341579794884,
0.03699124604463577,
-0.007127431221306324,
-0.04268134385347366,
-0.06067412719130516,
0.04042889177799225,
-0.006918164435774088,
0.05734745040535927,
0.046092696487903595,
-0.0075373598374426365,
-0.07420515269041061,
0.015195648185908794,
0.04982050135731697,
-0.06445697695016861,
0.01036444865167141,
0.021336007863283157,
0.04486692696809769,
-0.05230746045708656,
-0.029870005324482918,
-0.031030403450131416,
0.006464570760726929,
0.02693208120763302,
-0.005545666441321373,
-0.0476997084915638,
-0.04846503585577011,
0.01269278023391962,
-0.02850992977619171,
-0.03361095115542412,
-0.09836608171463013,
0.02438618615269661,
-0.02178427018225193,
-0.015249616466462612,
0.06198696419596672,
0.027850087732076645,
0.015596590004861355,
0.03960090130567551,
0.008340632542967796,
0.0287239458411932,
-0.046977121382951736,
0.03548237308859825,
-0.02860381454229355,
0.0020813816227018833,
-0.010348321869969368,
-0.056700438261032104,
-0.003088537137955427,
-0.030364885926246643,
-0.03510088473558426,
-0.03658587113022804,
-0.01106992643326521,
0.014714556746184826,
-0.002713122172281146,
0.012108906172215939,
-0.016411516815423965,
0.03598921373486519,
-0.019652830436825752,
-0.03136300668120384,
-0.014218234457075596,
-0.033278677612543106,
-0.055467911064624786,
-0.043826375156641006,
0.004166121128946543,
0.024915257468819618,
0.044048041105270386,
0.002541795140132308,
-0.009258577600121498,
0.007827021181583405,
-0.00308076455257833,
-0.008861741051077843,
0.027252988889813423,
0.0010787127539515495,
-0.036010004580020905,
-0.03257480263710022,
0.004612789023667574,
0.010114286094903946,
0.02816242352128029,
-0.016590850427746773,
0.033369485288858414,
0.020848281681537628,
-0.021107561886310577,
-0.008059695363044739,
0.00008205571793951094,
0.0421096570789814,
-0.06695075333118439,
-0.020898614078760147,
-0.013105306774377823,
-0.06325622648000717,
0.030368205159902573,
0.009026367217302322,
-0.017568960785865784,
0.02296144887804985,
0.00264854752458632,
0.04750678688287735,
0.0030422965064644814,
-0.030665680766105652,
0.0017568295588716865,
-0.022931672632694244,
0.02053939178586006,
-0.05462757870554924,
0.046478450298309326,
-0.022270701825618744,
0.019879378378391266,
-0.010075186379253864,
-0.028676923364400864,
-0.03955601900815964,
0.057327356189489365,
-0.014143464155495167,
-0.051454588770866394,
-0.004951349459588528,
0.020486392080783844,
-0.0006810352788306773,
0.024400105699896812,
-0.021384993568062782,
0.010296663269400597,
-0.014465018175542355,
0.0472039058804512,
-0.0401405468583107,
0.008088396862149239,
-0.02962815947830677,
-0.023586919531226158,
-0.015747614204883575,
-0.0396268330514431,
-0.015762079507112503,
-0.05503641441464424,
0.04700479283928871,
0.054629530757665634,
0.02756396122276783,
0.023200582712888718,
-0.037686266005039215,
0.0019423782359808683,
0.003146745963022113,
-0.06010814383625984,
-0.041131552308797836,
-0.037669964134693146,
0.01330224983394146,
-0.009035260416567326,
0.07509258389472961,
0.03868219628930092,
-0.023851387202739716,
-0.04551265388727188,
0.049490317702293396,
0.015032044611871243,
0.001953713595867157,
-0.009223022498190403,
0.025336528196930885,
0.020680101588368416,
0.044374771416187286,
-0.04712040349841118,
0.00004262836591806263,
-0.008283443748950958,
-0.009253461845219135,
0.019539881497621536,
0.007194040343165398,
0.007829787209630013,
0.017855284735560417,
-0.038963425904512405,
-0.011944223195314407,
0.0611862875521183,
0.03917001560330391,
0.009396683424711227,
-0.00642816536128521,
-0.023327186703681946,
0.012937501072883606,
0.018354954198002815,
-0.042205099016427994,
-0.02674080803990364,
0.037457406520843506,
-0.02765408530831337,
0.06510717421770096,
-0.0062959399074316025,
-0.0036766452249139547,
0.051272254437208176,
0.02619142271578312,
-0.0043496619910001755,
0.03762451559305191,
-0.0255904458463192,
0.003989931661635637,
0.04254470765590668,
-0.07329891622066498,
-0.004058619029819965,
-0.014741995371878147,
0.06949122995138168,
-0.05430483818054199,
0.042481277137994766,
0.041169553995132446,
0.027216574177145958,
0.01924237050116062,
-0.022129854187369347,
-0.03331432119011879,
0.03000188246369362,
-0.04040387272834778,
0.07355451583862305,
0.010846537537872791,
-0.09540276974439621,
0.10087625682353973,
0.014550003223121166,
-0.07345809042453766,
0.03626333177089691,
0.05027319863438606,
0.029547853395342827,
0.02642158977687359,
0.029507789760828018,
-0.056320421397686005,
0.019390752539038658,
-0.025507763028144836,
0.012956340797245502,
-0.06401762366294861,
-0.021985197439789772,
0.003423447487875819,
-0.044061318039894104,
0.00923565961420536,
0.025488249957561493,
-0.03280109167098999,
-0.00136759493034333,
0.007795033976435661,
-0.050366416573524475,
-0.025634177029132843,
-0.0027084958273917437,
0.019437987357378006,
-0.03869721293449402,
0.002291186014190316,
-0.033679086714982986,
0.05481424555182457,
0.02371823973953724,
-0.012668081559240818,
-0.05422521010041237,
0.005823912099003792,
0.0006162087665870786,
-0.0687490850687027,
-0.042310021817684174,
0.017197707667946815,
0.0026191065553575754,
-0.03069918416440487,
0.044968131929636,
-0.007972918450832367,
0.013624000363051891,
0.039601538330316544,
0.007673159241676331,
0.03257176652550697,
-0.05916518718004227,
0.02473778836429119,
0.01645674556493759,
0.021470807492733,
0.02498764544725418,
-0.014129514805972576,
0.03481720760464668,
0.03784838691353798,
0.03920026123523712,
-0.026897305622696877,
-0.02038164623081684,
-0.00392194977030158,
0.02386065572500229,
-0.04721176251769066,
0.015976551920175552,
0.005172679200768471,
-0.027275998145341873,
-0.014155812561511993,
-0.04398559778928757,
-0.003734142053872347,
0.02753550559282303,
-0.05296582728624344,
-0.012203572317957878,
0.039181917905807495,
-0.01747581921517849,
-0.05031997337937355,
-0.07955645024776459,
-0.02401438169181347,
-0.0301901176571846,
0.03217856585979462,
0.015590865164995193,
-0.04633227363228798,
0.00786503218114376,
-0.018080459907650948,
-0.059348009526729584,
0.026872647926211357,
0.021165557205677032,
-0.029716387391090393,
0.050330329686403275,
0.04844542592763901,
-0.04456904157996178,
0.0178560521453619,
0.020508931949734688,
-0.05358415096998215,
0.030385859310626984,
0.024545997381210327,
0.030831363052129745,
0.012224211357533932,
0.02682303823530674,
-0.007928048260509968,
-0.009469245560467243,
-0.046370524913072586,
-0.03420891985297203,
-0.01812063902616501,
-0.015191396698355675,
0.06371711939573288
] |
Craig/mGqFiPhu | [
"sentence-transformers",
"feature-extraction",
"sentence-similarity",
"transformers",
"license:apache-2.0"
] | feature-extraction | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
language: hu
license: apache-2.0
datasets:
- common_crawl
- wikipedia
---
# huBERT base model (cased)
## Model description
Cased BERT model for Hungarian, trained on the (filtered, deduplicated) Hungarian subset of the Common Crawl and a snapshot of the Hungarian Wikipedia.
## Intended uses & limitations
The model can be used as any other (cased) BERT model. It has been tested on the chunking and
named entity recognition tasks and set a new state-of-the-art on the former.
## Training
Details of the training data and procedure can be found in the PhD thesis linked below. (With the caveat that it only contains preliminary results
based on the Wikipedia subcorpus. Evaluation of the full model will appear in a future paper.)
## Eval results
When fine-tuned (via `BertForTokenClassification`) on chunking and NER, the model outperforms multilingual BERT, achieves state-of-the-art results on
both tasks. The exact scores are
| NER | Minimal NP | Maximal NP |
|-----|------------|------------|
| **97.62%** | **97.14%** | **96.97%** |
### BibTeX entry and citation info
If you use the model, please cite the following papers:
[Nemeskey, Dávid Márk (2020). "Natural Language Processing Methods for Language Modeling." PhD Thesis. Eötvös Loránd University.](https://hlt.bme.hu/en/publ/nemeskey_2020)
Bibtex:
```bibtex
@PhDThesis{ Nemeskey:2020,
author = {Nemeskey, Dávid Márk},
title = {Natural Language Processing Methods for Language Modeling},
year = {2020},
school = {E\"otv\"os Lor\'and University}
}
```
[Nemeskey, Dávid Márk (2021). "Introducing huBERT." In: XVII. Magyar Számítógépes Nyelvészeti Konferencia (MSZNY 2021). Szeged, pp. 3-14](https://hlt.bme.hu/en/publ/hubert_2021)
Bibtex:
```bibtex
@InProceedings{ Nemeskey:2021a,
author = {Nemeskey, Dávid Márk},
title = {Introducing \texttt{huBERT}},
booktitle = {{XVII}.\ Magyar Sz{\'a}m{\'i}t{\'o}g{\'e}pes Nyelv{\'e}szeti Konferencia ({MSZNY}2021)},
year = 2021,
pages = {TBA},
address = {Szeged},
}
```
| [
-0.003293094225227833,
-0.0034585127141326666,
-0.0429890900850296,
0.047995489090681076,
0.014191652648150921,
0.026109211146831512,
0.007968219928443432,
-0.007617110386490822,
-0.034287597984075546,
0.05856909602880478,
0.028507260605692863,
-0.009030742570757866,
-0.0017405562102794647,
0.05339604616165161,
-0.03322596102952957,
-0.01826087012887001,
-0.01978999190032482,
0.00048371110460720956,
-0.05919573828577995,
0.008626148104667664,
-0.020917223766446114,
0.019256694242358208,
-0.015686342492699623,
0.01681285724043846,
0.011456344276666641,
0.019747888669371605,
-0.018076220527291298,
0.04662230610847473,
0.019894549623131752,
-0.07227232307195663,
-0.00035587523598223925,
-0.041555095463991165,
-0.0384029857814312,
0.004632119555026293,
-0.024212542921304703,
-0.028133181855082512,
-0.013579037971794605,
0.007493976969271898,
0.010949179530143738,
0.07129208743572235,
-0.03998139128088951,
0.033070143312215805,
-0.0008151186048053205,
-0.07524129003286362,
0.025753432884812355,
0.007256580516695976,
-0.04117485508322716,
-0.03000471740961075,
0.03734275698661804,
-0.03455263376235962,
-0.040581509470939636,
-0.06788726896047592,
-0.043452974408864975,
0.04359996318817139,
-0.03044860251247883,
-0.03226635977625847,
-0.05432675778865814,
-0.015578029677271843,
0.07654033601284027,
-0.035094548016786575,
-0.021989328786730766,
0.0061089713126420975,
-0.04814990237355232,
0.02960486151278019,
0.04554898664355278,
-0.03760947659611702,
0.010027416981756687,
-0.04536377266049385,
0.03500336781144142,
-0.03153262659907341,
0.035444002598524094,
-0.03803868219256401,
-0.018090568482875824,
-0.09843166172504425,
-0.01709470897912979,
-0.011626362800598145,
0.040332723408937454,
0.03778057172894478,
-0.025630857795476913,
0.04826507717370987,
0.003398663131520152,
0.01814269833266735,
0.015071999281644821,
-0.04171924665570259,
-0.005004012957215309,
0.054160770028829575,
-0.03209610655903816,
0.005029989406466484,
0.006004849448800087,
0.05909860506653786,
-0.049473948776721954,
0.006554342806339264,
-0.0025979371275752783,
-0.01512230932712555,
-0.00735628604888916,
0.02035662718117237,
0.01200736965984106,
0.01487762201577425,
0.04094648361206055,
0.0382012315094471,
0.024503206834197044,
0.03962713107466698,
-0.0029869156423956156,
0.04948888346552849,
-0.0038458327762782574,
0.007788139395415783,
-0.01442534476518631,
-0.03670792654156685,
-0.038226667791604996,
0.028116801753640175,
0.027984827756881714,
-0.06228122115135193,
-0.05124787241220474,
0.042789384722709656,
0.019612351432442665,
-0.04070181027054787,
0.06357912719249725,
-0.037211284041404724,
-0.05187608674168587,
-0.0460171140730381,
0.03761817142367363,
-0.0030669623520225286,
-0.00387480272911489,
-0.004983978345990181,
-0.06404057145118713,
0.028819963335990906,
-0.04094267264008522,
-0.022657835856080055,
-0.0004132090543862432,
0.013670208863914013,
-0.024876819923520088,
0.05487268418073654,
0.03408601135015488,
-0.07812485843896866,
0.015863582491874695,
-0.00018305511912330985,
-0.07061419636011124,
0.05150764063000679,
0.03245895355939865,
0.10269416868686676,
-0.039506275206804276,
-0.04378123953938484,
0.012733429670333862,
0.021043214946985245,
-0.018679607659578323,
-0.00009965550270862877,
0.013360457494854927,
-0.039397597312927246,
-0.009527788497507572,
-0.027135591953992844,
0.05600515753030777,
-0.06456130743026733,
0.005823723506182432,
0.053953032940626144,
-0.015970254316926003,
0.049318358302116394,
-0.04673773795366287,
-0.0077328868210315704,
0.0032046588603407145,
0.02349739708006382,
-0.020412692800164223,
0.03386121243238449,
0.00917222909629345,
-0.016461888328194618,
-0.05952160805463791,
-0.0476125106215477,
0.004199861548841,
0.08647479116916656,
-0.0030265783425420523,
0.0035090292803943157,
-0.0464324951171875,
0.024060718715190887,
0.0672488883137703,
0.03753490000963211,
-0.031584352254867554,
0.033176980912685394,
0.042205147445201874,
0.04044058546423912,
-0.010778184048831463,
0.06825471669435501,
0.007734416052699089,
-0.023577867075800896,
-0.02343139611184597,
-0.000997300841845572,
0.0028679866809397936,
-0.005677820183336735,
-0.007181125693023205,
0.04788383096456528,
-0.00319359521381557,
-0.026974674314260483,
-0.008374583907425404,
0.07683834433555603,
-0.000802479509729892,
-0.008895063772797585,
0.025563176721334457,
0.011300981044769287,
-0.022883664816617966,
0.03560330346226692,
-0.022739794105291367,
0.00378374638967216,
-0.0083177974447608,
-0.019106263294816017,
0.021456370130181313,
0.041781436651945114,
0.028386397287249565,
0.04018658772110939,
-0.0076569863595068455,
0.0657191351056099,
-0.03125172480940819,
0.006877418607473373,
-0.05662050098180771,
-0.04868748411536217,
-0.005631281994283199,
0.039014607667922974,
0.027389854192733765,
0.06625011563301086,
-0.008577234111726284,
-0.049706730991601944,
0.015942849218845367,
0.06074867025017738,
0.06977280974388123,
0.030393091961741447,
-0.02441081404685974,
0.010210972279310226,
0.003452883567661047,
0.07882203161716461,
-0.049444012343883514,
-0.03591718152165413,
-0.001249687047675252,
0.05441322177648544,
-0.029463769868016243,
-0.013493080623447895,
-0.0004180450632702559,
0.03239227831363678,
-0.040694739669561386,
-0.06615476310253143,
0.06358106434345245,
0.012015413492918015,
-0.015480663627386093,
0.016009896993637085,
-0.013709140941500664,
0.02789326012134552,
0.019112054258584976,
0.020701110363006592,
-0.017139580100774765,
-0.06282318383455276,
-0.017061594873666763,
0.013591503724455833,
0.05428268760442734,
-0.053827010095119476,
0.04210565984249115,
-0.006334287580102682,
0.018828103318810463,
0.028598086908459663,
-0.043311700224876404,
0.042060889303684235,
0.022920899093151093,
0.0040824743919074535,
-0.028365185484290123,
0.04015614837408066,
0.023149847984313965,
0.038749344646930695,
0.06280893087387085,
0.0120755759999156,
0.05537110194563866,
0.009470460936427116,
0.056536462157964706,
0.06180223077535629,
0.010849145241081715,
0.007332990411669016,
0.03348970413208008,
0.058655399829149246,
-0.016590416431427002,
-0.0017436194466426969,
0.08305200934410095,
-0.028196552768349648,
0.00354444095864892,
-0.042983684688806534,
-0.0015678362688049674,
-0.004289580509066582,
-0.010634727776050568,
0.037190016359090805,
-0.006571195088326931,
-0.010067728348076344,
0.02434185892343521,
-0.021921945735812187,
-0.02085026353597641,
0.03160274773836136,
0.0008363234810531139,
0.020311474800109863,
0.0003346048470120877,
-0.02118908055126667,
0.027456672862172127,
-0.061910904943943024,
-0.05278978869318962,
0.015159398317337036,
-0.04576515406370163,
0.014455752447247505,
-0.07320801913738251,
-0.022616799920797348,
-0.04209192097187042,
-0.021084286272525787,
0.03544845059514046,
0.03680936619639397,
-0.020003875717520714,
-0.02807072550058365,
0.0072576673701405525,
-0.05605066567659378,
-0.028836114332079887,
-0.0503743551671505,
-0.0358368344604969,
-0.049230676144361496,
-0.08234697580337524,
0.06067367270588875,
0.02353334054350853,
0.03762936592102051,
0.00670360354706645,
0.0007335108821280301,
-0.039879053831100464,
-0.024939406663179398,
0.052852705121040344,
0.052376799285411835,
-0.040586601942777634,
-0.02292322926223278,
0.03517840430140495,
-0.0018634524894878268,
0.034570153802633286,
-0.03315318375825882,
-0.030738024041056633,
0.049736589193344116,
0.06948340684175491,
0.01859680376946926,
0.010625187307596207,
0.024007167667150497,
-0.039358917623758316,
-0.05851862207055092,
-0.040809400379657745,
-0.03594636172056198,
-0.007537676487118006,
-0.045805227011442184,
-0.04652069881558418,
0.004823924042284489,
-0.034518416970968246,
-0.009010699577629566,
-0.02156056836247444,
-0.017342962324619293,
0.01685047522187233,
0.044902268797159195,
0.03475965932011604,
0.0304190032184124,
-0.017927996814250946,
-0.04476720467209816,
0.07944585382938385,
-0.002359657548367977,
0.013357618823647499,
-0.07168839126825333,
-0.05144933611154556,
0.009911916218698025,
0.03090403787791729,
-0.001050877501256764,
-0.03160341456532478,
0.08028532564640045,
0.009271024726331234,
0.00004181253825663589,
-0.004534998442977667,
-0.04978114739060402,
-0.0700375959277153,
0.0212636049836874,
0.004605961963534355,
-0.010203941725194454,
-0.04706348851323128,
-0.02604575827717781,
-0.0025131364818662405,
0.04979827255010605,
-0.07677796483039856,
-0.051089584827423096,
0.012952057644724846,
0.0035481383092701435,
0.038600191473960876,
-0.004507305566221476,
-0.046039775013923645,
0.027558021247386932,
-0.021187229081988335,
-0.059363748878240585,
-0.0035717501305043697,
0.0080607570707798,
0.02014950104057789,
0.045626282691955566,
0.012825481593608856,
-0.03287053853273392,
0.04542011767625809,
0.024336187168955803,
0.04664296656847,
0.03581645339727402,
-0.029239658266305923,
0.020699402317404747,
-0.033663518726825714,
0.02085195854306221,
-0.01583094336092472,
-0.019026407971978188,
-0.052759040147066116,
-0.06858251243829727,
-0.011364130303263664,
0.007332819513976574,
0.0073557510040700436,
-0.02983880043029785,
0.03985036537051201,
-0.011612322181463242,
0.0032928758300840855,
0.00831016805022955,
0.019577685743570328,
0.01845788210630417,
-0.06150860711932182,
0.046594832092523575,
0.0027916678227484226,
0.033854492008686066,
-0.053387220948934555,
0.0012616069288924336,
-0.05023956671357155,
-0.028132837265729904,
-0.00359743763692677,
0.08416824042797089,
0.040673304349184036,
0.04782724380493164,
0.08322781324386597,
0.006841329392045736,
-0.033297985792160034,
0.050742872059345245,
0.020506415516138077,
-0.004083511419594288,
-0.04815923795104027,
-0.012763298116624355,
-0.010034923441708088,
-0.04426424950361252,
-0.0016774034593254328,
-0.03710049018263817,
0.032073862850666046,
0.02817106619477272,
0.012765574268996716,
-0.024341510608792305,
0.010751698166131973,
-0.025399576872587204,
-0.023779818788170815,
-0.08888600766658783,
-0.03379391133785248,
0.0038049127906560898,
-0.037252433598041534,
0.03367144614458084,
0.03508557751774788,
0.011867837980389595,
0.05428961291909218,
0.061372797936201096,
-0.031025461852550507,
-0.04007376357913017,
0.029883580282330513,
0.032230179756879807,
-0.02827025018632412,
-0.042739760130643845,
-0.05084078386425972,
0.055409278720617294,
0.055747948586940765,
-0.005889727268368006,
-0.10050836205482483,
0.00012830588093493134,
0.05359521880745888,
-0.04430251568555832,
0.060837045311927795,
0.0002387418207945302,
0.0414850227534771,
0.04709023982286453,
-0.013829253613948822,
0.03467383608222008,
-0.013150480575859547,
0.018906978890299797,
-0.005223644897341728,
0.06018168106675148,
-0.028968507423996925,
-0.031234847381711006,
-0.02454788237810135,
0.03590332344174385,
0.01941354013979435,
0.03138226270675659,
0.04108316823840141,
-0.03152519091963768,
-0.047505464404821396,
0.005243359133601189,
0.021152911707758904,
-0.05540216341614723,
0.03126167133450508,
0.03620431199669838,
0.04102494940161705,
-0.06338576227426529,
-0.041632115840911865,
-0.007294642273336649,
-0.009725074283778667,
0.008457661606371403,
-0.012580345384776592,
-0.03607359901070595,
-0.06406155228614807,
0.010220333933830261,
-0.009591801092028618,
-0.0019289696356281638,
-0.08380792289972305,
0.012090315110981464,
-0.02997327223420143,
-0.021369779482483864,
0.05063297599554062,
0.03687484562397003,
0.04176943004131317,
0.044570136815309525,
-0.022406741976737976,
-0.022752143442630768,
-0.037666916847229004,
0.04331028461456299,
-0.026242831721901894,
-0.024368001148104668,
-0.009636101312935352,
-0.049294326454401016,
-0.002633788390085101,
-0.0481913760304451,
-0.044894441962242126,
-0.06630327552556992,
0.00910439994186163,
0.029063336551189423,
-0.01616496779024601,
0.004976789467036724,
-0.02050989679992199,
0.020503511652350426,
-0.05679994821548462,
-0.041381776332855225,
-0.025910742580890656,
-0.035925738513469696,
-0.05028165504336357,
-0.030524905771017075,
0.012814479880034924,
0.006631545256823301,
0.025064053013920784,
0.0027539890725165606,
-0.0004576406499836594,
0.00628781970590353,
-0.004312126897275448,
-0.028154853731393814,
0.02856137789785862,
-0.018201231956481934,
-0.02959548868238926,
-0.0073984721675515175,
0.0070224059745669365,
0.030022691935300827,
0.04572487249970436,
-0.042596906423568726,
0.03250962123274803,
0.03840946406126022,
-0.036721572279930115,
-0.031201180070638657,
0.007284494116902351,
0.017961813136935234,
-0.04952123016119003,
-0.05731620267033577,
-0.011768036521971226,
-0.05787629634141922,
0.05197681486606598,
-0.020650265738368034,
-0.030249925330281258,
0.009921666234731674,
-0.00940732192248106,
0.04020882770419121,
-0.014599645510315895,
-0.03581862524151802,
0.02498723194003105,
-0.01503736898303032,
0.0311184860765934,
-0.048122838139534,
0.015570975840091705,
-0.03712419047951698,
0.024759570136666298,
-0.026291146874427795,
-0.017863797023892403,
-0.0497698150575161,
0.020126909017562866,
-0.00863911397755146,
-0.03026558645069599,
-0.011028270237147808,
0.011854776181280613,
-0.03659545257687569,
0.021960698068141937,
-0.024234585464000702,
0.010778927244246006,
-0.01350089069455862,
0.04727962613105774,
-0.06348827481269836,
-0.0047597200609743595,
-0.03941592946648598,
0.0042097000405192375,
-0.05810606852173805,
-0.024555830284953117,
-0.002231274964287877,
-0.036773331463336945,
0.035230666399002075,
0.0201701857149601,
0.013774389401078224,
0.03775712475180626,
-0.03160221502184868,
-0.0011518750106915832,
0.019404077902436256,
-0.05517666041851044,
-0.010698134079575539,
-0.011434941552579403,
0.017233531922101974,
-0.001461358042433858,
0.07939869910478592,
0.031594716012477875,
-0.05007819086313248,
-0.05750022828578949,
0.030603116378188133,
0.010703885927796364,
0.006942575331777334,
-0.0017873639008030295,
0.022482331842184067,
0.026778437197208405,
0.05210794135928154,
-0.02145729400217533,
0.0009057967690750957,
-0.006727271713316441,
-0.05211587995290756,
0.03414909914135933,
-0.00619716988876462,
0.030375799164175987,
0.014720131643116474,
-0.029648860916495323,
-0.038522977381944656,
0.051281895488500595,
0.014920555986464024,
0.008871689438819885,
-0.014475487172603607,
-0.05409024655818939,
0.02797306329011917,
-0.016180414706468582,
-0.056413520127534866,
0.01095923874527216,
0.005450430791825056,
-0.06371162086725235,
0.06938032805919647,
-0.02518102526664734,
0.013499876484274864,
0.02429460920393467,
0.010794716887176037,
-0.03883259743452072,
0.04839261248707771,
-0.03240138292312622,
-0.005581607110798359,
0.03341314196586609,
-0.03902556747198105,
-0.022485611960291862,
-0.02690422348678112,
0.06461945921182632,
-0.06267575174570084,
0.023056963458657265,
0.06036880984902382,
-0.008946814574301243,
0.028035473078489304,
-0.023220108821988106,
-0.02888372726738453,
0.011209504678845406,
-0.03270454704761505,
0.0821593850851059,
0.013206087984144688,
-0.058131568133831024,
0.058918245136737823,
-0.0006135461153462529,
-0.06773136556148529,
0.04026389122009277,
0.02686421386897564,
0.003174095181748271,
0.02245537005364895,
0.037587374448776245,
-0.054772451519966125,
0.006782452575862408,
-0.03284996747970581,
0.017295461148023605,
-0.029922842979431152,
0.0037236132193356752,
0.014028344303369522,
-0.04755401983857155,
-0.0009149352554231882,
0.04137815535068512,
-0.03898334875702858,
-0.013165835291147232,
0.007670640014111996,
-0.07952460646629333,
-0.059557147324085236,
0.013343807309865952,
0.01644289679825306,
-0.022456083446741104,
-0.0036496140528470278,
-0.038580868393182755,
0.02924870327115059,
0.030713113024830818,
-0.023391660302877426,
-0.029088094830513,
0.006818179506808519,
0.018170543015003204,
-0.07095590978860855,
-0.035953179001808167,
0.036788057535886765,
0.0036116838455200195,
-0.037957947701215744,
0.029066098853945732,
-0.00998941995203495,
0.027047956362366676,
0.04656726494431496,
0.022007133811712265,
0.015669969841837883,
-0.04816347733139992,
-0.00823609996587038,
0.017719319090247154,
0.02418021857738495,
0.03048931434750557,
-0.02027318999171257,
-0.005000093020498753,
0.04699104651808739,
0.04677969589829445,
-0.010013115592300892,
-0.06575313955545425,
-0.015233859419822693,
-0.006071212701499462,
-0.027081865817308426,
0.011074980720877647,
0.01554667018353939,
-0.0480777844786644,
-0.05786250904202461,
-0.001639768248423934,
-0.0011265100911259651,
0.059583134949207306,
-0.04881620034575462,
0.015927650034427643,
0.02323773503303528,
-0.016261981800198555,
-0.04364177957177162,
-0.05843072757124901,
-0.02764955349266529,
-0.0498785674571991,
0.02483278699219227,
0.01064806617796421,
-0.0175413116812706,
0.009049786254763603,
-0.041349634528160095,
-0.06175089254975319,
0.023671695962548256,
0.021076535806059837,
-0.04575497657060623,
0.058892399072647095,
0.02391018159687519,
-0.048604439944028854,
-0.005975683685392141,
0.035321302711963654,
-0.02576398476958275,
0.04015599563717842,
0.009126893244683743,
-0.005195052362978458,
0.02161860279738903,
0.02649136446416378,
-0.00858401320874691,
-0.016650157049298286,
-0.0601329430937767,
-0.04637669399380684,
-0.018800023943185806,
0.008186006918549538,
0.06351812183856964
] |
Cryptikdw/DialoGPT-small-rick | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 7 | null |
---
language: de
tags:
- pytorch
- tf
- bert
datasets:
- mlqa
metrics:
- f1
- em
---
### QA Model trained on MLQA dataset for german langauge.
MODEL used for fine tuning is GBERT Large by deepset.ai
## MLQA DEV (german)
EM: 63.82
F1: 77.20
## XQUAD TEST (german)
EM: 65.96
F1: 80.85
## Model inferencing:
```python
!pip install -q transformers
from transformers import pipeline
qa_pipeline = pipeline(
"question-answering",
model="Sahajtomar/GBERTQnA",
tokenizer="Sahajtomar/GBERTQnA"
)
qa_pipeline({
'context': "Vor einigen Jahren haben Wissenschaftler ein wichtiges Mutagen identifiziert, das in unseren eigenen Zellen liegt: APOBEC, ein Protein, das normalerweise als Schutzmittel gegen Virusinfektionen fungiert. Heute hat ein Team von Schweizer und russischen Wissenschaftlern unter der Leitung von Sergey Nikolaev, Genetiker an der Universität Genf (UNIGE) in der Schweiz, entschlüsselt, wie APOBEC eine Schwäche unseres DNA-Replikationsprozesses ausnutzt, um Mutationen in unserem Genom zu induzieren.",
'question': "Welches Mutagen schützt vor Virusinfektionen?"
})
# output
{'answer': 'APOBEC', 'end': 121, 'score': 0.9815779328346252, 'start': 115}
## Even complex queries can be answered pretty well
qa_pipeline({
"context": 'Im Juli 1944 befand sich die Rote Armee tief auf polnischem Gebiet und verfolgte die Deutschen in Richtung Warschau. In dem Wissen, dass Stalin der Idee eines unabhängigen Polens feindlich gegenüberstand, gab die polnische Exilregierung in London der unterirdischen Heimatarmee (AK) den Befehl, vor dem Eintreffen der Roten Armee zu versuchen, die Kontrolle über Warschau von den Deutschen zu übernehmen. So begann am 1. August 1944, als sich die Rote Armee der Stadt näherte, der Warschauer Aufstand. Der bewaffnete Kampf, der 48 Stunden dauern sollte, war teilweise erfolgreich, dauerte jedoch 63 Tage. Schließlich mussten die Kämpfer der Heimatarmee und die ihnen unterstützenden Zivilisten kapitulieren. Sie wurden in Kriegsgefangenenlager in Deutschland transportiert, während die gesamte Zivilbevölkerung ausgewiesen wurde. Die Zahl der polnischen Zivilisten wird auf 150.000 bis 200.000 geschätzt.'
'question': "Wer wurde nach Deutschland transportiert?"
#output
{'answer': 'die Kämpfer der Heimatarmee und die ihnen unterstützenden Zivilisten',
'end': 693,
'score': 0.23357819020748138,
'start': 625}
```
Try it on a Colab:
<a href="https://github.com/Sahajtomar/Question-Answering/blob/main/Sahajtomar_GBERTQnA.ipynb" target="_parent"><img src="https://camo.githubusercontent.com/52feade06f2fecbf006889a904d221e6a730c194/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667" alt="Open In Colab" data-canonical-src="https://colab.research.google.com/assets/colab-badge.svg"></a>
| [
0.018443327397108078,
-0.04070562869310379,
-0.011202612891793251,
0.06704622507095337,
0.05350619554519653,
0.017432065680623055,
-0.014772568829357624,
0.0032493178732693195,
-0.07195533066987991,
0.028085265308618546,
0.005988698918372393,
0.0030200595501810312,
-0.019068017601966858,
0.04155077412724495,
-0.04818342998623848,
-0.07895530015230179,
-0.008122235536575317,
-0.00978640653192997,
-0.04079494625329971,
-0.019846715033054352,
-0.03088449314236641,
0.018956607207655907,
0.008759276941418648,
0.00283841066993773,
0.0011276307050138712,
0.013445038348436356,
-0.021073520183563232,
0.03565359115600586,
0.007934104651212692,
-0.05929014831781387,
-0.0008279865141957998,
-0.007395991124212742,
-0.024729596450924873,
-0.0349639430642128,
-0.024801170453429222,
-0.019231263548135757,
0.013462137430906296,
0.0026595531962811947,
0.0011458216467872262,
0.05130187049508095,
-0.005899501498788595,
0.012384984642267227,
-0.004266043193638325,
-0.018196478486061096,
0.05270237848162651,
0.004820419941097498,
-0.051004353910684586,
-0.022900259122252464,
0.029585501179099083,
-0.025504427030682564,
-0.05010933056473732,
-0.07463730871677399,
-0.02937932498753071,
-0.014435315504670143,
-0.03284396231174469,
-0.004424278624355793,
-0.07707282155752182,
0.02483436092734337,
0.04450513795018196,
-0.05956556275486946,
-0.036480166018009186,
0.009365098550915718,
-0.07297878712415695,
-0.0041324421763420105,
0.03342016041278839,
-0.04790196567773819,
-0.017053822055459023,
-0.02926063723862171,
-0.00032045270199887455,
-0.01686280407011509,
0.07336736470460892,
-0.05609305575489998,
0.05277759209275246,
-0.07108975946903229,
-0.0017559294356033206,
-0.002953949850052595,
0.030984602868556976,
0.03667760640382767,
-0.02600540779531002,
0.05329754576086998,
0.04067392274737358,
0.006694683339446783,
0.021143224090337753,
-0.041770681738853455,
-0.028260331600904465,
0.02917768433690071,
-0.015517352148890495,
-0.030218729749321938,
-0.013001914136111736,
0.05137411877512932,
-0.011441202834248543,
-0.04070407152175903,
-0.027819940820336342,
-0.0032114912755787373,
0.0033413246273994446,
0.028931552544236183,
0.029515152797102928,
-0.01796426996588707,
-0.009759929962456226,
0.024200566112995148,
0.025615135207772255,
0.04689376428723335,
-0.002307306043803692,
0.04577779024839401,
-0.01667887531220913,
0.013529795221984386,
-0.0033352631144225597,
-0.0253728199750185,
-0.039013687521219254,
0.03162787854671478,
0.016984371468424797,
-0.04781493544578552,
-0.010753948241472244,
0.03911694139242172,
0.05654118210077286,
0.004865198861807585,
0.05911156162619591,
-0.023902887478470802,
-0.01668526791036129,
-0.056255947798490524,
0.04203059896826744,
0.02126225084066391,
-0.011760655790567398,
0.024916047230362892,
-0.021407444030046463,
0.018746212124824524,
-0.06941281259059906,
-0.03143014386296272,
0.01652699150145054,
0.025482049211859703,
-0.005858570337295532,
0.05956359580159187,
0.03171970695257187,
-0.044334784150123596,
0.026787331327795982,
0.008906678296625614,
-0.07440439611673355,
0.018708009272813797,
0.007306552026420832,
0.11067166179418564,
-0.06679210811853409,
-0.04842820763587952,
0.02797584980726242,
0.01535204891115427,
-0.01813482493162155,
-0.006755387410521507,
-0.009962565265595913,
-0.002852528588846326,
-0.010960197076201439,
0.006782006938010454,
0.07302335649728775,
-0.04954393953084946,
0.010392517782747746,
0.023373810574412346,
-0.0029201963916420937,
0.027888597920536995,
-0.02968180738389492,
0.0118037024512887,
-0.0019120951183140278,
-0.010360568761825562,
-0.013705561868846416,
0.022333689033985138,
-0.013917766511440277,
-0.011755187064409256,
-0.044626131653785706,
-0.0416058748960495,
-0.002475984627380967,
0.09268389642238617,
0.01083871629089117,
-0.02995438128709793,
-0.02597843110561371,
0.006610725540667772,
0.0209867712110281,
0.03603312373161316,
-0.02798633463680744,
0.050568144768476486,
0.04530044272542,
0.012467483058571815,
0.007108696736395359,
0.044861361384391785,
0.018152449280023575,
-0.021988147869706154,
-0.030330268666148186,
0.027666404843330383,
-0.011253931559622288,
-0.02299332432448864,
0.02673163078725338,
0.024297770112752914,
-0.017499351873993874,
-0.029483387246727943,
-0.011449908837676048,
0.05345994234085083,
-0.014704236760735512,
0.016424495726823807,
0.00452783890068531,
0.008026698604226112,
-0.0036380274686962366,
0.04969976469874382,
-0.025478584691882133,
0.003114119404926896,
-0.024388141930103302,
-0.04645445570349693,
0.056698769330978394,
0.004735514521598816,
0.021215155720710754,
0.04373239725828171,
-0.013825115747749805,
0.10789355635643005,
-0.02120743878185749,
0.004132465925067663,
-0.03647937998175621,
-0.026619434356689453,
-0.005917657632380724,
0.04256613180041313,
0.04507949575781822,
0.042278632521629333,
-0.019131196662783623,
-0.007947036996483803,
0.04229388386011124,
0.06928150355815887,
0.047449830919504166,
0.015789655968546867,
-0.007300876546651125,
0.009784896858036518,
0.01557490136474371,
0.06160907447338104,
-0.04188147187232971,
-0.014278105460107327,
0.015837322920560837,
0.046196069568395615,
-0.023760905489325523,
0.01080804318189621,
-0.00738923903554678,
0.012893318198621273,
-0.046790044754743576,
-0.06575272977352142,
0.0554560050368309,
0.007227781228721142,
0.008094266057014465,
0.044598288834095,
0.006357695907354355,
0.011952025815844536,
0.009753087535500526,
0.008160937577486038,
0.006925727240741253,
-0.031158989295363426,
-0.004865393508225679,
0.01292791310697794,
0.044309381395578384,
-0.0730094462633133,
0.009194467216730118,
0.00945607852190733,
0.02252170443534851,
0.03586886450648308,
-0.05174662545323372,
0.021610286086797714,
0.032984133809804916,
0.016006212681531906,
-0.00857341755181551,
0.010990305803716183,
0.030746005475521088,
-0.003954255022108555,
0.10084549337625504,
0.0005674348794855177,
0.05608897656202316,
0.008368589915335178,
0.018828870728611946,
0.09622710198163986,
0.022784510627388954,
0.011829706840217113,
0.018045475706458092,
0.04896136000752449,
0.01611880585551262,
0.007260241080075502,
0.007180451415479183,
-0.0463433638215065,
0.031861331313848495,
-0.028990205377340317,
0.0003260538214817643,
0.0005963215371593833,
0.015711018815636635,
0.022491691634058952,
0.036391355097293854,
-0.031656377017498016,
0.021388722583651543,
-0.018169069662690163,
-0.00516579020768404,
0.030769694596529007,
-0.02974550426006317,
0.0027055195532739162,
-0.024845970794558525,
-0.02740573137998581,
0.015019531361758709,
-0.06797075271606445,
-0.05687075853347778,
0.005008211825042963,
0.00042331646545790136,
0.0020298599265515804,
-0.06885422021150589,
-0.027474956586956978,
-0.0873015969991684,
-0.030305620282888412,
0.058679964393377304,
0.02672288380563259,
-0.018543681129813194,
-0.026093367487192154,
0.020847957581281662,
-0.02982664294540882,
-0.066981241106987,
-0.046322453767061234,
-0.03556349128484726,
-0.05243062600493431,
-0.06329087167978287,
0.048267874866724014,
0.01644190214574337,
0.04186195135116577,
-0.006367429159581661,
0.006521093659102917,
-0.02232920564711094,
-0.014460974372923374,
0.047467201948165894,
0.0245051309466362,
-0.031512483954429626,
-0.054957374930381775,
0.03511207178235054,
-0.01187488716095686,
0.0480663888156414,
0.017027348279953003,
-0.04701144993305206,
0.09220525622367859,
0.06506006419658661,
0.006585467141121626,
-0.00029693791293539107,
-0.005253493320196867,
-0.040372803807258606,
-0.024124065414071083,
-0.03237326070666313,
-0.02350422739982605,
-0.025409290567040443,
-0.031266048550605774,
-0.04934234172105789,
-0.012756661511957645,
-0.03474543243646622,
-0.006513416767120361,
0.011572988703846931,
0.014539430849254131,
0.04412344470620155,
0.06094881519675255,
0.038014981895685196,
0.017312753945589066,
-0.03724744915962219,
-0.026819385588169098,
0.072047159075737,
-0.005194052588194609,
0.04198871925473213,
-0.06064252927899361,
-0.042275309562683105,
0.051668036729097366,
-0.0011816539335995913,
0.0055268676951527596,
-0.015546755865216255,
0.07393388450145721,
0.012898309156298637,
-0.017706582322716713,
0.00854147132486105,
-0.024294350296258926,
-0.04850306361913681,
0.003862486220896244,
-0.014326763339340687,
-0.021516134962439537,
-0.04778485745191574,
-0.036612655967473984,
-0.0007187864393927157,
0.047650374472141266,
-0.06590873748064041,
-0.06725426018238068,
-0.03995949402451515,
0.019272925332188606,
0.01071268878877163,
-0.011097308248281479,
-0.03678709641098976,
0.00880521908402443,
-0.036742936819791794,
-0.035626836121082306,
0.013655789196491241,
0.018057523295283318,
-0.021134648472070694,
0.02676341123878956,
0.026311218738555908,
-0.014383000321686268,
0.04499062895774841,
0.026686152443289757,
0.042765405029058456,
0.018750762566924095,
-0.038352906703948975,
0.015097587369382381,
-0.006130471359938383,
0.0155488895252347,
0.017592933028936386,
-0.02566252276301384,
-0.04080523923039436,
-0.09352722764015198,
-0.0074286190792918205,
0.03608148545026779,
-0.0044378917664289474,
-0.002796259243041277,
0.033377423882484436,
0.007021813653409481,
0.003346624318510294,
-0.03063223510980606,
0.015157519839704037,
0.0635697990655899,
-0.0544879212975502,
0.07036142796278,
0.019386444240808487,
0.045727185904979706,
-0.03974805399775505,
0.023744704201817513,
-0.026002727448940277,
-0.0009972620755434036,
0.03332357481122017,
0.0522506907582283,
0.018085233867168427,
0.03217554837465286,
0.052786935120821,
0.01797991618514061,
-0.03798435255885124,
0.04119596257805824,
0.05891326814889908,
-0.030761269852519035,
-0.03730928897857666,
-0.0067437635734677315,
-0.005076253321021795,
-0.019681734964251518,
-0.005818293895572424,
-0.03626430034637451,
0.03873535245656967,
0.04153042286634445,
0.010029071010649204,
-0.014024387113749981,
-0.01007795613259077,
-0.023373395204544067,
-0.048505496233701706,
-0.01747369021177292,
0.018299205228686333,
0.0026382897049188614,
0.0072355689480900764,
0.0317445732653141,
0.04440075159072876,
0.00833901297301054,
0.0376938134431839,
0.0309328343719244,
-0.00020974609651602805,
-0.04556071013212204,
0.04146592319011688,
0.02664473094046116,
-0.0695386528968811,
-0.07126851379871368,
-0.02902296930551529,
0.05190221220254898,
0.047510776668787,
-0.008350864052772522,
-0.09620816260576248,
0.028572916984558105,
0.059285711497068405,
-0.04690917208790779,
0.07401232421398163,
-0.008119453676044941,
0.030933866277337074,
0.08738987892866135,
-0.013469072990119457,
0.010417502373456955,
-0.008235854096710682,
0.03150065615773201,
-0.012860246933996677,
0.10355211049318314,
-0.020500730723142624,
-0.0260603167116642,
-0.05275822430849075,
0.03062131255865097,
0.03862883150577545,
0.03246937319636345,
0.02922765538096428,
-0.003320371499285102,
-0.04920060187578201,
0.005169406998902559,
0.04653984680771828,
-0.05689236894249916,
0.03700155019760132,
0.04092325642704964,
0.022521132603287697,
-0.07062557339668274,
-0.03151522949337959,
0.0038886982947587967,
-0.0026178054977208376,
0.03402850776910782,
-0.002989240689203143,
-0.028530646115541458,
-0.07321237027645111,
0.04962436109781265,
-0.04150748997926712,
-0.030623406171798706,
-0.07576996088027954,
0.03720209002494812,
-0.009006762877106667,
-0.015673547983169556,
0.06839241832494736,
0.028243187814950943,
0.02564917877316475,
0.04081457108259201,
-0.022890685126185417,
0.0032949866726994514,
-0.0362662598490715,
0.04100262373685837,
-0.05545881390571594,
-0.006235736887902021,
-0.015536734834313393,
-0.028965124860405922,
0.011732887476682663,
-0.01014816202223301,
-0.0619768388569355,
-0.04776734486222267,
-0.03540438041090965,
0.037692297250032425,
0.021466627717018127,
-0.0031267767772078514,
-0.03324952721595764,
0.03344487398862839,
-0.03481820598244667,
-0.008545578457415104,
-0.016891924664378166,
-0.00787325482815504,
-0.061425432562828064,
-0.04137320816516876,
0.00514609832316637,
0.002764390781521797,
0.038235653191804886,
0.026374222710728645,
0.009514504112303257,
0.025504114106297493,
0.010407998226583004,
-0.012569781392812729,
0.018854184076189995,
-0.0026709516532719135,
-0.042004458606243134,
-0.03528913855552673,
0.038509294390678406,
-0.007777143735438585,
0.04097248241305351,
-0.010345927439630032,
0.027146093547344208,
0.023734422400593758,
-0.025747617706656456,
-0.028063399717211723,
0.00043893620022572577,
0.03180956095457077,
-0.08349892497062683,
-0.04013918340206146,
-0.03987833112478256,
-0.04949714243412018,
0.024501971900463104,
0.005871427245438099,
-0.058552470058202744,
0.004821248352527618,
0.01598646119236946,
0.020595066249370575,
0.03163888677954674,
-0.025102518498897552,
0.03992106020450592,
-0.005594713147729635,
0.030042316764593124,
-0.05377935990691185,
0.017812814563512802,
-0.013750146143138409,
-0.01713806577026844,
-0.03174373880028725,
-0.020710675045847893,
-0.04081626608967781,
0.062162406742572784,
-0.022757655009627342,
-0.011101686395704746,
-0.016735825687646866,
0.0013956010807305574,
-0.031266022473573685,
0.029357027262449265,
-0.010594241321086884,
0.028300361707806587,
-0.04012339189648628,
0.017600880935788155,
-0.07466374337673187,
-0.020745430141687393,
-0.01570315659046173,
0.009474894031882286,
-0.03821606934070587,
0.03330408036708832,
-0.04288557171821594,
-0.02531673014163971,
0.012880942784249783,
0.00734358374029398,
0.03064873442053795,
0.021821696311235428,
-0.013163525611162186,
0.009617118164896965,
0.015224653296172619,
-0.03532048687338829,
-0.01248889695852995,
-0.040283337235450745,
-0.024542996659874916,
-0.025527631863951683,
0.05457216128706932,
0.046436019241809845,
-0.046322036534547806,
-0.06498584151268005,
0.057248834520578384,
0.01609109528362751,
0.003623186144977808,
0.009181948378682137,
-0.006013181060552597,
0.05046779289841652,
0.013533164747059345,
-0.03178364783525467,
0.0019612866453826427,
-0.02093859761953354,
-0.024402258917689323,
0.03409699350595474,
-0.011486532166600227,
0.02711591310799122,
-0.0015068626962602139,
-0.02590613067150116,
-0.029487693682312965,
0.05349006503820419,
0.0139284897595644,
0.024538906291127205,
-0.006466659717261791,
-0.008410601876676083,
0.045998893678188324,
0.02474009431898594,
-0.03785363584756851,
-0.0035109645687043667,
-0.00869277585297823,
-0.04384545236825943,
0.07289688289165497,
-0.007628859020769596,
-0.006856692023575306,
0.05528939887881279,
0.01302813459187746,
-0.027297787368297577,
0.058307208120822906,
-0.014788866974413395,
0.012291019782423973,
0.04831260070204735,
-0.05339483171701431,
-0.0073038493283092976,
-0.052750036120414734,
0.08514754474163055,
-0.07935398072004318,
0.04517728090286255,
0.0240801814943552,
0.013350437395274639,
0.023991046473383904,
-0.02149411477148533,
-0.029394743964076042,
0.019973035901784897,
-0.0454038567841053,
0.06580616533756256,
0.01006751786917448,
-0.02213832549750805,
0.07526424527168274,
0.04046935960650444,
-0.07155853509902954,
0.012314601801335812,
0.057413700968027115,
0.030234143137931824,
0.03836998715996742,
0.02198014222085476,
-0.07822181284427643,
0.009996789507567883,
-0.00034903603955172,
0.022145139053463936,
-0.0326789990067482,
-0.03754813224077225,
-0.00016378280997741967,
-0.031167514622211456,
-0.00789223425090313,
0.006063802633434534,
-0.013921278528869152,
-0.0009959496092051268,
0.010753069072961807,
-0.07064288854598999,
-0.05518481880426407,
0.012985806912183762,
0.02350548654794693,
-0.04978586360812187,
0.02192133292555809,
-0.062025465071201324,
0.02473653480410576,
0.031637437641620636,
0.004054572433233261,
-0.005394363775849342,
-0.024420008063316345,
0.013936166651546955,
-0.06959293782711029,
-0.05145906284451485,
0.035328034311532974,
-0.007699953857809305,
-0.029695728793740273,
0.02508208528161049,
-0.013983783312141895,
0.016659285873174667,
0.006968161556869745,
-0.004328289534896612,
0.019874850288033485,
-0.04094293341040611,
0.028845857828855515,
0.028775542974472046,
0.014709854498505592,
0.03277338668704033,
-0.04180362448096275,
0.046347491443157196,
0.03792243450880051,
0.034917090088129044,
-0.008644661866128445,
-0.04862818121910095,
-0.00708995433524251,
0.042749982327222824,
-0.038183268159627914,
0.005805152468383312,
-0.006929747760295868,
-0.06724104285240173,
-0.029505910351872444,
-0.020485658198595047,
0.01580699346959591,
0.034646984189748764,
-0.024800507351756096,
0.0001635140652069822,
0.058242637664079666,
-0.030554525554180145,
-0.03067963384091854,
-0.10354340821504593,
-0.027672499418258667,
-0.058498479425907135,
0.025585927069187164,
0.038301192224025726,
-0.05139252543449402,
0.01101064495742321,
-0.0524819940328598,
-0.0446813590824604,
0.049436625093221664,
0.018305372446775436,
-0.05617785453796387,
0.04552822560071945,
0.03834689036011696,
-0.03926780819892883,
0.02170305885374546,
0.035132043063640594,
-0.02971700206398964,
0.01939132623374462,
-0.003979239612817764,
0.01622113771736622,
0.061534833163022995,
0.04946696758270264,
-0.016717631369829178,
-0.023118600249290466,
-0.03445427492260933,
-0.040373269468545914,
-0.03268320858478546,
-0.01643548160791397,
0.08594758808612823
] |
CyberMuffin/DialoGPT-small-ChandlerBot | [
"pytorch",
"gpt2",
"text-generation",
"transformers",
"conversational"
] | conversational | {
"architectures": [
"GPT2LMHeadModel"
],
"model_type": "gpt2",
"task_specific_params": {
"conversational": {
"max_length": 1000
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 9 | null | ---
language:
- en
tags:
- text Classification
license: apache-2.0
widget:
- text: "I like you. </s></s> I love you."
---
* IMDBSentimentDistilBertModel:
- I have used IMDB movie review dataset to create custom model by using DistilBertForSequenceClassification.
from transformers import DistilBertForSequenceClassification, Trainer, TrainingArguments
model = DistilBertForSequenceClassification.from_pretrained('./imdbsentdistilbertmodel')
| [
-0.04044313356280327,
-0.01263581495732069,
-0.03584066033363342,
0.037490904331207275,
0.030761048197746277,
0.050995878875255585,
-0.022729674354195595,
-0.014538968913257122,
-0.017179762944579124,
0.05772950127720833,
0.053283512592315674,
-0.004059118218719959,
0.021945880725979805,
0.05154763162136078,
-0.03357838839292526,
0.004013724159449339,
-0.018053574487566948,
-0.028712129220366478,
-0.030743958428502083,
0.0005565242026932538,
-0.007761830929666758,
-0.002785297343507409,
-0.006198945455253124,
0.046948082745075226,
0.011966956779360771,
0.02124188281595707,
-0.027457376942038536,
0.05890243127942085,
0.038921888917684555,
-0.05827433988451958,
0.01553325355052948,
-0.04014183208346367,
-0.02891986258327961,
-0.021090306341648102,
-0.027194034308195114,
-0.0055825794115662575,
0.01152551919221878,
0.024834373965859413,
0.015177798457443714,
0.02881884202361107,
0.0016078016487881541,
0.01583353988826275,
0.00361466477625072,
-0.031933750957250595,
0.03797227889299393,
0.00019596106722019613,
-0.0551263689994812,
-0.03511657565832138,
0.027388921007514,
-0.04544663056731224,
-0.03781769424676895,
-0.07472703605890274,
-0.031452763825654984,
0.029386751353740692,
0.012967590242624283,
-0.019180860370397568,
-0.05534753575921059,
-0.0021298741921782494,
0.077055923640728,
-0.04953451827168465,
-0.0360453724861145,
0.020592840388417244,
-0.06137802451848984,
0.010386304929852486,
0.03480544686317444,
-0.03325909003615379,
0.029442347586154938,
-0.04749493673443794,
0.03617238998413086,
-0.0301728006452322,
0.05095446854829788,
-0.04149104654788971,
0.011849039234220982,
-0.0567246675491333,
-0.044524185359478,
-0.03674979880452156,
0.044281862676143646,
0.04029551520943642,
-0.024622159078717232,
0.04676055908203125,
0.05564076825976372,
-0.0008058120147325099,
0.02746233344078064,
-0.03210669010877609,
-0.01848459802567959,
0.039713092148303986,
-0.029957087710499763,
-0.0006176455644890666,
-0.016714679077267647,
0.024226268753409386,
-0.03613901138305664,
-0.05068038031458855,
0.002017844235524535,
-0.040957458317279816,
0.008206285536289215,
0.026226317510008812,
-0.003093412145972252,
-0.023962588980793953,
0.02452518604695797,
0.04969990998506546,
0.040871843695640564,
0.04885753244161606,
-0.033117689192295074,
0.06945087760686874,
-0.0034602819941937923,
-0.006809423677623272,
-0.002884821267798543,
-0.03689704090356827,
-0.034854333847761154,
0.04287966713309288,
0.024760672822594643,
-0.03251951187849045,
-0.02558671310544014,
0.024494031444191933,
0.015937214717268944,
-0.014040045440196991,
0.06718908250331879,
-0.04195719212293625,
-0.04651547595858574,
-0.03854543715715408,
0.036252789199352264,
0.01585116982460022,
0.012641209177672863,
-0.013552075251936913,
-0.06681855022907257,
0.003514168318361044,
-0.04943443462252617,
-0.013789116404950619,
-0.01877668686211109,
0.031433213502168655,
0.025434892624616623,
0.04645311087369919,
0.007116338703781366,
-0.0532684400677681,
0.0082059595733881,
0.03837261721491814,
-0.07000729441642761,
0.03578450158238411,
0.039052195847034454,
0.112540602684021,
-0.06296142190694809,
-0.05730586126446724,
-0.006663194391876459,
0.007791880983859301,
-0.04515688866376877,
0.004320154897868633,
-0.00445576710626483,
-0.05746518447995186,
-0.029407551512122154,
-0.003393404884263873,
0.02405961975455284,
-0.053987301886081696,
-0.02170952595770359,
0.04509321600198746,
0.015466646291315556,
0.03869471326470375,
-0.054863449186086655,
-0.003194405697286129,
-0.0128184137865901,
0.01256554014980793,
-0.05792153626680374,
0.045040007680654526,
-0.004943459760397673,
0.004027834162116051,
-0.0610508918762207,
-0.0332498773932457,
0.02531448006629944,
0.09184832125902176,
-0.005349942483007908,
-0.024451687932014465,
-0.02382846549153328,
0.028566548600792885,
0.03189855441451073,
0.024128714576363564,
-0.03393092751502991,
0.024473367258906364,
0.055234991014003754,
0.03584003448486328,
0.0022267254535108805,
0.052688028663396835,
0.0006216114852577448,
-0.028849324211478233,
-0.021509911864995956,
0.00488754129037261,
0.015149475075304508,
-0.03708299621939659,
0.021608712151646614,
0.050113171339035034,
-0.009948660619556904,
-0.02339395135641098,
-0.009638284333050251,
0.04174182564020157,
-0.026102464646100998,
-0.009302432648837566,
-0.0023083658888936043,
0.022224532440304756,
-0.029043342918157578,
0.03905703127384186,
-0.010425896383821964,
-0.00458500673994422,
-0.03944433853030205,
-0.02092277631163597,
0.013043136335909367,
-0.0034845671616494656,
0.032474614679813385,
0.034794166684150696,
-0.03133990615606308,
0.09256096929311752,
-0.06112644076347351,
-0.005307616200298071,
-0.047311875969171524,
-0.028397198766469955,
-0.0010654593352228403,
0.04212889447808266,
0.036395102739334106,
0.052397046238183975,
-0.010363775305449963,
-0.05719573423266411,
0.026860758662223816,
0.04401193559169769,
0.06452368944883347,
0.02308722771704197,
-0.030472250655293465,
-0.03870942443609238,
0.015541697852313519,
0.046987637877464294,
-0.07111368328332901,
-0.03946784883737564,
0.016388006508350372,
0.05354297161102295,
0.00825322326272726,
-0.001408202457241714,
-0.002950778929516673,
0.010348937474191189,
-0.02848890610039234,
-0.06411190330982208,
0.04902130365371704,
0.008670544251799583,
0.012337028048932552,
0.021270884200930595,
0.0015155078144744039,
0.007926390506327152,
0.02230391837656498,
0.010556817054748535,
0.012185070663690567,
-0.03147914260625839,
0.020040130242705345,
0.00013692775974050164,
0.06636276841163635,
-0.04883071780204773,
0.03593044355511665,
-0.0018164014909416437,
0.024520045146346092,
0.037659455090761185,
-0.03132538124918938,
0.04710150882601738,
0.06254559010267258,
0.01628284901380539,
-0.014151080511510372,
0.02560700662434101,
0.013098563998937607,
0.05774454027414322,
0.04968204349279404,
-0.02638818882405758,
0.056344226002693176,
0.02919568307697773,
0.0328153520822525,
0.1045585572719574,
0.018448403105139732,
0.01800481602549553,
0.05288973078131676,
0.04813408851623535,
-0.004781701602041721,
0.002282612258568406,
0.052620116621255875,
-0.04912576824426651,
0.02542867138981819,
-0.039320074021816254,
0.005140033084899187,
-0.012577150948345661,
-0.026540743187069893,
0.059899237006902695,
0.028262929990887642,
-0.004482169169932604,
0.013944150879979134,
0.016361955553293228,
0.012716683559119701,
0.02493545040488243,
0.0003100816975347698,
-0.003522479673847556,
-0.01043985690921545,
-0.036922305822372437,
0.018138036131858826,
-0.07142630964517593,
-0.04628157243132591,
-0.024828840047121048,
-0.030327236279845238,
-0.0026118026580661535,
-0.09504147619009018,
-0.04713043197989464,
-0.05946096405386925,
-0.0220232754945755,
0.032366495579481125,
0.030984671786427498,
-0.003649604506790638,
-0.02628984861075878,
0.015434019267559052,
-0.04592345654964447,
-0.04997839406132698,
-0.036943789571523666,
-0.04503554105758667,
-0.038140252232551575,
-0.0810118168592453,
0.038281723856925964,
0.038967475295066833,
0.02469766139984131,
0.01714412309229374,
-0.0040858653374016285,
-0.0427771732211113,
-0.032027456909418106,
0.05268910527229309,
0.05640770494937897,
-0.03913841396570206,
-0.039441995322704315,
0.007498731836676598,
-0.0195425096899271,
0.01089177094399929,
-0.015233863145112991,
-0.03899301216006279,
0.06442944705486298,
0.06373505294322968,
0.006061274092644453,
0.014668523333966732,
-0.015919845551252365,
-0.0416853204369545,
-0.053253576159477234,
-0.02284209430217743,
-0.05141998082399368,
-0.050262585282325745,
-0.03896142169833183,
-0.0508510060608387,
-0.04753114655613899,
-0.048736777156591415,
0.0031030960381031036,
-0.018240999430418015,
0.010207380168139935,
0.0047112395986914635,
0.05046042427420616,
0.021200979128479958,
0.02575528249144554,
-0.026486074551939964,
-0.0008904068963602185,
0.030638117343187332,
-0.012734959833323956,
-0.03494129702448845,
-0.07949625700712204,
-0.028846098110079765,
0.027369847521185875,
0.025427445769309998,
-0.0022339201532304287,
-0.0028313433285802603,
0.08337346464395523,
0.0130495335906744,
-0.01148823369294405,
0.0016020819311961532,
-0.004393933340907097,
0.011022011749446392,
-0.00901793409138918,
0.004185096360743046,
-0.00785827822983265,
-0.05791598558425903,
-0.03903675824403763,
-0.014481564983725548,
0.04550141468644142,
-0.07880209386348724,
-0.047791168093681335,
-0.02479678764939308,
0.03700412064790726,
0.028737463057041168,
0.017218999564647675,
-0.04491829499602318,
-0.012916634790599346,
-0.06415152549743652,
-0.01712684892117977,
0.014647247269749641,
-0.022639676928520203,
0.022967064753174782,
0.04301443323493004,
0.016863351687788963,
-0.00936651136726141,
0.03184821456670761,
0.04211290925741196,
0.04849829152226448,
0.03076939843595028,
-0.06016140431165695,
0.013812251389026642,
-0.04623258858919144,
0.01961851306259632,
0.014366359449923038,
-0.01624719426035881,
-0.03209548443555832,
-0.07945404946804047,
-0.027843883261084557,
-0.009711540304124355,
-0.014217857271432877,
-0.0076268818229436874,
0.04093049466609955,
-0.026001710444688797,
-0.03388707712292671,
-0.005376203451305628,
0.023509912192821503,
0.045028235763311386,
-0.024324290454387665,
0.05333862081170082,
-0.005550695117563009,
0.03131893277168274,
-0.046515390276908875,
0.005709331016987562,
-0.04980048909783363,
-0.03986557945609093,
-0.034695014357566833,
0.04273506999015808,
0.016131460666656494,
0.051870398223400116,
0.058819323778152466,
0.02649516426026821,
-0.0370352566242218,
0.07284418493509293,
0.056729335337877274,
-0.025067077949643135,
-0.05273626372218132,
-0.0027418751269578934,
-0.0016478527104482055,
-0.020846238359808922,
0.010383711196482182,
-0.012414312921464443,
0.030231857672333717,
0.049471415579319,
-0.013489616103470325,
-0.014213754795491695,
-0.00819576159119606,
-0.009115592576563358,
-0.038068946450948715,
-0.0765567272901535,
-0.023239346221089363,
0.006918347906321287,
-0.026411360129714012,
0.018719440326094627,
0.02844620868563652,
0.018710577860474586,
0.06743399798870087,
0.034379567950963974,
-0.012850791215896606,
-0.04776889458298683,
0.029394105076789856,
0.039880067110061646,
-0.04486704617738724,
-0.09742584079504013,
-0.051072485744953156,
0.022326959297060966,
0.04948043078184128,
-0.021952860057353973,
-0.07993334531784058,
0.026505639776587486,
0.03465043008327484,
-0.04270268604159355,
0.07411488145589828,
-0.013310998678207397,
0.050119366496801376,
0.05156414583325386,
-0.002985257189720869,
0.021701475605368614,
-0.013658475130796432,
-0.011890028603374958,
0.017002979293465614,
0.04362831264734268,
-0.054550282657146454,
-0.043830785900354385,
-0.039485324174165726,
0.03327183425426483,
0.038879599422216415,
0.048482850193977356,
0.02429775521159172,
-0.027401499450206757,
-0.0673208236694336,
-0.013328696601092815,
0.02560933493077755,
-0.00623649125918746,
0.005253054667264223,
0.04629002884030342,
0.0439329519867897,
-0.04071056842803955,
-0.02235322631895542,
-0.02151430770754814,
-0.004411494825035334,
0.03802534565329552,
0.008453506976366043,
-0.05073905736207962,
-0.03832201287150383,
0.02318660542368889,
-0.021502545103430748,
-0.012207584455609322,
-0.07717835158109665,
0.006018871441483498,
-0.021986933425068855,
-0.018815312534570694,
0.062360331416130066,
0.04566692188382149,
0.028714122250676155,
0.03845427930355072,
-0.0015522700268775225,
-0.0007751270313747227,
-0.02333017997443676,
0.041296329349279404,
-0.02835019864141941,
-0.03931864723563194,
-0.0006640119827352464,
-0.07204027473926544,
-0.026915669441223145,
-0.037774428725242615,
-0.032221853733062744,
-0.036204513162374496,
-0.004848412238061428,
0.019252970814704895,
-0.006408486515283585,
0.0032011838629841805,
0.000891097413841635,
0.028503965586423874,
-0.02071605809032917,
-0.03623108193278313,
-0.044989459216594696,
-0.013055264949798584,
-0.07986120879650116,
-0.01911371573805809,
-0.0012431793147698045,
-0.009212889708578587,
0.004560868255794048,
-0.0018646088428795338,
0.04051671549677849,
0.012196633964776993,
0.004036130849272013,
-0.04022880643606186,
0.015334239229559898,
0.02902219071984291,
-0.036672063171863556,
-0.019757241010665894,
0.0039530484937131405,
0.0076837739907205105,
0.027960272505879402,
-0.025318793952465057,
0.019346611574292183,
-0.010703925043344498,
0.0018184692598879337,
-0.04739845544099808,
0.0295494943857193,
0.017813265323638916,
-0.07461108267307281,
-0.03799904137849808,
-0.019566182047128677,
-0.026916906237602234,
0.031878720968961716,
-0.03379637375473976,
-0.048465631902217865,
0.03975418210029602,
0.0346338264644146,
0.03132375329732895,
-0.03213987126946449,
-0.006283423863351345,
0.023031847551465034,
-0.031336184591054916,
0.028150595724582672,
-0.0618768073618412,
0.03441043570637703,
-0.039912935346364975,
0.014661590568721294,
-0.01816401816904545,
-0.00012682935630436987,
-0.06029093638062477,
0.056978512555360794,
-0.0201334860175848,
-0.023098772391676903,
-0.015698207542300224,
0.018246270716190338,
-0.018678858876228333,
0.009431764483451843,
-0.01237435545772314,
0.01095640379935503,
-0.02973528392612934,
0.03654131665825844,
-0.020083559677004814,
0.014836733229458332,
-0.015530653297901154,
0.025092393159866333,
-0.0383341945707798,
-0.041163165122270584,
-0.00024845576263032854,
-0.0362115204334259,
0.03329066187143326,
0.023197874426841736,
0.024738259613513947,
0.020808136090636253,
-0.007659964729100466,
0.0013479620683938265,
0.024190105497837067,
-0.07173985242843628,
-0.0365716814994812,
-0.011317728087306023,
0.03086988441646099,
-0.0048241568729281425,
0.042787227779626846,
0.03673369437456131,
-0.0428825207054615,
-0.05198393017053604,
0.05524082109332085,
0.0342804379761219,
0.003048214828595519,
0.001225719228386879,
0.023370977491140366,
0.031210098415613174,
0.028543952852487564,
-0.026155423372983932,
-0.0018998897867277265,
0.002893046010285616,
-0.011674714274704456,
-0.019273189827799797,
-0.004626634065061808,
0.021496044471859932,
0.016140548512339592,
-0.039278991520404816,
-0.040471430867910385,
0.07438167184591293,
0.027960065752267838,
0.04284239560365677,
0.020438455045223236,
-0.04844110459089279,
0.05045405030250549,
0.003089203266426921,
-0.03536214306950569,
0.016152398660779,
-0.01017458550632,
-0.02227352373301983,
0.0657864585518837,
-0.009547105990350246,
0.016076652333140373,
0.036326032131910324,
0.013179643079638481,
-0.022461876273155212,
0.04642714187502861,
-0.05657263845205307,
0.01931634172797203,
0.0352632962167263,
-0.049375228583812714,
-0.02328530140221119,
-0.03675064072012901,
0.0563201829791069,
-0.045475322753190994,
0.05056936666369438,
0.04878850281238556,
0.005717367399483919,
0.02705073356628418,
-0.08481606841087341,
-0.02752036787569523,
0.015601246617734432,
-0.03882487863302231,
0.07435963302850723,
-0.002356995129957795,
-0.047432661056518555,
0.06500844657421112,
0.005147386342287064,
-0.10085795074701309,
0.031048500910401344,
0.030720464885234833,
0.03903959318995476,
0.004782459232956171,
0.03996240720152855,
-0.024832826107740402,
0.009694683365523815,
-0.027662483975291252,
0.013625981286168098,
-0.06066984683275223,
-0.010346234776079655,
0.002250347286462784,
-0.04687865450978279,
-0.00020433565077837557,
0.04137251898646355,
-0.029125673696398735,
0.01350721251219511,
0.013639381155371666,
-0.04097086191177368,
-0.03612558916211128,
-0.01013291347771883,
-0.00010596937499940395,
0.014596442691981792,
-0.0259396955370903,
-0.017303410917520523,
0.008836901746690273,
0.00676067965105176,
-0.013935036957263947,
-0.029485944658517838,
0.013001992367208004,
0.009614172391593456,
-0.05604710429906845,
-0.051804687827825546,
0.030899222940206528,
0.018470045179128647,
-0.004219406750053167,
0.02508460357785225,
0.014451254159212112,
0.013094374909996986,
0.027519967406988144,
-0.0008491213084198534,
0.01874958910048008,
-0.05403786152601242,
-0.009311323054134846,
0.02536836825311184,
0.01488660927861929,
0.020073644816875458,
-0.028735116124153137,
0.02287188358604908,
0.037319280207157135,
0.030874934047460556,
0.0018915674882009625,
-0.04216455668210983,
-0.019240474328398705,
0.013160046190023422,
-0.03348470851778984,
0.02428188920021057,
0.00806563999503851,
-0.04317833483219147,
-0.034637853503227234,
0.006616196595132351,
-0.009681294672191143,
0.04851064458489418,
-0.048028912395238876,
0.031209390610456467,
0.020330633968114853,
0.009471679106354713,
-0.051098428666591644,
-0.08944717049598694,
-0.03827253729104996,
-0.023864896968007088,
0.012394817546010017,
0.04120444878935814,
-0.0498090423643589,
0.022310083732008934,
-0.04099263995885849,
-0.03520931676030159,
0.0481705479323864,
0.010323622263967991,
-0.05834846943616867,
0.08443523943424225,
0.07915129512548447,
-0.043480463325977325,
0.03212234377861023,
0.04617031663656235,
-0.04715433716773987,
0.006522316951304674,
0.0326450951397419,
0.014905639924108982,
0.024937793612480164,
0.03214944899082184,
-0.03783323988318443,
-0.02715364098548889,
-0.07333708554506302,
-0.03873671591281891,
-0.05870048701763153,
-0.0026564064901322126,
0.04308103024959564
] |
Davlan/mT5_base_yoruba_adr | [
"pytorch",
"mt5",
"text2text-generation",
"arxiv:2003.10564",
"arxiv:2103.08647",
"transformers",
"autotrain_compatible"
] | text2text-generation | {
"architectures": [
"MT5ForConditionalGeneration"
],
"model_type": "mt5",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 5 | null | ---
thumbnail: https://github.com/SauravMaheshkar/CommonLit-Readibility/blob/main/assets/CommonLit%20-%20Big%20Banner.png?raw=true
tags:
- kaggle
license: cc0-1.0
datasets:
- Commonlit-Readibility
---

# FineTuning
| **Architecture** | **Weights** | **Training Loss** | **Validation Loss** |
|:-----------------------:|:---------------:|:----------------:|:----------------------:|
| roberta-base | [huggingface/hub](https://huggingface.co/SauravMaheshkar/clr-finetuned-roberta-base) | **0.641** | **0.4728** |
| bert-base-uncased | [huggingface/hub](https://huggingface.co/SauravMaheshkar/clr-finetuned-bert-base-uncased) | 0.6781 | 0.4977 |
| albert-base | [huggingface/hub](https://huggingface.co/SauravMaheshkar/clr-finetuned-albert-base) | 0.7119 | 0.5155 |
| xlm-roberta-base | [huggingface/hub](https://huggingface.co/SauravMaheshkar/clr-finetuned-xlm-roberta-base) | 0.7225 | 0.525 |
| bert-large-uncased | [huggingface/hub](https://huggingface.co/SauravMaheshkar/clr-finetuned-bert-large-uncased) | 0.7482 | 0.5161 |
| albert-large | [huggingface/hub](https://huggingface.co/SauravMaheshkar/clr-finetuned-albert-large) | 1.075 | 0.9921 |
| roberta-large | [huggingface/hub](https://huggingface.co/SauravMaheshkar/clr-finetuned-roberta-large) | 2.749 | 1.075 |
| [
-0.020113762468099594,
-0.01620008610188961,
0.009769095107913017,
0.036649178713560104,
0.034040652215480804,
-0.005373548716306686,
-0.04427733272314072,
-0.022032205015420914,
-0.05051128938794136,
0.03667984902858734,
0.017541756853461266,
0.003035607747733593,
0.03776827082037926,
0.04430316761136055,
-0.002768593607470393,
-0.03094751574099064,
-0.007304617669433355,
-0.015317215584218502,
-0.02495146356523037,
-0.01096651516854763,
0.011657588183879852,
0.004565754439681768,
-0.008188696578145027,
0.03762788325548172,
0.032910678535699844,
-0.018947148695588112,
0.02996572107076645,
0.034818582236766815,
0.04063643887639046,
-0.06612104177474976,
0.013607335276901722,
-0.018422506749629974,
-0.05845999717712402,
-0.041782479733228683,
-0.013008659705519676,
0.011205028742551804,
0.005605698097497225,
-0.005685114301741123,
0.011371164582669735,
0.07829142361879349,
0.015136235393583775,
0.048118956387043,
-0.0019511625869199634,
-0.05663830041885376,
0.048259470611810684,
-0.05539143085479736,
-0.053852979093790054,
-0.047721315175294876,
0.03578973934054375,
-0.0444081649184227,
-0.05617593228816986,
-0.06471285969018936,
-0.04082271084189415,
0.0021314367186278105,
0.008235972374677658,
-0.0000990795306279324,
-0.04833364114165306,
-0.0062421164475381374,
0.05036231130361557,
-0.056775547564029694,
-0.07338182628154755,
0.003573435125872493,
-0.07666180282831192,
0.017459232360124588,
0.009225529618561268,
-0.03735200688242912,
0.002854146994650364,
-0.02195359580218792,
0.05044282600283623,
-0.009416624903678894,
0.06506126374006271,
-0.04966503381729126,
0.006423578597605228,
-0.0699113979935646,
0.03924057260155678,
-0.015907047316432,
0.02533123828470707,
0.04870900139212608,
-0.027977751567959785,
0.04901590943336487,
0.03284236788749695,
0.0013800980523228645,
0.03786865249276161,
0.0014852965250611305,
0.004491046536713839,
0.02309909276664257,
-0.04277955740690231,
0.005745529197156429,
0.02442321367561817,
0.047079943120479584,
-0.027262138202786446,
-0.056198228150606155,
-0.04143282771110535,
-0.0326438844203949,
-0.01774688996374607,
0.008644362911581993,
0.05472942814230919,
-0.009467417374253273,
0.002349924063310027,
0.004514460917562246,
0.012356377206742764,
0.04393303021788597,
-0.03085818700492382,
0.05584636330604553,
0.010170917958021164,
-0.01471432950347662,
-0.030085934326052666,
-0.03002922050654888,
-0.02483939379453659,
0.015312905423343182,
0.06303364783525467,
-0.016567759215831757,
-0.04568302258849144,
0.02650848589837551,
0.011081252247095108,
-0.0414058156311512,
0.05315941199660301,
-0.022363372147083282,
-0.04330814629793167,
-0.04159170389175415,
0.013388220220804214,
-0.01638752408325672,
0.02471383661031723,
-0.008924710564315319,
-0.029921619221568108,
0.02516692504286766,
-0.03675409033894539,
-0.020577235147356987,
0.0020046127028763294,
0.0349893756210804,
-0.010379953309893608,
0.05366568639874458,
0.008866919204592705,
-0.0953691303730011,
0.018204540014266968,
-0.008975493721663952,
-0.04621025547385216,
0.05433392897248268,
-0.008385208435356617,
0.09490714222192764,
-0.06228702515363693,
-0.04075240343809128,
0.029001561924815178,
0.03542522341012955,
-0.015564179047942162,
0.0053710066713392735,
0.015829728916287422,
-0.004913853481411934,
-0.00934755988419056,
-0.01225209143012762,
0.04052209109067917,
-0.06985028088092804,
-0.01977495104074478,
0.06683313101530075,
-0.007163681089878082,
0.032246239483356476,
-0.05508391559123993,
0.0034521992783993483,
0.02147737890481949,
-0.020413713529706,
-0.014266297221183777,
0.03420412167906761,
-0.015830785036087036,
-0.018069734796881676,
-0.029290108010172844,
-0.025485068559646606,
-0.014016207307577133,
0.06309868395328522,
-0.010928614996373653,
-0.03170672804117203,
-0.02944132871925831,
0.012621082365512848,
0.032271698117256165,
0.00524664344266057,
-0.014949092641472816,
0.044041745364665985,
0.060418080538511276,
0.04855355620384216,
-0.006308323238044977,
0.02098412811756134,
0.031377196311950684,
-0.01819680444896221,
-0.00995576661080122,
0.01561980415135622,
0.04060231149196625,
0.015485210344195366,
0.03282661736011505,
0.018320854753255844,
0.0014970825286582112,
-0.03100566752254963,
-0.012365139089524746,
0.06401604413986206,
0.0076182130724191666,
-0.008222189731895924,
0.03626428544521332,
-0.02515239082276821,
-0.010982638224959373,
0.047968000173568726,
-0.03960683196783066,
0.030866073444485664,
0.008654316887259483,
-0.03691232576966286,
0.021293599158525467,
0.0044195326045155525,
0.032245468348264694,
0.018909603357315063,
-0.013666230253875256,
0.07344122231006622,
-0.05524945259094238,
0.006314748432487249,
-0.04952574148774147,
-0.04019254818558693,
-0.006216982379555702,
0.04788776487112045,
0.006048187147825956,
0.05259978398680687,
-0.019893400371074677,
-0.03671819344162941,
0.000666096224449575,
0.07729735225439072,
0.04489292949438095,
0.03197434917092323,
-0.026698166504502296,
-0.00014025361451786011,
0.06829524040222168,
0.02727813646197319,
-0.03328295424580574,
-0.04871584102511406,
0.013448097743093967,
0.03646872937679291,
-0.02669144794344902,
0.0071333288215100765,
-0.028261233121156693,
0.02227436751127243,
-0.0352555550634861,
-0.07997030764818192,
0.06901368498802185,
0.05914243683218956,
0.007754721213132143,
0.014651402831077576,
-0.027965789660811424,
0.030125457793474197,
0.035462845116853714,
0.02681976743042469,
0.0009565862128511071,
-0.03192465007305145,
0.0244609322398901,
0.035655904561281204,
0.03542231395840645,
-0.020126432180404663,
0.0500694215297699,
-0.026032952591776848,
0.02470601163804531,
0.006064068526029587,
0.0002761614741757512,
0.00719612929970026,
0.058439701795578,
-0.007962589152157307,
-0.005430561024695635,
0.03777633234858513,
0.006248027086257935,
0.005231194198131561,
0.07741209119558334,
0.005623370409011841,
0.03667358681559563,
-0.03357551246881485,
0.039750732481479645,
0.07453250885009766,
0.005676180589944124,
0.021640604361891747,
0.03207280486822128,
0.08115092664957047,
-0.018830597400665283,
-0.03900495171546936,
0.04625388979911804,
-0.05224647745490074,
0.02584689110517502,
-0.01814994402229786,
0.009627162478864193,
-0.009467918425798416,
-0.0246425811201334,
0.017711898311972618,
0.026751674711704254,
-0.01319117657840252,
0.006792426109313965,
-0.027781063690781593,
0.00939132459461689,
0.010568712837994099,
0.0036056332755833864,
0.02562531642615795,
-0.009435690008103848,
-0.018672499805688858,
0.01734497956931591,
-0.07660335302352905,
-0.03686119616031647,
0.012199132703244686,
-0.028827060014009476,
0.015809323638677597,
-0.11064960807561874,
-0.0011885369895026088,
-0.07527162879705429,
-0.020820511505007744,
0.03636658564209938,
0.04222985729575157,
-0.018058057874441147,
-0.04963580146431923,
0.020374557003378868,
-0.05635194852948189,
-0.02366575039923191,
-0.07915831357240677,
-0.02440479025244713,
-0.055808767676353455,
-0.07313044369220734,
0.03226284682750702,
0.02526143379509449,
0.04443074390292168,
-0.010924873873591423,
-0.02257833443582058,
-0.05231291800737381,
-0.03577083349227905,
0.05097448453307152,
0.03565501794219017,
-0.03183945640921593,
-0.041184842586517334,
0.020563919097185135,
-0.0036220052279531956,
0.003025289624929428,
0.00849707517772913,
-0.024100113660097122,
0.06811735779047012,
0.08142843097448349,
0.010099146515130997,
0.011348129250109196,
-0.008598623797297478,
-0.0268514696508646,
-0.02273409254848957,
-0.033822186291217804,
-0.03062383085489273,
-0.018448766320943832,
-0.04264473542571068,
-0.04925408214330673,
-0.04528447985649109,
-0.02911338210105896,
-0.023502089083194733,
-0.012726182118058205,
-0.006812927778810263,
0.04810681566596031,
0.027262572199106216,
0.030321620404720306,
0.035921480506658554,
-0.08180003613233566,
-0.032824426889419556,
0.09265270084142685,
0.030866388231515884,
0.019335534423589706,
-0.07866938412189484,
-0.035347409546375275,
0.019191691651940346,
0.027578741312026978,
-0.005704295821487904,
-0.03989023342728615,
0.06462576985359192,
-0.000573768513277173,
-0.021358860656619072,
0.0007070863503031433,
-0.006728770677000284,
-0.013453759253025055,
-0.004441595636308193,
-0.0058553642593324184,
0.017367294058203697,
-0.03531147539615631,
-0.005974834784865379,
-0.02665788121521473,
0.05429749935865402,
-0.049521736800670624,
-0.05830691382288933,
-0.004591359756886959,
0.012527618557214737,
0.03847990185022354,
0.010357363149523735,
-0.03204996511340141,
-0.022294746711850166,
-0.051916513592004776,
0.005296043585985899,
0.023773958906531334,
-0.005409139674156904,
0.02113286219537258,
0.061426013708114624,
-0.003186246147379279,
-0.015041649341583252,
0.008831051178276539,
0.04833265766501427,
0.03647305816411972,
0.016933754086494446,
-0.06896886974573135,
0.025517044588923454,
0.0010563101386651397,
0.003959616646170616,
-0.00391218438744545,
-0.04035768657922745,
-0.04039139673113823,
-0.0632241889834404,
-0.013316208496689796,
0.04367608577013016,
0.00018200732301920652,
-0.026147713884711266,
0.03800947219133377,
-0.007614484056830406,
-0.031869471073150635,
0.0221108365803957,
-0.02496444247663021,
0.023348012939095497,
-0.021410616114735603,
0.07278957962989807,
-0.015568304806947708,
0.032608795911073685,
-0.04736682027578354,
-0.004051251336932182,
-0.03670448437333107,
-0.008875706233084202,
0.004686596803367138,
0.055627334862947464,
0.014914636500179768,
0.02462712489068508,
0.03340421989560127,
0.04034934565424919,
-0.02302890084683895,
0.04457894340157509,
0.03429461270570755,
-0.023589476943016052,
-0.04374822601675987,
0.026939857751131058,
-0.008080764673650265,
-0.06012330576777458,
-0.026633834466338158,
-0.02662249468266964,
0.02383657917380333,
0.017839236184954643,
-0.0003361032868269831,
0.011602274142205715,
0.018584730103611946,
-0.014584814198315144,
-0.02506365068256855,
-0.05463882163167,
-0.021515684202313423,
-0.0039835525676608086,
-0.044842008501291275,
0.05351465195417404,
0.06452594697475433,
0.02130565606057644,
0.04332466423511505,
0.041726235300302505,
-0.03067220188677311,
-0.022242072969675064,
0.07895304262638092,
0.018557703122496605,
-0.04156133159995079,
-0.04785727337002754,
-0.033106282353401184,
0.04040226340293884,
0.021475445479154587,
0.010916545987129211,
-0.10151027143001556,
0.05166928470134735,
0.06406055390834808,
-0.03750936686992645,
0.04588728025555611,
0.010252418927848339,
0.036205194890499115,
0.03564444184303284,
0.007517840247601271,
0.046120535582304,
-0.0007746811606921256,
-0.010512346401810646,
-0.008744482882320881,
0.036110542714595795,
-0.0038591453339904547,
-0.017660127952694893,
-0.03206166252493858,
0.025746207684278488,
0.018658502027392387,
0.0402538888156414,
0.04727305844426155,
-0.0454702265560627,
-0.047317009419202805,
0.015318788588047028,
0.02131737396121025,
-0.041980866342782974,
0.01565137505531311,
0.015057011507451534,
0.030628321692347527,
-0.041189782321453094,
-0.036909446120262146,
-0.010714118368923664,
-0.017486639320850372,
0.06019999086856842,
-0.0334346778690815,
0.009854215197265148,
-0.027505723759531975,
0.023357054218649864,
-0.0047328658401966095,
-0.02353714592754841,
-0.04175582528114319,
0.05486299842596054,
0.014051439240574837,
-0.007439679000526667,
0.044864118099212646,
0.013461170718073845,
0.04713054373860359,
0.03780555725097656,
0.004148182924836874,
-0.0018088023643940687,
-0.018600231036543846,
0.04729534685611725,
-0.032647505402565,
-0.024055499583482742,
0.006321851629763842,
-0.03406913951039314,
-0.017473870888352394,
-0.004467555787414312,
-0.057425010949373245,
-0.03452001139521599,
-0.01195015013217926,
0.05668550729751587,
0.0036750396247953176,
0.013864386826753616,
-0.003664456307888031,
0.04188359156250954,
-0.02124950848519802,
-0.04578237235546112,
-0.04551335796713829,
-0.002739076502621174,
-0.06687352806329727,
0.003270141314715147,
0.03912745788693428,
0.011584080755710602,
0.04426328465342522,
0.02826152741909027,
0.024306155741214752,
0.04244734346866608,
0.006408473011106253,
-0.028597000986337662,
0.04982832074165344,
0.0023959041573107243,
-0.03615431487560272,
-0.04437891021370888,
0.025293154641985893,
0.038848407566547394,
0.057151664048433304,
-0.03012578934431076,
0.016303205862641335,
0.002518407767638564,
-0.004117555450648069,
-0.0046233260072767735,
0.027540311217308044,
0.01739382930099964,
-0.06462626904249191,
-0.046520330011844635,
0.002726490143686533,
-0.011601603589951992,
0.05466298386454582,
-0.0481482595205307,
-0.010856987908482552,
0.023270126432180405,
0.04408840835094452,
0.04034143313765526,
-0.012064946815371513,
-0.047422200441360474,
0.015966935083270073,
-0.008693479001522064,
0.016550863161683083,
-0.05540817230939865,
0.02819249778985977,
-0.01973620243370533,
0.04656654968857765,
-0.04794628918170929,
0.009121864102780819,
-0.04348405450582504,
0.04295647516846657,
-0.016116641461849213,
-0.013724468648433685,
-0.002110023284330964,
0.07485970109701157,
-0.005668282508850098,
0.0031422211322933435,
-0.024648496881127357,
0.02406345121562481,
-0.0023574880324304104,
0.036585014313459396,
-0.04237670451402664,
-0.005516987293958664,
-0.03049081191420555,
-0.01474375743418932,
-0.04698480665683746,
-0.015489532612264156,
-0.006155113223940134,
-0.01872577890753746,
0.011176927015185356,
0.0846799686551094,
0.008714512921869755,
0.02555030770599842,
-0.012849507853388786,
-0.010913776233792305,
0.019190598279237747,
-0.0590631440281868,
-0.03616340085864067,
0.0050771525129675865,
0.01330458652228117,
-0.02899954281747341,
0.05615933611989021,
0.010708767920732498,
-0.06977004557847977,
-0.040966831147670746,
0.041629597544670105,
-0.004049629904329777,
-0.0051842425018548965,
0.013917963951826096,
0.05441682040691376,
0.0613594613969326,
0.053853780031204224,
-0.023311542347073555,
0.03305293619632721,
-0.011331679299473763,
-0.025930965319275856,
0.0436895415186882,
-0.00955154187977314,
0.03831113874912262,
0.016821786761283875,
-0.03446035832166672,
-0.012961676344275475,
0.08841119706630707,
-0.002941744402050972,
0.017179468646645546,
-0.015251765958964825,
-0.04749886319041252,
0.0304592102766037,
-0.004891672637313604,
-0.06261236220598221,
0.03336990252137184,
0.012060649693012238,
-0.019074667245149612,
0.05459143593907356,
-0.0011129736667498946,
0.004110266920179129,
0.052372053265571594,
0.04493781924247742,
-0.022499464452266693,
0.054798077791929245,
-0.04227035492658615,
0.042998306453228,
0.023932339623570442,
-0.03640495613217354,
-0.028336571529507637,
-0.0705997422337532,
0.056897491216659546,
-0.08464318513870239,
0.06627622246742249,
0.06489817798137665,
0.00877261534333229,
0.014093037694692612,
-0.0041366685181856155,
-0.06620286405086517,
-0.0027885856106877327,
-0.049982354044914246,
0.05058274790644646,
0.004598343279212713,
-0.08393999934196472,
0.06903780996799469,
0.026444319635629654,
-0.07541617006063461,
0.05511137470602989,
0.05026976391673088,
0.031444940716028214,
0.00917750783264637,
0.02171359397470951,
-0.058844272047281265,
0.023345762863755226,
-0.05729459971189499,
0.04885303974151611,
-0.021256787702441216,
-0.040803659707307816,
0.011773984879255295,
-0.012393916957080364,
-0.028876738622784615,
0.047325778752565384,
-0.0007466502138413489,
-0.004614171572029591,
0.05260339751839638,
-0.037965286523103714,
-0.047982487827539444,
0.015573549084365368,
0.04181215539574623,
-0.029002925381064415,
-0.01713639684021473,
-0.018408076837658882,
0.04907071590423584,
0.02152515947818756,
0.01244520302861929,
-0.03386261686682701,
0.0023210225626826286,
0.031515512615442276,
-0.08394180238246918,
-0.01651398092508316,
0.0338020958006382,
-0.00239724013954401,
-0.03517099469900131,
0.015762677416205406,
-0.015705058351159096,
0.005223127547651529,
0.03340482711791992,
-0.02413027547299862,
-0.006140212062746286,
-0.04530772194266319,
-0.009882159531116486,
-0.0018629569094628096,
0.007774269673973322,
0.026564791798591614,
-0.011056230403482914,
0.022395256906747818,
0.023101922124624252,
0.01870502158999443,
0.009167906828224659,
-0.014097549021244049,
-0.011333446018397808,
0.03298415616154671,
-0.02413087710738182,
0.011914410628378391,
0.01059679314494133,
-0.04751782864332199,
-0.045718755573034286,
-0.01128556951880455,
-0.04632731154561043,
0.04735606163740158,
-0.05193956196308136,
0.011788568459451199,
0.05978192389011383,
-0.02578509785234928,
-0.03753557801246643,
-0.09634318202733994,
-0.008848920464515686,
-0.04251257702708244,
0.021141385659575462,
-0.00468534417450428,
-0.03616059944033623,
0.027296850457787514,
-0.03632131963968277,
-0.05679202079772949,
0.018486211076378822,
0.018710173666477203,
-0.030573425814509392,
0.04895554482936859,
0.04663705825805664,
-0.04463524743914604,
0.006478601135313511,
-0.0032274085097014904,
-0.04690590128302574,
0.021354015916585922,
0.014387713745236397,
0.03335535526275635,
0.019857045263051987,
0.03719020634889603,
-0.01827141083776951,
-0.027915306389331818,
-0.041381996124982834,
-0.03093128651380539,
-0.025148117914795876,
0.04301076382398605,
0.04871790111064911
] |
Davlan/xlm-roberta-base-finetuned-lingala | [
"pytorch",
"xlm-roberta",
"fill-mask",
"transformers",
"license:apache-2.0",
"autotrain_compatible"
] | fill-mask | {
"architectures": [
"XLMRobertaForMaskedLM"
],
"model_type": "xlm-roberta",
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 9 | null | ---
thumbnail: https://github.com/SauravMaheshkar/chaii-Hindi-Tamil-QA/blob/main/assets/Coffee%20Banner.png?raw=true
tags:
- kaggle
- rembert
- pytorch
- question-answering
language: multilingual
license: cc0-1.0
inference: false
datasets:
- Commonlit-Readibility
---
<div align = "center">
<img src = "https://github.com/SauravMaheshkar/chaii-Hindi-Tamil-QA/blob/main/assets/Coffee%20Banner.png?raw=true">
</div>
This dataset contains the [**google/rembert**](https://huggingface.co/transformers/model_doc/rembert.html) model weights according to my team's experimentation strategy during the [**chaii - Hindi and Tamil Question Answering**](https://www.kaggle.com/c/chaii-hindi-and-tamil-question-answering) competition. They are listed below with their corresponding public LB score:-
| Huggingface Hub Link | Public LB Score |
| :---: | :---: |
| [**SauravMaheshkar/rembert-maxseq-400-docstride-128-chaii**](https://huggingface.co/SauravMaheshkar/rembert-maxseq-400-docstride-128-chaii) | 0.724 |
| [**SauravMaheshkar/rembert-maxseq-384-docstride-135-chaii**](https://huggingface.co/SauravMaheshkar/rembert-maxseq-384-docstride-135-chaii) | 0.723 |
| [**SauravMaheshkar/rembert-maxseq-400-docstride-135-chaii**](https://huggingface.co/SauravMaheshkar/rembert-maxseq-400-docstride-135-chaii) | 0.737 |
| [**SauravMaheshkar/rembert-maxseq-384-docstride-128-chaii**](https://huggingface.co/SauravMaheshkar/rembert-maxseq-384-docstride-128-chaii) | 0.725 |
| [
-0.013764739036560059,
-0.021390516310930252,
0.002391856163740158,
0.03998016566038132,
0.03207847848534584,
0.005474995356053114,
-0.02963673509657383,
-0.02353072538971901,
-0.0487818643450737,
0.05139720067381859,
0.0317004956305027,
-0.015888554975390434,
0.01739582046866417,
0.03915025666356087,
-0.024389052763581276,
-0.019495820626616478,
-0.031228691339492798,
-0.018220888450741768,
-0.028577005490660667,
-0.012577643617987633,
0.010805833153426647,
0.012138956226408482,
-0.008284308947622776,
0.024894235655665398,
-0.0027288899291306734,
0.016983341425657272,
-0.008608301170170307,
0.028039544820785522,
0.0078008705750107765,
-0.07898974418640137,
-0.014257499948143959,
-0.06706488877534866,
-0.021816616877913475,
-0.06136739253997803,
-0.018897270783782005,
-0.013612102717161179,
0.025539426133036613,
0.010189905762672424,
0.021619360893964767,
0.06749070435762405,
-0.016595955938100815,
0.017862120643258095,
-0.008389567956328392,
-0.0242632944136858,
0.06917902827262878,
-0.032899752259254456,
-0.03819017857313156,
-0.02989889122545719,
0.030338134616613388,
-0.028206700459122658,
-0.05476068705320358,
-0.08246417343616486,
-0.05742742866277695,
0.0035355982836335897,
0.0096711665391922,
-0.023921901360154152,
-0.037813324481248856,
-0.007759715896099806,
0.04078177362680435,
-0.06268149614334106,
-0.05037632957100868,
-0.007273092400282621,
-0.07631570100784302,
0.008366898633539677,
0.04446808248758316,
-0.03596634790301323,
0.015784263610839844,
-0.045891158282756805,
0.036839526146650314,
-0.02085573785007,
0.06734852492809296,
-0.06730110198259354,
0.037995219230651855,
-0.06837553530931473,
-0.016592856496572495,
0.0012348257005214691,
0.024906978011131287,
0.04574248939752579,
-0.02495289221405983,
0.06134264916181564,
0.016834400594234467,
-0.013498026877641678,
0.035065170377492905,
-0.008506931364536285,
-0.0059211840853095055,
0.008056383579969406,
-0.033230241388082504,
-0.00012421100109349936,
0.020155245438218117,
0.045861247926950455,
-0.036623515188694,
-0.06375934928655624,
-0.015577266924083233,
-0.02135777845978737,
-0.008521552197635174,
0.029448185116052628,
0.042789824306964874,
-0.0075059677474200726,
0.017616238445043564,
0.011473254300653934,
0.02040773816406727,
0.057856928557157516,
-0.018376924097537994,
0.051739878952503204,
-0.006791987456381321,
0.01046881265938282,
-0.012239313684403896,
-0.031448669731616974,
-0.049418963491916656,
0.022007105872035027,
0.027487734332680702,
-0.05267497897148132,
-0.036877505481243134,
0.017547480762004852,
0.008412244729697704,
-0.03623944893479347,
0.041134778410196304,
-0.044586922973394394,
-0.0364963635802269,
-0.06242332234978676,
0.0308631993830204,
0.0046348716132342815,
-0.029812829568982124,
0.02032332681119442,
-0.04111073911190033,
0.02182755433022976,
-0.022565485909581184,
-0.023322485387325287,
0.013421174138784409,
0.016995960846543312,
-0.00641588494181633,
0.048738542944192886,
0.005273041315376759,
-0.07228179275989532,
0.020583661273121834,
-0.0003509550588205457,
-0.03882070630788803,
0.04711258411407471,
0.002228475408628583,
0.0977759063243866,
-0.06329985707998276,
-0.06217501312494278,
0.03393199294805527,
0.03213982284069061,
0.0012053301325067878,
0.006293376442044973,
0.02215920388698578,
-0.0255914144217968,
-0.038915034383535385,
-0.014013155363500118,
0.04342490807175636,
-0.06572994589805603,
0.0037472343537956476,
0.04755169898271561,
0.00033871459891088307,
0.03207458183169365,
-0.04622204229235649,
-0.01682053692638874,
0.00901602953672409,
-0.005859756376594305,
-0.02206835336983204,
0.01854262501001358,
0.018959417939186096,
-0.003311652224510908,
-0.047302570194005966,
-0.0363166481256485,
0.01144589763134718,
0.0888243317604065,
-0.0065323240123689175,
-0.01573646441102028,
-0.03259822353720665,
0.02369636297225952,
0.019186317920684814,
0.016793522983789444,
-0.023595592007040977,
0.036935292184352875,
0.05852009356021881,
0.04190690815448761,
-0.02360488660633564,
0.026359936222434044,
0.020864875987172127,
-0.030460501089692116,
-0.0187681894749403,
0.005326888058334589,
0.02016514725983143,
-0.03345468267798424,
0.03191959485411644,
0.03526867926120758,
-0.007507246918976307,
-0.029334647580981255,
-0.010794521309435368,
0.055244870483875275,
-0.031902000308036804,
-0.01977471262216568,
0.0009527416550554335,
-0.020167196169495583,
-0.03336770832538605,
0.04552720487117767,
-0.019629666581749916,
0.013309838250279427,
-0.03798132389783859,
-0.0006625389796681702,
0.038350433111190796,
0.02125702053308487,
0.016607576981186867,
0.043397244065999985,
-0.00400222884491086,
0.07860131561756134,
-0.04412039369344711,
-0.005982880014926195,
-0.05207352712750435,
-0.04554184526205063,
0.0004313072422519326,
0.05894393473863602,
0.017750926315784454,
0.05312453955411911,
-0.01945263333618641,
-0.05314945802092552,
0.04373125359416008,
0.06910067796707153,
0.06005968526005745,
0.027485033497214317,
0.0019198090303689241,
-0.004782635252922773,
0.03984886035323143,
0.06763793528079987,
-0.06969853490591049,
-0.03337022289633751,
0.0253620408475399,
0.04240904003381729,
-0.017452295869588852,
-0.00266465381719172,
-0.002391620771959424,
0.01512876432389021,
-0.045254506170749664,
-0.06212947517633438,
0.05421419441699982,
0.021652469411492348,
0.021465789526700974,
0.016997531056404114,
-0.00005830491500091739,
0.019050907343626022,
0.03683727979660034,
0.010013855993747711,
-0.006383652798831463,
-0.0488525815308094,
0.014951410703361034,
0.019066721200942993,
0.07955949008464813,
-0.03757137432694435,
0.027932222932577133,
0.000047399218601640314,
0.011334962211549282,
0.032359663397073746,
-0.03436220437288284,
0.008191869594156742,
0.038003988564014435,
0.010100966319441795,
-0.035612836480140686,
0.008125673979520798,
0.009645516984164715,
0.011082778684794903,
0.0755978524684906,
0.009686889126896858,
0.043364156037569046,
-0.006225913763046265,
0.01665809191763401,
0.08855877071619034,
0.004857705906033516,
0.019064493477344513,
0.020099511370062828,
0.08382968604564667,
0.031852610409259796,
0.0007183599518612027,
0.05317793786525726,
-0.053544435650110245,
0.011492973193526268,
-0.030625255778431892,
0.007400768809020519,
-0.02852989360690117,
-0.0006031010998412967,
0.044538713991642,
0.027428215369582176,
-0.002225178526714444,
0.025395095348358154,
0.0023096187505871058,
-0.004833506885915995,
0.05199466645717621,
-0.032244082540273666,
0.0032001440413296223,
-0.022441761568188667,
0.0034892400726675987,
0.03297846391797066,
-0.07230881601572037,
-0.041666679084300995,
0.003654263913631439,
-0.03241245448589325,
0.021212391555309296,
-0.0871693417429924,
-0.01658795028924942,
-0.06470419466495514,
-0.027624448761343956,
0.050899505615234375,
0.04710816964507103,
-0.013361824676394463,
-0.031960368156433105,
0.0023493445478379726,
-0.0390390045940876,
-0.046072691679000854,
-0.05753340572118759,
-0.05610531195998192,
-0.024404169991612434,
-0.10889498144388199,
0.040331464260816574,
0.03763782978057861,
0.045701686292886734,
-0.0018762028776109219,
-0.005869337357580662,
-0.02471141330897808,
-0.010134924203157425,
0.05705821514129639,
0.046261683106422424,
-0.011348406784236431,
-0.057280924171209335,
0.037100374698638916,
-0.008775352500379086,
0.008926022797822952,
-0.00022361673472914845,
-0.04693727195262909,
0.09741080552339554,
0.04292372986674309,
0.015862269327044487,
0.004356784280389547,
-0.004366598557680845,
-0.043635670095682144,
-0.05057544261217117,
-0.05224623531103134,
-0.03534044697880745,
-0.020568368956446648,
-0.048514965921640396,
-0.04178238287568092,
-0.02092808485031128,
-0.0314183346927166,
-0.02762480266392231,
-0.020691482350230217,
-0.01227443665266037,
0.007921881973743439,
0.04457369074225426,
0.03508890047669411,
0.026123659685254097,
-0.05226171016693115,
-0.010015628300607204,
0.07347790896892548,
0.008721716701984406,
0.002100963843986392,
-0.06561975181102753,
-0.038675904273986816,
0.037573300302028656,
0.015064644627273083,
-0.010719495825469494,
-0.028649738058447838,
0.06122087314724922,
0.004977317992597818,
-0.023541869595646858,
0.009988469071686268,
-0.041441552340984344,
-0.010133396834135056,
0.026032669469714165,
-0.0008397863712161779,
-0.029425280168652534,
-0.052419133484363556,
-0.02299816533923149,
-0.010654838755726814,
0.030986759811639786,
-0.043222781270742416,
-0.06666623800992966,
-0.013121849857270718,
0.029837870970368385,
-0.001621785806491971,
-0.009431383572518826,
-0.04530494660139084,
-0.0031143149826675653,
-0.051445771008729935,
-0.025402426719665527,
0.04465079680085182,
-0.010076508857309818,
0.006955329794436693,
0.036348339170217514,
0.005172644276171923,
-0.03932702913880348,
0.038006480783224106,
0.014306099154055119,
0.039797376841306686,
0.024420149624347687,
-0.03689997270703316,
0.016111085191369057,
-0.004154294729232788,
0.01248279120773077,
0.004804179538041353,
-0.014235259965062141,
-0.047703199088573456,
-0.08266831934452057,
-0.0037559717893600464,
0.051027510315179825,
-0.014729439280927181,
-0.04496079310774803,
0.03442760556936264,
0.004911503288894892,
-0.026876656338572502,
0.008874813094735146,
0.018490871414542198,
0.020449237897992134,
-0.05035437270998955,
0.05981806293129921,
0.0008385006804019213,
0.0277260709553957,
-0.05211161449551582,
0.0032003463711589575,
-0.05481128394603729,
-0.004693998023867607,
-0.014946818351745605,
0.04854895547032356,
-0.011553719639778137,
0.045602552592754364,
0.04350750893354416,
0.028222698718309402,
-0.026355145499110222,
0.049923062324523926,
0.04648541659116745,
-0.02638009935617447,
-0.05527614429593086,
-0.009105963632464409,
-0.005120519548654556,
-0.03241084888577461,
-0.03954518213868141,
-0.03551127389073372,
0.057001497596502304,
0.033912673592567444,
-0.0011878557270392776,
-0.0037303310818970203,
0.015218067914247513,
-0.03796045482158661,
-0.044364575296640396,
-0.05331747978925705,
-0.01483292505145073,
-0.012953691184520721,
-0.026097383350133896,
0.013006425462663174,
0.06353111565113068,
0.0314536914229393,
0.048124492168426514,
0.04721198230981827,
-0.016887767240405083,
-0.051092833280563354,
0.039653077721595764,
0.015599734149873257,
-0.04213680326938629,
-0.07102875411510468,
-0.04672237113118172,
0.03154550492763519,
0.024064423516392708,
0.0038273476529866457,
-0.08006087690591812,
0.04624205082654953,
0.02841714210808277,
-0.05484217777848244,
0.024007394909858704,
0.0020718793384730816,
0.031444232910871506,
0.052816085517406464,
-0.013214430771768093,
0.012730896472930908,
-0.03086150251328945,
0.002276498591527343,
-0.0200942475348711,
0.04782215133309364,
-0.020128965377807617,
-0.02030724287033081,
-0.07241367548704147,
0.009885894134640694,
0.020205585286021233,
0.055397383868694305,
0.04856640845537186,
-0.022313527762889862,
-0.03730401396751404,
-0.016891097649931908,
0.03680264204740524,
-0.04295489937067032,
0.02798834629356861,
0.043553851544857025,
0.01518732588738203,
-0.047929923981428146,
-0.037279609590768814,
0.010522040538489819,
0.008252391591668129,
0.019130326807498932,
-0.021572863683104515,
-0.018843285739421844,
-0.029621869325637817,
0.019594158977270126,
-0.01570761762559414,
-0.016206417232751846,
-0.0763445794582367,
0.06342290341854095,
-0.011942854151129723,
-0.029566042125225067,
0.05365315452218056,
0.040982987731695175,
0.011734136380255222,
0.05766582861542702,
-0.0006981507758609951,
-0.0029207190964370966,
-0.02971474826335907,
0.06331205368041992,
-0.03672145679593086,
-0.000685129314661026,
-0.022154349833726883,
-0.06278356909751892,
-0.028141900897026062,
-0.023552440106868744,
-0.04377496615052223,
-0.03164529427886009,
-0.05413337051868439,
0.02991841360926628,
-0.007213532458990812,
0.010929080657660961,
-0.005994033068418503,
0.05073321983218193,
-0.031214190647006035,
-0.026288192719221115,
-0.047078896313905716,
0.00041846802923828363,
-0.07525323331356049,
-0.033000435680150986,
0.029760142788290977,
-0.014140977524220943,
0.037820372730493546,
0.019701482728123665,
0.0043378607369959354,
0.0327814556658268,
0.010532447136938572,
-0.015514287166297436,
0.01544819213449955,
-0.01181765552610159,
-0.04054652526974678,
-0.037440769374370575,
0.00043368959450162947,
0.006417698692530394,
0.05423147976398468,
-0.02186576835811138,
0.020820070058107376,
0.019822901114821434,
-0.014599352143704891,
-0.032663051038980484,
-0.0010297601111233234,
0.036888107657432556,
-0.06078242510557175,
-0.032017726451158524,
-0.011670183390378952,
-0.033970728516578674,
0.028684284538030624,
-0.034402333199977875,
-0.06721863150596619,
0.044351570308208466,
0.02081441320478916,
0.044953711330890656,
-0.00670802453532815,
-0.027460787445306778,
0.03774282708764076,
-0.018077043816447258,
-0.008031326346099377,
-0.05144983157515526,
0.026684466749429703,
-0.02596084214746952,
0.016291750594973564,
-0.0394904650747776,
-0.0029720563907176256,
-0.055736541748046875,
0.05239598825573921,
-0.01962015964090824,
-0.011546025983989239,
0.0021635040175169706,
0.029916085302829742,
-0.030693920329213142,
0.04797334969043732,
-0.02241816371679306,
-0.001675984007306397,
-0.03868534788489342,
0.05328690633177757,
-0.07538299262523651,
0.007861574180424213,
-0.013456551358103752,
-0.01175873912870884,
-0.03495466709136963,
-0.0019695525988936424,
-0.009954100474715233,
-0.016125164926052094,
0.008277902379631996,
0.012100462801754475,
0.0384838841855526,
0.029707223176956177,
-0.02290702424943447,
0.008213465102016926,
0.032127030193805695,
-0.04895220324397087,
-0.005017844028770924,
-0.016732824966311455,
0.014899155125021935,
-0.01610146462917328,
0.04739701375365257,
0.018660860136151314,
-0.04263995215296745,
-0.04393178969621658,
0.045574575662612915,
0.03059360384941101,
0.004956591874361038,
0.006904916372150183,
0.01905757747590542,
0.06659725308418274,
0.00509299524128437,
-0.031165657564997673,
0.005967285484075546,
-0.006219098810106516,
-0.009154309518635273,
0.05035968869924545,
-0.003520287573337555,
0.021617630496621132,
-0.014612840488553047,
-0.009200227446854115,
-0.024264900013804436,
0.08009879291057587,
0.012806009501218796,
0.02445574477314949,
0.007539614103734493,
-0.05115623027086258,
0.02826767973601818,
0.027693914249539375,
-0.039231929928064346,
0.018374266102910042,
0.002544391667470336,
-0.023126346990466118,
0.04092317819595337,
-0.021630849689245224,
0.005626204423606396,
0.047969721257686615,
0.012488378211855888,
-0.03847402706742287,
0.04182813689112663,
-0.04203612729907036,
0.017070436850190163,
0.0547652505338192,
-0.05922321602702141,
-0.01363382302224636,
-0.03810062259435654,
0.06577423214912415,
-0.08865450322628021,
0.04850166663527489,
0.025513632223010063,
0.0021063899621367455,
0.008799615316092968,
-0.020041780546307564,
-0.04833836480975151,
0.02413247339427471,
-0.04272688180208206,
0.08184341341257095,
0.014910228550434113,
-0.04551384598016739,
0.06515321135520935,
0.027993639931082726,
-0.07513405382633209,
0.03569519892334938,
0.04328979179263115,
0.01248851977288723,
0.04745732247829437,
0.04738974943757057,
-0.04864562302827835,
0.022929491475224495,
-0.024606306105852127,
0.06476768851280212,
-0.05850948020815849,
-0.056768789887428284,
0.013099943287670612,
-0.046989962458610535,
-0.041732657700777054,
0.014713048934936523,
-0.0012641403591260314,
0.0024953598622232676,
0.01414832565933466,
-0.04015757888555527,
-0.06653940677642822,
0.03691763058304787,
0.02089299075305462,
-0.022568974643945694,
-0.0027270822320133448,
-0.03268065303564072,
0.037774380296468735,
0.013574755750596523,
0.009792408905923367,
-0.016984183341264725,
-0.006412108428776264,
0.028743892908096313,
-0.052098870277404785,
-0.026540271937847137,
0.052778977900743484,
-0.012035402469336987,
-0.04887377470731735,
0.022482870146632195,
-0.03553779795765877,
0.02365133911371231,
0.018108369782567024,
-0.01449673343449831,
0.024954795837402344,
-0.04934516176581383,
-0.0041954657062888145,
0.021991172805428505,
0.02139923721551895,
0.008522813208401203,
-0.023439407348632812,
0.05284033343195915,
0.043289996683597565,
0.030741089954972267,
0.014778386801481247,
-0.0394577756524086,
-0.008757717907428741,
0.01333744078874588,
-0.03670799359679222,
0.028427960351109505,
-0.012206841260194778,
-0.07332630455493927,
-0.02105690911412239,
-0.03676552698016167,
-0.013395367190241814,
0.03827005252242088,
-0.03628833219408989,
-0.011608641594648361,
0.028376378118991852,
-0.01923796534538269,
-0.018693238496780396,
-0.09559973329305649,
-0.02413361519575119,
-0.06389212608337402,
0.025073811411857605,
0.012799582444131374,
-0.058473579585552216,
0.03378347307443619,
-0.05174371227622032,
-0.06331471353769302,
0.023620983585715294,
0.043173398822546005,
-0.0671699047088623,
0.042429812252521515,
0.04955931007862091,
-0.030773302540183067,
0.023278146982192993,
0.014769877307116985,
-0.04466865584254265,
0.02887268364429474,
-0.0014968307223170996,
0.0299292653799057,
0.01081310398876667,
0.029564054682850838,
-0.010748650878667831,
-0.019741391763091087,
-0.06865690648555756,
-0.032762885093688965,
-0.03098299168050289,
-0.0007434304570779204,
0.07176586240530014
] |
Dawn576/Dawn | [] | null | {
"architectures": null,
"model_type": null,
"task_specific_params": {
"conversational": {
"max_length": null
},
"summarization": {
"early_stopping": null,
"length_penalty": null,
"max_length": null,
"min_length": null,
"no_repeat_ngram_size": null,
"num_beams": null,
"prefix": null
},
"text-generation": {
"do_sample": null,
"max_length": null
},
"translation_en_to_de": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_fr": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
},
"translation_en_to_ro": {
"early_stopping": null,
"max_length": null,
"num_beams": null,
"prefix": null
}
}
} | 0 | null | ---
tags:
- conversational
---
13th doctor model DialoGPT-small | [
-0.03258353844285011,
0.030110061168670654,
0.029973207041621208,
0.024249929934740067,
0.00814923644065857,
0.004186143632978201,
-0.02073686569929123,
0.00513862632215023,
0.0038127710577100515,
0.019797956570982933,
0.03110768273472786,
-0.02592894807457924,
0.009971962310373783,
0.04416700825095177,
-0.03335973247885704,
-0.020118871703743935,
-0.03764045611023903,
0.004416369833052158,
-0.03852549195289612,
-0.006684579886496067,
0.04989037662744522,
-0.003432339057326317,
-0.025226030498743057,
0.041255008429288864,
0.017774930223822594,
0.01440469454973936,
-0.01697559654712677,
0.008496448397636414,
0.03521401435136795,
-0.027158701792359352,
0.02784760855138302,
-0.057227492332458496,
-0.03143518045544624,
-0.051513779908418655,
-0.03662244975566864,
-0.03812556341290474,
0.008839970454573631,
0.007548621855676174,
0.000079227531387005,
0.03755198046565056,
-0.005972360260784626,
-0.0030488595366477966,
0.005795690231025219,
-0.03619292750954628,
0.05940968543291092,
-0.0014546865131706,
-0.03795972093939781,
-0.023718444630503654,
0.012885712087154388,
-0.03412055969238281,
-0.05106905475258827,
-0.06862068921327591,
-0.041317250579595566,
-0.0065839411690831184,
0.016856487840414047,
-0.03718603402376175,
-0.05561653524637222,
-0.006755245849490166,
0.08401554822921753,
-0.01217073854058981,
-0.0054635461419820786,
-0.00288691115565598,
-0.07527244836091995,
0.012720786035060883,
0.016591526567935944,
-0.06361424922943115,
0.030292151495814323,
-0.05025005713105202,
0.024950286373496056,
-0.039685361087322235,
0.061424579471349716,
-0.047861915081739426,
0.0038762257900089025,
-0.062232855707407,
-0.00790406670421362,
0.0013352460227906704,
0.052797794342041016,
0.055956870317459106,
-0.039092037826776505,
0.045379508286714554,
0.036724530160427094,
0.00019847579824272543,
0.06311887502670288,
-0.023457348346710205,
-0.03398321941494942,
0.03333137184381485,
-0.05106785520911217,
-0.0025476207956671715,
-0.008389984257519245,
0.046368423849344254,
-0.015109078958630562,
-0.054687485098838806,
-0.04274372011423111,
-0.014360847882926464,
-0.011149260215461254,
0.04054628312587738,
0.02919914945960045,
-0.03276355192065239,
0.022690100595355034,
0.04582326486706734,
0.026697617024183273,
0.03949853777885437,
-0.02200894244015217,
0.05017637833952904,
-0.012284494005143642,
0.01303032599389553,
0.033037278801202774,
-0.011178512126207352,
-0.024627214297652245,
0.024354135617613792,
0.0020973796490579844,
-0.039105530828237534,
-0.03949121758341789,
0.031259678304195404,
0.046539269387722015,
0.016142265871167183,
0.09520379453897476,
-0.03240632265806198,
-0.033895332366228104,
-0.06632009893655777,
0.04078390821814537,
-0.018923941999673843,
-0.024909615516662598,
-0.009295751340687275,
-0.03363257274031639,
0.005852180533111095,
-0.033836688846349716,
-0.0062787579372525215,
-0.0036201414186507463,
-0.0014058786910027266,
0.0065352050587534904,
0.021989855915308,
-0.04020964726805687,
-0.0723935216665268,
-0.008175290189683437,
0.03973318636417389,
-0.054586686193943024,
-0.0031490048859268427,
0.03757453337311745,
0.10076353698968887,
-0.05922437086701393,
-0.038836464285850525,
-0.01916651241481304,
0.01825411431491375,
-0.0390961691737175,
-0.0034345593303442,
0.006291806232184172,
-0.022150181233882904,
-0.05240093544125557,
0.0008945094887167215,
0.003325225319713354,
-0.0412590429186821,
-0.005884591490030289,
0.0576288066804409,
0.03131164237856865,
0.02079644612967968,
-0.04257389158010483,
0.030032064765691757,
-0.00859607383608818,
-0.027555007487535477,
-0.03679428622126579,
0.06535667181015015,
-0.026926854625344276,
-0.02580755017697811,
-0.031449317932128906,
-0.03419748321175575,
0.004251305945217609,
0.07769288122653961,
0.02197975665330887,
-0.02295522391796112,
-0.0217514019459486,
0.041060760617256165,
0.036053817719221115,
0.026572544127702713,
-0.020405450835824013,
0.035604704171419144,
0.04254115745425224,
0.01642751879990101,
-0.025226054713129997,
0.05258944630622864,
0.006089379545301199,
-0.04524524137377739,
-0.037425123155117035,
-0.01256211195141077,
0.03609887883067131,
-0.01659509353339672,
0.013817342929542065,
0.029008951038122177,
-0.02966758795082569,
-0.04544344171881676,
0.016979869455099106,
0.06674990057945251,
-0.022357797250151634,
-0.01661965623497963,
-0.0014147213660180569,
-0.03247692808508873,
-0.022382646799087524,
0.019005917012691498,
-0.04108664393424988,
0.007475352846086025,
-0.03396466374397278,
-0.004754015244543552,
0.04363236576318741,
-0.0005471651675179601,
0.0035541458055377007,
0.03906012699007988,
-0.014028163626790047,
0.06073269248008728,
-0.053313031792640686,
0.019586332142353058,
-0.02278692089021206,
-0.01114659383893013,
-0.023962216451764107,
0.03438584506511688,
0.006473599001765251,
0.04450950399041176,
-0.03682468831539154,
-0.06692182272672653,
0.009034681133925915,
0.05138418450951576,
0.039346855133771896,
0.031148653477430344,
-0.03276708349585533,
-0.02557733841240406,
0.036668527871370316,
0.028512125834822655,
-0.039752211421728134,
0.011383156292140484,
0.014286456629633904,
0.012179152108728886,
-0.009045644663274288,
-0.01453798171132803,
-0.04774097353219986,
-0.00258078146725893,
-0.04885716363787651,
-0.06656622886657715,
0.03636129945516586,
0.015350736677646637,
-0.010660690255463123,
0.041673433035612106,
-0.009610189124941826,
0.011531458236277103,
0.04561963304877281,
0.026415709406137466,
0.004472583997994661,
-0.07904104888439178,
0.011800753884017467,
0.005484384950250387,
0.07250586897134781,
-0.049792151898145676,
0.017983924597501755,
-0.0022414757404476404,
0.016766399145126343,
0.03719925507903099,
-0.03535405173897743,
0.03718521445989609,
0.04697322100400925,
0.0752282440662384,
-0.022257309406995773,
0.04258124157786369,
0.005646882113069296,
0.029476279392838478,
0.06836267560720444,
0.004542353097349405,
0.04738913103938103,
-0.014854224398732185,
0.017751336097717285,
0.05680009350180626,
0.0051615433767437935,
-0.007179196923971176,
0.019309289753437042,
0.06633192300796509,
-0.000541876710485667,
0.0202946737408638,
0.0457514151930809,
-0.005971693899482489,
0.024942519143223763,
-0.06265982985496521,
-0.005819866433739662,
-0.005572822876274586,
-0.009350094944238663,
0.04911182448267937,
0.0011419220827519894,
-0.009632526896893978,
0.018947536125779152,
-0.024870166555047035,
0.005566115491092205,
0.033838335424661636,
0.00953861977905035,
-0.015386161394417286,
0.013002672232687473,
-0.030749017372727394,
0.031189851462841034,
-0.04248756542801857,
-0.04129425063729286,
-0.012549055740237236,
-0.053017787635326385,
-0.013990466482937336,
-0.09938174486160278,
-0.03692932054400444,
-0.0900864452123642,
-0.018872326239943504,
0.03389851748943329,
0.01130142156034708,
0.009285452775657177,
-0.009655429981648922,
0.018717700615525246,
-0.03490385785698891,
-0.05337754264473915,
-0.0642031654715538,
-0.019421717151999474,
-0.032073311507701874,
-0.03460494428873062,
0.024431508034467697,
0.06332757323980331,
0.04711756482720375,
0.0037275804206728935,
-0.020493563264608383,
-0.056816425174474716,
-0.022098947316408157,
0.03950396180152893,
0.0006100275204516947,
-0.0598280131816864,
-0.024304702877998352,
-0.006138084921985865,
0.010533512569963932,
-0.016927704215049744,
-0.019424639642238617,
-0.045526210218667984,
0.06757869571447372,
0.049196772277355194,
0.0025380731094628572,
0.015188065357506275,
-0.01081525906920433,
-0.047852251678705215,
-0.017857830971479416,
-0.04596732184290886,
-0.018189309164881706,
-0.010819734074175358,
-0.010583101771771908,
-0.042382046580314636,
-0.022487930953502655,
-0.05339325964450836,
-0.013948303647339344,
0.013190681114792824,
0.00545499986037612,
0.007264495827257633,
0.03958424925804138,
0.04712582007050514,
0.018199536949396133,
-0.024006297811865807,
-0.019077586010098457,
0.04908180981874466,
-0.0038134416099637747,
-0.012855417095124722,
-0.0712764784693718,
-0.03487292304635048,
0.023221954703330994,
0.013550951145589352,
0.00563312042504549,
-0.035080619156360626,
0.02295500971376896,
0.03699781373143196,
0.0002821044472511858,
0.030814511701464653,
-0.05170169472694397,
0.021219251677393913,
-0.016727054491639137,
-0.014484353363513947,
-0.025376051664352417,
-0.022778060287237167,
0.007951369509100914,
-0.006452452391386032,
0.026044294238090515,
-0.07725463062524796,
-0.013007976114749908,
-0.030412498861551285,
-0.0023002263624221087,
0.04073820263147354,
0.021693939343094826,
-0.07139010727405548,
-0.0041961669921875,
-0.0510544590651989,
-0.010607857257127762,
-0.006271077319979668,
-0.012972278520464897,
0.018705930560827255,
0.04380185902118683,
0.004333841148763895,
-0.01937771402299404,
0.049431003630161285,
0.015018223784863949,
0.04652007296681404,
0.05581536144018173,
-0.022460466250777245,
0.027572231367230415,
-0.01948307454586029,
0.045741450041532516,
-0.009589106775820255,
-0.023357359692454338,
-0.06333976984024048,
-0.08511005342006683,
-0.03441951796412468,
0.033815979957580566,
-0.0374290756881237,
0.034186266362667084,
0.04247497767210007,
-0.0636085569858551,
-0.009824235923588276,
-0.010231287218630314,
0.04150831699371338,
0.0452238991856575,
-0.036245908588171005,
0.06083528324961662,
-0.002986910520121455,
0.022516749799251556,
-0.04979580268263817,
-0.014195870608091354,
-0.04704871028661728,
-0.025456449016928673,
-0.00948395486921072,
0.07277224212884903,
0.0029979750979691744,
0.05789291858673096,
0.05865313485264778,
0.01825125887989998,
-0.0403415746986866,
0.04052489623427391,
0.07521063089370728,
-0.005854001734405756,
-0.03837394714355469,
0.018336448818445206,
-0.023102058097720146,
-0.013538296334445477,
0.003110505873337388,
-0.03295092657208443,
0.027009807527065277,
0.04032421484589577,
-0.0030910740606486797,
0.011548279784619808,
0.006238791160285473,
-0.02151576615869999,
-0.01042845193296671,
-0.0677068680524826,
-0.0041867936961352825,
0.009180604480206966,
-0.011003408581018448,
0.048825040459632874,
0.020370781421661377,
0.000304479559417814,
0.07951242476701736,
0.01246438454836607,
-0.047383274883031845,
-0.03605233132839203,
0.027186838909983635,
0.02340967394411564,
-0.036968767642974854,
-0.06596297770738602,
-0.0508616641163826,
0.031575266271829605,
0.02950417622923851,
-0.012861350551247597,
-0.09026719629764557,
0.012215402908623219,
0.03291241452097893,
-0.04121280089020729,
0.054677825421094894,
-0.003022619057446718,
0.04991166293621063,
0.055320803076028824,
0.010231835767626762,
0.029665086418390274,
-0.05675600469112396,
0.024734264239668846,
-0.008795037865638733,
0.059792954474687576,
-0.05545492097735405,
-0.05673734098672867,
-0.038603752851486206,
0.05282188951969147,
0.00965223740786314,
0.02384008839726448,
0.026987088844180107,
-0.04867890849709511,
-0.05622044950723648,
-0.009721835143864155,
0.03278622776269913,
-0.029216261580586433,
0.016820969060063362,
0.03017946146428585,
0.06472888588905334,
-0.06000849977135658,
0.004976659547537565,
0.014829475432634354,
-0.004234975203871727,
0.013503806665539742,
-0.04300355166196823,
-0.049984049052000046,
-0.01822712831199169,
0.026166578754782677,
-0.027479097247123718,
-0.012527073733508587,
-0.09001235663890839,
0.025725768879055977,
-0.03536162152886391,
-0.021765243262052536,
0.06953462213277817,
0.05410832166671753,
0.04693922400474548,
0.05748558044433594,
0.0065020048059523106,
0.04146776720881462,
-0.026944391429424286,
0.021865149959921837,
-0.04156037047505379,
-0.026420537382364273,
0.0025446834042668343,
-0.07872354239225388,
-0.03960177302360535,
-0.030889229848980904,
-0.033970028162002563,
-0.03366547450423241,
0.0064241355285048485,
-0.0023819822818040848,
-0.0019157739588990808,
0.00361275183968246,
0.02027447521686554,
0.00025218812515959144,
-0.00116382644046098,
-0.009752650745213032,
0.009472819045186043,
-0.021221565082669258,
-0.08051187545061111,
-0.058365847915410995,
0.024718597531318665,
-0.02248058281838894,
0.004330010153353214,
0.004468671046197414,
0.01648005098104477,
0.041876211762428284,
-0.006529266946017742,
-0.026693163439631462,
0.025676673278212547,
0.04191208630800247,
-0.025701966136693954,
-0.0077767325565218925,
0.02346198260784149,
0.006464963313192129,
0.01025493536144495,
-0.03821472451090813,
0.029679961502552032,
0.006382133811712265,
-0.0381205789744854,
-0.021938441321253777,
0.01893567107617855,
0.020766181871294975,
-0.07126663625240326,
0.004581432789564133,
-0.014375084079802036,
-0.04234200343489647,
0.015524586662650108,
-0.04052332788705826,
-0.030621733516454697,
-0.018845224753022194,
0.030934954062104225,
0.006458785384893417,
-0.007796263322234154,
-0.02729770354926586,
0.01644241251051426,
-0.023845352232456207,
-0.002219563815742731,
-0.08604785799980164,
-0.0065463148057460785,
-0.026363272219896317,
0.02488192357122898,
-0.021793633699417114,
0.02981030009686947,
-0.03291059285402298,
0.03825737163424492,
-0.03267405927181244,
-0.007187936455011368,
0.019431257620453835,
0.004998024553060532,
-0.003853068221360445,
0.03494465723633766,
0.01244630478322506,
0.00791802629828453,
-0.022429995238780975,
0.05752725899219513,
-0.05022985488176346,
0.008914452977478504,
-0.001562541234306991,
-0.029558319598436356,
-0.012803811579942703,
0.003969884943217039,
-0.010864493437111378,
-0.05954114720225334,
0.03772731497883797,
0.03601640835404396,
0.013199363835155964,
0.04753314331173897,
-0.006175997667014599,
0.013562126085162163,
0.04002071171998978,
-0.06520508229732513,
-0.04477822035551071,
0.004913718905299902,
-0.009291975758969784,
0.02557743713259697,
0.05239515379071236,
0.016689613461494446,
-0.04956536367535591,
-0.03028528392314911,
0.021348150447010994,
0.027097154408693314,
0.007300728932023048,
-0.0024418351240456104,
0.05172869190573692,
0.05626414343714714,
0.048870690166950226,
-0.016188401728868484,
-0.003737253835424781,
0.04461957514286041,
-0.006877451203763485,
-0.02481062524020672,
-0.008727285079658031,
0.02147839218378067,
-0.001807910273782909,
-0.024714553728699684,
-0.012764097191393375,
0.06637228280305862,
-0.019845539703965187,
0.0004724741156678647,
-0.01580948568880558,
-0.04334678128361702,
0.0754784643650055,
-0.016711778938770294,
-0.0426207073032856,
0.018333053216338158,
0.048655588179826736,
-0.02126895636320114,
0.03563220426440239,
-0.01521076075732708,
-0.0021004839800298214,
0.06522002071142197,
0.04241874814033508,
-0.012940241023898125,
0.010979843325912952,
-0.0300896093249321,
0.014932346530258656,
0.018348615616559982,
-0.052883487194776535,
-0.014442522078752518,
-0.059710729867219925,
0.0675681084394455,
-0.03598544001579285,
0.05039956793189049,
0.03764761984348297,
0.027111215516924858,
0.03659140318632126,
-0.05191592499613762,
-0.038095880299806595,
-0.011820352636277676,
-0.02209002524614334,
0.08954489231109619,
0.011096508242189884,
-0.051120325922966,
0.06511006504297256,
0.014244015328586102,
-0.0949898213148117,
0.039874155074357986,
0.021992342546582222,
0.0455603301525116,
0.020974870771169662,
0.05237627401947975,
-0.027698613703250885,
0.024185506626963615,
-0.03780190274119377,
0.010415995493531227,
-0.036331210285425186,
-0.0029678160790354013,
-0.017775647342205048,
-0.03640720620751381,
-0.0030227394308894873,
0.020535435527563095,
-0.030366510152816772,
0.012302129529416561,
0.04019849747419357,
0.00662627350538969,
-0.06048312038183212,
-0.0019207061268389225,
0.03092925250530243,
-0.010157830081880093,
-0.014001606032252312,
-0.017811059951782227,
0.009897495619952679,
0.03898104652762413,
-0.023962991312146187,
-0.06754396110773087,
0.012701704166829586,
0.011559419333934784,
-0.05873997136950493,
-0.054131489247083664,
0.07204106450080872,
0.01848825067281723,
-0.0006663506501354277,
-0.006266255397349596,
0.03242341801524162,
0.01958719827234745,
0.04421672597527504,
-0.009711679071187973,
0.005134920589625835,
-0.09851796180009842,
-0.004787749145179987,
0.018992440775036812,
0.02947082184255123,
0.021709918975830078,
-0.019096987321972847,
0.03350088372826576,
0.0821746289730072,
0.05414392799139023,
-0.0005264976061880589,
-0.035260990262031555,
-0.02454547956585884,
0.001881350646726787,
-0.06644858419895172,
0.03536629304289818,
0.0021023766603320837,
-0.05847304314374924,
-0.037711456418037415,
-0.016345689073204994,
-0.013932875357568264,
0.01917794905602932,
-0.05635036900639534,
0.028482791036367416,
0.035735081881284714,
0.022319253534078598,
-0.034412626177072525,
-0.11486932635307312,
-0.055507928133010864,
0.008992161601781845,
0.026544105261564255,
0.024437015876173973,
-0.05528532341122627,
0.0247164536267519,
-0.015718352049589157,
0.006193992681801319,
0.05191751569509506,
0.0028331864159554243,
-0.012462718412280083,
0.05498668923974037,
0.060318149626255035,
-0.051170043647289276,
0.04948928952217102,
0.01747995801270008,
-0.046187471598386765,
0.0687558650970459,
0.002293420722708106,
0.03662300482392311,
0.00801886711269617,
0.046228982508182526,
-0.024773498997092247,
0.003934326581656933,
0.00004092041854164563,
-0.03982291370630264,
0.014477679505944252,
0.0021579230669885874,
0.06693217158317566
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.